From 7abc288dbda1f222eee0bca128ea4643a2378bd5 Mon Sep 17 00:00:00 2001 From: suil Date: Fri, 12 Jan 2018 12:43:48 +0000 Subject: [PATCH] fix constraints to request --- dist/PEP.js | 8 +- dist/ReThinkCtx.js | 8 +- dist/Runtime.js | 230 +------------------------------ dist/Runtime.light.js | 270 +++++++++++++++++++++++++++++++++++++ dist/Runtime.min.js | 6 +- dist/minibus.js | 8 +- dist/sandbox.js | 8 +- package.json | 2 +- src/runtime/Descriptors.js | 5 +- 9 files changed, 300 insertions(+), 245 deletions(-) diff --git a/dist/PEP.js b/dist/PEP.js index 03a7c8ec..0eadd1a7 100644 --- a/dist/PEP.js +++ b/dist/PEP.js @@ -1,5 +1,5 @@ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA @@ -25,8 +25,8 @@ **/ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA diff --git a/dist/ReThinkCtx.js b/dist/ReThinkCtx.js index 24dbb6b6..1de0b798 100644 --- a/dist/ReThinkCtx.js +++ b/dist/ReThinkCtx.js @@ -1,5 +1,5 @@ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA @@ -25,8 +25,8 @@ **/ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA diff --git a/dist/Runtime.js b/dist/Runtime.js index 8e217a42..4db981a9 100644 --- a/dist/Runtime.js +++ b/dist/Runtime.js @@ -1,5 +1,5 @@ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA @@ -25,8 +25,8 @@ **/ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA @@ -52,8 +52,8 @@ **/ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:48:46 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:41:34 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA @@ -79,220 +79,4 @@ **/ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:48:47 GMT+0000 (WET) -// licence: -/** -* Copyright 2016 PT Inovação e Sistemas SA -* Copyright 2016 INESC-ID -* Copyright 2016 QUOBIS NETWORKS SL -* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V -* Copyright 2016 ORANGE SA -* Copyright 2016 Deutsche Telekom AG -* Copyright 2016 Apizee -* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -**/ - - -// version: 0.11.0 -// date: Wed Jan 10 2018 16:31:02 GMT+0000 (WET) -// licence: -/** -* Copyright 2016 PT Inovação e Sistemas SA -* Copyright 2016 INESC-ID -* Copyright 2016 QUOBIS NETWORKS SL -* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V -* Copyright 2016 ORANGE SA -* Copyright 2016 Deutsche Telekom AG -* Copyright 2016 Apizee -* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -**/ - - -// version: 0.11.0 -// date: Wed Jan 10 2018 16:31:02 GMT+0000 (WET) -// licence: -/** -* Copyright 2016 PT Inovação e Sistemas SA -* Copyright 2016 INESC-ID -* Copyright 2016 QUOBIS NETWORKS SL -* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V -* Copyright 2016 ORANGE SA -* Copyright 2016 Deutsche Telekom AG -* Copyright 2016 Apizee -* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -**/ - - -// version: 0.11.0 -// date: Wed Jan 10 2018 15:19:01 GMT+0000 (WET) -// licence: -/** -* Copyright 2016 PT Inovação e Sistemas SA -* Copyright 2016 INESC-ID -* Copyright 2016 QUOBIS NETWORKS SL -* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V -* Copyright 2016 ORANGE SA -* Copyright 2016 Deutsche Telekom AG -* Copyright 2016 Apizee -* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -**/ - - -// version: 0.11.0 -// date: Wed Jan 10 2018 15:19:01 GMT+0000 (WET) -// licence: -/** -* Copyright 2016 PT Inovação e Sistemas SA -* Copyright 2016 INESC-ID -* Copyright 2016 QUOBIS NETWORKS SL -* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V -* Copyright 2016 ORANGE SA -* Copyright 2016 Deutsche Telekom AG -* Copyright 2016 Apizee -* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -**/ - - -// version: 0.11.0 -// date: Wed Jan 10 2018 15:13:30 GMT+0000 (WET) -// licence: -/** -* Copyright 2016 PT Inovação e Sistemas SA -* Copyright 2016 INESC-ID -* Copyright 2016 QUOBIS NETWORKS SL -* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V -* Copyright 2016 ORANGE SA -* Copyright 2016 Deutsche Telekom AG -* Copyright 2016 Apizee -* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -**/ - - -// version: 0.11.0 -// date: Wed Jan 10 2018 15:13:31 GMT+0000 (WET) -// licence: -/** -* Copyright 2016 PT Inovação e Sistemas SA -* Copyright 2016 INESC-ID -* Copyright 2016 QUOBIS NETWORKS SL -* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V -* Copyright 2016 ORANGE SA -* Copyright 2016 Deutsche Telekom AG -* Copyright 2016 Apizee -* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -**/ - - -// version: 0.11.0 -// date: Wed Jan 10 2018 09:10:09 GMT+0000 (WET) -// licence: -/** -* Copyright 2016 PT Inovação e Sistemas SA -* Copyright 2016 INESC-ID -* Copyright 2016 QUOBIS NETWORKS SL -* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V -* Copyright 2016 ORANGE SA -* Copyright 2016 Deutsche Telekom AG -* Copyright 2016 Apizee -* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -**/ - - -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("Runtime",[],n):"object"==typeof exports?exports.Runtime=n():e.Runtime=n()}("undefined"!=typeof self?self:this,function(){return function(e){var n={};function t(c){if(n[c])return n[c].exports;var g=n[c]={i:c,l:!1,exports:{}};return e[c].call(g.exports,g,g.exports,t),g.l=!0,g.exports}return t.m=e,t.c=n,t.d=function(e,n,c){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:c})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=212)}([function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar core = __webpack_require__(30);\nvar hide = __webpack_require__(18);\nvar redefine = __webpack_require__(19);\nvar ctx = __webpack_require__(27);\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2V4cG9ydC5qcz8wZWNlIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBjb3JlID0gcmVxdWlyZSgnLi9fY29yZScpO1xudmFyIGhpZGUgPSByZXF1aXJlKCcuL19oaWRlJyk7XG52YXIgcmVkZWZpbmUgPSByZXF1aXJlKCcuL19yZWRlZmluZScpO1xudmFyIGN0eCA9IHJlcXVpcmUoJy4vX2N0eCcpO1xudmFyIFBST1RPVFlQRSA9ICdwcm90b3R5cGUnO1xuXG52YXIgJGV4cG9ydCA9IGZ1bmN0aW9uICh0eXBlLCBuYW1lLCBzb3VyY2UpIHtcbiAgdmFyIElTX0ZPUkNFRCA9IHR5cGUgJiAkZXhwb3J0LkY7XG4gIHZhciBJU19HTE9CQUwgPSB0eXBlICYgJGV4cG9ydC5HO1xuICB2YXIgSVNfU1RBVElDID0gdHlwZSAmICRleHBvcnQuUztcbiAgdmFyIElTX1BST1RPID0gdHlwZSAmICRleHBvcnQuUDtcbiAgdmFyIElTX0JJTkQgPSB0eXBlICYgJGV4cG9ydC5CO1xuICB2YXIgdGFyZ2V0ID0gSVNfR0xPQkFMID8gZ2xvYmFsIDogSVNfU1RBVElDID8gZ2xvYmFsW25hbWVdIHx8IChnbG9iYWxbbmFtZV0g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gfVxufTtcbmdsb2JhbC5jb3JlID0gY29yZTtcbi8vIHR5cGUgYml0bWFwXG4kZXhwb3J0LkYgPSAxOyAgIC8vIGZvcmNlZFxuJGV4cG9ydC5HID0gMjsgICAvLyBnbG9iYWxcbiRleHBvcnQuUyA9IDQ7ICAgLy8gc3RhdGljXG4kZXhwb3J0LlAgPSA4OyAgIC8vIHByb3RvXG4kZXhwb3J0LkIgPSAxNjsgIC8vIGJpbmRcbiRleHBvcnQuVyA9IDMyOyAgLy8gd3JhcFxuJGV4cG9ydC5VID0gNjQ7ICAvLyBzYWZlXG4kZXhwb3J0LlIgPSAxMjg7IC8vIHJlYWwgcHJvdG8gbWV0aG9kIGZvciBgbGlicmFyeWBcbm1vZHVsZS5leHBvcnRzID0gJGV4cG9ydDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZXhwb3J0LmpzXG4vLyBtb2R1bGUgaWQgPSAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2hlbHBlcnMvY2xhc3NDYWxsQ2hlY2suanM/NjZiOSJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuZXhwb3J0cy5fX2VzTW9kdWxlID0gdHJ1ZTtcblxuZXhwb3J0cy5kZWZhdWx0ID0gZnVuY3Rpb24gKGluc3RhbmNlLCBDb25zdHJ1Y3Rvcikge1xuICBpZiAoIShpbnN0YW5jZSBpbnN0YW5jZW9mIENvbnN0cnVjdG9yKSkge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb25cIik7XG4gIH1cbn07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2NsYXNzQ2FsbENoZWNrLmpzXG4vLyBtb2R1bGUgaWQgPSAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1\n')},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _defineProperty = __webpack_require__(200);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2hlbHBlcnMvY3JlYXRlQ2xhc3MuanM/YzMxMCJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuZXhwb3J0cy5fX2VzTW9kdWxlID0gdHJ1ZTtcblxudmFyIF9kZWZpbmVQcm9wZXJ0eSA9IHJlcXVpcmUoXCIuLi9jb3JlLWpzL29iamVjdC9kZWZpbmUtcHJvcGVydHlcIik7XG5cbnZhciBfZGVmaW5lUHJvcGVydHkyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfZGVmaW5lUHJvcGVydHkpO1xuXG5mdW5jdGlvbiBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KG9iaikgeyByZXR1cm4gb2JqICYmIG9iai5fX2VzTW9kdWxlID8gb2JqIDogeyBkZWZhdWx0OiBvYmogfTsgfVxuXG5leHBvcnRzLmRlZmF1bHQgPSBmdW5jdGlvbiAoKSB7XG4gIGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXModGFyZ2V0LCBwcm9wcykge1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcHJvcHMubGVuZ3RoOyBpKyspIHtcbiAgICAgIHZhciBkZXNjcmlwdG9yID0gcHJvcHNbaV07XG4gICAgICBkZXNjcmlwdG9yLmVudW1lcmFibGUgPSBkZXNjcmlwdG9yLmVudW1lcmFibGUgfHwgZmFsc2U7XG4gICAgICBkZXNjcmlwdG9yLmNvbmZpZ3VyYWJsZSA9IHRydWU7XG4gICAgICBpZiAoXCJ2YWx1ZVwiIGluIGRlc2NyaXB0b3IpIGRlc2NyaXB0b3Iud3JpdGFibGUgPSB0cnVlO1xuICAgICAgKDAsIF9kZWZpbmVQcm9wZXJ0eTIuZGVmYXVsdCkodGFyZ2V0LCBkZXNjcmlwdG9yLmtleSwgZGVzY3JpcHRvcik7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGZ1bmN0aW9uIChDb25zdHJ1Y3RvciwgcHJvdG9Qcm9wcywgc3RhdGljUHJvcHMpIHtcbiAgICBpZiAocHJvdG9Qcm9wcykgZGVmaW5lUHJvcGVydGllcyhDb25zdHJ1Y3Rvci5wcm90b3R5cGUsIHByb3RvUHJvcHMpO1xuICAgIGlmIChzdGF0aWNQcm9wcykgZGVmaW5lUHJvcGVydGllcyhDb25zdHJ1Y3Rvciwgc3RhdGljUHJvcHMpO1xuICAgIHJldHVybiBDb25zdHJ1Y3RvcjtcbiAgfTtcbn0oKTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2hlbHBlcnMvY3JlYXRlQ2xhc3MuanNcbi8vIG1vZHVsZSBpZCA9IDJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///2\n')},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(6);\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2FuLW9iamVjdC5qcz8wYzg1Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKCFpc09iamVjdChpdCkpIHRocm93IFR5cGVFcnJvcihpdCArICcgaXMgbm90IGFuIG9iamVjdCEnKTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYW4tb2JqZWN0LmpzXG4vLyBtb2R1bGUgaWQgPSAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///3\n")},function(module,exports){eval("// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2dsb2JhbC5qcz8zYjMyIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS96bG9pcm9jay9jb3JlLWpzL2lzc3Vlcy84NiNpc3N1ZWNvbW1lbnQtMTE1NzU5MDI4XG52YXIgZ2xvYmFsID0gbW9kdWxlLmV4cG9ydHMgPSB0eXBlb2Ygd2luZG93ICE9ICd1bmRlZmluZWQnICYmIHdpbmRvdy5NYXRoID09IE1hdGhcbiAgPyB3aW5kb3cgOiB0eXBlb2Ygc2VsZiAhPSAndW5kZWZpbmVkJyAmJiBzZWxmLk1hdGggPT0gTWF0aCA/IHNlbGZcbiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLW5ldy1mdW5jXG4gIDogRnVuY3Rpb24oJ3JldHVybiB0aGlzJykoKTtcbmlmICh0eXBlb2YgX19nID09ICdudW1iZXInKSBfX2cgPSBnbG9iYWw7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tdW5kZWZcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZ2xvYmFsLmpzXG4vLyBtb2R1bGUgaWQgPSA0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///4\n")},function(module,exports){eval("module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2ZhaWxzLmpzP2NlMDIiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoZXhlYykge1xuICB0cnkge1xuICAgIHJldHVybiAhIWV4ZWMoKTtcbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiB0cnVlO1xuICB9XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19mYWlscy5qc1xuLy8gbW9kdWxlIGlkID0gNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///5\n")},function(module,exports){eval("module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2lzLW9iamVjdC5qcz81MGEzIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiB0eXBlb2YgaXQgPT09ICdvYmplY3QnID8gaXQgIT09IG51bGwgOiB0eXBlb2YgaXQgPT09ICdmdW5jdGlvbic7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1vYmplY3QuanNcbi8vIG1vZHVsZSBpZCA9IDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///6\n")},function(module,exports,__webpack_require__){eval('var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n "use strict";\n if (true) {\n !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === \'function\' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if (typeof module === \'object\' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n "use strict";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = "undefined";\n\n var logMethods = [\n "trace",\n "debug",\n "info",\n "warn",\n "error"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === \'function\') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === \'debug\') {\n methodName = \'log\';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, \'log\');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn\'t present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n var storageKey = "loglevel";\n if (name) {\n storageKey += ":" + name;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || \'silent\').toUpperCase();\n\n if (typeof window === undefinedType) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + "=" + levelName + ";";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + "=");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,\n "ERROR": 4, "SILENT": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return "No console available for logging";\n }\n } else {\n throw "log.setLevel() called with invalid level: " + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel == null ? "WARN" : defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if (typeof name !== "string" || name === "") {\n throw new TypeError("You must supply a name when creating a logger.");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n return defaultLogger;\n}));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9sb2dsZXZlbC9saWIvbG9nbGV2ZWwuanM/MDZmYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuKiBsb2dsZXZlbCAtIGh0dHBzOi8vZ2l0aHViLmNvbS9waW10ZXJyeS9sb2dsZXZlbFxuKlxuKiBDb3B5cmlnaHQgKGMpIDIwMTMgVGltIFBlcnJ5XG4qIExpY2Vuc2VkIHVuZGVyIHRoZSBNSVQgbGljZW5zZS5cbiovXG4oZnVuY3Rpb24gKHJvb3QsIGRlZmluaXRpb24pIHtcbiAgICBcInVzZSBzdHJpY3RcIjtcbiAgICBpZiAodHlwZW9mIGRlZmluZSA9PT0gJ2Z1bmN0aW9uJyAmJiBkZWZpbmUuYW1kKSB7XG4gICAgICAgIGRlZmluZShkZWZpbml0aW9uKTtcbiAgICB9IGVsc2UgaWYgKHR5cGVvZiBtb2R1bGUgPT09ICdvYmplY3QnICYmIG1vZHVsZS5leHBvcnRzKSB7XG4gICAgICAgIG1vZHVsZS5leHBvcnRzID0gZGVmaW5pdGlvbigpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJvb3QubG9nID0gZGVmaW5pdGlvbigpO1xuICAgIH1cbn0odGhpcywgZnVuY3Rpb24gKCkge1xuICAgIFwidXNlIHN0cmljdFwiO1xuXG4gICAgLy8gU2xpZ2h0bHkgZHViaW91cyB0cmlja3MgdG8gY3V0IGRvd24gbWluaW1pemVkIGZpbGUgc2l6ZVxuICAgIHZhciBub29wID0gZnVuY3Rpb24oKSB7fTtcbiAgICB2YXIgdW5kZWZpbmVkVHlwZSA9IFwidW5kZWZpbmVkXCI7XG5cbiAgICB2YXIgbG9nTWV0aG9kcyA9IFtcbiAgICAgICAgXCJ0cmFjZVwiLFxuICAgICAgICBcImRlYnVnXCIsXG4gICAgICAgIFwiaW5mb1wiLFxuICAgICAgICBcIndhcm5cIixcbiAgICAgICAgXCJlcnJvclwiXG4gICAgXTtcblxuICAgIC8vIENyb3NzLWJyb3dzZXIgYmluZCBlcXVpdmFsZW50IHRoYXQgd29ya3MgYXQgbGVhc3QgYmFjayB0byBJRTZcbiAgICBmdW5jdGlvbiBiaW5kTWV0aG9kKG9iaiwgbWV0aG9kTmFtZSkge1xuICAgICAgICB2YXIgbWV0aG9kID0gb2JqW21ldGhvZE5hbWVdO1xuICAgICAgICBpZiAodHlwZW9mIG1ldGhvZC5iaW5kID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICByZXR1cm4gbWV0aG9kLmJpbmQob2JqKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEZ1bmN0aW9uLnByb3RvdHlwZS5iaW5kLmNhbGwobWV0aG9kLCBvYmopO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIC8vIE1pc3NpbmcgYmluZCBzaGltIG9yIElFOCArIE1vZGVybml6ciwgZmFsbGJhY2sgdG8gd3JhcHBpbmdcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGdW5jdGlvbi5wcm90b3R5cGUuYXBwbHkuYXBwbHkobWV0aG9kLCBbb2JqLCBhcmd1bWVudHNdKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gQnVpbGQgdGhlIGJlc3QgbG9nZ2luZyBtZXRob2QgcG9zc2libGUgZm9yIHRoaXMgZW52XG4gICAgLy8gV2hlcmV2ZXIgcG9zc2libGUgd2Ugd2FudCB0byBiaW5kLCBub3Qgd3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gICAgICAgIHJldHVybjtcbiAgICAgICAgICB9IGNhdGNoIChpZ25vcmUpIHt9XG5cbiAgICAgICAgICAvLyBVc2Ugc2Vzc2lvbiBjb29raWUgYXMgZmFsbGJhY2tcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICB3aW5kb3cuZG9jdW1lbnQuY29va2llID1cbiAgICAgICAgICAgICAgICBlbmNvZGVVUklDb21wb25lbnQoc3RvcmFnZUtleSkgKyBcIj1cIiArIGxldmVsTmFtZSArIFwiO1wiO1xuICAgICAgICAgIH0gY2F0Y2ggKGlnbm9yZSkge31cbiAgICAgIH1cblxuICAgICAgZnVuY3Rpb24gZ2V0UGVyc2lzdGVkTGV2ZWwoKSB7XG4gICAgICAgICAgdmFyIHN0b3JlZExldmVsO1xuXG4gICAgICAgICAgaWYgKHR5cGVvZiB3aW5kb3cgPT09IHVuZGVmaW5lZFR5cGUpIHJldHVybjtcblxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHN0b3JlZExldmVsID0gd2luZG93LmxvY2FsU3RvcmFnZVtzdG9yYWdlS2V5XTtcbiAgICAgICAgICB9IGNhdGNoIChpZ25vcmUpIHt9XG5cbiAgICAgICAgICAvLyBGYWxsYmFjayB0byBjb29raWVzIGlmIGxvY2FsIHN0b3JhZ2UgZ2l2ZXMgdXMgbm90aGluZ1xuICAgICAgICAgIGlmICh0eXBlb2Ygc3RvcmVkTGV2ZWwgPT09IHVuZGVmaW5lZFR5cGUpIHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgIHZhciBjb29raWUgPSB3aW5kb3cuZG9jdW1lbnQuY29va2llO1xuICAgICAgICAgICAgICAgICAgdmFyIGxvY2F0aW9uID0gY29va2llLmluZGV4T2YoXG4gICAgICAgICAgICAgICAgICAgICAgZW5jb2RlVVJJQ29tcG9uZW50KHN0b3JhZ2VLZXkpICsgXCI9XCIpO1xuICAgICAgICAgICAgICAgICAgaWYgKGxvY2F0aW9uICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgIHN0b3JlZExldmVsID0gL14oW147XSspLy5leGVjKGNvb2tpZS5zbGljZShsb2NhdGlvbikpWzFdO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGNhdGNoIChpZ25vcmUpIHt9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLy8gSWYgdGhlIHN0b3JlZCBsZXZlbCBpcyBub3QgdmFsaWQsIHRyZWF0IGl0IGFzIGlmIG5vdGhpbmcgd2FzIHN0b3JlZC5cbiAgICAgICAgICBpZiAoc2VsZi5sZXZlbHNbc3RvcmVkTGV2ZWxdID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgc3RvcmVkTGV2ZWwgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHN0b3JlZExldmVsO1xuICAgICAgfVxuXG4gICAgICAvKlxuICAgICAgICpcbiAgICAgICAqIFB1YmxpYyBsb2dnZXIgQVBJIC0gc2VlIGh0dHBzOi8vZ2l0aHViLmNvbS9waW10ZXJyeS9sb2dsZXZlbCBmb3IgZGV0YWlsc1xuICAgICAgICpcbiAgICAgICAqL1xuXG4gICAgICBzZWxmLm5hbWUgPSBuYW1lO1xuXG4gICAgICBzZWxmLmxldmVscyA9IHsgXCJUUkFDRVwiOiAwLCBcIkRFQlVHXCI6IDEsIFwiSU5GT1wiOiAyLCBcIldBUk5cIjogMyxcbiAgICAgICAgICBcIkVSUk9SXCI6IDQsIFwiU0lMRU5UXCI6IDV9O1xuXG4gICAgICBzZWxmLm1ldGhvZEZhY3RvcnkgPSBmYWN0b3J5IHx8IGRlZmF1bHRNZXRob2RGYWN0b3J5O1xuXG4gICAgICBzZWxmLmdldExldmVsID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiBjdXJyZW50TGV2ZWw7XG4gICAgICB9O1xuXG4gICAgICBzZWxmLnNldExldmVsID0gZnVuY3Rpb24g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Q==\n//# sourceURL=webpack-internal:///7\n')},function(module,exports,__webpack_require__){eval("var store = __webpack_require__(78)('wks');\nvar uid = __webpack_require__(48);\nvar Symbol = __webpack_require__(4).Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3drcy5qcz85MjQwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBzdG9yZSA9IHJlcXVpcmUoJy4vX3NoYXJlZCcpKCd3a3MnKTtcbnZhciB1aWQgPSByZXF1aXJlKCcuL191aWQnKTtcbnZhciBTeW1ib2wgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5TeW1ib2w7XG52YXIgVVNFX1NZTUJPTCA9IHR5cGVvZiBTeW1ib2wgPT0gJ2Z1bmN0aW9uJztcblxudmFyICRleHBvcnRzID0gbW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAobmFtZSkge1xuICByZXR1cm4gc3RvcmVbbmFtZV0gfHwgKHN0b3JlW25hbWVdID1cbiAgICBVU0VfU1lNQk9MICYmIFN5bWJvbFtuYW1lXSB8fCAoVVNFX1NZTUJPTCA/IFN5bWJvbCA6IHVpZCkoJ1N5bWJvbC4nICsgbmFtZSkpO1xufTtcblxuJGV4cG9ydHMuc3RvcmUgPSBzdG9yZTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fd2tzLmpzXG4vLyBtb2R1bGUgaWQgPSA4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(416), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvcHJvbWlzZS5qcz9mZmYxIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0geyBcImRlZmF1bHRcIjogcmVxdWlyZShcImNvcmUtanMvbGlicmFyeS9mbi9wcm9taXNlXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL3Byb21pc2UuanNcbi8vIG1vZHVsZSBpZCA9IDlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///9\n')},function(module,exports,__webpack_require__){eval("// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(5)(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19kZXNjcmlwdG9ycy5qcz82ZDRhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIFRoYW5rJ3MgSUU4IGZvciBoaXMgZnVubnkgZGVmaW5lUHJvcGVydHlcbm1vZHVsZS5leHBvcnRzID0gIXJlcXVpcmUoJy4vX2ZhaWxzJykoZnVuY3Rpb24gKCkge1xuICByZXR1cm4gT2JqZWN0LmRlZmluZVByb3BlcnR5KHt9LCAnYScsIHsgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiA3OyB9IH0pLmEgIT0gNztcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19kZXNjcmlwdG9ycy5qc1xuLy8gbW9kdWxlIGlkID0gMTBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///10\n")},function(module,exports,__webpack_require__){eval("var anObject = __webpack_require__(3);\nvar IE8_DOM_DEFINE = __webpack_require__(148);\nvar toPrimitive = __webpack_require__(31);\nvar dP = Object.defineProperty;\n\nexports.f = __webpack_require__(10) ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZHAuanM/OTQzMiJdLCJz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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///11\n")},function(module,exports,__webpack_require__){eval("// 7.1.15 ToLength\nvar toInteger = __webpack_require__(33);\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1sZW5ndGguanM/MDViYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjEuMTUgVG9MZW5ndGhcbnZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgbWluID0gTWF0aC5taW47XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXQgPiAwID8gbWluKHRvSW50ZWdlcihpdCksIDB4MWZmZmZmZmZmZmZmZmYpIDogMDsgLy8gcG93KDIsIDUzKSAtIDEgPT0gOTAwNzE5OTI1NDc0MDk5MVxufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdG8tbGVuZ3RoLmpzXG4vLyBtb2R1bGUgaWQgPSAxMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///12\n")},function(module,exports){eval("var core = module.exports = { version: '2.5.3' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NvcmUuanM/MTVlMCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY29yZSA9IG1vZHVsZS5leHBvcnRzID0geyB2ZXJzaW9uOiAnMi41LjMnIH07XG5pZiAodHlwZW9mIF9fZSA9PSAnbnVtYmVyJykgX19lID0gY29yZTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby11bmRlZlxuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NvcmUuanNcbi8vIG1vZHVsZSBpZCA9IDEzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///13\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nexports.divideURL = divideURL;\nexports.emptyObject = emptyObject;\nexports.secondsSinceEpoch = secondsSinceEpoch;\nexports.deepClone = deepClone;\nexports.removePathFromURL = removePathFromURL;\nexports.getUserURLFromEmail = getUserURLFromEmail;\nexports.getUserEmailFromURL = getUserEmailFromURL;\nexports.convertToUserURL = convertToUserURL;\nexports.isDataObjectURL = isDataObjectURL;\nexports.isLegacy = isLegacy;\nexports.isURL = isURL;\nexports.isUserURL = isUserURL;\nexports.isHypertyURL = isHypertyURL;\nexports.getConfigurationResources = getConfigurationResources;\nexports.buildURL = buildURL;\nexports.generateGUID = generateGUID;\nexports.getUserIdentityDomain = getUserIdentityDomain;\nexports.isBackendServiceURL = isBackendServiceURL;\nexports.divideEmail = divideEmail;\nexports.assign = assign;\nexports.splitObjectURL = splitObjectURL;\nexports.checkAttribute = checkAttribute;\nexports.parseAttributes = parseAttributes;\nexports.isEmpty = isEmpty;\nexports.chatkeysToStringCloner = chatkeysToStringCloner;\nexports.chatkeysToArrayCloner = chatkeysToArrayCloner;\nexports.parseMessageURL = parseMessageURL;\nexports.availableSpace = availableSpace;\nexports.encode = encode;\nexports.decode = decode;\nexports.decodeToUint8Array = decodeToUint8Array;\nexports.stringify = stringify;\nexports.parse = parse;\nexports.parseToUint8Array = parseToUint8Array;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n/**\n * Support module with some functions will be useful\n * @module utils\n */\n\n/**\n * @typedef divideURL\n * @type Object\n * @property {string} type The type of URL\n * @property {string} domain The domain of URL\n * @property {string} identity The identity of URL\n */\n\n/**\n * Divide an url in type, domain and identity\n * @param {URL.URL} url - url address\n * @return {divideURL} the result of divideURL\n */\nfunction divideURL(url) {\n\n function recurse(value) {\n var regex = /([a-zA-Z-]*)(:\\/\\/(?:\\.)?|:)([-a-zA-Z0-9@:%._+~#=]{2,256})([-a-zA-Z0-9@:%._+~#=/]*)/gi;\n var subst = '$1,$3,$4';\n var parts = value.replace(regex, subst).split(',');\n return parts;\n }\n\n var parts = recurse(url);\n\n // If the url has no scheme\n if (parts[0] === url && !parts[0].includes('@')) {\n\n var _result = {\n type: '',\n domain: url,\n identity: ''\n };\n\n console.warn('[DivideURL] DivideURL don\\'t support url without scheme. Please review your url address', url);\n\n return _result;\n }\n\n // check if the url has the scheme and includes an @\n if (parts[0] === url && parts[0].includes('@')) {\n var scheme = parts[0] === url ? 'smtp' : parts[0];\n parts = recurse(scheme + '://' + parts[0]);\n }\n\n // if the domain includes an @, divide it to domain and identity respectively\n if (parts[1].includes('@')) {\n parts[2] = parts[0] + '://' + parts[1];\n parts[1] = parts[1].substr(parts[1].indexOf('@') + 1);\n } /*else if (parts[2].includes('/')) {\n parts[2] = parts[2].substr(parts[2].lastIndexOf('/')+1);\n }*/\n\n var result = {\n type: parts[0],\n domain: parts[1],\n identity: parts[2]\n };\n\n return result;\n}\n\n/**\n * Check if an Object is empty\n * @param {Object} object Object to be checked\n * @return {Boolean} status of Object, empty or not (true|false);\n */\nfunction emptyObject(object) {\n return (0, _keys2.default)(object).length > 0 ? false : true;\n}\n\nfunction secondsSinceEpoch() {\n return Math.floor(Date.now() / 1000);\n}\n\n/**\n * Make a COPY of the original data\n * @param {Object} obj - object to be cloned\n * @return {Object}\n */\nfunction deepClone(obj) {\n //TODO: simple but inefficient JSON deep clone...\n if (obj) return JSON.parse((0, _stringify2.default)(obj));\n}\n\nfunction removePathFromURL(url) {\n var splitURL = url.split('/');\n return splitURL[0] + '//' + splitURL[2] + '/' + splitURL[3];\n}\n\n/**\n * Obtains the user URL that corresponds to a given email\n * @param {string} userEmail The user email\n * @return {URL.URL} userURL The user URL\n */\nfunction getUserURLFromEmail(userEmail) {\n var indexOfAt = userEmail.indexOf('@');\n return 'user://' + userEmail.substring(indexOfAt + 1, userEmail.length) + '/' + userEmail.substring(0, indexOfAt);\n}\n\n/**\n * Obtains the user email that corresponds to a given URL\n * @param {URL.URL} userURL The user URL\n * @return {string} userEmail The user email\n */\nfunction getUserEmailFromURL(userURL) {\n var url = divideURL(userURL);\n return url.identity.replace('/', '') + '@' + url.domain; // identity field has '/exampleID' instead of 'exampleID'\n}\n\n/**\n * Check if the user identifier is already in the URL format, if not, convert to URL format\n * @param {string} identifier user identifier\n * @return {string} userURL the user URL\n */\nfunction convertToUserURL(identifier) {\n\n // check if the identifier is already in the url format\n if (identifier.substring(0, 7) === 'user://') {\n var dividedURL = divideURL(identifier);\n\n //check if the url is well formated\n if (dividedURL.domain && dividedURL.identity) {\n return identifier;\n } else {\n throw 'userURL with wrong format';\n }\n\n //if not, convert the user email to URL format\n } else {\n return getUserURLFromEmail(identifier);\n }\n}\n\nfunction isDataObjectURL(url) {\n var schemasToIgnore = ['domain-idp', 'runtime', 'domain', 'hyperty'];\n var splitURL = url.split('://');\n var urlSchema = splitURL[0];\n\n return schemasToIgnore.indexOf(urlSchema) === -1;\n}\n\nfunction isLegacy(url) {\n if (url.split('@').length > 1) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction isURL(url) {\n return url.split('/').length >= 3;\n}\n\nfunction isUserURL(url) {\n return divideURL(url).type === 'user';\n}\n\nfunction isHypertyURL(url) {\n return divideURL(url).type === 'hyperty';\n}\n\n/**\n * get information relative each component configured on runtime configuration;\n * @param {object} configuration object with all configuration\n * @param {string} component string with the component to get the configuration, like, runtimeURLS, catalogueURLs, msgNodeURL, domainRegistryURL;\n * @param {string} resource type of resource to get, like, catalogue, runtimeUA, protocolstub, idpProxy\n * @return {object} return an object with all configurations;\n */\nfunction getConfigurationResources(configuration, component, resource) {\n var objectResource = configuration[component];\n var resourceType = objectResource[resource];\n\n return resourceType;\n}\n\n/**\n * Build a full url with the runtime configuration;\n * @param {object} configuration object with all configuration\n * @param {string} component string with the component to get the configuration, like, runtimeURLS, catalogueURLs, msgNodeURL, domainRegistryURL;\n * @param {string} resource type of resource to get, like, catalogue, runtimeUA, protocolstub, idpProxy\n * @param {string} type resource to get, like a hyperty name or protocolstub name;\n * @param {boolean} useFallback if true the function will check if have a fallback url;\n * @return {string} partial url to contact the resource;\n */\nfunction buildURL(configuration, component, resource, type) {\n var useFallback = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n var objectResource = configuration[component];\n var url = void 0;\n\n if (!objectResource.hasOwnProperty(resource)) {\n throw Error('The configuration ' + (0, _stringify2.default)(objectResource, '', 2) + ' don\\'t have the ' + resource + ' resource you are looking for');\n }\n\n var resourceType = objectResource[resource];\n\n if (type) {\n url = resourceType.prefix + configuration.domain + resourceType.suffix + type;\n if (resourceType.hasOwnProperty('fallback') && useFallback) {\n if (resourceType.fallback.indexOf('%domain%')) {\n url = resourceType.fallback.replace(/(%domain%)/g, configuration.domain) + type;\n } else {\n url = resourceType.fallback + type;\n }\n }\n } else {\n url = resourceType.prefix + configuration.domain + resourceType.suffix;\n }\n\n // console.log(url);\n\n return url;\n}\n\n/**\n * Generate a Global Unique ID\n *\n * @returns String;\n */\nfunction generateGUID() {\n\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }\n\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n}\n\nfunction getUserIdentityDomain(url) {\n var dividedURL = divideURL(url);\n var splitedDomain = dividedURL.domain.split('.');\n var splitedLength = splitedDomain.length;\n if (splitedLength == 1) {\n return splitedDomain[splitedLength - 1];\n }\n var domain = splitedDomain[splitedLength - 2] + '.' + splitedDomain[splitedLength - 1];\n return domain;\n}\n\n/**\n * Check if URL is from a backend service\n * @param {string} url URL to be processed\n * @return {boolean}\n */\n\nfunction isBackendServiceURL(url) {\n var dividedURL = divideURL(url);\n var splitedDomain = dividedURL.domain.split('.');\n var backendSchemes = ['domain', 'global', 'domain-idp']; // should be defined in the runtime configuration\n var backendSubDomains = ['registry', 'msg-node']; // should be defined in the runtime configuration\n var subDomain = void 0;\n\n if (splitedDomain.length > 1) {\n subDomain = splitedDomain.filter(function (item) {\n return backendSubDomains.indexOf(item) !== -1;\n })[0];\n }\n\n if (subDomain && backendSubDomains.indexOf(subDomain) !== -1) {\n return true;\n }\n\n if (dividedURL.type) {\n return backendSchemes.indexOf(dividedURL.type) !== -1;\n }\n\n return false;\n}\n\nfunction divideEmail(email) {\n var indexOfAt = email.indexOf('@');\n\n var result = {\n username: email.substring(0, indexOfAt),\n domain: email.substring(indexOfAt + 1, email.length)\n };\n\n return result;\n}\n\nfunction assign(obj, keyPath, value) {\n\n if (!obj) obj = {};\n if (typeof keyPath === 'string') keyPath = parseAttributes(keyPath);\n\n var lastKeyIndex = keyPath.length - 1;\n\n for (var i = 0; i < lastKeyIndex; ++i) {\n var key = keyPath[i];\n if (!(key in obj)) {\n obj[key] = {};\n }\n\n obj = obj[key];\n }\n\n obj[keyPath[lastKeyIndex]] = value;\n}\n\nfunction splitObjectURL(dataObjectURL) {\n console.info('[utils - splitObjectURL]: ', dataObjectURL);\n\n var splitedURL = dataObjectURL.split('/');\n var url = splitedURL[0] + '//' + splitedURL[2] + '/' + splitedURL[3];\n var resource = splitedURL[5];\n\n var result = {\n url: url,\n resource: resource\n };\n\n console.info('[utils - splitObjectURL]: ', result);\n\n return result;\n}\n\nfunction checkAttribute(path) {\n\n var regex = /((([a-zA-Z]+):\\/\\/([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})\\/[a-zA-Z0-9.]+@[a-zA-Z0-9]+(-)?[a-zA-Z0-9]+(\\.)?[a-zA-Z0-9]{2,10}?\\.[a-zA-Z]{2,10})(.+(?=.identity))?/gm;\n\n var list = [];\n var final = [];\n var test = path.match(regex);\n\n if (test == null) {\n final = path.split('.');\n } else {\n var m = void 0;\n while ((m = regex.exec(path)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (m.index === regex.lastIndex) {\n regex.lastIndex++;\n }\n\n // The result can be accessed through the `m`-variable.\n m.forEach(function (match, groupIndex) {\n if (groupIndex === 0) {\n list.push(match);\n }\n });\n }\n var result = void 0;\n list.forEach(function (url) {\n\n result = path.replace(url, '*-*');\n final = result.split('.').map(function (item) {\n\n if (item === '*-*') {\n return url;\n }\n\n return item;\n });\n });\n }\n\n console.log('[RuntimeCore.Utils.checkAttribute]', final);\n return final;\n}\n\nfunction parseAttributes(path) {\n var regex = /([0-9a-zA-Z][-\\w]*):\\/\\//g;\n\n var string3 = 'identity';\n\n if (!path.includes('://')) {\n return path.split('.');\n } else {\n var string1 = path.split(regex)[0];\n\n var array1 = string1.split('.');\n\n var string2 = path.replace(string1, '');\n\n if (path.includes(string3)) {\n\n var array2 = string2.split(string3 + '.');\n\n console.log('array2 ' + array2);\n\n string2 = array2[0].slice('.', -1);\n\n array2 = array2[1].split('.');\n\n array1.push(string2, string3);\n\n array1 = array1.concat(array2);\n } else {\n array1.push(string2);\n }\n\n return array1.filter(Boolean);\n }\n}\n\nfunction isEmpty(obj) {\n for (var prop in obj) {\n\n if (obj.hasOwnProperty(prop)) {\n return false;\n }\n }\n\n return (0, _stringify2.default)(obj) === (0, _stringify2.default)({});\n}\n\nfunction chatkeysToStringCloner(sessionKeys) {\n var dataObjectSessionKeysClone = {};\n var fields = (0, _keys2.default)(sessionKeys);\n if (fields) {\n try {\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n dataObjectSessionKeysClone[field] = {};\n dataObjectSessionKeysClone[field].sessionKey = sessionKeys[field].sessionKey.toString();\n dataObjectSessionKeysClone[field].isToEncrypt = sessionKeys[field].isToEncrypt;\n }\n } catch (err) {\n console.error('_chatkeysToStringCloner:err', err);\n }\n }\n return dataObjectSessionKeysClone;\n}\n\nfunction chatkeysToArrayCloner(sessionKeys) {\n var dataObjectSessionKeysClone = {};\n var fields = (0, _keys2.default)(sessionKeys);\n if (fields) {\n try {\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n dataObjectSessionKeysClone[field] = {};\n var arrayValues = JSON.parse('[' + sessionKeys[field].sessionKey + ']');\n dataObjectSessionKeysClone[field].sessionKey = new Uint8Array(arrayValues);\n dataObjectSessionKeysClone[field].isToEncrypt = sessionKeys[field].isToEncrypt;\n }\n } catch (err) {\n console.error('_chatkeysToArrayCloner:err', err);\n }\n }\n return dataObjectSessionKeysClone;\n}\n\nfunction parseMessageURL(URL) {\n var splitedToURL = URL.split('/');\n if (splitedToURL.length <= 6) {\n return splitedToURL[0] + '//' + splitedToURL[2] + '/' + splitedToURL[3];\n } else {\n return splitedToURL[0] + '//' + splitedToURL[2] + '/' + splitedToURL[3] + '/' + splitedToURL[4];\n }\n}\n\nfunction availableSpace(usage, quota) {\n var available = (usage / quota).toFixed(2);\n return {\n quota: quota,\n usage: usage,\n percent: Number(available)\n };\n}\n\n/**\n* Encodes a JS object to base 64 encode\n* @param {Object} value byteArray value\n* @return {string} encoded value\n*/\nfunction encode(value) {\n try {\n var stringValue = stringify(value);\n return btoa(stringValue);\n } catch (err) {\n console.error('[Utils.encode:err] ' + err);\n throw err;\n }\n}\n\n/**\n * Decode a base64 string to object\n * @param {string_b64} value value encoded in base 64\n * @return {Object} decodedValue\n */\nfunction decode(value) {\n try {\n return JSON.parse(atob(value));\n } catch (err) {\n console.log('[Utils.decode:err] ' + err);\n throw err;\n }\n}\n\n/**\n* Decode a base64 string to Uint8Array\n* @param {string_b64} value byteArray value\n* @return {Uint8Array} encoded value\n*/\nfunction decodeToUint8Array(value) {\n try {\n return new Uint8Array(decode(value));\n } catch (err) {\n console.error('[Utils.decodeToUint8Array:err] ' + err);\n throw err;\n }\n}\n\n/**\n* Converts a JS object to string\n* NOTE: Special conversion for Uint8Arrays\n* @param {Object} value byteArray value\n* @return {Uint8Array} encoded value\n*/\nfunction stringify(value) {\n try {\n var stringValue = void 0;\n if (value.constructor === Uint8Array) {\n stringValue = '[' + value.toString() + ']'; // the [] is for JSON.parse compatibility\n } else {\n stringValue = (0, _stringify2.default)(value);\n }\n return stringValue;\n } catch (err) {\n console.error('[Utils.stringify:err] ' + err);\n throw err;\n }\n}\n\n/**\n* Converts a stringified object to object\n* @param {String} value byteArray value\n* @return {Object} encoded value\n*/\nfunction parse(value) {\n try {\n return JSON.parse(value);\n } catch (err) {\n console.error('[Utils.parse:err]' + err);\n console.trace();\n console.error('That that cause the error:', value);\n throw err;\n }\n}\n\n/**\n* Converts a stringified object to object\n* @param {String} value byteArray value\n* @return {Uint8Array} encoded value\n*/\nfunction parseToUint8Array(value) {\n try {\n return new Uint8Array(parse(value));\n } catch (err) {\n console.error('[Utils.parseToUint8Array:err]' + err);\n throw err;\n }\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL3V0aWxzL3V0aWxzLmpzP2JlNzMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4qIENvcHlyaWdodCAyMDE2IFBUIElub3Zhw6fDo28gZSBTaXN0ZW1hcyBTQVxuKiBDb3B5cmlnaHQgMjAxNiBJTkVTQy1JRFxuKiBDb3B5cmlnaHQgMjAxNiBRVU9CSVMgTkVUV09SS1MgU0xcbiogQ29weXJpZ2h0IDIwMTYgRlJBVU5IT0ZFUi1HRVNFTExTQ0hBRlQgWlVSIEZPRVJERVJVTkcgREVSIEFOR0VXQU5EVEVOIEZPUlNDSFVORyBFLlZcbiogQ29weXJpZ2h0IDIwMTYgT1JBTkdFIFNBXG4qIENvcHlyaWdodCAyMDE2IERldXRzY2hlIFRlbGVrb20gQUdcbiogQ29weXJpZ2h0IDIwMTYgQXBpemVlXG4qIENvcHlyaWdodCAyMDE2IFR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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUhBO0FBS0E7QUFDQTtBQUNBOzs7OztBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7OztBQU1BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFLQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///14\n")},function(module,exports,__webpack_require__){eval("// 7.1.13 ToObject(argument)\nvar defined = __webpack_require__(32);\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1vYmplY3QuanM/MTZiYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjEuMTMgVG9PYmplY3QoYXJndW1lbnQpXG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBPYmplY3QoZGVmaW5lZChpdCkpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdG8tb2JqZWN0LmpzXG4vLyBtb2R1bGUgaWQgPSAxNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///15\n")},function(module,exports){eval("module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hLWZ1bmN0aW9uLmpzPzVkMjMiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKHR5cGVvZiBpdCAhPSAnZnVuY3Rpb24nKSB0aHJvdyBUeXBlRXJyb3IoaXQgKyAnIGlzIG5vdCBhIGZ1bmN0aW9uIScpO1xuICByZXR1cm4gaXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hLWZ1bmN0aW9uLmpzXG4vLyBtb2R1bGUgaWQgPSAxNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///16\n")},function(module,exports){eval("var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19oYXMuanM/NTgxNyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgaGFzT3duUHJvcGVydHkgPSB7fS5oYXNPd25Qcm9wZXJ0eTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCBrZXkpIHtcbiAgcmV0dXJuIGhhc093blByb3BlcnR5LmNhbGwoaXQsIGtleSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19oYXMuanNcbi8vIG1vZHVsZSBpZCA9IDE3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///17\n")},function(module,exports,__webpack_require__){eval("var dP = __webpack_require__(11);\nvar createDesc = __webpack_require__(47);\nmodule.exports = __webpack_require__(10) ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19oaWRlLmpzP2RhOWQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGRQID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJyk7XG52YXIgY3JlYXRlRGVzYyA9IHJlcXVpcmUoJy4vX3Byb3BlcnR5LWRlc2MnKTtcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKSA/IGZ1bmN0aW9uIChvYmplY3QsIGtleSwgdmFsdWUpIHtcbiAgcmV0dXJuIGRQLmYob2JqZWN0LCBrZXksIGNyZWF0ZURlc2MoMSwgdmFsdWUpKTtcbn0gOiBmdW5jdGlvbiAob2JqZWN0LCBrZXksIHZhbHVlKSB7XG4gIG9iamVjdFtrZXldID0gdmFsdWU7XG4gIHJldHVybiBvYmplY3Q7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19oaWRlLmpzXG4vLyBtb2R1bGUgaWQgPSAxOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///18\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar hide = __webpack_require__(18);\nvar has = __webpack_require__(17);\nvar SRC = __webpack_require__(48)('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\n__webpack_require__(30).inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19yZWRlZmluZS5qcz80NzcwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBoaWRlID0gcmVxdWlyZSgnLi9faGlkZScpO1xudmFyIGhhcyA9IHJlcXVpcmUoJy4vX2hhcycpO1xudmFyIFNSQyA9IHJlcXVpcmUoJy4vX3VpZCcpKCdzcmMnKTtcbnZhciBUT19TVFJJTkcgPSAndG9TdHJpbmcnO1xudmFyICR0b1N0cmluZyA9IEZ1bmN0aW9uW1RPX1NUUklOR107XG52YXIgVFBMID0gKCcnICsgJHRvU3RyaW5nKS5zcGxpdChUT19TVFJJTkcpO1xuXG5yZXF1aXJlKCcuL19jb3JlJykuaW5zcGVjdFNvdXJjZSA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gJHRvU3RyaW5nLmNhbGwoaXQpO1xufTtcblxuKG1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKE8sIGtleSwgdmFsLCBzYWZlKSB7XG4gIHZhciBpc0Z1bmN0aW9uID0gdHlwZW9mIHZhbCA9PSAnZnVuY3Rpb24nO1xuICBpZiAoaXNGdW5jdGlvbikgaGFzKHZhbCwgJ25hbWUnKSB8fCBoaWRlKHZhbCwgJ25hbWUnLCBrZXkpO1xuICBpZiAoT1trZXldID09PSB2YWwpIHJldHVybjtcbiAgaWYgKGlzRnVuY3Rpb24pIGhhcyh2YWwsIFNSQyk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FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///19\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar fails = __webpack_require__(5);\nvar defined = __webpack_require__(32);\nvar quot = /\"/g;\n// B.2.3.2.1 CreateHTML(string, tag, attribute, value)\nvar createHTML = function (string, tag, attribute, value) {\n var S = String(defined(string));\n var p1 = '<' + tag;\n if (attribute !== '') p1 += ' ' + attribute + '=\"' + String(value).replace(quot, '"') + '\"';\n return p1 + '>' + S + '';\n};\nmodule.exports = function (NAME, exec) {\n var O = {};\n O[NAME] = exec(createHTML);\n $export($export.P + $export.F * fails(function () {\n var test = ''[NAME]('\"');\n return test !== test.toLowerCase() || test.split('\"').length > 3;\n }), 'String', O);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zdHJpbmctaHRtbC5qcz9jYjdkIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgZmFpbHMgPSByZXF1aXJlKCcuL19mYWlscycpO1xudmFyIGRlZmluZWQgPSByZXF1aXJlKCcuL19kZWZpbmVkJyk7XG52YXIgcXVvdCA9IC9cIi9nO1xuLy8gQi4yLjMuMi4xIENyZWF0ZUhUTUwoc3RyaW5nLCB0YWcsIGF0dHJpYnV0ZSwgdmFsdWUpXG52YXIgY3JlYXRlSFRNTCA9IGZ1bmN0aW9uIChzdHJpbmcsIHRhZywgYXR0cmlidXRlLCB2YWx1ZSkge1xuICB2YXIgUyA9IFN0cmluZyhkZWZpbmVkKHN0cmluZykpO1xuICB2YXIgcDEgPSAnPCcgKyB0YWc7XG4gIGlmIChhdHRyaWJ1dGUgIT09ICcnKSBwMSArPSAnICcgKyBhdHRyaWJ1dGUgKyAnPVwiJyArIFN0cmluZyh2YWx1ZSkucmVwbGFjZShxdW90LCAnJnF1b3Q7JykgKyAnXCInO1xuICByZXR1cm4gcDEgKyAnPicgKyBTICsgJzwvJyArIHRhZyArICc+Jztcbn07XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChOQU1FLCBleGVjKSB7XG4gIHZhciBPID0ge307XG4gIE9bTkFNRV0gPSBleGVjKGNyZWF0ZUhUTUwpO1xuICAkZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqIGZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgdGVzdCA9ICcnW05BTUVdKCdcIicpO1xuICAgIHJldHVybiB0ZXN0ICE9PSB0ZXN0LnRvTG93ZXJDYXNlKCkgfHwgdGVzdC5zcGxpdCgnXCInKS5sZW5ndGggPiAzO1xuICB9KSwgJ1N0cmluZycsIE8pO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLWh0bWwuanNcbi8vIG1vZHVsZSBpZCA9IDIwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///20\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(22);\nvar core = __webpack_require__(13);\nvar ctx = __webpack_require__(65);\nvar hide = __webpack_require__(58);\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && key in exports) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZ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Ly8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2V4cG9ydC5qc1xuLy8gbW9kdWxlIGlkID0gMjFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///21\n")},function(module,exports){eval("// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2dsb2JhbC5qcz9lY2FiIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS96bG9pcm9jay9jb3JlLWpzL2lzc3Vlcy84NiNpc3N1ZWNvbW1lbnQtMTE1NzU5MDI4XG52YXIgZ2xvYmFsID0gbW9kdWxlLmV4cG9ydHMgPSB0eXBlb2Ygd2luZG93ICE9ICd1bmRlZmluZWQnICYmIHdpbmRvdy5NYXRoID09IE1hdGhcbiAgPyB3aW5kb3cgOiB0eXBlb2Ygc2VsZiAhPSAndW5kZWZpbmVkJyAmJiBzZWxmLk1hdGggPT0gTWF0aCA/IHNlbGZcbiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLW5ldy1mdW5jXG4gIDogRnVuY3Rpb24oJ3JldHVybiB0aGlzJykoKTtcbmlmICh0eXBlb2YgX19nID09ICdudW1iZXInKSBfX2cgPSBnbG9iYWw7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tdW5kZWZcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19nbG9iYWwuanNcbi8vIG1vZHVsZSBpZCA9IDIyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///22\n")},function(module,exports,__webpack_require__){eval("var store = __webpack_require__(136)('wks');\nvar uid = __webpack_require__(94);\nvar Symbol = __webpack_require__(22).Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy5qcz83NTJjIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBzdG9yZSA9IHJlcXVpcmUoJy4vX3NoYXJlZCcpKCd3a3MnKTtcbnZhciB1aWQgPSByZXF1aXJlKCcuL191aWQnKTtcbnZhciBTeW1ib2wgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5TeW1ib2w7XG52YXIgVVNFX1NZTUJPTCA9IHR5cGVvZiBTeW1ib2wgPT0gJ2Z1bmN0aW9uJztcblxudmFyICRleHBvcnRzID0gbW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAobmFtZSkge1xuICByZXR1cm4gc3RvcmVbbmFtZV0gfHwgKHN0b3JlW25hbWVdID1cbiAgICBVU0VfU1lNQk9MICYmIFN5bWJvbFtuYW1lXSB8fCAoVVNFX1NZTUJPTCA/IFN5bWJvbCA6IHVpZCkoJ1N5bWJvbC4nICsgbmFtZSkpO1xufTtcblxuJGV4cG9ydHMuc3RvcmUgPSBzdG9yZTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL193a3MuanNcbi8vIG1vZHVsZSBpZCA9IDIzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///23\n")},function(module,exports,__webpack_require__){eval("// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = __webpack_require__(70);\nvar defined = __webpack_require__(32);\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1pb2JqZWN0LmpzPzNjN2EiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gdG8gaW5kZXhlZCBvYmplY3QsIHRvT2JqZWN0IHdpdGggZmFsbGJhY2sgZm9yIG5vbi1hcnJheS1saWtlIEVTMyBzdHJpbmdzXG52YXIgSU9iamVjdCA9IHJlcXVpcmUoJy4vX2lvYmplY3QnKTtcbnZhciBkZWZpbmVkID0gcmVxdWlyZSgnLi9fZGVmaW5lZCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIElPYmplY3QoZGVmaW5lZChpdCkpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdG8taW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gMjRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///24\n")},function(module,exports,__webpack_require__){eval("var pIE = __webpack_require__(71);\nvar createDesc = __webpack_require__(47);\nvar toIObject = __webpack_require__(24);\nvar toPrimitive = __webpack_require__(31);\nvar has = __webpack_require__(17);\nvar IE8_DOM_DEFINE = __webpack_require__(148);\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = __webpack_require__(10) ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZ29wZC5qcz9jN2RjIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBwSUUgPSByZXF1aXJlKCcuL19vYmplY3QtcGllJyk7XG52YXIgY3JlYXRlRGVzYyA9IHJlcXVpcmUoJy4vX3Byb3BlcnR5LWRlc2MnKTtcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgdG9QcmltaXRpdmUgPSByZXF1aXJlKCcuL190by1wcmltaXRpdmUnKTtcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciBJRThfRE9NX0RFRklORSA9IHJlcXVpcmUoJy4vX2llOC1kb20tZGVmaW5lJyk7XG52YXIgZ09QRCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3I7XG5cbmV4cG9ydHMuZiA9IHJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgPyBnT1BEIDogZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKE8sIFApIHtcbiAgTyA9IHRvSU9iamVjdChPKTtcbiAgUCA9IHRvUHJpbWl0aXZlKFAsIHRydWUpO1xuICBpZiAoSUU4X0RPTV9ERUZJTkUpIHRyeSB7XG4gICAgcmV0dXJuIGdPUEQoTywgUCk7XG4gIH0gY2F0Y2ggKGUpIHsgLyogZW1wdHkgKi8gfVxuICBpZiAoaGFzKE8sIFApKSByZXR1cm4gY3JlYXRlRGVzYyghcElFLmYuY2FsbChPLCBQKSwgT1tQXSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZ29wZC5qc1xuLy8gbW9kdWxlIGlkID0gMjVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///25\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = __webpack_require__(17);\nvar toObject = __webpack_require__(15);\nvar IE_PROTO = __webpack_require__(103)('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZ3BvLmpzPzI4ZWEiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjkgLyAxNS4yLjMuMiBPYmplY3QuZ2V0UHJvdG90eXBlT2YoTylcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIElFX1BST1RPID0gcmVxdWlyZSgnLi9fc2hhcmVkLWtleScpKCdJRV9QUk9UTycpO1xudmFyIE9iamVjdFByb3RvID0gT2JqZWN0LnByb3RvdHlwZTtcblxubW9kdWxlLmV4cG9ydHMgPSBPYmplY3QuZ2V0UHJvdG90eXBlT2YgfHwgZnVuY3Rpb24gKE8pIHtcbiAgTyA9IHRvT2JqZWN0KE8pO1xuICBpZiAoaGFzKE8sIElFX1BST1RPKSkgcmV0dXJuIE9bSUVfUFJPVE9dO1xuICBpZiAodHlwZW9mIE8uY29uc3RydWN0b3IgPT0gJ2Z1bmN0aW9uJyAmJiBPIGluc3RhbmNlb2YgTy5jb25zdHJ1Y3Rvcikge1xuICAgIHJldHVybiBPLmNvbnN0cnVjdG9yLnByb3RvdHlwZTtcbiAgfSByZXR1cm4gTyBpbnN0YW5jZW9mIE9iamVjdCA/IE9iamVjdFByb3RvIDogbnVsbDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1ncG8uanNcbi8vIG1vZHVsZSBpZCA9IDI2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///26\n")},function(module,exports,__webpack_require__){eval("// optional / simple context binding\nvar aFunction = __webpack_require__(16);\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uI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UNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///27\n")},function(module,exports){eval("var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jb2YuanM/YzlkMCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgdG9TdHJpbmcgPSB7fS50b1N0cmluZztcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIHRvU3RyaW5nLmNhbGwoaXQpLnNsaWNlKDgsIC0xKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2NvZi5qc1xuLy8gbW9kdWxlIGlkID0gMjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///28\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar fails = __webpack_require__(5);\n\nmodule.exports = function (method, arg) {\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call\n arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zdHJpY3QtbWV0aG9kLmpzPzM0ZGEiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGZhaWxzID0gcmVxdWlyZSgnLi9fZmFpbHMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAobWV0aG9kLCBhcmcpIHtcbiAgcmV0dXJuICEhbWV0aG9kICYmIGZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tdXNlbGVzcy1jYWxsXG4gICAgYXJnID8gbWV0aG9kLmNhbGwobnVsbCwgZnVuY3Rpb24gKCkgeyAvKiBlbXB0eSAqLyB9LCAxKSA6IG1ldGhvZC5jYWxsKG51bGwpO1xuICB9KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3N0cmljdC1tZXRob2QuanNcbi8vIG1vZHVsZSBpZCA9IDI5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///29\n")},function(module,exports){eval("var core = module.exports = { version: '2.5.3' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jb3JlLmpzP2VlMDUiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGNvcmUgPSBtb2R1bGUuZXhwb3J0cyA9IHsgdmVyc2lvbjogJzIuNS4zJyB9O1xuaWYgKHR5cGVvZiBfX2UgPT0gJ251bWJlcicpIF9fZSA9IGNvcmU7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tdW5kZWZcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fY29yZS5qc1xuLy8gbW9kdWxlIGlkID0gMzBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///30\n")},function(module,exports,__webpack_require__){eval("// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = __webpack_require__(6);\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1wcmltaXRpdmUuanM/YjM4OCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjEuMSBUb1ByaW1pdGl2ZShpbnB1dCBbLCBQcmVmZXJyZWRUeXBlXSlcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX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QTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///31\n")},function(module,exports){eval('// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError("Can\'t call method on " + it);\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19kZWZpbmVkLmpzP2ZmMDgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4yLjEgUmVxdWlyZU9iamVjdENvZXJjaWJsZShhcmd1bWVudClcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIGlmIChpdCA9PSB1bmRlZmluZWQpIHRocm93IFR5cGVFcnJvcihcIkNhbid0IGNhbGwgbWV0aG9kIG9uICBcIiArIGl0KTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZGVmaW5lZC5qc1xuLy8gbW9kdWxlIGlkID0gMzJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///32\n')},function(module,exports){eval("// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1pbnRlZ2VyLmpzP2ExZTgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4xLjQgVG9JbnRlZ2VyXG52YXIgY2VpbCA9IE1hdGguY2VpbDtcbnZhciBmbG9vciA9IE1hdGguZmxvb3I7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXNOYU4oaXQgPSAraXQpID8gMCA6IChpdCA+IDAgPyBmbG9vciA6IGNlaWwpKGl0KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3RvLWludGVnZXIuanNcbi8vIG1vZHVsZSBpZCA9IDMzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///33\n")},function(module,exports,__webpack_require__){eval("// most Object methods by ES6 should accept primitives\nvar $export = __webpack_require__(0);\nvar core = __webpack_require__(30);\nvar fails = __webpack_require__(5);\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3Qtc2FwLmpzP2RlMmUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gbW9zdCBPYmplY3QgbWV0aG9kcyBieSBFUzYgc2hvdWxkIGFjY2VwdCBwcmltaXRpdmVzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGNvcmUgPSByZXF1aXJlKCcuL19jb3JlJyk7XG52YXIgZmFpbHMgPSByZXF1aXJlKCcuL19mYWlscycpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoS0VZLCBleGVjKSB7XG4gIHZhciBmbiA9IChjb3JlLk9iamVjdCB8fCB7fSlbS0VZXSB8fCBPYmplY3RbS0VZXTtcbiAgdmFyIGV4cCA9IHt9O1xuICBleHBbS0VZXSA9IGV4ZWMoZm4pO1xuICAkZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqIGZhaWxzKGZ1bmN0aW9uICgpIHsgZm4oMSk7IH0pLCAnT2JqZWN0JywgZXhwKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1zYXAuanNcbi8vIG1vZHVsZSBpZCA9IDM0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///34\n")},function(module,exports,__webpack_require__){eval("// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = __webpack_require__(27);\nvar IObject = __webpack_require__(70);\nvar toObject = __webpack_require__(15);\nvar toLength = __webpack_require__(12);\nvar asc = __webpack_require__(120);\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hcnJheS1tZXRob2RzLmpzPzJlMTQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMCAtPiBBcnJheSNmb3JFYWNoXG4vLyAxIC0+IEFycmF5I21hcFxuLy8gMiAtPiBBcnJheSNmaWx0ZXJcbi8vIDMgLT4gQXJyYXkjc29tZVxuLy8gNCAtPiBBcnJheSNldmVyeVxuLy8gNSAtPiBBcnJheSNmaW5kXG4vLyA2IC0+IEFycmF5I2ZpbmRJbmRleFxudmFyIGN0eCA9IHJlcXVpcmUoJy4vX2N0eCcpO1xudmFyIElPYmplY3QgPSByZXF1aXJlKCcuL19pb2JqZWN0Jyk7XG52YXIgdG9PYmplY3QgPSByZXF1aXJlKCcuL190by1vYmplY3QnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4vX3RvLWxlbmd0aCcpO1xudmFyIGF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IjoiIn0=\n//# sourceURL=webpack-internal:///35\n")},function(module,exports){eval("module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lzLW9iamVjdC5qcz8xMmE4Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiB0eXBlb2YgaXQgPT09ICdvYmplY3QnID8gaXQgIT09IG51bGwgOiB0eXBlb2YgaXQgPT09ICdmdW5jdGlvbic7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lzLW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gMzZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///36\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(440), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9rZXlzLmpzPzdkOTgiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9rZXlzXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSAzN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///37\n')},function(module,exports,__webpack_require__){"use strict";eval("\nif (__webpack_require__(10)) {\n var LIBRARY = __webpack_require__(49);\n var global = __webpack_require__(4);\n var fails = __webpack_require__(5);\n var $export = __webpack_require__(0);\n var $typed = __webpack_require__(88);\n var $buffer = __webpack_require__(126);\n var ctx = __webpack_require__(27);\n var anInstance = __webpack_require__(55);\n var propertyDesc = __webpack_require__(47);\n var hide = __webpack_require__(18);\n var redefineAll = __webpack_require__(57);\n var toInteger = __webpack_require__(33);\n var toLength = __webpack_require__(12);\n var toIndex = __webpack_require__(174);\n var toAbsoluteIndex = __webpack_require__(51);\n var toPrimitive = __webpack_require__(31);\n var has = __webpack_require__(17);\n var classof = __webpack_require__(72);\n var isObject = __webpack_require__(6);\n var toObject = __webpack_require__(15);\n var isArrayIter = __webpack_require__(117);\n var create = __webpack_require__(52);\n var getPrototypeOf = __webpack_require__(26);\n var gOPN = __webpack_require__(53).f;\n var getIterFn = __webpack_require__(119);\n var uid = __webpack_require__(48);\n var wks = __webpack_require__(8);\n var createArrayMethod = __webpack_require__(35);\n var createArrayIncludes = __webpack_require__(79);\n var speciesConstructor = __webpack_require__(86);\n var ArrayIterators = __webpack_require__(122);\n var Iterators = __webpack_require__(63);\n var $iterDetect = __webpack_require__(83);\n var setSpecies = __webpack_require__(54);\n var arrayFill = __webpack_require__(121);\n var arrayCopyWithin = __webpack_require__(164);\n var $DP = __webpack_require__(11);\n var $GOPD = __webpack_require__(25);\n var dP = $DP.f;\n var gOPD = $GOPD.f;\n var RangeError = global.RangeError;\n var TypeError = global.TypeError;\n var Uint8Array = global.Uint8Array;\n var ARRAY_BUFFER = 'ArrayBuffer';\n var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;\n var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\n var PROTOTYPE = 'prototype';\n var ArrayProto = Array[PROTOTYPE];\n var $ArrayBuffer = $buffer.ArrayBuffer;\n var $DataView = $buffer.DataView;\n var arrayForEach = createArrayMethod(0);\n var arrayFilter = createArrayMethod(2);\n var arraySome = createArrayMethod(3);\n var arrayEvery = createArrayMethod(4);\n var arrayFind = createArrayMethod(5);\n var arrayFindIndex = createArrayMethod(6);\n var arrayIncludes = createArrayIncludes(true);\n var arrayIndexOf = createArrayIncludes(false);\n var arrayValues = ArrayIterators.values;\n var arrayKeys = ArrayIterators.keys;\n var arrayEntries = ArrayIterators.entries;\n var arrayLastIndexOf = ArrayProto.lastIndexOf;\n var arrayReduce = ArrayProto.reduce;\n var arrayReduceRight = ArrayProto.reduceRight;\n var arrayJoin = ArrayProto.join;\n var arraySort = ArrayProto.sort;\n var arraySlice = ArrayProto.slice;\n var arrayToString = ArrayProto.toString;\n var arrayToLocaleString = ArrayProto.toLocaleString;\n var ITERATOR = wks('iterator');\n var TAG = wks('toStringTag');\n var TYPED_CONSTRUCTOR = uid('typed_constructor');\n var DEF_CONSTRUCTOR = uid('def_constructor');\n var ALL_CONSTRUCTORS = $typed.CONSTR;\n var TYPED_ARRAY = $typed.TYPED;\n var VIEW = $typed.VIEW;\n var WRONG_LENGTH = 'Wrong length!';\n\n var $map = createArrayMethod(1, function (O, length) {\n return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);\n });\n\n var LITTLE_ENDIAN = fails(function () {\n // eslint-disable-next-line no-undef\n return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;\n });\n\n var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {\n new Uint8Array(1).set({});\n });\n\n var toOffset = function (it, BYTES) {\n var offset = toInteger(it);\n if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');\n return offset;\n };\n\n var validate = function (it) {\n if (isObject(it) && TYPED_ARRAY in it) return it;\n throw TypeError(it + ' is not a typed array!');\n };\n\n var allocate = function (C, length) {\n if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {\n throw TypeError('It is not a typed array constructor!');\n } return new C(length);\n };\n\n var speciesFromList = function (O, list) {\n return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);\n };\n\n var fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = allocate(C, length);\n while (length > index) result[index] = list[index++];\n return result;\n };\n\n var addGetter = function (it, key, internal) {\n dP(it, key, { get: function () { return this._d[internal]; } });\n };\n\n var $from = function from(source /* , mapfn, thisArg */) {\n var O = toObject(source);\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iterFn = getIterFn(O);\n var i, length, values, result, step, iterator;\n if (iterFn != undefined && !isArrayIter(iterFn)) {\n for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {\n values.push(step.value);\n } O = values;\n }\n if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);\n for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n };\n\n var $of = function of(/* ...items */) {\n var index = 0;\n var length = arguments.length;\n var result = allocate(this, length);\n while (length > index) result[index] = arguments[index++];\n return result;\n };\n\n // iOS Safari 6.x fails here\n var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });\n\n var $toLocaleString = function toLocaleString() {\n return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);\n };\n\n var proto = {\n copyWithin: function copyWithin(target, start /* , end */) {\n return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n },\n every: function every(callbackfn /* , thisArg */) {\n return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars\n return arrayFill.apply(validate(this), arguments);\n },\n filter: function filter(callbackfn /* , thisArg */) {\n return speciesFromList(this, arrayFilter(validate(this), callbackfn,\n arguments.length > 1 ? arguments[1] : undefined));\n },\n find: function find(predicate /* , thisArg */) {\n return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n findIndex: function findIndex(predicate /* , thisArg */) {\n return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n forEach: function forEach(callbackfn /* , thisArg */) {\n arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n indexOf: function indexOf(searchElement /* , fromIndex */) {\n return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n includes: function includes(searchElement /* , fromIndex */) {\n return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n join: function join(separator) { // eslint-disable-line no-unused-vars\n return arrayJoin.apply(validate(this), arguments);\n },\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars\n return arrayLastIndexOf.apply(validate(this), arguments);\n },\n map: function map(mapfn /* , thisArg */) {\n return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduce.apply(validate(this), arguments);\n },\n reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduceRight.apply(validate(this), arguments);\n },\n reverse: function reverse() {\n var that = this;\n var length = validate(that).length;\n var middle = Math.floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n },\n some: function some(callbackfn /* , thisArg */) {\n return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n sort: function sort(comparefn) {\n return arraySort.call(validate(this), comparefn);\n },\n subarray: function subarray(begin, end) {\n var O = validate(this);\n var length = O.length;\n var $begin = toAbsoluteIndex(begin, length);\n return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(\n O.buffer,\n O.byteOffset + $begin * O.BYTES_PER_ELEMENT,\n toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)\n );\n }\n };\n\n var $slice = function slice(start, end) {\n return speciesFromList(this, arraySlice.call(validate(this), start, end));\n };\n\n var $set = function set(arrayLike /* , offset */) {\n validate(this);\n var offset = toOffset(arguments[1], 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError(WRONG_LENGTH);\n while (index < len) this[offset + index] = src[index++];\n };\n\n var $iterators = {\n entries: function entries() {\n return arrayEntries.call(validate(this));\n },\n keys: function keys() {\n return arrayKeys.call(validate(this));\n },\n values: function values() {\n return arrayValues.call(validate(this));\n }\n };\n\n var isTAIndex = function (target, key) {\n return isObject(target)\n && target[TYPED_ARRAY]\n && typeof key != 'symbol'\n && key in target\n && String(+key) == String(key);\n };\n var $getDesc = function getOwnPropertyDescriptor(target, key) {\n return isTAIndex(target, key = toPrimitive(key, true))\n ? propertyDesc(2, target[key])\n : gOPD(target, key);\n };\n var $setDesc = function defineProperty(target, key, desc) {\n if (isTAIndex(target, key = toPrimitive(key, true))\n && isObject(desc)\n && has(desc, 'value')\n && !has(desc, 'get')\n && !has(desc, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !desc.configurable\n && (!has(desc, 'writable') || desc.writable)\n && (!has(desc, 'enumerable') || desc.enumerable)\n ) {\n target[key] = desc.value;\n return target;\n } return dP(target, key, desc);\n };\n\n if (!ALL_CONSTRUCTORS) {\n $GOPD.f = $getDesc;\n $DP.f = $setDesc;\n }\n\n $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {\n getOwnPropertyDescriptor: $getDesc,\n defineProperty: $setDesc\n });\n\n if (fails(function () { arrayToString.call({}); })) {\n arrayToString = arrayToLocaleString = function toString() {\n return arrayJoin.call(this);\n };\n }\n\n var $TypedArrayPrototype$ = redefineAll({}, proto);\n redefineAll($TypedArrayPrototype$, $iterators);\n hide($TypedArrayPrototype$, ITERATOR, $iterators.values);\n redefineAll($TypedArrayPrototype$, {\n slice: $slice,\n set: $set,\n constructor: function () { /* noop */ },\n toString: arrayToString,\n toLocaleString: $toLocaleString\n });\n addGetter($TypedArrayPrototype$, 'buffer', 'b');\n addGetter($TypedArrayPrototype$, 'byteOffset', 'o');\n addGetter($TypedArrayPrototype$, 'byteLength', 'l');\n addGetter($TypedArrayPrototype$, 'length', 'e');\n dP($TypedArrayPrototype$, TAG, {\n get: function () { return this[TYPED_ARRAY]; }\n });\n\n // eslint-disable-next-line max-statements\n module.exports = function (KEY, BYTES, wrapper, CLAMPED) {\n CLAMPED = !!CLAMPED;\n var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + KEY;\n var SETTER = 'set' + KEY;\n var TypedArray = global[NAME];\n var Base = TypedArray || {};\n var TAC = TypedArray && getPrototypeOf(TypedArray);\n var FORCED = !TypedArray || !$typed.ABV;\n var O = {};\n var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];\n var getter = function (that, index) {\n var data = that._d;\n return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);\n };\n var setter = function (that, index, value) {\n var data = that._d;\n if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;\n data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);\n };\n var addElement = function (that, index) {\n dP(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n if (FORCED) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME, '_d');\n var index = 0;\n var offset = 0;\n var buffer, byteLength, length, klass;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new $ArrayBuffer(byteLength);\n } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n buffer = data;\n offset = toOffset($offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - offset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (TYPED_ARRAY in data) {\n return fromList(TypedArray, data);\n } else {\n return $from.call(TypedArray, data);\n }\n hide(that, '_d', {\n b: buffer,\n o: offset,\n l: byteLength,\n e: length,\n v: new $DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);\n hide(TypedArrayPrototype, 'constructor', TypedArray);\n } else if (!fails(function () {\n TypedArray(1);\n }) || !fails(function () {\n new TypedArray(-1); // eslint-disable-line no-new\n }) || !$iterDetect(function (iter) {\n new TypedArray(); // eslint-disable-line no-new\n new TypedArray(null); // eslint-disable-line no-new\n new TypedArray(1.5); // eslint-disable-line no-new\n new TypedArray(iter); // eslint-disable-line no-new\n }, true)) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME);\n var klass;\n // `ws` module bug, temporarily remove validation length for Uint8Array\n // https://github.com/websockets/ws/pull/645\n if (!isObject(data)) return new Base(toIndex(data));\n if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n return $length !== undefined\n ? new Base(data, toOffset($offset, BYTES), $length)\n : $offset !== undefined\n ? new Base(data, toOffset($offset, BYTES))\n : new Base(data);\n }\n if (TYPED_ARRAY in data) return fromList(TypedArray, data);\n return $from.call(TypedArray, data);\n });\n arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {\n if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);\n });\n TypedArray[PROTOTYPE] = TypedArrayPrototype;\n if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;\n }\n var $nativeIterator = TypedArrayPrototype[ITERATOR];\n var CORRECT_ITER_NAME = !!$nativeIterator\n && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);\n var $iterator = $iterators.values;\n hide(TypedArray, TYPED_CONSTRUCTOR, true);\n hide(TypedArrayPrototype, TYPED_ARRAY, NAME);\n hide(TypedArrayPrototype, VIEW, true);\n hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);\n\n if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {\n dP(TypedArrayPrototype, TAG, {\n get: function () { return NAME; }\n });\n }\n\n O[NAME] = TypedArray;\n\n $export($export.G + $export.W + $export.F * (TypedArray != Base), O);\n\n $export($export.S, NAME, {\n BYTES_PER_ELEMENT: BYTES\n });\n\n $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {\n from: $from,\n of: $of\n });\n\n if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);\n\n $export($export.P, NAME, proto);\n\n setSpecies(NAME);\n\n $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });\n\n $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);\n\n if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;\n\n $export($export.P + $export.F * fails(function () {\n new TypedArray(1).slice();\n }), NAME, { slice: $slice });\n\n $export($export.P + $export.F * (fails(function () {\n return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();\n }) || !fails(function () {\n TypedArrayPrototype.toLocaleString.call([1, 2]);\n })), NAME, { toLocaleString: $toLocaleString });\n\n Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;\n if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);\n };\n} else module.exports = function () { /* empty */ };\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190eXBlZC1hcnJheS5qcz9lZmI1Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbmlmIChyZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpKSB7XG4gIHZhciBMSUJSQVJZID0gcmVxdWlyZSgnLi9fbGlicmFyeScpO1xuICB2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG4gIHZhciBmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG4gIHZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG4gIHZhciAkdHlwZWQgPSByZXF1aXJlKCcuL190eXBlZCcpO1xuICB2YXIgJGJ1ZmZlciA9IHJlcXVpcmUoJy4vX3R5cGVkLWJ1ZmZlcicpO1xuICB2YXIgY3R4ID0gcmVxdWlyZSgnLi9fY3R4Jyk7XG4gIHZhciBhbkluc3RhbmNlID0gcmVxdWlyZSgnLi9fYW4taW5zdGFuY2UnKTtcbiAgdmFyIHByb3BlcnR5RGVzYyA9IHJlcXVpcmUoJy4vX3Byb3BlcnR5LWRlc2MnKTtcbiAgdmFyIGhpZGUgPSByZXF1aXJlKCcuL19oaWRlJyk7XG4gIHZhciByZWRlZmluZUFsbCA9IHJlcXV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('metadata');\nvar store = shared.store || (shared.store = new (__webpack_require__(172))());\n\nvar getOrCreateMetadataMap = function (target, targetKey, create) {\n var targetMetadata = store.get(target);\n if (!targetMetadata) {\n if (!create) return undefined;\n store.set(target, targetMetadata = new Map());\n }\n var keyMetadata = targetMetadata.get(targetKey);\n if (!keyMetadata) {\n if (!create) return undefined;\n targetMetadata.set(targetKey, keyMetadata = new Map());\n } return keyMetadata;\n};\nvar ordinaryHasOwnMetadata = function (MetadataKey, O, P) {\n var metadataMap = getOrCreateMetadataMap(O, P, false);\n return metadataMap === undefined ? false : metadataMap.has(MetadataKey);\n};\nvar ordinaryGetOwnMetadata = function (MetadataKey, O, P) {\n var metadataMap = getOrCreateMetadataMap(O, P, false);\n return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);\n};\nvar ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {\n getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);\n};\nvar ordinaryOwnMetadataKeys = function (target, targetKey) {\n var metadataMap = getOrCreateMetadataMap(target, targetKey, false);\n var keys = [];\n if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });\n return keys;\n};\nvar toMetaKey = function (it) {\n return it === undefined || typeof it == 'symbol' ? it : String(it);\n};\nvar exp = function (O) {\n $export($export.S, 'Reflect', O);\n};\n\nmodule.exports = {\n store: store,\n map: getOrCreateMetadataMap,\n has: ordinaryHasOwnMetadata,\n get: ordinaryGetOwnMetadata,\n set: ordinaryDefineOwnMetadata,\n keys: ordinaryOwnMetadataKeys,\n key: toMetaKey,\n exp: exp\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19tZXRhZGF0YS5qcz9jMDJiIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBNY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lY3QnLCBPKTtcbn07XG5cbm1vZHVsZS5leHBvcnRzID0ge1xuICBzdG9yZTogc3RvcmUsXG4gIG1hcDogZ2V0T3JDcmVhdGVNZXRhZGF0YU1hcCxcbiAgaGFzOiBvcmRpbmFyeUhhc093bk1ldGFkYXRhLFxuICBnZXQ6IG9yZGluYXJ5R2V0T3duTWV0YWRhdGEsXG4gIHNldDogb3JkaW5hcnlEZWZpbmVPd25NZXRhZGF0YSxcbiAga2V5czogb3JkaW5hcnlPd25NZXRhZGF0YUtleXMsXG4gIGtleTogdG9NZXRhS2V5LFxuICBleHA6IGV4cFxufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWV0YWRhdGEuanNcbi8vIG1vZHVsZSBpZCA9IDM5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///39\n")},function(module,exports,__webpack_require__){eval("var anObject = __webpack_require__(41);\nvar IE8_DOM_DEFINE = __webpack_require__(184);\nvar toPrimitive = __webpack_require__(132);\nvar dP = Object.defineProperty;\n\nexports.f = __webpack_require__(44) ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1kcC5qcz83YWYwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIElFOF9ET01fREVGSU5FID0gcmVxdWlyZSgnLi9faWU4LWRvbS1kZWZpbmUnKTtcbnZhciB0b1ByaW1pdGl2ZSA9IHJlcXVpcmUoJy4vX3RvLXByaW1pdGl2ZScpO1xudmFyIGRQID0gT2JqZWN0LmRlZmluZVByb3BlcnR5O1xuXG5leHBvcnRzLmYgPSByZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpID8gT2JqZWN0LmRlZmluZVByb3BlcnR5IDogZnVuY3Rpb24gZGVmaW5lUHJvcGVydHkoTywgUCwgQXR0cmlidXRlcykge1xuICBhbk9iamVjdChPKTtcbiAgUCA9IHRvUHJpbWl0aXZlKFAsIHRydWUpO1xuICBhbk9iamVjdChBdHRyaWJ1dGVzKTtcbiAgaWYgKElFOF9ET01fREVGSU5FKSB0cnkge1xuICAgIHJldHVybiBkUChPLCBQLCBBdHRyaWJ1dGVzKTtcbiAgfSBjYXRjaCAoZSkgeyAvKiBlbXB0eSAqLyB9XG4gIGlmICgnZ2V0JyBpbiBBdHRyaWJ1dGVzIHx8ICdzZXQnIGluIEF0dHJpYnV0ZXMpIHRocm93IFR5cGVFcnJvcignQWNjZXNzb3JzIG5vdCBzdXBwb3J0ZWQhJyk7XG4gIGlmICgndmFsdWUnIGluIEF0dHJpYnV0ZXMpIE9bUF0gPSBBdHRyaWJ1dGVzLnZhbHVlO1xuICByZXR1cm4gTztcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWRwLmpzXG4vLyBtb2R1bGUgaWQgPSA0MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///40\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(36);\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FuLW9iamVjdC5qcz9lZmIzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKCFpc09iamVjdChpdCkpIHRocm93IFR5cGVFcnJvcihpdCArICcgaXMgbm90IGFuIG9iamVjdCEnKTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hbi1vYmplY3QuanNcbi8vIG1vZHVsZSBpZCA9IDQxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///41\n")},function(module,exports,__webpack_require__){eval("var META = __webpack_require__(48)('meta');\nvar isObject = __webpack_require__(6);\nvar has = __webpack_require__(17);\nvar setDesc = __webpack_require__(11).f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !__webpack_require__(5)(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJza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IHtcbiAgS0VZOiBNRVRBLFxuICBORUVEOiBmYWxzZSxcbiAgZmFzdEtleTogZmFzdEtleSxcbiAgZ2V0V2VhazogZ2V0V2VhayxcbiAgb25GcmVlemU6IG9uRnJlZXplXG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19tZXRhLmpzXG4vLyBtb2R1bGUgaWQgPSA0MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///42\n")},function(module,exports,__webpack_require__){eval("// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = __webpack_require__(8)('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(18)(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hZGQtdG8tdW5zY29wYWJsZXMuanM/NDYxMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMi4xLjMuMzEgQXJyYXkucHJvdG90eXBlW0BAdW5zY29wYWJsZXNdXG52YXIgVU5TQ09QQUJMRVMgPSByZXF1aXJlKCcuL193a3MnKSgndW5zY29wYWJsZXMnKTtcbnZhciBBcnJheVByb3RvID0gQXJyYXkucHJvdG90eXBlO1xuaWYgKEFycmF5UHJvdG9bVU5TQ09QQUJMRVNdID09IHVuZGVmaW5lZCkgcmVxdWlyZSgnLi9faGlkZScpKEFycmF5UHJvdG8sIFVOU0NPUEFCTEVTLCB7fSk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChrZXkpIHtcbiAgQXJyYXlQcm90b1tVTlNDT1BBQkxFU11ba2V5XSA9IHRydWU7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hZGQtdG8tdW5zY29wYWJsZXMuanNcbi8vIG1vZHVsZSBpZCA9IDQzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///43\n")},function(module,exports,__webpack_require__){eval("// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(66)(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2Rlc2NyaXB0b3JzLmpzP2Y4NGQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gVGhhbmsncyBJRTggZm9yIGhpcyBmdW5ueSBkZWZpbmVQcm9wZXJ0eVxubW9kdWxlLmV4cG9ydHMgPSAhcmVxdWlyZSgnLi9fZmFpbHMnKShmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBPYmplY3QuZGVmaW5lUHJvcGVydHkoe30sICdhJywgeyBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIDc7IH0gfSkuYSAhPSA3O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZGVzY3JpcHRvcnMuanNcbi8vIG1vZHVsZSBpZCA9IDQ0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///44\n")},function(module,exports,__webpack_require__){eval("// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = __webpack_require__(187);\nvar defined = __webpack_require__(130);\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWlvYmplY3QuanM/NGRjNCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyB0byBpbmRleGVkIG9iamVjdCwgdG9PYmplY3Qgd2l0aCBmYWxsYmFjayBmb3Igbm9uLWFycmF5LWxpa2UgRVMzIHN0cmluZ3NcbnZhciBJT2JqZWN0ID0gcmVxdWlyZSgnLi9faW9iamVjdCcpO1xudmFyIGRlZmluZWQgPSByZXF1aXJlKCcuL19kZWZpbmVkJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gSU9iamVjdChkZWZpbmVkKGl0KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWlvYmplY3QuanNcbi8vIG1vZHVsZSBpZCA9IDQ1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///45\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(464), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL2pzb24vc3RyaW5naWZ5LmpzPzlhZjEiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL2pzb24vc3RyaW5naWZ5XCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL2pzb24vc3RyaW5naWZ5LmpzXG4vLyBtb2R1bGUgaWQgPSA0NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///46\n')},function(module,exports){eval("module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19wcm9wZXJ0eS1kZXNjLmpzPzdkNGQiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoYml0bWFwLCB2YWx1ZSkge1xuICByZXR1cm4ge1xuICAgIGVudW1lcmFibGU6ICEoYml0bWFwICYgMSksXG4gICAgY29uZmlndXJhYmxlOiAhKGJpdG1hcCAmIDIpLFxuICAgIHdyaXRhYmxlOiAhKGJpdG1hcCAmIDQpLFxuICAgIHZhbHVlOiB2YWx1ZVxuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcHJvcGVydHktZGVzYy5qc1xuLy8gbW9kdWxlIGlkID0gNDdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///47\n")},function(module,exports){eval("var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL191aWQuanM/YmE1NCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgaWQgPSAwO1xudmFyIHB4ID0gTWF0aC5yYW5kb20oKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGtleSkge1xuICByZXR1cm4gJ1N5bWJvbCgnLmNvbmNhdChrZXkgPT09IHVuZGVmaW5lZCA/ICcnIDoga2V5LCAnKV8nLCAoKytpZCArIHB4KS50b1N0cmluZygzNikpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdWlkLmpzXG4vLyBtb2R1bGUgaWQgPSA0OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///48\n")},function(module,exports){eval("module.exports = false;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19saWJyYXJ5LmpzPzU3NzkiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmYWxzZTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbGlicmFyeS5qc1xuLy8gbW9kdWxlIGlkID0gNDlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///49\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = __webpack_require__(150);\nvar enumBugKeys = __webpack_require__(104);\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3Qta2V5cy5qcz80MjFkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi4xNCAvIDE1LjIuMy4xNCBPYmplY3Qua2V5cyhPKVxudmFyICRrZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMtaW50ZXJuYWwnKTtcbnZhciBlbnVtQnVnS2V5cyA9IHJlcXVpcmUoJy4vX2VudW0tYnVnLWtleXMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBPYmplY3Qua2V5cyB8fCBmdW5jdGlvbiBrZXlzKE8pIHtcbiAgcmV0dXJuICRrZXlzKE8sIGVudW1CdWdLZXlzKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSA1MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///50\n")},function(module,exports,__webpack_require__){eval("var toInteger = __webpack_require__(33);\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1hYnNvbHV0ZS1pbmRleC5qcz9jZThmIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgbWF4ID0gTWF0aC5tYXg7XG52YXIgbWluID0gTWF0aC5taW47XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpbmRleCwgbGVuZ3RoKSB7XG4gIGluZGV4ID0gdG9JbnRlZ2VyKGluZGV4KTtcbiAgcmV0dXJuIGluZGV4IDwgMCA/IG1heChpbmRleCArIGxlbmd0aCwgMCkgOiBtaW4oaW5kZXgsIGxlbmd0aCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1hYnNvbHV0ZS1pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gNTFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///51\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = __webpack_require__(3);\nvar dPs = __webpack_require__(151);\nvar enumBugKeys = __webpack_require__(104);\nvar IE_PROTO = __webpack_require__(103)('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(101)('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n __webpack_require__(105).appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtY3JlYXRlLmpzP2VmMjkiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjIgLyAxNS4yLjMuNSBPYmplY3QuY3JlYXRlKE8gWywgUHJvcGVydGllc10pXG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBkUHMgPSByZXF1aXJlKCcuL19vYmplY3QtZHBzJyk7XG52YXIgZW51bUJ1Z0tleXMgPSByZXF1aXJlKCcuL19lbnVtLWJ1Zy1rZXlzJyk7XG52YXIgSUVfUFJPVE8gPSByZXF1aXJlKCcuL19zaG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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///52\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = __webpack_require__(150);\nvar hiddenKeys = __webpack_require__(104).concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZ29wbi5qcz81OWMzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi43IC8gMTUuMi4zLjQgT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMoTylcbnZhciAka2V5cyA9IHJlcXVpcmUoJy4vX29iamVjdC1rZXlzLWludGVybmFsJyk7XG52YXIgaGlkZGVuS2V5cyA9IHJlcXVpcmUoJy4vX2VudW0tYnVnLWtleXMnKS5jb25jYXQoJ2xlbmd0aCcsICdwcm90b3R5cGUnKTtcblxuZXhwb3J0cy5mID0gT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMgfHwgZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlOYW1lcyhPKSB7XG4gIHJldHVybiAka2V5cyhPLCBoaWRkZW5LZXlzKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1nb3BuLmpzXG4vLyBtb2R1bGUgaWQgPSA1M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///53\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar global = __webpack_require__(4);\nvar dP = __webpack_require__(11);\nvar DESCRIPTORS = __webpack_require__(10);\nvar SPECIES = __webpack_require__(8)('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtc3BlY2llcy5qcz8wODQ5Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBkUCA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpO1xudmFyIERFU0NSSVBUT1JTID0gcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKTtcbnZhciBTUEVDSUVTID0gcmVxdWlyZSgnLi9fd2tzJykoJ3NwZWNpZXMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoS0VZKSB7XG4gIHZhciBDID0gZ2xvYmFsW0tFWV07XG4gIGlmIChERVNDUklQVE9SUyAmJiBDICYmICFDW1NQRUNJRVNdKSBkUC5mKEMsIFNQRUNJRVMsIHtcbiAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzOyB9XG4gIH0pO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc2V0LXNwZWNpZXMuanNcbi8vIG1vZHVsZSBpZCA9IDU0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///54\n")},function(module,exports){eval("module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hbi1pbnN0YW5jZS5qcz9mNDZhIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCBDb25zdHJ1Y3RvciwgbmFtZSwgZm9yYmlkZGVuRmllbGQpIHtcbiAgaWYgKCEoaXQgaW5zdGFuY2VvZiBDb25zdHJ1Y3RvcikgfHwgKGZvcmJpZGRlbkZpZWxkICE9PSB1bmRlZmluZWQgJiYgZm9yYmlkZGVuRmllbGQgaW4gaXQpKSB7XG4gICAgdGhyb3cgVHlwZUVycm9yKG5hbWUgKyAnOiBpbmNvcnJlY3QgaW52b2NhdGlvbiEnKTtcbiAgfSByZXR1cm4gaXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hbi1pbnN0YW5jZS5qc1xuLy8gbW9kdWxlIGlkID0gNTVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///55\n")},function(module,exports,__webpack_require__){eval("var ctx = __webpack_require__(27);\nvar call = __webpack_require__(162);\nvar isArrayIter = __webpack_require__(117);\nvar anObject = __webpack_require__(3);\nvar toLength = __webpack_require__(12);\nvar getIterFn = __webpack_require__(119);\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19mb3Itb2YuanM/YmU2NCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY3R4ID0gcmVxdWlyZSgnLi9fY3R4Jyk7XG52YXIgY2FsbCA9IHJlcXVpcmUoJ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dKSA6IGYoaXRlcmFibGVbaW5kZXhdKTtcbiAgICBpZiAocmVzdWx0ID09PSBCUkVBSyB8fCByZXN1bHQgPT09IFJFVFVSTikgcmV0dXJuIHJlc3VsdDtcbiAgfSBlbHNlIGZvciAoaXRlcmF0b3IgPSBpdGVyRm4uY2FsbChpdGVyYWJsZSk7ICEoc3RlcCA9IGl0ZXJhdG9yLm5leHQoKSkuZG9uZTspIHtcbiAgICByZXN1bHQgPSBjYWxsKGl0ZXJhdG9yLCBmLCBzdGVwLnZhbHVlLCBlbnRyaWVzKTtcbiAgICBpZiAocmVzdWx0ID09PSBCUkVBSyB8fCByZXN1bHQgPT09IFJFVFVSTikgcmV0dXJuIHJlc3VsdDtcbiAgfVxufTtcbmV4cG9ydHMuQlJFQUsgPSBCUkVBSztcbmV4cG9ydHMuUkVUVVJOID0gUkVUVVJOO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19mb3Itb2YuanNcbi8vIG1vZHVsZSBpZCA9IDU2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///56\n")},function(module,exports,__webpack_require__){eval("var redefine = __webpack_require__(19);\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19yZWRlZmluZS1hbGwuanM/MDM1ZSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgcmVkZWZpbmUgPSByZXF1aXJlKCcuL19yZWRlZmluZScpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAodGFyZ2V0LCBzcmMsIHNhZmUpIHtcbiAgZm9yICh2YXIga2V5IGluIHNyYykgcmVkZWZpbmUodGFyZ2V0LCBrZXksIHNyY1trZXldLCBzYWZlKTtcbiAgcmV0dXJuIHRhcmdldDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3JlZGVmaW5lLWFsbC5qc1xuLy8gbW9kdWxlIGlkID0gNTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///57\n")},function(module,exports,__webpack_require__){eval("var dP = __webpack_require__(40);\nvar createDesc = __webpack_require__(73);\nmodule.exports = __webpack_require__(44) ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2hpZGUuanM/ODQ5YyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZFAgPSByZXF1aXJlKCcuL19vYmplY3QtZHAnKTtcbnZhciBjcmVhdGVEZXNjID0gcmVxdWlyZSgnLi9fcHJvcGVydHktZGVzYycpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpID8gZnVuY3Rpb24gKG9iamVjdCwga2V5LCB2YWx1ZSkge1xuICByZXR1cm4gZFAuZihvYmplY3QsIGtleSwgY3JlYXRlRGVzYygxLCB2YWx1ZSkpO1xufSA6IGZ1bmN0aW9uIChvYmplY3QsIGtleSwgdmFsdWUpIHtcbiAgb2JqZWN0W2tleV0gPSB2YWx1ZTtcbiAgcmV0dXJuIG9iamVjdDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faGlkZS5qc1xuLy8gbW9kdWxlIGlkID0gNThcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///58\n")},function(module,exports){eval("var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2hhcy5qcz8wZjYyIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBoYXNPd25Qcm9wZXJ0eSA9IHt9Lmhhc093blByb3BlcnR5O1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQsIGtleSkge1xuICByZXR1cm4gaGFzT3duUHJvcGVydHkuY2FsbChpdCwga2V5KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faGFzLmpzXG4vLyBtb2R1bGUgaWQgPSA1OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///59\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(443), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9nZXQtcHJvdG90eXBlLW9mLmpzPzY3MWUiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9nZXQtcHJvdG90eXBlLW9mXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9nZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSA2MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///60\n')},function(module,exports,__webpack_require__){eval("var def = __webpack_require__(11).f;\nvar has = __webpack_require__(17);\nvar TAG = __webpack_require__(8)('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtdG8tc3RyaW5nLXRhZy5qcz9jOThiIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBkZWYgPSByZXF1aXJlKCcuL19vYmplY3QtZHAnKS5mO1xudmFyIGhhcyA9IHJlcXVpcmUoJy4vX2hhcycpO1xudmFyIFRBRyA9IHJlcXVpcmUoJy4vX3drcycpKCd0b1N0cmluZ1RhZycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCwgdGFnLCBzdGF0KSB7XG4gIGlmIChpdCAmJiAhaGFzKGl0ID0gc3RhdCA/IGl0IDogaXQucHJvdG90eXBlLCBUQUcpKSBkZWYoaXQsIFRBRywgeyBjb25maWd1cmFibGU6IHRydWUsIHZhbHVlOiB0YWcgfSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtdG8tc3RyaW5nLXRhZy5qc1xuLy8gbW9kdWxlIGlkID0gNjFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///61\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar defined = __webpack_require__(32);\nvar fails = __webpack_require__(5);\nvar spaces = __webpack_require__(107);\nvar space = '[' + spaces + ']';\nvar non = '\\u200b\\u0085';\nvar ltrim = RegExp('^' + space + space + '*');\nvar rtrim = RegExp(space + space + '*$');\n\nvar exporter = function (KEY, exec, ALIAS) {\n var exp = {};\n var FORCE = fails(function () {\n return !!spaces[KEY]() || non[KEY]() != non;\n });\n var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];\n if (ALIAS) exp[ALIAS] = fn;\n $export($export.P + $export.F * FORCE, 'String', exp);\n};\n\n// 1 -> String#trimLeft\n// 2 -> String#trimRight\n// 3 -> String#trim\nvar trim = exporter.trim = function (string, TYPE) {\n string = String(defined(string));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n};\n\nmodule.exports = exporter;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zdHJpbmctdHJpbS5qcz82MjY3Il0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcbnZhciBmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG52YXIgc3BhY2VzID0gcmVxdWlyZSgnLi9fc3RyaW5nLXdzJyk7XG52YXIgc3BhY2UgPSAnWycgKyBzcGFjZXMgKyAnXSc7XG52YXIgbm9uID0gJ1xcdTIwMGJcXHUwMDg1JztcbnZhciBsdHJpbSA9IFJlZ0V4cCgnXicgKyBzcGFjZSArIHNwYWNlICsgJyonKTtcbnZhciBydHJpbSA9IFJlZ0V4cChzcGFjZSArIHNwYWNlICsgJyokJyk7XG5cbnZhciBleHBvcnRlciA9IGZ1bmN0aW9uIChLRVksIGV4ZWMsIEFMSUFTKSB7XG4gIHZhciBleHAgPSB7fTtcbiAgdmF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TtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///62\n")},function(module,exports){eval("module.exports = {};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pdGVyYXRvcnMuanM/NmNkZCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHt9O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pdGVyYXRvcnMuanNcbi8vIG1vZHVsZSBpZCA9IDYzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///63\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(6);\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL192YWxpZGF0ZS1jb2xsZWN0aW9uLmpzP2NlYWYiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCwgVFlQRSkge1xuICBpZiAoIWlzT2JqZWN0KGl0KSB8fCBpdC5fdCAhPT0gVFlQRSkgdGhyb3cgVHlwZUVycm9yKCdJbmNvbXBhdGlibGUgcmVjZWl2ZXIsICcgKyBUWVBFICsgJyByZXF1aXJlZCEnKTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdmFsaWRhdGUtY29sbGVjdGlvbi5qc1xuLy8gbW9kdWxlIGlkID0gNjRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///64\n")},function(module,exports,__webpack_require__){eval("// optional / simple context binding\nvar aFunction = __webpack_require__(93);\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2N0eC5qcz9mOTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIG9wdGlvbmFsIC8gc2ltcGxlIGNvbnRleHQgYmluZGluZ1xudmFyIGFGdW5jdGlvbiA9IHJlcXVpcmUoJy4vX2EtZnVuY3Rpb24nKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGZuLCB0aGF0LCBsZW5ndGgpIHtcbiAgYUZ1bmN0aW9uKGZuKTtcbiAgaWYgKHRoYXQgPT09IHVuZGVmaW5lZCkgcmV0dXJuIGZuO1xuICBzd2l0Y2ggKGxlbmd0aCkge1xuICAgIGNhc2UgMTogcmV0dXJuIGZ1bmN0aW9uIChhKSB7XG4gICAgICByZXR1cm4gZm4uY2FsbCh0aGF0LCBhKTtcbiAgICB9O1xuICAgIGNhc2UgMjogcmV0dXJuIGZ1bmN0aW9uIChhLCBiKSB7XG4gICAgICByZXR1cm4gZm4uY2FsbCh0aGF0LCBhLCBiKTtcbiAgICB9O1xuICAgIGNhc2UgMzogcmV0dXJuIGZ1bmN0aW9uIChhLCBiLCBjKSB7XG4gICAgICByZXR1cm4gZm4uY2FsbCh0aGF0LCBhLCBiLCBjKTtcbiAgICB9O1xuICB9XG4gIHJldHVybiBmdW5jdGlvbiAoLyogLi4uYXJncyAqLykge1xuICAgIHJldHVybiBmbi5hcHBseSh0aGF0LCBhcmd1bWVudHMpO1xuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19jdHguanNcbi8vIG1vZHVsZSBpZCA9IDY1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///65\n")},function(module,exports){eval("module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2ZhaWxzLmpzPzRiY2QiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoZXhlYykge1xuICB0cnkge1xuICAgIHJldHVybiAhIWV4ZWMoKTtcbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiB0cnVlO1xuICB9XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2ZhaWxzLmpzXG4vLyBtb2R1bGUgaWQgPSA2NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///66\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = __webpack_require__(186);\nvar enumBugKeys = __webpack_require__(137);\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1rZXlzLmpzPzk2NGIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjE0IC8gMTUuMi4zLjE0IE9iamVjdC5rZXlzKE8pXG52YXIgJGtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cy1pbnRlcm5hbCcpO1xudmFyIGVudW1CdWdLZXlzID0gcmVxdWlyZSgnLi9fZW51bS1idWcta2V5cycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IE9iamVjdC5rZXlzIHx8IGZ1bmN0aW9uIGtleXMoTykge1xuICByZXR1cm4gJGtleXMoTywgZW51bUJ1Z0tleXMpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3Qta2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gNjdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///67\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _typeof2 = __webpack_require__(98);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n\n return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4uanM/Y2YwYSJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuZXhwb3J0cy5fX2Vz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0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///68\n')},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = __webpack_require__(456);\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = __webpack_require__(203);\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = __webpack_require__(98);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2luaGVyaXRzLmpzPzNkZmQiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmV4cG9ydHMuX19lc01vZHVsZSA9IHRydWU7XG5cbnZhciBfc2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKFwiLi4vY29yZS1qcy9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZlwiKTtcblxudmFyIF9zZXRQcm90b3R5cGVPZjIgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KF9zZXRQcm90b3R5cGVPZik7XG5cbnZhciBfY3JlYXRlID0gcmVxdWlyZShcIi4u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iAoc3VwZXJDbGFzcykgX3NldFByb3RvdHlwZU9mMi5kZWZhdWx0ID8gKDAsIF9zZXRQcm90b3R5cGVPZjIuZGVmYXVsdCkoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpIDogc3ViQ2xhc3MuX19wcm90b19fID0gc3VwZXJDbGFzcztcbn07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2luaGVyaXRzLmpzXG4vLyBtb2R1bGUgaWQgPSA2OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///69\n')},function(module,exports,__webpack_require__){eval("// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = __webpack_require__(28);\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pb2JqZWN0LmpzPzQzYTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZmFsbGJhY2sgZm9yIG5vbi1hcnJheS1saWtlIEVTMyBhbmQgbm9uLWVudW1lcmFibGUgb2xkIFY4IHN0cmluZ3NcbnZhciBjb2YgPSByZXF1aXJlKCcuL19jb2YnKTtcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1wcm90b3R5cGUtYnVpbHRpbnNcbm1vZHVsZS5leHBvcnRzID0gT2JqZWN0KCd6JykucHJvcGVydHlJc0VudW1lcmFibGUoMCkgPyBPYmplY3QgOiBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIGNvZihpdCkgPT0gJ1N0cmluZycgPyBpdC5zcGxpdCgnJykgOiBPYmplY3QoaXQpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gNzBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///70\n")},function(module,exports){eval("exports.f = {}.propertyIsEnumerable;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtcGllLmpzPzYzNTYiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0cy5mID0ge30ucHJvcGVydHlJc0VudW1lcmFibGU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1waWUuanNcbi8vIG1vZHVsZSBpZCA9IDcxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///71\n")},function(module,exports,__webpack_require__){eval("// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = __webpack_require__(28);\nvar TAG = __webpack_require__(8)('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jbGFzc29mLmpzP2MwMmQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZ2V0dGluZyB0YWcgZnJvbSAxOS4xLjMuNiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nKClcbnZhciBjb2YgPSByZXF1aXJlKCcuL19jb2YnKTtcbnZhciBUQUcgPSByZXF1aXJlKCcuL193a3MnKSgndG9TdHJpbmdUYWcnKTtcbi8vIEVTMyB3cm9uZyBoZXJlXG52YXIgQVJHID0gY29mKGZ1bmN0aW9uICgpIHsgcmV0dXJuIGFyZ3VtZW50czsgfSgpKSA9PSAnQXJndW1lbnRzJztcblxuLy8gZmFsbGJhY2sgZm9yIElFMTEgU2NyaXB0IEFjY2VzcyBEZW5pZWQgZXJyb3JcbnZhciB0cnlHZXQgPSBmdW5jdGlvbiAoaXQsIGtleSkge1xuICB0cnkge1xuICAgIHJldHVybiBpdFtrZXldO1xuICB9IGNhdGNoIChlKSB7IC8qIGVtcHR5ICovIH1cbn07XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHZhciBPLCBULCBCO1xuICByZXR1cm4gaXQgPT09IHVuZGVmaW5lZCA/ICdVbmRlZmluZWQnIDogaXQgPT09IG51bGwgPyAnTnVsbCdcbiAgICAvLyBAQHRvU3RyaW5nVGFnIGNhc2VcbiAgICA6IHR5cGVvZiAoVCA9IHRyeUdldChPID0gT2JqZWN0KGl0KSwgVEFHKSkgPT0gJ3N0cmluZycgPyBUXG4gICAgLy8gYnVpbHRpblRhZyBjYXNlXG4gICAgOiBBUkcgPyBjb2YoTylcbiAgICAvLyBFUzMgYXJndW1lbnRzIGZhbGxiYWNrXG4gICAgOiAoQiA9IGNvZihPKSkgPT0gJ09iamVjdCcgJiYgdHlwZW9mIE8uY2FsbGVlID09ICdmdW5jdGlvbicgPyAnQXJndW1lbnRzJyA6IEI7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jbGFzc29mLmpzXG4vLyBtb2R1bGUgaWQgPSA3MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///72\n")},function(module,exports){eval("module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3Byb3BlcnR5LWRlc2MuanM/NWZjMCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChiaXRtYXAsIHZhbHVlKSB7XG4gIHJldHVybiB7XG4gICAgZW51bWVyYWJsZTogIShiaXRtYXAgJiAxKSxcbiAgICBjb25maWd1cmFibGU6ICEoYml0bWFwICYgMiksXG4gICAgd3JpdGFibGU6ICEoYml0bWFwICYgNCksXG4gICAgdmFsdWU6IHZhbHVlXG4gIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3Byb3BlcnR5LWRlc2MuanNcbi8vIG1vZHVsZSBpZCA9IDczXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///73\n")},function(module,exports){eval("module.exports = {};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXJhdG9ycy5qcz9mZGI0Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0ge307XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXRlcmF0b3JzLmpzXG4vLyBtb2R1bGUgaWQgPSA3NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///74\n")},function(module,exports){eval("var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NvZi5qcz80N2QzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b1N0cmluZyA9IHt9LnRvU3RyaW5nO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gdG9TdHJpbmcuY2FsbChpdCkuc2xpY2UoOCwgLTEpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19jb2YuanNcbi8vIG1vZHVsZSBpZCA9IDc1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///75\n")},function(module,exports,__webpack_require__){eval("// 7.1.13 ToObject(argument)\nvar defined = __webpack_require__(130);\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLW9iamVjdC5qcz9iMDFkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMS4xMyBUb09iamVjdChhcmd1bWVudClcbnZhciBkZWZpbmVkID0gcmVxdWlyZSgnLi9fZGVmaW5lZCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIE9iamVjdChkZWZpbmVkKGl0KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gNzZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///76\n")},function(module,exports){eval("exports.f = {}.propertyIsEnumerable;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1waWUuanM/MzY5MiJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnRzLmYgPSB7fS5wcm9wZXJ0eUlzRW51bWVyYWJsZTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtcGllLmpzXG4vLyBtb2R1bGUgaWQgPSA3N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///77\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zaGFyZWQuanM/NTU2OCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgU0hBUkVEID0gJ19fY29yZS1qc19zaGFyZWRfXyc7XG52YXIgc3RvcmUgPSBnbG9iYWxbU0hBUkVEXSB8fCAoZ2xvYmFsW1NIQVJFRF0gPSB7fSk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChrZXkpIHtcbiAgcmV0dXJuIHN0b3JlW2tleV0gfHwgKHN0b3JlW2tleV0gPSB7fSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zaGFyZWQuanNcbi8vIG1vZHVsZSBpZCA9IDc4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///78\n")},function(module,exports,__webpack_require__){eval("// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(24);\nvar toLength = __webpack_require__(12);\nvar toAbsoluteIndex = __webpack_require__(51);\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hcnJheS1pbmNsdWRlcy5qcz9hMmRlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGZhbHNlIC0+IEFycmF5I2luZGV4T2Zcbi8vIHRydWUgIC0+IEFycmF5I2luY2x1ZGVzXG52YXIgdG9JT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8taW9iamVjdCcpO1xudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi9fdG8tbGVuZ3RoJyk7XG52YXIgdG9BYnNvbHV0ZUluZGV4ID0gcmVxdWlyZSgnLi9fdG8tYWJzb2x1dGUtaW5kZXgnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKElTX0lOQ0xVREVTKSB7XG4gIHJldHVybiBmdW5jdGlvbiAoJHRoaXMsIGVsLCBmcm9tSW5kZXgpIHtcbiAgICB2YXIgTyA9IHRvSU9iamVjdCgkdGhpcyk7XG4gICAgdmFyIGxlbmd0aC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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///79\n")},function(module,exports){eval("exports.f = Object.getOwnPropertySymbols;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZ29wcy5qcz82MzUzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydHMuZiA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1nb3BzLmpzXG4vLyBtb2R1bGUgaWQgPSA4MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///80\n")},function(module,exports,__webpack_require__){eval("// 7.2.2 IsArray(argument)\nvar cof = __webpack_require__(28);\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1hcnJheS5qcz81Y2VkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMi4yIElzQXJyYXkoYXJndW1lbnQpXG52YXIgY29mID0gcmVxdWlyZSgnLi9fY29mJyk7XG5tb2R1bGUuZXhwb3J0cyA9IEFycmF5LmlzQXJyYXkgfHwgZnVuY3Rpb24gaXNBcnJheShhcmcpIHtcbiAgcmV0dXJuIGNvZihhcmcpID09ICdBcnJheSc7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gODFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///81\n")},function(module,exports,__webpack_require__){eval("// 7.2.8 IsRegExp(argument)\nvar isObject = __webpack_require__(6);\nvar cof = __webpack_require__(28);\nvar MATCH = __webpack_require__(8)('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1yZWdleHAuanM/YmI0MyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjIuOCBJc1JlZ0V4cChhcmd1bWVudClcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIGNvZiA9IHJlcXVpcmUoJy4vX2NvZicpO1xudmFyIE1BVENIID0gcmVxdWlyZSgnLi9fd2tzJykoJ21hdGNoJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICB2YXIgaXNSZWdFeHA7XG4gIHJldHVybiBpc09iamVjdChpdCkgJiYgKChpc1JlZ0V4cCA9IGl0W01BVENIXSkgIT09IHVuZGVmaW5lZCA/ICEhaXNSZWdFeHAgOiBjb2YoaXQpID09ICdSZWdFeHAnKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2lzLXJlZ2V4cC5qc1xuLy8gbW9kdWxlIGlkID0gODJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///82\n")},function(module,exports,__webpack_require__){eval("var ITERATOR = __webpack_require__(8)('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pdGVyLWRldGVjdC5qcz9hYTRjIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBJVEVSQVRPUiA9IHJlcXVpcmUoJy4vX3drcycpKCdpdGVyYXRvcicpO1xudmFyIFNBRkVfQ0xP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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///83\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = __webpack_require__(3);\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19mbGFncy5qcz9kMjkxIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDIxLjIuNS4zIGdldCBSZWdFeHAucHJvdG90eXBlLmZsYWdzXG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKCkge1xuICB2YXIgdGhhdCA9IGFuT2JqZWN0KHRoaXMpO1xuICB2YXIgcmVzdWx0ID0gJyc7XG4gIGlmICh0aGF0Lmdsb2JhbCkgcmVzdWx0ICs9ICdnJztcbiAgaWYgKHRoYXQuaWdub3JlQ2FzZSkgcmVzdWx0ICs9ICdpJztcbiAgaWYgKHRoYXQubXVsdGlsaW5lKSByZXN1bHQgKz0gJ20nO1xuICBpZiAodGhhdC51bmljb2RlKSByZXN1bHQgKz0gJ3UnO1xuICBpZiAodGhhdC5zdGlja3kpIHJlc3VsdCArPSAneSc7XG4gIHJldHVybiByZXN1bHQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19mbGFncy5qc1xuLy8gbW9kdWxlIGlkID0gODRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///84\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar hide = __webpack_require__(18);\nvar redefine = __webpack_require__(19);\nvar fails = __webpack_require__(5);\nvar defined = __webpack_require__(32);\nvar wks = __webpack_require__(8);\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n var fns = exec(defined, SYMBOL, ''[KEY]);\n var strfn = fns[0];\n var rxfn = fns[1];\n if (fails(function () {\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n })) {\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19maXgtcmUtd2tzLmpzPzU2MGQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGhpZGUgPSByZXF1aXJlKCc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i41LjkgUmVnRXhwLnByb3RvdHlwZVtAQHNlYXJjaF0oc3RyaW5nKVxuICAgICAgOiBmdW5jdGlvbiAoc3RyaW5nKSB7IHJldHVybiByeGZuLmNhbGwoc3RyaW5nLCB0aGlzKTsgfVxuICAgICk7XG4gIH1cbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2ZpeC1yZS13a3MuanNcbi8vIG1vZHVsZSBpZCA9IDg1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///85\n")},function(module,exports,__webpack_require__){eval("// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = __webpack_require__(3);\nvar aFunction = __webpack_require__(16);\nvar SPECIES = __webpack_require__(8)('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zcGVjaWVzLWNvbnN0cnVjdG9yLmpzP2VjZWQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4zLjIwIFNwZWNpZXNDb25zdHJ1Y3RvcihPLCBkZWZhdWx0Q29uc3RydWN0b3IpXG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuL19hLWZ1bmN0aW9uJyk7XG52YXIgU1BFQ0lFUyA9IHJlcXVpcmUoJy4vX3drcycpKCdzcGVjaWVzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChPLCBEKSB7XG4gIHZhciBDID0gYW5PYmplY3QoTykuY29uc3RydWN0b3I7XG4gIHZhciBTO1xuICByZXR1cm4gQyA9PT0gdW5kZWZpbmVkIHx8IChTID0gYW5PYmplY3QoQylbU1BFQ0lFU10pID09IHVuZGVmaW5lZCA/IEQgOiBhRnVuY3Rpb24oUyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zcGVjaWVzLWNvbnN0cnVjdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSA4NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///86\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar global = __webpack_require__(4);\nvar $export = __webpack_require__(0);\nvar redefine = __webpack_require__(19);\nvar redefineAll = __webpack_require__(57);\nvar meta = __webpack_require__(42);\nvar forOf = __webpack_require__(56);\nvar anInstance = __webpack_require__(55);\nvar isObject = __webpack_require__(6);\nvar fails = __webpack_require__(5);\nvar $iterDetect = __webpack_require__(83);\nvar setToStringTag = __webpack_require__(61);\nvar inheritIfRequired = __webpack_require__(108);\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n var fixMethod = function (KEY) {\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n var instance = new C();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new C();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if (!ACCEPT_ITERABLES) {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME);\n var that = inheritIfRequired(new Base(), target, C);\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n // weak collections should not contains .clear method\n if (IS_WEAK && proto.clear) delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jb2xsZWN0aW9uLmpzP2QxMTgiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciByZWRlZmluZSA9IHJlcXVpcmUoJy4vX3JlZGVmaW5lJyk7XG52YXIgcmVkZWZpbmVBbGwgPSByZXF1aXJlKCcuL19yZWRlZmluZS1hbGwnKTtcbnZhciBtZXRhID0gcmVxdWlyZSgnLi9fbWV0YScpO1xudmFyIGZvck9mID0gcmVxdWlyZSgnLi9fZm9yLW9mJyk7XG52YXIgYW5JbnN0YW5jZSA9IHJlcXVpcmUoJy4vX2FuLWluc3RhbmNlJyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG52YXIgJGl0ZXJEZXRlY3QgPSByZXF1aXJlKCcuL19pdGVyLWRldGVjdCcpO1xudmFyIHNldFRvU3RyaW5nVGFnID0gcmVxdWlyZSgnLi9fc2V0LXRvLXN0cmluZy10YWcnKTtcbnZhciBpbmhlcml0SWZSZXF1aXJ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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///87\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar hide = __webpack_require__(18);\nvar uid = __webpack_require__(48);\nvar TYPED = uid('typed_array');\nvar VIEW = uid('view');\nvar ABV = !!(global.ArrayBuffer && global.DataView);\nvar CONSTR = ABV;\nvar i = 0;\nvar l = 9;\nvar Typed;\n\nvar TypedArrayConstructors = (\n 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'\n).split(',');\n\nwhile (i < l) {\n if (Typed = global[TypedArrayConstructors[i++]]) {\n hide(Typed.prototype, TYPED, true);\n hide(Typed.prototype, VIEW, true);\n } else CONSTR = false;\n}\n\nmodule.exports = {\n ABV: ABV,\n CONSTR: CONSTR,\n TYPED: TYPED,\n VIEW: VIEW\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190eXBlZC5qcz9kM2I5Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKT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BQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///88\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// Forced replacement prototype accessors methods\nmodule.exports = __webpack_require__(49) || !__webpack_require__(5)(function () {\n var K = Math.random();\n // In FF throws only define methods\n // eslint-disable-next-line no-undef, no-useless-call\n __defineSetter__.call(null, K, function () { /* empty */ });\n delete __webpack_require__(4)[K];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZm9yY2VkLXBhbS5qcz83NjZlIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEZvcmNlZCByZXBsYWNlbWVudCBwcm90b3R5cGUgYWNjZXNzb3JzIG1ldGhvZHNcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9fbGlicmFyeScpIHx8ICFyZXF1aXJlKCcuL19mYWlscycpKGZ1bmN0aW9uICgpIHtcbiAgdmFyIEsgPSBNYXRoLnJhbmRvbSgpO1xuICAvLyBJbiBGRiB0aHJvd3Mgb25seSBkZWZpbmUgbWV0aG9kc1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tdW5kZWYsIG5vLXVzZWxlc3MtY2FsbFxuICBfX2RlZmluZVNldHRlcl9fLmNhbGwobnVsbCwgSywgZnVuY3Rpb24gKCkgeyAvKiBlbXB0eSAqLyB9KTtcbiAgZGVsZXRlIHJlcXVpcmUoJy4vX2dsb2JhbCcpW0tdO1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1mb3JjZWQtcGFtLmpzXG4vLyBtb2R1bGUgaWQgPSA4OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///89\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = __webpack_require__(0);\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { of: function of() {\n var length = arguments.length;\n var A = new Array(length);\n while (length--) A[length] = arguments[length];\n return new this(A);\n } });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtY29sbGVjdGlvbi1vZi5qcz9kMjNkIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vcHJvcG9zYWwtc2V0bWFwLW9mZnJvbS9cbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKENPTExFQ1RJT04pIHtcbiAgJGV4cG9ydCgkZXhwb3J0LlMsIENPTExFQ1RJT04sIHsgb2Y6IGZ1bmN0aW9uIG9mKCkge1xuICAgIHZhciBsZW5ndGggPSBhcmd1bWVudHMubGVuZ3RoO1xuICAgIHZhciBBID0gbmV3IEFycmF5KGxlbmd0aCk7XG4gICAgd2hpbGUgKGxlbmd0aC0tKSBBW2xlbmd0aF0gPSBhcmd1bWVudHNbbGVuZ3RoXTtcbiAgICByZXR1cm4gbmV3IHRoaXMoQSk7XG4gIH0gfSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtY29sbGVjdGlvbi1vZi5qc1xuLy8gbW9kdWxlIGlkID0gOTBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///90\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = __webpack_require__(0);\nvar aFunction = __webpack_require__(16);\nvar ctx = __webpack_require__(27);\nvar forOf = __webpack_require__(56);\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {\n var mapFn = arguments[1];\n var mapping, A, n, cb;\n aFunction(this);\n mapping = mapFn !== undefined;\n if (mapping) aFunction(mapFn);\n if (source == undefined) return new this();\n A = [];\n if (mapping) {\n n = 0;\n cb = ctx(mapFn, arguments[2], 2);\n forOf(source, false, function (nextItem) {\n A.push(cb(nextItem, n++));\n });\n } else {\n forOf(source, false, A.push, A);\n }\n return new this(A);\n } });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2R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cbiAgICAgIGZvck9mKHNvdXJjZSwgZmFsc2UsIEEucHVzaCwgQSk7XG4gICAgfVxuICAgIHJldHVybiBuZXcgdGhpcyhBKTtcbiAgfSB9KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3NldC1jb2xsZWN0aW9uLWZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDkxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///91\n")},function(module,exports){eval("module.exports = true;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2xpYnJhcnkuanM/M2I4OCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHRydWU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fbGlicmFyeS5qc1xuLy8gbW9kdWxlIGlkID0gOTJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///92\n")},function(module,exports){eval("module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2EtZnVuY3Rpb24uanM/OTRlOSJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICBpZiAodHlwZW9mIGl0ICE9ICdmdW5jdGlvbicpIHRocm93IFR5cGVFcnJvcihpdCArICcgaXMgbm90IGEgZnVuY3Rpb24hJyk7XG4gIHJldHVybiBpdDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fYS1mdW5jdGlvbi5qc1xuLy8gbW9kdWxlIGlkID0gOTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///93\n")},function(module,exports){eval("var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3VpZC5qcz9kYzRhIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpZCA9IDA7XG52YXIgcHggPSBNYXRoLnJhbmRvbSgpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoa2V5KSB7XG4gIHJldHVybiAnU3ltYm9sKCcuY29uY2F0KGtleSA9PT0gdW5kZWZpbmVkID8gJycgOiBrZXksICcpXycsICgrK2lkICsgcHgpLnRvU3RyaW5nKDM2KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3VpZC5qc1xuLy8gbW9kdWxlIGlkID0gOTRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///94\n")},function(module,exports,__webpack_require__){eval("var def = __webpack_require__(40).f;\nvar has = __webpack_require__(59);\nvar TAG = __webpack_require__(23)('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NldC10by1zdHJpbmctdGFnLmpzPzdiYTkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGRlZiA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmY7XG52YXIgaGFzID0gcmVxdWlyZSgnLi9faGFzJyk7XG52YXIgVEFHID0gcmVxdWlyZSgnLi9fd2tzJykoJ3RvU3RyaW5nVGFnJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCB0YWcsIHN0YXQpIHtcbiAgaWYgKGl0ICYmICFoYXMoaXQgPSBzdGF0ID8gaXQgOiBpdC5wcm90b3R5cGUsIFRBRykpIGRlZihpdCwgVEFHLCB7IGNvbmZpZ3VyYWJsZTogdHJ1ZSwgdmFsdWU6IHRhZyB9KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fc2V0LXRvLXN0cmluZy10YWcuanNcbi8vIG1vZHVsZSBpZCA9IDk1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///95\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(434), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9hc3NpZ24uanM/YzI4MyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHsgXCJkZWZhdWx0XCI6IHJlcXVpcmUoXCJjb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L2Fzc2lnblwiKSwgX19lc01vZHVsZTogdHJ1ZSB9O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvYXNzaWduLmpzXG4vLyBtb2R1bGUgaWQgPSA5NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///96\n')},function(module,exports,__webpack_require__){eval("// most Object methods by ES6 should accept primitives\nvar $export = __webpack_require__(21);\nvar core = __webpack_require__(13);\nvar fails = __webpack_require__(66);\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1zYXAuanM/YmFhNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBtb3N0IE9iamVjdCBtZXRob2RzIGJ5IEVTNiBzaG91bGQgYWNjZXB0IHByaW1pdGl2ZXNcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgY29yZSA9IHJlcXVpcmUoJy4vX2NvcmUnKTtcbnZhciBmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChLRVksIGV4ZWMpIHtcbiAgdmFyIGZuID0gKGNvcmUuT2JqZWN0IHx8IHt9KVtLRVldIHx8IE9iamVjdFtLRVldO1xuICB2YXIgZXhwID0ge307XG4gIGV4cFtLRVldID0gZXhlYyhmbik7XG4gICRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GICogZmFpbHMoZnVuY3Rpb24gKCkgeyBmbigxKTsgfSksICdPYmplY3QnLCBleHApO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3Qtc2FwLmpzXG4vLyBtb2R1bGUgaWQgPSA5N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///97\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _iterator = __webpack_require__(445);\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = __webpack_require__(447);\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {\n return typeof obj === "undefined" ? "undefined" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL3R5cGVvZi5qcz9hNDU2Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5leHBvcnRzLl9fZXNNb2R1bGUgPSB0cnVlO1xuX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RcIiA/IFwidW5kZWZpbmVkXCIgOiBfdHlwZW9mKG9iaik7XG59IDogZnVuY3Rpb24gKG9iaikge1xuICByZXR1cm4gb2JqICYmIHR5cGVvZiBfc3ltYm9sMi5kZWZhdWx0ID09PSBcImZ1bmN0aW9uXCIgJiYgb2JqLmNvbnN0cnVjdG9yID09PSBfc3ltYm9sMi5kZWZhdWx0ICYmIG9iaiAhPT0gX3N5bWJvbDIuZGVmYXVsdC5wcm90b3R5cGUgPyBcInN5bWJvbFwiIDogdHlwZW9mIG9iaiA9PT0gXCJ1bmRlZmluZWRcIiA/IFwidW5kZWZpbmVkXCIgOiBfdHlwZW9mKG9iaik7XG59O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvaGVscGVycy90eXBlb2YuanNcbi8vIG1vZHVsZSBpZCA9IDk4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///98\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('address-allocation'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log system\n\n\n// TODO: this could not be the best way to do a Singleton but at this moment it works;\n\nvar instance = void 0;\n\n/**\n * Class will ask to the message node for addresses\n */\n\nvar AddressAllocation = function () {\n /* private\n _url: URL\n _bus: MiniBus\n */\n\n /**\n * Create an Address Allocation\n * @param {URL.URL} url - url from who is sending the message\n * @param {MiniBus} bus - MiniBus used for address allocation\n */\n function AddressAllocation(url, bus, registry) {\n (0, _classCallCheck3.default)(this, AddressAllocation);\n\n\n if (!instance) {\n this._url = url + '/address-allocation';\n this._bus = bus;\n this._registry = registry;\n instance = this;\n } else {\n return instance;\n }\n }\n\n (0, _createClass3.default)(AddressAllocation, [{\n key: 'create',\n\n\n /**\n *\n * Ask for creation of a number of Hyperty addresses, to the domain message node.\n *\n * @param {Domain} domain - domain of the message node\n * @param {Number} number - number of address to be allocated\n * @param {Descriptor} info - descriptor to search for the hyperty (TODO:// this should be confirmed)\n * @see https://github.com/reTHINK-project/specs/blob/master/datamodel/core/hyperty-catalogue/readme.md#catalogue-data-model\n * @param {scheme} scheme - scheme of address to be created or reused, like: hyperty, comm, context, etc;\n * @param {boolean|URL.HypertyURL} reuseURL - reuseURL is used to reuse the hypertyURL previously registred;\n * @returns {Promise} this is Promise and returns an object with the address information\n *\n * @memberOf AddressAllocation\n */\n value: function create(domain, number, info, scheme, reuseURL) {\n\n // // console.log('typeof(reuseURL)', typeof(reuseURL), reuseURL);\n\n if (reuseURL) {\n\n if (typeof reuseURL === 'boolean') {\n\n if (reuseURL) {\n return this._reuseAllocatedAddress(domain, number, info, scheme, reuseURL);\n } else {\n return this._allocateNewAddress(domain, scheme, number);\n }\n }\n\n if (typeof reuseURL === 'string' && (0, _utils.isURL)(reuseURL)) {\n return this._reuseAllocatedAddress(domain, number, info, scheme, reuseURL);\n }\n } else {\n log.info('[AddressAllocation] - new address will be allocated');\n\n // if there is no URL saved request a new URL\n return this._allocateNewAddress(domain, scheme, number);\n }\n }\n }, {\n key: '_reuseAllocatedAddress',\n value: function _reuseAllocatedAddress(domain, number, info, scheme, reuseURL) {\n var _this2 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this2._registry.checkRegisteredURLs(info, reuseURL).then(function (urls) {\n\n if (urls) {\n log.info('[AddressAllocation - ' + scheme + '] - Reuse URL');\n var value = { newAddress: false, address: urls };\n resolve(value);\n } else {\n\n if (typeof reuseURL === 'string') {\n log.info('[AddressAllocation - reuseURL] - Object ' + reuseURL + ' not found');\n reject('URL Not Found');\n } else if (typeof reuseURL === 'boolean') {\n _this2._allocateNewAddress(domain, scheme, number).then(resolve).catch(reject);\n } else {\n reject('URL Not Found');\n }\n }\n });\n });\n }\n }, {\n key: '_allocateNewAddress',\n value: function _allocateNewAddress(domain, scheme, number) {\n var _this3 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var msg = {\n type: 'create', from: _this3._url, to: 'domain://msg-node.' + domain + '/address-allocation',\n body: { value: { number: number } }\n };\n\n if (scheme !== 'hyperty') msg.body.scheme = scheme;\n\n log.info('[AddressAllocation - ' + scheme + '] - Request new URL');\n\n _this3._bus.postMessage(msg, function (reply) {\n if (reply.body.code === 200) {\n var result = { newAddress: true, address: reply.body.value.allocated };\n resolve(result);\n } else {\n reject(reply.body.desc);\n }\n });\n });\n }\n\n /**\n * Send a request to the domain message node, to deallocate one or more addresses\n * @param {Domain} domain - Domain of the message node.\n * @param {addresses} addresses to request the deallocation\n * @returns {Promise} the response by the message node\n */\n\n }, {\n key: 'delete',\n value: function _delete(domain, addresses) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var message = {\n type: 'delete', from: _this._url, to: 'domain://msg-node.' + domain + '/address-allocation',\n body: { childrenResources: addresses }\n };\n\n _this._bus.postMessage(message, function (reply) {\n if (reply.body.code === 200) {\n resolve(reply.body.code);\n } else {\n reject(reply.body.desc);\n }\n });\n });\n }\n }, {\n key: 'url',\n\n\n /**\n * get the URL value\n * @return {string} The url value;\n */\n get: function get() {\n return this._url;\n }\n }], [{\n key: 'instance',\n get: function get() {\n if (!instance) {\n throw new Error('The address allocation was not instantiated');\n }\n\n return instance;\n }\n }]);\n return AddressAllocation;\n}();\n\nexports.default = AddressAllocation;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2FsbG9jYXRpb24vQWRkcmVzc0FsbG9jYXRpb24uanM/MWU2YSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE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QTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFFQTtBQUNBOzs7QUFFQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRkE7QUFDQTtBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFDQTtBQUNBOzs7Ozs7Ozs7QUFNQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRkE7QUFDQTtBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTs7Ozs7QUFqSUE7Ozs7QUFJQTtBQUFBO0FBQUE7OztBQVpBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQXNJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///99\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _Crypto = __webpack_require__(490);\n\nvar _Crypto2 = _interopRequireDefault(_Crypto);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('CryptoManager'); // Log System\n\n/**\n* The Crypto Manager provides manages cryptographic features for the runtime including:\n* - Mutual Authentication between peers\n* - Crypto Keys\n* - e2e encryption and decription of communication between Hyperties and dta objects\n*\n*/\nvar CryptoManager = function () {\n\n /**\n * This is the constructor to initialise the CryptoManager, it does not require any input.\n * The init() must called in order to set mandatories attributes\n */\n\n function CryptoManager(storageManager) {\n (0, _classCallCheck3.default)(this, CryptoManager);\n\n this.storageManager = storageManager;\n this.userDefaultKeyRef = 'userAsymmetricKey';\n }\n\n (0, _createClass3.default)(CryptoManager, [{\n key: 'init',\n value: function init(runtimeURL, runtimeCapabilities, storageManager, dataObjectsStorage, registry, coreDiscovery, idm, runtimeFactory) {\n var _this = this;\n\n if (!runtimeURL) throw new Error('[] runtimeURL is missing.');\n if (!storageManager) throw new Error('storageManager is missing');\n if (!runtimeFactory) throw new Error('runtimeFactory is missing');\n\n _this._runtimeURL = runtimeURL;\n _this._cryptoManagerURL = _this._runtimeURL + '/cryptoManager';\n\n //_this._myURL = _this._runtimeURL + '/crypto';\n _this.storageManager = storageManager;\n _this.dataObjectsStorage = dataObjectsStorage;\n _this.runtimeCapabilities = runtimeCapabilities;\n\n _this._runtimeFactory = runtimeFactory;\n _this._domain = (0, _utils.divideURL)(_this._runtimeURL).domain;\n\n _this.crypto = new _Crypto2.default(_this._runtimeFactory);\n\n // hashTable to store all the crypto information between two hyperties\n _this.chatKeys = {};\n\n // hashTable to store the symmetric keys to be used in the chat group\n _this.dataObjectSessionKeys = {};\n\n //failsafe to enable/disable all the criptographic functions\n _this.isToUseEncryption = true;\n\n _this._registry = registry;\n _this._coreDiscovery = coreDiscovery;\n\n _this._idm = idm;\n }\n\n //******************* GET AND SET METHODS *******************\n\n /**\n * return the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n\n }, {\n key: 'loadSessionKeys',\n\n\n // to be used to initialise IDM with SessionKeys used in previous session\n\n value: function loadSessionKeys() {\n var _this = this;\n return new _promise2.default(function (resolve) {\n\n _this.storageManager.get('dataObjectSessionKeys').then(function (sessionKeys) {\n if (sessionKeys) _this.dataObjectSessionKeys = sessionKeys;else _this.dataObjectSessionKeys = {};\n resolve();\n });\n });\n }\n }, {\n key: '_isFromRemoteSM',\n value: function _isFromRemoteSM(from) {\n var splitFrom = from.split('://');\n return splitFrom[0] === 'runtime' && from !== this._runtimeURL + '/sm';\n }\n }, {\n key: 'addCryptoGUIListeners',\n value: function addCryptoGUIListeners() {\n //TODO: Change the GUI invocation of this method\n var _this = this;\n\n _this._messageBus.addListener(_this._cryptoManagerURL, function (msg) {\n var funcName = msg.body.method;\n\n //let returnedValue;\n if (funcName === 'generateRSAKeyPair') {\n _this._crypto.getMyPublicKey().then(function (key) {\n var value = { type: 'execute', value: key, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if generateRSAKeyPair method postMessage error: ' + err);\n }\n });\n return;\n }\n });\n }\n\n //******************* ENCRYPTION METHODS *******************\n /**\n * Identifies the messages to be encrypted\n * @param {Message} message\n * @returns {boolean} returns true if the message requires encryption\n */\n\n }, {\n key: '_isToEncrypt',\n value: function _isToEncrypt(message) {\n log.info('[CryptoManager.istoChyperModule]', message);\n var isCreate = message.type === 'create';\n var isFromHyperty = message.from.includes('hyperty://');\n var isToHyperty = message.to.includes('hyperty://');\n var isToDataObject = (0, _utils.isDataObjectURL)(message.to);\n\n var doMutualAuthentication = message.body.hasOwnProperty('mutual') ? message.body.mutual : true;\n\n if (!doMutualAuthentication) return false;\n\n //if is not to apply encryption, then returns resolve\n if (!this.isToUseEncryption && !(message.type === 'handshake')) {\n log.info('not handshake: encryption disabled');\n return false;\n }\n\n if (message.type === 'update') {\n log.info('update:encryption disabled');\n return false;\n }\n\n if ((0, _utils.isLegacy)(message.to)) return false;\n\n return isCreate && isFromHyperty && isToHyperty || isCreate && isFromHyperty && isToDataObject && doMutualAuthentication || message.type === 'handshake' || message.type === 'update' && doMutualAuthentication;\n }\n }, {\n key: '_isToDecrypt',\n value: function _isToDecrypt(message) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n // For sybscribe message let's start the mutualAuthentication\n var isSubscription = message.type === 'subscribe';\n var isFromRemoteSM = _this._isFromRemoteSM(message.from);\n\n if (isSubscription & isFromRemoteSM) {\n log.log('_doMutualAuthenticationPhase1');\n\n _this._doMutualAuthenticationPhase1(message).then(function () {\n resolve(false);\n }, function (error) {\n reject(error);\n });\n } else if (message.hasOwnProperty('body') && message.body.hasOwnProperty('value') && typeof message.body.value === 'string') {\n log.log('_isToDecrypt:true');\n resolve(true);\n } else {\n log.log('_isToDecrypt:false');\n resolve(false);\n }\n }).catch(function (error) {\n log.error('[CryptoManager._isToDecrypt]', error);\n });\n }\n }, {\n key: 'encryptMessage',\n value: function encryptMessage(message) {\n //log.info('encryptMessage:message', message);\n var _this = this;\n\n log.log('encrypt message ');\n\n return new _promise2.default(function (resolve, reject) {\n\n var isHandShakeType = message.type === 'handshake';\n\n //if is not to apply encryption, then returns resolve\n if (!_this._isToEncrypt(message)) {\n // log.log('decryption disabled');\n return resolve(message);\n }\n\n var dataObjectURL = (0, _utils.parseMessageURL)(message.to);\n\n var isToDataObject = (0, _utils.isDataObjectURL)(dataObjectURL);\n var isToLegacyIdentity = (0, _utils.isLegacy)(message.to);\n var isFromHyperty = (0, _utils.divideURL)(message.from).type === 'hyperty';\n var isToHyperty = (0, _utils.divideURL)(message.to).type === 'hyperty';\n\n if (message.type === 'update') {\n log.log('encrypt message: message type update');\n return resolve(message);\n }\n\n if (isToLegacyIdentity) {\n resolve(message);\n } else if (isFromHyperty && isToHyperty) {\n var userURL = _this._registry.getHypertyOwner(message.from);\n if (userURL) {\n\n // check if exists any keys between two users\n var chatKeys = _this.chatKeys[message.from + '<->' + message.to];\n if (!chatKeys) {\n chatKeys = _this._newChatCrypto(message, userURL);\n\n //log.log('createChatKey encrypt', message.from + message.to);\n _this.chatKeys[message.from + '<->' + message.to] = chatKeys;\n message.body.handshakePhase = 'startHandShake';\n }\n\n if (chatKeys.authenticated && !isHandShakeType) {\n\n var iv = _this.crypto.generateIV();\n _this.crypto.encryptAES(chatKeys.keys.hypertyFromSessionKey, (0, _utils.stringify)(message.body.value), iv).then(function (encryptedValue) {\n\n var filteredMessage = _this._filterMessageToHash(message, (0, _utils.stringify)(message.body.value) + (0, _utils.stringify)(iv), chatKeys.hypertyFrom.messageInfo);\n\n _this.crypto.hashHMAC(chatKeys.keys.hypertyFromHashKey, filteredMessage).then(function (hash) {\n //log.log('result of hash ', hash);\n var value = { iv: (0, _utils.encode)(iv), value: (0, _utils.encode)(encryptedValue), hash: (0, _utils.encode)(hash) };\n message.body.value = (0, _utils.encode)(value);\n\n resolve(message);\n });\n });\n\n // if is a handshake message, just resolve it\n } else if (isHandShakeType) {\n resolve(message);\n\n // else, starts a new handshake protocol\n } else {\n _this._doHandShakePhase(message, chatKeys).then(function (value) {\n _this.chatKeys[message.from + '<->' + message.to] = value.chatKeys;\n\n _this._messageBus.postMessage(value.message);\n reject('encrypt handshake protocol phase ');\n });\n }\n } else {\n reject('In encryptMessage: Hyperty owner URL was not found');\n }\n\n //if from hyperty to a dataObjectURL\n } else if (isFromHyperty && isToDataObject) {\n\n //log.log('dataObject value to encrypt: ', message.body.value);\n //log.log('IdentityModule - encrypt from hyperty to dataobject ', message);\n\n _this.storageManager.get('dataObjectSessionKeys').then(function (sessionKeys) {\n sessionKeys = (0, _utils.chatkeysToArrayCloner)(sessionKeys || {});\n var dataObjectKey = sessionKeys ? sessionKeys[dataObjectURL] : null;\n\n _this.dataObjectsStorage.getDataObject(dataObjectURL).then(function (isHypertyReporter) {\n //if no key exists, create a new one if is the reporter of dataObject\n if (!dataObjectKey) {\n // if the hyperty is the reporter of the dataObject then generates a session key\n if (isHypertyReporter.reporter && isHypertyReporter.reporter === message.from) {\n\n var sessionKey = _this.crypto.generateRandom();\n _this.dataObjectSessionKeys[dataObjectURL] = { sessionKey: sessionKey, isToEncrypt: true };\n var dataObjectSessionKeysClone = (0, _utils.chatkeysToStringCloner)(_this.dataObjectSessionKeys);\n\n //TODO: check if this does not need to be stored\n _this.storageManager.set('dataObjectSessionKeys', 0, dataObjectSessionKeysClone).catch(function (err) {\n reject('On encryptMessage from method storageManager.set error: ' + err);\n });\n dataObjectKey = _this.dataObjectSessionKeys[dataObjectURL];\n }\n }\n\n //check if there is already a session key for the chat room\n if (dataObjectKey) {\n\n // and if is to apply encryption, encrypt the messages\n if (dataObjectKey.isToEncrypt) {\n var _iv = _this.crypto.generateIV();\n var stringifiedIV = (0, _utils.stringify)(_iv);\n var stringifiedMessageBody = (0, _utils.stringify)(message.body.value);\n\n _this.crypto.encryptAES(dataObjectKey.sessionKey, stringifiedMessageBody, _iv).then(function (encryptedValue) {\n delete message.body.identity.assertion; //TODO: Check why assertion is comming on the message!\n delete message.body.identity.expires; //TODO: Check why expires is comming on the message!\n var filteredMessage = _this._filterMessageToHash(message, stringifiedMessageBody + stringifiedIV);\n\n _this.crypto.hashHMAC(dataObjectKey.sessionKey, filteredMessage).then(function (hash) {\n // log.log('hash ', hash);\n\n var newValue = { value: (0, _utils.encode)(encryptedValue), iv: (0, _utils.encode)(_iv), hash: (0, _utils.encode)(hash) };\n\n message.body.value = (0, _utils.stringify)(newValue);\n resolve(message);\n });\n });\n\n // if not, just send the message\n } else {\n resolve(message);\n }\n\n // start the generation of a new session Key\n } else {\n reject('Data object key could not be defined: Failed to decrypt message ');\n }\n }).catch(function (err) {\n reject('On encryptMessage from method dataObjectsStorage.getDataObject error: ' + err);\n });\n }).catch(function (err) {\n reject('On encryptMessage from method storageManager.get error: ' + err);\n });\n }\n });\n }\n }, {\n key: 'encryptDataObject',\n value: function encryptDataObject(dataObject, sender) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n log.info('dataObject value to encrypt: ', dataObject);\n\n var dataObjectURL = (0, _utils.parseMessageURL)(sender);\n\n _this.storageManager.get('dataObjectSessionKeys').then(function (sessionKeys) {\n sessionKeys = (0, _utils.chatkeysToArrayCloner)(sessionKeys || {});\n var dataObjectKey = sessionKeys ? sessionKeys[dataObjectURL] : null;\n\n //check if there is already a session key for the chat room\n if (dataObjectKey) {\n\n // and if is to apply encryption, encrypt the messages\n if (dataObjectKey.isToEncrypt) {\n var iv = _this.crypto.generateIV();\n\n _this.crypto.encryptAES(dataObjectKey.sessionKey, (0, _utils.stringify)(dataObject), iv).then(function (encryptedValue) {\n var newValue = { value: (0, _utils.encode)(encryptedValue), iv: (0, _utils.encode)(iv) };\n\n //log.log('encrypted dataObject', newValue);\n return resolve(newValue);\n }).catch(function (err) {\n reject('On encryptDataObject from method encryptAES error: ' + err);\n });\n\n // if not, just send the message\n } else {\n log.info('The dataObject is not encrypted');\n return resolve(dataObject);\n }\n\n // start the generation of a new session Key\n } else {\n return reject('No dataObjectKey for this dataObjectURL:', dataObjectURL);\n }\n }).catch(function (err) {\n reject('On encryptDataObject from method storageManager.get error: ' + err);\n });\n });\n }\n }, {\n key: 'decryptMessage',\n value: function decryptMessage(message) {\n var _this = this;\n\n // log.log('decryptMessage:message', message);\n\n return new _promise2.default(function (resolve, reject) {\n var isHandShakeType = message.type === 'handshake';\n\n _this._isToDecrypt(message).then(function (isToDecrypt) {\n\n //if is not to apply encryption, then returns resolve\n if (!isToDecrypt) return resolve(message);\n\n var dataObjectURL = (0, _utils.parseMessageURL)(message.to);\n\n var isToDataObject = (0, _utils.isDataObjectURL)(dataObjectURL);\n var isFromHyperty = (0, _utils.divideURL)(message.from).type === 'hyperty';\n var isToHyperty = (0, _utils.divideURL)(message.to).type === 'hyperty';\n\n if (message.type === 'update') {\n return resolve(message);\n }\n\n //is is hyperty to hyperty communication\n if (isFromHyperty && isToHyperty) {\n // log.log('decrypt hyperty to hyperty');\n var userURL = _this._registry.getHypertyOwner(message.to);\n if (userURL) {\n\n var chatKeys = _this.chatKeys[message.to + '<->' + message.from];\n if (!chatKeys) {\n chatKeys = _this._newChatCrypto(message, userURL, 'decrypt');\n _this.chatKeys[message.to + '<->' + message.from] = chatKeys;\n }\n\n if (chatKeys.authenticated && !isHandShakeType) {\n var value = (0, _utils.decode)(message.body.value);\n var iv = (0, _utils.decodeToUint8Array)(value.iv);\n var data = (0, _utils.decodeToUint8Array)(value.value);\n var hash = (0, _utils.decodeToUint8Array)(value.hash);\n _this.crypto.decryptAES(chatKeys.keys.hypertyToSessionKey, data, iv).then(function (decryptedData) {\n // log.log('decrypted value ', decryptedData);\n message.body.value = decryptedData;\n\n var filteredMessage = _this._filterMessageToHash(message, decryptedData + iv);\n\n _this.crypto.verifyHMAC(chatKeys.keys.hypertyToHashKey, filteredMessage, hash).then(function (result) {\n //log.log('result of hash verification! ', result);\n message.body.assertedIdentity = true;\n resolve(message);\n });\n });\n } else if (isHandShakeType) {\n _this._doHandShakePhase(message, chatKeys).then(function (value) {\n\n //if it was started by doMutualAuthentication then ends the protocol\n if (value === 'handShakeEnd') {\n //reject('decrypt handshake protocol phase');\n\n // if was started by a message, then resend that message\n } else {\n _this.chatKeys[message.to + '<->' + message.from] = value.chatKeys;\n _this._messageBus.postMessage(value.message);\n\n //reject('decrypt handshake protocol phase ');\n }\n });\n } else {\n reject('wrong message do decrypt');\n }\n } else {\n reject('error on decrypt message');\n }\n\n //if from hyperty to a dataObjectURL\n } else if (isFromHyperty && isToDataObject) {\n // log.log('dataObject value to decrypt: ', message.body);\n\n _this.storageManager.get('dataObjectSessionKeys').then(function (sessionKeys) {\n sessionKeys = (0, _utils.chatkeysToArrayCloner)(sessionKeys || {});\n var dataObjectKey = sessionKeys ? sessionKeys[dataObjectURL] : null;\n\n if (dataObjectKey) {\n\n //check if is to apply encryption\n if (dataObjectKey.isToEncrypt) {\n var parsedValue = (0, _utils.parse)(message.body.value);\n var _iv2 = (0, _utils.decodeToUint8Array)(parsedValue.iv);\n var encryptedValue = (0, _utils.decodeToUint8Array)(parsedValue.value);\n var _hash = (0, _utils.decodeToUint8Array)(parsedValue.hash);\n\n _this.crypto.decryptAES(dataObjectKey.sessionKey, encryptedValue, _iv2).then(function (decryptedValue) {\n var parsedValue = (0, _utils.parse)(decryptedValue);\n\n // log.log('decrypted Value,', parsedValue);\n message.body.value = parsedValue;\n\n var filteredMessage = _this._filterMessageToHash(message, (0, _utils.stringify)(parsedValue) + (0, _utils.stringify)(_iv2));\n\n _this.crypto.verifyHMAC(dataObjectKey.sessionKey, filteredMessage, _hash).then(function (result) {\n log.log('Received message HMAC result', result);\n\n message.body.assertedIdentity = true;\n resolve(message);\n }).catch(function (err) {\n reject('Message HMAC is invalid: ' + err);\n });\n });\n\n //if not, just return the message\n } else {\n message.body.assertedIdentity = true;\n resolve(message);\n }\n } else {\n message.body.assertedIdentity = true;\n resolve(message);\n\n //reject('no sessionKey for chat room found');\n }\n });\n } else {\n reject('wrong message to decrypt');\n }\n });\n });\n }\n }, {\n key: 'decryptDataObject',\n value: function decryptDataObject(dataObject, sender) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n //if is not to apply encryption, then returns resolve\n if (!_this.isToUseEncryption) {\n // log.log('decryption disabled');\n return resolve(dataObject);\n }\n\n var dataObjectURL = (0, _utils.parseMessageURL)(sender);\n\n // log.log('dataObject value to decrypt: ', dataObject);\n\n _this.storageManager.get('dataObjectSessionKeys').then(function (sessionKeys) {\n sessionKeys = (0, _utils.chatkeysToArrayCloner)(sessionKeys);\n var dataObjectKey = sessionKeys ? sessionKeys[dataObjectURL] : null;\n\n if (dataObjectKey) {\n\n //check if is to apply encryption\n if (dataObjectKey.isToEncrypt) {\n var iv = (0, _utils.decodeToUint8Array)(dataObject.iv);\n var encryptedValue = (0, _utils.decodeToUint8Array)(dataObject.value);\n\n _this.crypto.decryptAES(dataObjectKey.sessionKey, encryptedValue, iv).then(function (decryptedValue) {\n var parsedValue = (0, _utils.parse)(decryptedValue);\n var newValue = { value: parsedValue, iv: (0, _utils.encode)(iv) };\n\n // log.log('decrypted dataObject,', newValue);\n\n return resolve(newValue);\n }).catch(function (err) {\n reject('On decryptDataObject from method encryptAES error: ' + err);\n });\n\n //if not, just return the dataObject\n } else {\n // log.log('The dataObject is not encrypted');\n return resolve(dataObject);\n }\n } else {\n return reject('No dataObjectKey for this dataObjectURL:', dataObjectURL);\n }\n });\n });\n }\n }, {\n key: '_doMutualAuthenticationPhase1',\n value: function _doMutualAuthenticationPhase1(message) {\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n var to = message.to.split('/');\n\n //let subsIndex = to.indexOf('subscription');\n //let isDataObjectSubscription = subsIndex !== -1;\n to.pop();\n var dataObjectURL = to[0] + '//' + to[2] + '/' + to[3];\n _this._doMutualAuthenticationPhase2(dataObjectURL, message.body.subscriber).then(function () {\n _this._registry.registerSubscriber(dataObjectURL, message.body.subscriber);\n resolve();\n }, function (error) {\n reject(error);\n });\n });\n }\n }, {\n key: '_doMutualAuthenticationPhase2',\n value: function _doMutualAuthenticationPhase2(sender, receiver) {\n log.info('doMutualAuthentication:sender ', sender);\n log.info('doMutualAuthentication:receiver ', receiver);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var dataObjectURL = void 0;\n\n // check if the sender is a dataObject and if so stores that value\n var reporterURL = _this._registry.getReporterURLSynchonous(sender);\n if (reporterURL) {\n dataObjectURL = sender;\n sender = reporterURL;\n }\n\n var msg = {\n to: receiver,\n from: sender,\n callback: undefined,\n body: { handshakePhase: 'startHandShake', ignore: 'ignoreMessage' }\n };\n\n if (!sender || !receiver) {\n return reject('sender or receiver missing on doMutualAuthentication');\n }\n\n var chatKeys = _this.chatKeys[sender + '<->' + receiver];\n var userURL = _this._registry.getHypertyOwner(sender);\n\n if (userURL) {\n\n if (!chatKeys) {\n // callback to resolve when finish the mutual authentication\n var resolved = function resolved(value) {\n // log.log('callback value:', value);\n resolve(value);\n };\n msg.callback = resolved;\n msg.dataObjectURL = dataObjectURL;\n\n chatKeys = _this._newChatCrypto(msg, userURL);\n _this.chatKeys[sender + '<->' + receiver] = chatKeys;\n }\n\n if (chatKeys.authenticated) {\n\n var startSessionKeyExchange = {\n to: sender,\n from: receiver\n };\n chatKeys.dataObjectURL = dataObjectURL;\n _this._sendReporterSessionKey(startSessionKeyExchange, chatKeys).then(function (value) {\n\n _this._messageBus.postMessage(value.message);\n resolve('exchange of chat sessionKey initiated');\n }).catch(function (err) {\n reject('On doMutualAuthentication from method _sendReporterSessionKey error: ' + err);\n });\n } else {\n _this._doHandShakePhase(msg, chatKeys);\n }\n } else {\n reject('Mutual authentication error: Hyperty owner could not be resolved');\n }\n });\n }\n\n /**\n * returns the reporter associated to the dataObject URL\n * @param {String} dataObjectURL dataObject url\n * @return {String} reporter dataObject url reporter\n */\n /* _getHypertyFromDataObject(dataObjectURL) {\n log.info('_getHypertyFromDataObject:dataObjectURL', dataObjectURL);\n let _this = this;\n return new Promise(function(resolve, reject) {\n let splitedURL = divideURL(dataObjectURL);\n let domain = splitedURL.domain;\n let finalURL = _this._parseMessageURL(dataObjectURL);\n // check if is the creator of the hyperty\n let reporterURL = _this.registry.getReporterURLSynchonous(finalURL);\n log.info('_getHypertyFromDataObject:reporterURL', reporterURL);\n if (reporterURL) {\n resolve(reporterURL);\n } else {\n // check if there is already an association from an hypertyURL to the dataObject\n let storedReporterURL = _this.dataObjectsIdentity[finalURL];\n log.info('_getHypertyFromDataObject:storedReporterURL', storedReporterURL);\n if (storedReporterURL) {\n resolve(storedReporterURL);\n } else {\n // check if there is any hyperty that subscribed the dataObjectURL\n let subscriberHyperty = _this.registry.getDataObjectSubscriberHyperty(dataObjectURL);\n log.info('_getHypertyFromDataObject:subscriberHyperty', subscriberHyperty);\n if (subscriberHyperty) {\n resolve(subscriberHyperty);\n } else {\n // search in domain registry for the hyperty associated to the dataObject\n // search in case is a subscriber who wants to know the reporter\n _this._coreDiscovery.discoverDataObjectPerURL(finalURL, domain).then(dataObject => {\n log.info('_getHypertyFromDataObject:dataObject', dataObject);\n _this.dataObjectsIdentity[finalURL] = dataObject.reporter;\n log.info('_getHypertyFromDataObject:dataObject.reporter', dataObject.reporter);\n resolve(dataObject.reporter);\n }, err => {\n reject(err);\n });\n }\n }\n }\n });\n }*/\n\n }, {\n key: '_sendReporterSessionKey',\n value: function _sendReporterSessionKey(message, chatKeys) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var sessionKeyBundle = _this.dataObjectSessionKeys[chatKeys.dataObjectURL];\n var reporterSessionKeyMsg = void 0;\n var valueToEncrypt = void 0;\n var sessionKey = void 0;\n var iv = void 0;\n var value = {};\n\n //if there is not yet a session Key, generates a new one\n if (!sessionKeyBundle) {\n sessionKey = _this.crypto.generateRandom();\n _this.dataObjectSessionKeys[chatKeys.dataObjectURL] = { sessionKey: sessionKey, isToEncrypt: true };\n\n var dataObjectSessionKeysClone = (0, _utils.chatkeysToStringCloner)(_this.dataObjectSessionKeys);\n\n _this.storageManager.set('dataObjectSessionKeys', 0, dataObjectSessionKeysClone).catch(function (err) {\n reject('On _sendReporterSessionKey from method storageManager.set(dataObjectSessionKeys...) error: ' + err);\n });\n } else {\n sessionKey = sessionKeyBundle.sessionKey;\n }\n\n try {\n valueToEncrypt = (0, _utils.encode)({ value: (0, _utils.encode)(sessionKey), dataObjectURL: chatKeys.dataObjectURL });\n } catch (err) {\n return reject('On _sendReporterSessionKey from method storageManager.set error valueToEncrypt: ' + err);\n }\n\n iv = _this.crypto.generateIV();\n value.iv = (0, _utils.encode)(iv);\n _this.crypto.encryptAES(chatKeys.keys.hypertyFromSessionKey, valueToEncrypt, iv).then(function (encryptedValue) {\n\n reporterSessionKeyMsg = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'reporterSessionKey',\n value: (0, _utils.encode)(encryptedValue)\n }\n };\n\n var filteredMessage = _this._filterMessageToHash(reporterSessionKeyMsg, valueToEncrypt + iv, chatKeys.hypertyFrom.messageInfo);\n\n return _this.crypto.hashHMAC(chatKeys.keys.hypertyFromHashKey, filteredMessage);\n }).then(function (hashedMessage) {\n var valueWithHash = (0, _utils.encode)({ value: reporterSessionKeyMsg.body.value, hash: (0, _utils.encode)(hashedMessage), iv: value.iv });\n\n reporterSessionKeyMsg.body.value = valueWithHash;\n\n resolve({ message: reporterSessionKeyMsg, chatKeys: chatKeys });\n }).catch(function (err) {\n reject('On _sendReporterSessionKey from chained promises encryptAES error: ' + err);\n });\n });\n }\n\n /**\n * Function that resolve and create the domainURL in case it is provided one. If not, resolve the default domainURL\n * @param {String} idpDomain idpDomain (Optional)\n */\n\n }, {\n key: '_resolveDomain',\n value: function _resolveDomain(idpDomain) {\n if (!idpDomain) {\n return 'domain-idp://google.com';\n } else {\n return 'domain-idp://' + idpDomain;\n }\n }\n }, {\n key: '_doHandShakePhase',\n value: function _doHandShakePhase(message, chatKeys) {\n // log('_doHandShakePhase:dataObject', message);\n //\tlog('_doHandShakePhase:chatKeys', chatKeys);\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var handshakeType = message.body.handshakePhase;\n var iv = void 0;\n var hash = void 0;\n var value = {};\n var filteredMessage = void 0;\n var privateKeyHolder = void 0;\n\n log.info('handshake phase: ', handshakeType);\n\n switch (handshakeType) {\n\n case 'startHandShake':\n {\n chatKeys.keys.fromRandom = _this.crypto.generateRandom();\n var startHandShakeMsg = {\n type: 'handshake',\n to: message.to,\n from: message.from,\n body: {\n handshakePhase: 'senderHello',\n value: (0, _utils.encode)(chatKeys.keys.fromRandom)\n }\n };\n chatKeys.handshakeHistory.senderHello = _this._filterMessageToHash(startHandShakeMsg, undefined, chatKeys.hypertyFrom.messageInfo);\n\n // check if was the encrypt function or the mutual authentication that request the\n // start of the handShakePhase.\n\n if (chatKeys.initialMessage) {\n resolve({ message: startHandShakeMsg, chatKeys: chatKeys });\n } else {\n _this.chatKeys[message.from + '<->' + message.to] = chatKeys;\n _this._messageBus.postMessage(startHandShakeMsg);\n }\n\n break;\n }\n case 'senderHello':\n {\n\n log.log('senderHello');\n chatKeys.handshakeHistory.senderHello = _this._filterMessageToHash(message);\n chatKeys.keys.fromRandom = (0, _utils.decodeToUint8Array)(message.body.value);\n chatKeys.keys.toRandom = _this.crypto.generateRandom();\n\n var senderHelloMsg = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'receiverHello',\n value: (0, _utils.encode)(chatKeys.keys.toRandom)\n }\n };\n chatKeys.handshakeHistory.receiverHello = _this._filterMessageToHash(senderHelloMsg, undefined, chatKeys.hypertyFrom.messageInfo);\n resolve({ message: senderHelloMsg, chatKeys: chatKeys });\n\n break;\n }\n case 'receiverHello':\n {\n\n log.log('receiverHello');\n _this.getMyPrivateKey().then(function (privateKey) {\n privateKeyHolder = privateKey;\n\n chatKeys.handshakeHistory.receiverHello = _this._filterMessageToHash(message);\n\n return _this._idm.validateAssertion(message.body.identity.assertion, undefined, message.body.identity.idp.domain);\n }).then(function (value) {\n\n //TODO remove later this verification as soon as all the IdP proxy are updated in the example\n var encodedpublicKey = typeof value.contents === 'string' ? value.contents : value.contents.nonce;\n\n var receiverPublicKey = (0, _utils.parseToUint8Array)(encodedpublicKey);\n var premasterSecret = _this.crypto.generatePMS();\n var toRandom = message.body.value;\n chatKeys.hypertyTo.assertion = message.body.identity.assertion;\n chatKeys.hypertyTo.publicKey = receiverPublicKey;\n chatKeys.hypertyTo.userID = message.body.identity.userProfile.userURL;\n chatKeys.keys.toRandom = (0, _utils.decodeToUint8Array)(toRandom);\n chatKeys.keys.premasterKey = premasterSecret;\n\n var concatKey = _this.crypto.concatPMSwithRandoms(premasterSecret, chatKeys.keys.toRandom, chatKeys.keys.fromRandom);\n\n return _this.crypto.generateMasterSecret(concatKey, 'messageHistoric' + chatKeys.keys.toRandom + chatKeys.keys.fromRandom);\n\n //generate the master key\n }).then(function (masterKey) {\n chatKeys.keys.masterKey = masterKey;\n\n return _this.crypto.generateKeys(masterKey, 'key expansion' + chatKeys.keys.toRandom + chatKeys.keys.fromRandom);\n\n //generate the symmetric and hash keys\n }).then(function (keys) {\n\n chatKeys.keys.hypertyToSessionKey = new Uint8Array(keys[0]);\n chatKeys.keys.hypertyFromSessionKey = new Uint8Array(keys[1]);\n chatKeys.keys.hypertyToHashKey = new Uint8Array(keys[2]);\n chatKeys.keys.hypertyFromHashKey = new Uint8Array(keys[3]);\n iv = _this.crypto.generateIV();\n value.iv = (0, _utils.encode)(iv);\n\n var messageStructure = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'senderCertificate'\n }\n };\n\n // hash the value and the iv\n filteredMessage = _this._filterMessageToHash(messageStructure, 'ok' + iv, chatKeys.hypertyFrom.messageInfo);\n return _this.crypto.hashHMAC(chatKeys.keys.hypertyFromHashKey, filteredMessage);\n }).then(function (hash) {\n value.hash = (0, _utils.encode)(hash);\n\n //encrypt the data\n return _this.crypto.encryptAES(chatKeys.keys.hypertyFromSessionKey, 'ok', iv);\n }).then(function (encryptedData) {\n value.symetricEncryption = (0, _utils.encode)(encryptedData);\n\n return _this.crypto.encryptRSA(chatKeys.hypertyTo.publicKey, chatKeys.keys.premasterKey);\n }).then(function (encryptedValue) {\n value.assymetricEncryption = (0, _utils.encode)(encryptedValue);\n\n var messageStructure = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'senderCertificate'\n }\n };\n\n var messageToHash = _this._filterMessageToHash(messageStructure, chatKeys.keys.premasterKey, chatKeys.hypertyFrom.messageInfo);\n return _this.crypto.signRSA(privateKeyHolder, (0, _utils.encode)(chatKeys.handshakeHistory) + (0, _utils.encode)(messageToHash));\n }).then(function (signature) {\n\n value.signature = (0, _utils.encode)(signature);\n\n var receiverHelloMsg = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'senderCertificate',\n value: (0, _utils.encode)(value)\n }\n };\n chatKeys.handshakeHistory.senderCertificate = _this._filterMessageToHash(receiverHelloMsg, 'ok' + iv, chatKeys.hypertyFrom.messageInfo);\n\n resolve({ message: receiverHelloMsg, chatKeys: chatKeys });\n }, function (error) {\n return reject(error);\n });\n\n break;\n }\n case 'senderCertificate':\n {\n\n log.log('senderCertificate');\n\n var receivedValue = (0, _utils.decode)(message.body.value);\n\n _this.getMyPrivateKey().then(function (privateKey) {\n privateKeyHolder = privateKey;\n\n return _this._idm.validateAssertion(message.body.identity.assertion, undefined, message.body.identity.idp.domain);\n }).then(function (value) {\n var encryptedPMS = (0, _utils.decodeToUint8Array)(receivedValue.assymetricEncryption);\n\n //TODO remove later this verification as soon as all the IdP proxy are updated in the example\n var encodedpublicKey = typeof value.contents === 'string' ? value.contents : value.contents.nonce;\n\n var senderPublicKey = (0, _utils.parseToUint8Array)(encodedpublicKey);\n chatKeys.hypertyTo.assertion = message.body.identity.assertion;\n chatKeys.hypertyTo.publicKey = senderPublicKey;\n chatKeys.hypertyTo.userID = message.body.identity.userProfile.userURL;\n\n return _this.crypto.decryptRSA(privateKeyHolder, encryptedPMS);\n }, function (error) {\n // log.log(error);\n reject('Error during authentication of identity: ', error.message);\n\n //obtain the PremasterKey using the private key\n }).then(function (pms) {\n\n chatKeys.keys.premasterKey = new Uint8Array(pms);\n\n var signature = (0, _utils.decodeToUint8Array)(receivedValue.signature);\n\n var receivedmsgToHash = _this._filterMessageToHash(message, chatKeys.keys.premasterKey);\n\n return _this.crypto.verifyRSA(chatKeys.hypertyTo.publicKey, (0, _utils.encode)(chatKeys.handshakeHistory) + (0, _utils.encode)(receivedmsgToHash), signature);\n\n // validates the signature received\n }).then(function (signValidationResult) {\n\n //log.log('SenderCertificate - signature validation result ', signValidationResult);\n var concatKey = _this.crypto.concatPMSwithRandoms(chatKeys.keys.premasterKey, chatKeys.keys.toRandom, chatKeys.keys.fromRandom);\n\n return _this.crypto.generateMasterSecret(concatKey, 'messageHistoric' + chatKeys.keys.toRandom + chatKeys.keys.fromRandom);\n\n // generates the master keys from the Premaster key and the randoms\n }).then(function (masterKey) {\n chatKeys.keys.masterKey = masterKey;\n\n return _this.crypto.generateKeys(masterKey, 'key expansion' + chatKeys.keys.toRandom + chatKeys.keys.fromRandom);\n\n // generates the symmetric keys to be used in the symmetric encryption\n }).then(function (keys) {\n chatKeys.keys.hypertyFromSessionKey = new Uint8Array(keys[0]);\n chatKeys.keys.hypertyToSessionKey = new Uint8Array(keys[1]);\n chatKeys.keys.hypertyFromHashKey = new Uint8Array(keys[2]);\n chatKeys.keys.hypertyToHashKey = new Uint8Array(keys[3]);\n iv = (0, _utils.decodeToUint8Array)(receivedValue.iv);\n var data = (0, _utils.decodeToUint8Array)(receivedValue.symetricEncryption);\n\n return _this.crypto.decryptAES(chatKeys.keys.hypertyToSessionKey, data, iv);\n }).then(function (decryptedData) {\n // log.log('decryptedData', decryptedData);\n\n chatKeys.handshakeHistory.senderCertificate = _this._filterMessageToHash(message, decryptedData + iv);\n\n var hashReceived = (0, _utils.decodeToUint8Array)(receivedValue.hash);\n\n filteredMessage = _this._filterMessageToHash(message, decryptedData + iv);\n\n return _this.crypto.verifyHMAC(chatKeys.keys.hypertyToHashKey, filteredMessage, hashReceived);\n }).then(function (verifiedHash) {\n\n // log.log('result of hash verification ', verifiedHash);\n var receiverFinishedMessage = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'receiverFinishedMessage'\n }\n };\n iv = _this.crypto.generateIV();\n value.iv = (0, _utils.encode)(iv);\n\n filteredMessage = _this._filterMessageToHash(receiverFinishedMessage, 'ok!' + iv, chatKeys.hypertyFrom.messageInfo);\n\n //log.log('TIAGO: doHandShakePhase verifiedHash');\n return _this.crypto.hashHMAC(chatKeys.keys.hypertyFromHashKey, filteredMessage);\n }).then(function (hash) {\n\n value.hash = (0, _utils.encode)(hash);\n return _this.crypto.encryptAES(chatKeys.keys.hypertyFromSessionKey, 'ok!', iv);\n }).then(function (encryptedValue) {\n value.value = (0, _utils.encode)(encryptedValue);\n var receiverFinishedMessage = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'receiverFinishedMessage',\n value: (0, _utils.encode)(value)\n }\n };\n\n chatKeys.handshakeHistory.receiverFinishedMessage = _this._filterMessageToHash(receiverFinishedMessage, 'ok!' + iv, chatKeys.hypertyFrom.messageInfo);\n chatKeys.authenticated = true;\n resolve({ message: receiverFinishedMessage, chatKeys: chatKeys });\n }).catch(function (err) {\n reject('On _doHandShakePhase from senderCertificate error: ' + err);\n });\n\n break;\n }\n case 'receiverFinishedMessage':\n {\n\n chatKeys.authenticated = true;\n\n value = (0, _utils.decode)(message.body.value);\n\n iv = (0, _utils.decodeToUint8Array)(value.iv);\n var data = (0, _utils.decodeToUint8Array)(value.value);\n hash = (0, _utils.decodeToUint8Array)(value.hash);\n\n _this.crypto.decryptAES(chatKeys.keys.hypertyToSessionKey, data, iv).then(function (decryptedData) {\n // log.log('decryptedData', decryptedData);\n chatKeys.handshakeHistory.receiverFinishedMessage = _this._filterMessageToHash(message, decryptedData + iv);\n\n var filteredMessage = _this._filterMessageToHash(message, decryptedData + iv);\n _this.crypto.verifyHMAC(chatKeys.keys.hypertyToHashKey, filteredMessage, hash).then(function (result) {\n\n // check if there was an initial message that was blocked and send it\n if (chatKeys.initialMessage) {\n\n var initialMessage = {\n type: 'create',\n to: message.from,\n from: message.to,\n body: {\n value: chatKeys.initialMessage.body.value\n }\n };\n\n resolve({ message: initialMessage, chatKeys: chatKeys });\n\n //sends the sessionKey to the subscriber hyperty\n } else {\n _this._sendReporterSessionKey(message, chatKeys).then(function (value) {\n\n resolve(value);\n }).catch(function (err) {\n reject('On _doHandShakePhase from receiverFinishedMessage error: ' + err);\n });\n }\n });\n });\n\n break;\n }\n\n case 'reporterSessionKey':\n {\n\n log.log('reporterSessionKey');\n\n var valueIVandHash = (0, _utils.decode)(message.body.value);\n hash = (0, _utils.decodeToUint8Array)(valueIVandHash.hash);\n iv = (0, _utils.decodeToUint8Array)(valueIVandHash.iv);\n var encryptedValue = (0, _utils.decodeToUint8Array)(valueIVandHash.value);\n var parsedValue = void 0;\n var sessionKey = void 0;\n var dataObjectURL = void 0;\n var receiverAcknowledgeMsg = void 0;\n\n //log.log('[IdentityModule reporterSessionKey] - decryptAES: ', chatKeys.keys.hypertyToSessionKey, encryptedValue, iv);\n\n _this.crypto.decryptAES(chatKeys.keys.hypertyToSessionKey, encryptedValue, iv).then(function (decryptedValue) {\n\n parsedValue = (0, _utils.decode)(decryptedValue);\n sessionKey = (0, _utils.decodeToUint8Array)(parsedValue.value);\n dataObjectURL = parsedValue.dataObjectURL;\n\n var messageToHash = _this._filterMessageToHash(message, decryptedValue + iv);\n\n return _this.crypto.verifyHMAC(chatKeys.keys.hypertyToHashKey, messageToHash, hash);\n }).then(function (hashResult) {\n\n // log.log('hash successfully validated ', hashResult);\n\n _this.dataObjectSessionKeys[dataObjectURL] = { sessionKey: sessionKey, isToEncrypt: true };\n var dataObjectSessionKeysClone = (0, _utils.chatkeysToStringCloner)(_this.dataObjectSessionKeys);\n _this.storageManager.set('dataObjectSessionKeys', 0, dataObjectSessionKeysClone).catch(function (err) {\n reject('On _sendReporterSessionKey from method reporterSessionKey error: ' + err);\n });\n\n iv = _this.crypto.generateIV();\n value.iv = (0, _utils.encode)(iv);\n\n return _this.crypto.encryptAES(chatKeys.keys.hypertyFromSessionKey, 'ok!!', iv);\n }).then(function (encryptedValue) {\n\n receiverAcknowledgeMsg = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'receiverAcknowledge'\n }\n };\n\n value.value = (0, _utils.encode)(encryptedValue);\n var messageToHash = _this._filterMessageToHash(receiverAcknowledgeMsg, 'ok!!' + iv, chatKeys.hypertyFrom.messageInfo);\n\n return _this.crypto.hashHMAC(chatKeys.keys.hypertyFromHashKey, messageToHash);\n }).then(function (hashedMessage) {\n var finalValue = (0, _utils.encode)({ value: value.value, hash: (0, _utils.encode)(hashedMessage), iv: value.iv });\n\n receiverAcknowledgeMsg.body.value = finalValue;\n resolve({ message: receiverAcknowledgeMsg, chatKeys: chatKeys });\n }).catch(function (err) {\n reject('On _doHandShakePhase from reporterSessionKey error: ' + err);\n });\n\n break;\n }\n\n case 'receiverAcknowledge':\n {\n\n log.log('receiverAcknowledge');\n\n var receivedvalueIVandHash = (0, _utils.decode)(message.body.value);\n var receivedHash = (0, _utils.decodeToUint8Array)(receivedvalueIVandHash.hash);\n iv = (0, _utils.decodeToUint8Array)(receivedvalueIVandHash.iv);\n var receivedEncryptedValue = (0, _utils.decodeToUint8Array)(receivedvalueIVandHash.value);\n\n _this.crypto.decryptAES(chatKeys.keys.hypertyToSessionKey, receivedEncryptedValue, iv).then(function (decryptedValue) {\n\n var filteredMessage = _this._filterMessageToHash(message, decryptedValue + iv);\n return _this.crypto.verifyHMAC(chatKeys.keys.hypertyToHashKey, filteredMessage, receivedHash);\n }).then(function (hashResult) {\n // log.log('hashResult ', hashResult);\n\n var callback = chatKeys.callback;\n\n if (callback) {\n callback('handShakeEnd');\n }\n resolve('handShakeEnd');\n }).catch(function (err) {\n reject('On _doHandShakePhase from receiverAcknowledge error: ' + err);\n });\n\n break;\n }\n\n default:\n reject(message);\n }\n });\n }\n\n /**\n * filter the messages to hash, by removing some fields not generated by the runtime core\n * @param {Message} message message\n * @param {String} decryptedValue (Optional) value from body.value in case it originally comes encrypted\n * @param {JSON} identity(Optional) add the hyperty identity associated in case is not added to the initial message\n * @return {Message} new message filtered\n */\n\n }, {\n key: '_filterMessageToHash',\n value: function _filterMessageToHash(message, decryptedValue, identity) {\n\n return {\n type: message.type,\n from: message.from,\n to: message.to,\n body: {\n identity: identity || message.body.identity,\n value: decryptedValue || message.body.value,\n handshakePhase: message.body.handshakePhase\n }\n };\n }\n\n /**\n * generates the initial structure for the keys between two users\n * @param {JSON} message initial message that triggers the mutual authentication\n * @param {String} userURL userURL\n * @param {boolean} receiver(Optional) indicates if is the sender or the receiver that creates a new chat crypto\n * @return {JSON} newChatCrypto new JSON structure for the chat crypto\n */\n\n }, {\n key: '_newChatCrypto',\n value: function _newChatCrypto(message, userURL, receiver) {\n var _this = this;\n\n //check whether is the sender or the receiver to create a new chatCrypto\n //to mantain consistency on the keys if the receiver create a new chatCrypto,\n //then invert the fields\n var from = receiver ? message.to : message.from;\n var to = receiver ? message.from : message.to;\n\n var userInfo = _this._idm.getIdentity(userURL);\n\n var newChatCrypto = {\n hypertyFrom: {\n hyperty: from,\n userID: userInfo.userProfile.userURL,\n\n //privateKey: \"getMyPublicKey\",\n //publicKey: \"getMyPrivateKey\",\n assertion: userInfo.assertion,\n messageInfo: userInfo\n },\n hypertyTo: {\n hyperty: to,\n userID: undefined,\n publicKey: undefined,\n assertion: undefined\n },\n keys: {\n hypertyToSessionKey: undefined,\n hypertyFromSessionKey: undefined,\n hypertyToHashKey: undefined,\n hypertyFromHashKey: undefined,\n toRandom: undefined,\n fromRandom: undefined,\n premasterKey: undefined,\n masterKey: undefined\n },\n handshakeHistory: {\n senderHello: undefined,\n receiverHello: undefined,\n senderCertificate: undefined,\n receiverFinishedMessage: undefined\n },\n initialMessage: message.body.ignore ? undefined : message,\n callback: message.callback,\n authenticated: false,\n dataObjectURL: message.dataObjectURL\n };\n\n return newChatCrypto;\n }\n\n /**\n * Retrieves a public keys given a user refrence. If no key is found,\n generates a new key asymmetric key and retrieves the public keys.\n * @param {userRef} String user reference for the key pair\n * @return {Array} public key\n */\n\n }, {\n key: 'getMyPublicKey',\n value: function getMyPublicKey() {\n var userRef = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.userDefaultKeyRef;\n\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n _this.storageManager.get(userRef).then(function (storedKeyPair) {\n if (storedKeyPair) {\n return resolve(storedKeyPair.public);\n }\n _this._generateAndStoreNewAsymetricKey(userRef).then(function (generatedKeyPair) {\n resolve(generatedKeyPair.public);\n }).catch(function (err) {\n log.error('[getMyPublicKey:_generateAndStoreNewAsymetricKey:err]: ' + err.message);\n reject(err);\n });\n }).catch(function (err) {\n log.error('[getMyPublicKey:storageManager:err]: ' + err.message);\n reject(err);\n });\n });\n }\n\n /**\n * Retrieves a private keys given a user refrence. If no key is found,\n generates a new key asymmetric key and retrieves the private key.\n * @param {userRef} String user reference for the key pair\n * @return {Array} private key\n **/\n\n }, {\n key: 'getMyPrivateKey',\n value: function getMyPrivateKey() {\n var userRef = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.userDefaultKeyRef;\n\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n _this.storageManager.get(userRef).then(function (storedKeyPair) {\n if (storedKeyPair) {\n return resolve(storedKeyPair.private);\n }\n _this._generateAndStoreNewAsymetricKey(userRef).then(function (generatedKeyPair) {\n resolve(generatedKeyPair.private);\n }).catch(function (err) {\n log.error('[getMyPrivateKey:_generateAndStoreNewAsymetricKey:err]: ' + err.message);\n reject(err);\n });\n }).catch(function (err) {\n log.error('[getMyPrivateKey:storageManager:err]: ' + err.message);\n reject(err);\n });\n });\n }\n\n /**\n * Generates a new key pair, stores and retrives the key pair.\n * @param {userRef} String user reference for the key pair\n * @return {Array} private key\n **/\n\n }, {\n key: '_generateAndStoreNewAsymetricKey',\n value: function _generateAndStoreNewAsymetricKey(userRef) {\n var _this = this;\n var keyPair = undefined;\n return new _promise2.default(function (resolve, reject) {\n _this.crypto.generateRSAKeyPair().then(function (generatedKeyPair) {\n log.log('_generateAndStoreNewAsymetricKey:userAsymmetricKeyGenerated', generatedKeyPair);\n keyPair = generatedKeyPair;\n return _this.storageManager.set(userRef, 0, generatedKeyPair);\n }).then(function (storedReference) {\n log.log('_generateAndStoreNewAsymetricKey:userAsymmetricKeySuccess', storedReference);\n resolve(keyPair);\n }).catch(function (err) {\n log.error('[_generateAndStoreNewAsymetricKey:err]: ' + err.message);\n reject(err);\n });\n });\n }\n }, {\n key: 'messageBus',\n get: function get() {\n var _this = this;\n return _this._messageBus;\n }\n\n /**\n * Set the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n ,\n set: function set(messageBus) {\n var _this = this;\n _this._messageBus = messageBus;\n\n _this.addCryptoGUIListeners();\n }\n\n /**\n * return the coreDiscovery component\n */\n\n }, {\n key: 'coreDiscovery',\n get: function get() {\n var _this = this;\n return _this._coreDiscovery;\n }\n\n /**\n * return user's public key\n */\n\n /* getMyPublicKey() {\n // to be implemented\n return new Promise((resolve)=> {\n resolve('mypublickey');\n });\n }\n */\n /**\n * Set the coreDiscovery component\n * @param {coreDiscovery} coreDiscovery\n */\n ,\n set: function set(coreDiscovery) {\n var _this = this;\n _this._coreDiscovery = coreDiscovery;\n }\n\n /**\n * return the registry in this idModule\n * @param {registry} registry\n */\n\n }, {\n key: 'registry',\n get: function get() {\n var _this = this;\n return _this._registry;\n }\n\n /**\n * Set the registry in this idModule\n * @param {registry} reg\n */\n ,\n set: function set(registry) {\n var _this = this;\n _this._registry = registry;\n }\n }]);\n return CryptoManager;\n}();\n\n/*\nconst nodeJSKeyPairPopulate = { public: [48, 130, 1, 34, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 3, 130, 1, 15, 0, 48, 130, 1, 10, 2, 130, 1, 1, 0, 228, 43, 101, 12, 121, 7, 157, 71, 81, 58, 219, 32, 10, 108, 193, 179, 212, 116, 255, 59, 217, 32, 161, 201, 53, 171, 226, 199, 137, 202, 171, 60, 82, 53, 125, 62, 177, 126, 165, 24, 141, 30, 15, 226, 59, 107, 34, 7, 13, 149, 112, 125, 10, 230, 191, 156, 164, 177, 10, 185, 13, 66, 3, 217, 166, 244, 90, 119, 111, 27, 145, 104, 71, 189, 166, 226, 255, 133, 83, 151, 231, 101, 151, 89, 22, 19, 65, 154, 10, 53, 208, 218, 252, 219, 37, 50, 212, 86, 145, 107, 132, 90, 233, 202, 227, 108, 114, 141, 29, 73, 187, 31, 13, 234, 0, 232, 24, 191, 35, 149, 179, 138, 214, 159, 245, 162, 148, 221, 118, 17, 105, 89, 151, 146, 209, 55, 236, 61, 143, 233, 228, 10, 115, 8, 81, 197, 45, 123, 187, 223, 176, 254, 165, 69, 143, 29, 100, 114, 17, 130, 226, 223, 33, 11, 240, 81, 61, 172, 191, 157, 246, 202, 87, 131, 221, 88, 48, 127, 159, 119, 160, 152, 117, 61, 253, 174, 65, 214, 203, 218, 63, 50, 78, 160, 181, 221, 211, 128, 70, 178, 191, 170, 0, 13, 122, 173, 12, 203, 252, 4, 184, 225, 252, 7, 62, 96, 116, 15, 216, 158, 55, 85, 48, 16, 9, 206, 119, 74, 112, 243, 136, 84, 184, 223, 254, 101, 91, 61, 10, 91, 85, 192, 147, 144, 57, 29, 66, 238, 199, 244, 193, 194, 150, 232, 200, 107, 2, 3, 1, 0, 1],\n private: [48, 130, 4, 191, 2, 1, 0, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 4, 130, 4, 169, 48, 130, 4, 165, 2, 1, 0, 2, 130, 1, 1, 0, 228, 43, 101, 12, 121, 7, 157, 71, 81, 58, 219, 32, 10, 108, 193, 179, 212, 116, 255, 59, 217, 32, 161, 201, 53, 171, 226, 199, 137, 202, 171, 60, 82, 53, 125, 62, 177, 126, 165, 24, 141, 30, 15, 226, 59, 107, 34, 7, 13, 149, 112, 125, 10, 230, 191, 156, 164, 177, 10, 185, 13, 66, 3, 217, 166, 244, 90, 119, 111, 27, 145, 104, 71, 189, 166, 226, 255, 133, 83, 151, 231, 101, 151, 89, 22, 19, 65, 154, 10, 53, 208, 218, 252, 219, 37, 50, 212, 86, 145, 107, 132, 90, 233, 202, 227, 108, 114, 141, 29, 73, 187, 31, 13, 234, 0, 232, 24, 191, 35, 149, 179, 138, 214, 159, 245, 162, 148, 221, 118, 17, 105, 89, 151, 146, 209, 55, 236, 61, 143, 233, 228, 10, 115, 8, 81, 197, 45, 123, 187, 223, 176, 254, 165, 69, 143, 29, 100, 114, 17, 130, 226, 223, 33, 11, 240, 81, 61, 172, 191, 157, 246, 202, 87, 131, 221, 88, 48, 127, 159, 119, 160, 152, 117, 61, 253, 174, 65, 214, 203, 218, 63, 50, 78, 160, 181, 221, 211, 128, 70, 178, 191, 170, 0, 13, 122, 173, 12, 203, 252, 4, 184, 225, 252, 7, 62, 96, 116, 15, 216, 158, 55, 85, 48, 16, 9, 206, 119, 74, 112, 243, 136, 84, 184, 223, 254, 101, 91, 61, 10, 91, 85, 192, 147, 144, 57, 29, 66, 238, 199, 244, 193, 194, 150, 232, 200, 107, 2, 3, 1, 0, 1, 2, 130, 1, 0, 103, 244, 137, 118, 116, 82, 14, 203, 102, 107, 253, 88, 12, 199, 222, 60, 243, 136, 86, 157, 74, 224, 190, 53, 113, 57, 157, 250, 49, 130, 96, 31, 252, 136, 152, 70, 143, 17, 215, 96, 103, 51, 18, 35, 141, 212, 210, 205, 9, 216, 83, 70, 245, 71, 138, 119, 112, 229, 164, 176, 9, 37, 81, 161, 193, 154, 68, 249, 115, 106, 201, 6, 12, 225, 144, 126, 141, 210, 141, 242, 128, 159, 221, 163, 222, 21, 233, 230, 167, 206, 59, 24, 250, 233, 81, 122, 102, 26, 6, 233, 72, 133, 47, 77, 155, 238, 86, 6, 139, 24, 131, 163, 179, 112, 48, 247, 142, 6, 207, 204, 173, 223, 140, 199, 150, 95, 123, 152, 202, 155, 131, 238, 62, 96, 133, 4, 217, 51, 121, 30, 38, 178, 189, 216, 44, 35, 241, 93, 7, 62, 90, 111, 216, 66, 209, 243, 128, 234, 141, 84, 135, 181, 13, 38, 220, 114, 245, 240, 178, 95, 220, 206, 11, 186, 234, 213, 66, 121, 83, 68, 89, 75, 46, 183, 145, 183, 147, 160, 215, 118, 198, 125, 181, 146, 30, 251, 58, 87, 47, 209, 237, 97, 24, 47, 179, 6, 110, 242, 99, 150, 226, 148, 198, 174, 146, 101, 213, 87, 178, 10, 223, 105, 18, 56, 53, 22, 212, 158, 170, 176, 51, 86, 145, 125, 124, 44, 9, 85, 19, 144, 246, 170, 78, 124, 30, 32, 12, 166, 174, 139, 77, 63, 173, 82, 10, 153, 2, 129, 129, 0, 248, 18, 143, 246, 137, 136, 145, 219, 178, 39, 27, 94, 64, 90, 47, 163, 114, 60, 63, 187, 131, 143, 244, 16, 42, 128, 231, 117, 92, 98, 219, 155, 62, 107, 252, 17, 245, 45, 160, 225, 103, 142, 72, 36, 193, 150, 235, 214, 175, 62, 212, 56, 45, 9, 0, 60, 114, 107, 134, 228, 204, 131, 131, 214, 94, 201, 148, 159, 99, 139, 181, 13, 119, 38, 30, 107, 166, 165, 203, 43, 34, 20, 207, 171, 32, 58, 167, 62, 196, 153, 103, 204, 213, 247, 48, 111, 227, 59, 95, 97, 194, 187, 53, 10, 247, 108, 58, 86, 28, 29, 113, 8, 110, 171, 220, 245, 11, 82, 233, 223, 91, 68, 166, 117, 174, 187, 62, 77, 2, 129, 129, 0, 235, 118, 2, 105, 239, 212, 30, 104, 157, 41, 109, 11, 248, 152, 22, 236, 97, 40, 153, 131, 228, 5, 86, 187, 113, 126, 144, 76, 141, 79, 110, 250, 146, 152, 49, 58, 156, 201, 176, 92, 189, 209, 30, 112, 108, 175, 204, 204, 247, 164, 46, 129, 239, 98, 127, 49, 145, 218, 63, 193, 124, 174, 18, 98, 201, 99, 154, 162, 138, 78, 159, 253, 3, 248, 3, 209, 36, 239, 193, 155, 193, 5, 19, 236, 37, 78, 118, 135, 250, 199, 7, 141, 248, 120, 36, 136, 93, 98, 174, 60, 18, 215, 93, 174, 107, 141, 116, 145, 167, 221, 210, 169, 247, 67, 254, 222, 161, 134, 63, 221, 90, 87, 42, 99, 227, 81, 173, 151, 2, 129, 129, 0, 133, 23, 168, 103, 83, 232, 146, 160, 181, 23, 40, 38, 204, 13, 214, 203, 49, 41, 195, 227, 189, 181, 8, 243, 119, 106, 75, 67, 250, 250, 10, 234, 98, 118, 26, 250, 35, 121, 132, 124, 10, 76, 26, 198, 165, 154, 108, 19, 117, 88, 23, 17, 192, 143, 184, 177, 181, 141, 157, 4, 185, 248, 193, 77, 204, 243, 7, 170, 240, 4, 111, 113, 183, 0, 27, 136, 20, 19, 149, 74, 33, 241, 218, 108, 236, 80, 171, 148, 16, 116, 97, 109, 83, 74, 88, 145, 94, 239, 102, 192, 19, 114, 207, 5, 128, 51, 111, 164, 237, 86, 154, 99, 52, 197, 62, 57, 182, 6, 152, 245, 61, 137, 58, 105, 159, 2, 84, 109, 2, 129, 129, 0, 226, 67, 111, 132, 95, 91, 101, 177, 63, 189, 44, 53, 193, 184, 92, 230, 223, 98, 133, 74, 209, 86, 52, 7, 65, 195, 206, 100, 81, 178, 144, 65, 167, 151, 42, 79, 89, 149, 18, 173, 188, 21, 244, 251, 49, 230, 41, 150, 153, 46, 35, 38, 231, 99, 174, 56, 115, 32, 215, 253, 85, 147, 108, 197, 147, 34, 236, 216, 222, 177, 57, 90, 136, 114, 207, 48, 46, 31, 90, 220, 18, 58, 143, 239, 111, 214, 27, 95, 6, 36, 53, 229, 62, 108, 45, 39, 1, 30, 47, 178, 56, 164, 206, 56, 42, 208, 46, 193, 61, 31, 147, 45, 147, 23, 187, 22, 50, 255, 111, 229, 132, 199, 152, 75, 142, 136, 209, 151, 2, 129, 129, 0, 165, 56, 232, 76, 55, 57, 240, 159, 92, 207, 220, 143, 130, 30, 57, 234, 251, 172, 171, 180, 54, 159, 229, 96, 246, 73, 112, 146, 75, 157, 242, 201, 161, 218, 37, 176, 35, 170, 50, 90, 148, 102, 191, 199, 239, 174, 78, 72, 67, 85, 199, 45, 149, 145, 132, 161, 212, 33, 157, 75, 216, 79, 39, 233, 18, 210, 255, 26, 72, 229, 239, 44, 12, 147, 158, 176, 192, 95, 126, 32, 175, 23, 226, 131, 139, 197, 175, 193, 62, 8, 151, 252, 68, 154, 94, 89, 189, 125, 90, 30, 36, 175, 73, 230, 194, 13, 233, 247, 123, 60, 241, 47, 171, 51, 189, 112, 111, 213, 141, 89, 70, 249, 236, 63, 236, 110, 115, 208]};\n*/\n\nexports.default = new CryptoManager();\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9jcnlwdG9NYW5hZ2Vy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TtcblxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJvZHkuYXNzZXJ0ZWRJZGVudGl0eSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUobWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgICB9KS5jYXRjaChlcnIgPT4geyByZWplY3QoJ01lc3NhZ2UgSE1BQyBpcyBpbnZhbGlkOiAnICsgZXJyKTsgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAvL2lmIG5vdCwganVzdCByZXR1cm4gdGhlIG1lc3NhZ2VcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBtZXNzYWdlLmJvZHkuYXNzZXJ0ZWRJZGVudGl0eSA9IHRydWU7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZShtZXNzYWdlKTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBtZXNzYWdlLmJvZHkuYXNzZXJ0ZWRJZGVudGl0eSA9IHRydWU7XG4gICAgICAgICAgICAgIHJlc29sdmUobWVzc2FnZSk7XG5cbiAgICAgICAgICAgICAgLy9yZWplY3QoJ25vIHNlc3Npb25LZXkgZm9yIGNoYXQgcm9vbSBmb3VuZCcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmVqZWN0KCd3cm9uZyBtZXNzYWdlIHRvIGRlY3J5cHQnKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICB9KTtcbiAgfVxuXG4gIGRlY3J5cHREYXRhT2JqZWN0KGRhdGFPYmplY3QsIHNlbmRlcikge1xuICAgIGxldCBfdGhpcyA9IHRoaXM7XG5cbiAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24ocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAvL2lmIGlzIG5vdCB0byBhcHB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IHRvOiBtZXNzYWdlLmZyb20sXG4gICAgICAgICAgICAgICAgICBmcm9tOiBtZXNzYWdlLnRvLFxuICAgICAgICAgICAgICAgICAgYm9keToge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogY2hhdEtleXMuaW5pdGlhbE1lc3NhZ2UuYm9keS52YWx1ZVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICByZXNvbHZlKHttZXNzYWdlOiBpbml0aWFsTWVzc2FnZSwgY2hhdEtleXM6IGNoYXRLZXlzfSk7XG5cbiAgICAgICAgICAgICAgICAvL3NlbmRzIHRoZSBzZXNzaW9uS2V5IHRvIHRoZSBzdWJzY3JpYmVyIGh5cGVydHlcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5fc2VuZFJlcG9ydGVyU2Vzc2lvbktleShtZXNzYWdlLCBjaGF0S2V5cykudGhlbih2YWx1ZSA9PiB7XG5cbiAgICAgICAgICAgICAgICAgIHJlc29sdmUodmFsdWUpO1xuICAgICAgICAgICAgICAgIH0pLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgICAgICAgICByZWplY3QoJ09uIF9kb0hhbmRTaGFrZVBoYXNlIGZyb20gcmVjZWl2ZXJGaW5pc2hlZE1lc3NhZ2UgZXJyb3I6ICcgKyBlcnIpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgY2FzZSAncmVwb3J0ZXJTZXNzaW9uS2V5Jzoge1xuXG4gICAgICAgICAgbG9nLmxvZygncmVwb3J0ZXJTZXNzaW9uS2V5Jyk7XG5cbiAgICAgICAgICBsZXQgdmFsdWVJVmFuZEhhc2ggPSBkZWNvZGUobWVzc2FnZS5ib2R5LnZhbHVlKTtcbiAgICAgICA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ICBhc3NlcnRpb246IHVzZXJJbmZvLmFzc2VydGlvbixcbiAgICAgICAgICBtZXNzYWdlSW5mbzogdXNlckluZm9cbiAgICAgICAgfSxcbiAgICAgICAgaHlwZXJ0eVRvOlxuICAgICAgICB7XG4gICAgICAgICAgaHlwZXJ0eTogdG8sXG4gICAgICAgICAgdXNlcklEOiB1bmRlZmluZWQsXG4gICAgICAgICAgcHVibGljS2V5OiB1bmRlZmluZWQsXG4gICAgICAgICAgYXNzZXJ0aW9uOiB1bmRlZmluZWRcbiAgICAgICAgfSxcbiAgICAgICAga2V5czpcbiAgICAgICAge1xuICAgICAgICAgIGh5cGVydHlUb1Nlc3Npb25LZXk6IHVuZGVmaW5lZCxcbiAgICAgICAgICBoeXBlcnR5RnJvbVNlc3Npb25LZXk6IHVuZGVmaW5lZCxcbiAgICAgICAgICBoeXBlcnR5VG9IYXNoS2V5OiB1bmRlZmluZWQsXG4gICAgICAgICAgaHlwZXJ0eUZyb21IYXNoS2V5OiB1bmRlZmluZWQsXG4gICAgICAgICAgdG9SYW5kb206IHVuZGVmaW5lZCxcbiAgICAgICAgICBmcm9tUmFuZG9tOiB1bmRlZmluZWQsXG4gICAgICAgICAgcHJlbWFzdGVyS2V5OiB1bmRlZmluZWQsXG4gICAgICAgICAgbWFzdGVyS2V5OiB1bmRlZmluZWRcbiAgICAgICAgfSxcbiAgICAgICAgaGFuZHNoYWtlSGlzdG9yeToge1xuICAgICAgICAgIHNlbmRlckhlbGxvOiB1bmRlZmluZWQsXG4gICAgICAgICAgcmVjZWl2ZXJIZWxsbzogdW5kZWZpbmVkLFxuICAgICAgICAgIHNlbmRlckNlcnRpZmljYXRlOiB1bmRlZmluZWQsXG4gICAgICAgICAgcmVjZWl2ZXJGaW5pc2hlZE1lc3NhZ2U6IHVuZGVmaW5lZFxuICAgICAgICB9LFxuICAgICAgICBpbml0aWFsTWVzc2FnZTogKG1lc3NhZ2UuYm9keS5pZ25vcmUpID8gdW5kZWZpbmVkIDogbWVzc2F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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7Ozs7QUFNQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBOzs7Ozs7OztBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQTV6Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7OztBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7OztBQUlBOzs7Ozs7O0FBU0E7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQWt3Q0E7Ozs7O0FBS0E7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///100\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(6);\nvar document = __webpack_require__(4).document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZG9tLWNyZWF0ZS5qcz84ZTFjIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIGRvY3VtZW50ID0gcmVxdWlyZSgnLi9fZ2xvYmFsJykuZG9jdW1lbnQ7XG4vLyB0eXBlb2YgZG9jdW1lbnQuY3JlYXRlRWxlbWVudCBpcyAnb2JqZWN0JyBpbiBvbGQgSUVcbnZhciBpcyA9IGlzT2JqZWN0KGRvY3VtZW50KSAmJiBpc09iamVjdChkb2N1bWVudC5jcmVhdGVFbGVtZW50KTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBpcyA/IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoaXQpIDoge307XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19kb20tY3JlYXRlLmpzXG4vLyBtb2R1bGUgaWQgPSAxMDFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///101\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar core = __webpack_require__(30);\nvar LIBRARY = __webpack_require__(49);\nvar wksExt = __webpack_require__(149);\nvar defineProperty = __webpack_require__(11).f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fd2tzLWRlZmluZS5qcz9kZTBmIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBjb3JlID0gcmVxdWlyZSgnLi9fY29yZScpO1xudmFyIExJQlJBUlkgPSByZXF1aXJlKCcuL19saWJyYXJ5Jyk7XG52YXIgd2tzRXh0ID0gcmVxdWlyZSgnLi9fd2tzLWV4dCcpO1xudmFyIGRlZmluZVByb3BlcnR5ID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJykuZjtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKG5hbWUpIHtcbiAgdmFyICRTeW1ib2wgPSBjb3JlLlN5bWJvbCB8fCAoY29yZS5TeW1ib2wgPSBMSUJSQVJZID8ge30gOiBnbG9iYWwuU3ltYm9sIHx8IHt9KTtcbiAgaWYgKG5hbWUuY2hhckF0KDApICE9ICdfJyAmJiAhKG5hbWUgaW4gJFN5bWJvbCkpIGRlZmluZVByb3BlcnR5KCRTeW1ib2wsIG5hbWUsIHsgdmFsdWU6IHdrc0V4dC5mKG5hbWUpIH0pO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fd2tzLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMTAyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///102\n")},function(module,exports,__webpack_require__){eval("var shared = __webpack_require__(78)('keys');\nvar uid = __webpack_require__(48);\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc2hhcmVkLWtleS5qcz85OTkzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBzaGFyZWQgPSByZXF1aXJlKCcuL19zaGFyZWQnKSgna2V5cycpO1xudmFyIHVpZCA9IHJlcXVpcmUoJy4vX3VpZCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoa2V5KSB7XG4gIHJldHVybiBzaGFyZWRba2V5XSB8fCAoc2hhcmVkW2tleV0gPSB1aWQoa2V5KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zaGFyZWQta2V5LmpzXG4vLyBtb2R1bGUgaWQgPSAxMDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///103\n")},function(module,exports){eval("// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZW51bS1idWcta2V5cy5qcz80MGE1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIElFIDgtIGRvbid0IGVudW0gYnVnIGtleXNcbm1vZHVsZS5leHBvcnRzID0gKFxuICAnY29uc3RydWN0b3IsaGFzT3duUHJvcGVydHksaXNQcm90b3R5cGVPZixwcm9wZXJ0eUlzRW51bWVyYWJsZSx0b0xvY2FsZVN0cmluZyx0b1N0cmluZyx2YWx1ZU9mJ1xuKS5zcGxpdCgnLCcpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19lbnVtLWJ1Zy1rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSAxMDRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///104\n")},function(module,exports,__webpack_require__){eval("var document = __webpack_require__(4).document;\nmodule.exports = document && document.documentElement;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faHRtbC5qcz83NzRlIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBkb2N1bWVudCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpLmRvY3VtZW50O1xubW9kdWxlLmV4cG9ydHMgPSBkb2N1bWVudCAmJiBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQ7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2h0bWwuanNcbi8vIG1vZHVsZSBpZCA9IDEwNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///105\n")},function(module,exports,__webpack_require__){eval("// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = __webpack_require__(6);\nvar anObject = __webpack_require__(3);\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = __webpack_require__(27)(Function.call, __webpack_require__(25).f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc2V0LXByb3RvLmpzPzgyZjAiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gV29ya3Mgd2l0aCBfX3Byb3RvX18gb25seS4gT2xkIHY4IGNhbid0IHdvcmsgd2l0aCBudWxsIHByb3RvIG9iamVjdHMuXG4vKiBlc2xpbnQtZGlzYWJsZSBuby1wcm90byAqL1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBjaGVjayA9IGZ1bmN0aW9uIChPLCBwcm90bykge1xuICBhbk9iamVjdChPKTtcbiAgaWYgKCFpc09iamVjdChwcm90bykgJiYgcHJvdG8gIT09IG51bGwpIHRocm93IFR5cGVFcnJvcihwcm90byArI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BQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///106\n")},function(module,exports){eval("module.exports = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' +\n '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLXdzLmpzPzVkZGIiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSAnXFx4MDlcXHgwQVxceDBCXFx4MENcXHgwRFxceDIwXFx4QTBcXHUxNjgwXFx1MTgwRVxcdTIwMDBcXHUyMDAxXFx1MjAwMlxcdTIwMDMnICtcbiAgJ1xcdTIwMDRcXHUyMDA1XFx1MjAwNlxcdTIwMDdcXHUyMDA4XFx1MjAwOVxcdTIwMEFcXHUyMDJGXFx1MjA1RlxcdTMwMDBcXHUyMDI4XFx1MjAyOVxcdUZFRkYnO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zdHJpbmctd3MuanNcbi8vIG1vZHVsZSBpZCA9IDEwN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///107\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(6);\nvar setPrototypeOf = __webpack_require__(106).set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faW5oZXJpdC1pZi1yZXF1aXJlZC5qcz85MjI3Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIHNldFByb3RvdHlwZU9mID0gcmVxdWlyZSgnLi9fc2V0LXByb3RvJykuc2V0O1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAodGhhdCwgdGFyZ2V0LCBDKSB7XG4gIHZhciBTID0gdGFyZ2V0LmNvbnN0cnVjdG9yO1xuICB2YXIgUDtcbiAgaWYgKFMgIT09IEMgJiYgdHlwZW9mIFMgPT0gJ2Z1bmN0aW9uJyAmJiAoUCA9IFMucHJvdG90eXBlKSAhPT0gQy5wcm90b3R5cGUgJiYgaXNPYmplY3QoUCkgJiYgc2V0UHJvdG90eXBlT2YpIHtcbiAgICBzZXRQcm90b3R5cGVPZih0aGF0LCBQKTtcbiAgfSByZXR1cm4gdGhhdDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2luaGVyaXQtaWYtcmVxdWlyZWQuanNcbi8vIG1vZHVsZSBpZCA9IDEwOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///108\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar toInteger = __webpack_require__(33);\nvar defined = __webpack_require__(32);\n\nmodule.exports = function repeat(count) {\n var str = String(defined(this));\n var res = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError(\"Count can't be negative\");\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;\n return res;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLXJlcGVhdC5qcz9jNDA3Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiByZXBlYXQoY291bnQpIHtcbiAgdmFyIHN0ciA9IFN0cmluZyhkZWZpbmVkKHRoaXMpKTtcbiAgdmFyIHJlcyA9ICcnO1xuICB2YXIgbiA9IHRvSW50ZWdlcihjb3VudCk7XG4gIGlmIChuIDwgMCB8fCBuID09IEluZmluaXR5KSB0aHJvdyBSYW5nZUVycm9yKFwiQ291bnQgY2FuJ3QgYmUgbmVnYXRpdmVcIik7XG4gIGZvciAoO24gPiAwOyAobiA+Pj49IDEpICYmIChzdHIgKz0gc3RyKSkgaWYgKG4gJiAxKSByZXMgKz0gc3RyO1xuICByZXR1cm4gcmVzO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLXJlcGVhdC5qc1xuLy8gbW9kdWxlIGlkID0gMTA5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///109\n")},function(module,exports){eval("// 20.2.2.28 Math.sign(x)\nmodule.exports = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1zaWduLmpzPzczMDkiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjI4IE1hdGguc2lnbih4KVxubW9kdWxlLmV4cG9ydHMgPSBNYXRoLnNpZ24gfHwgZnVuY3Rpb24gc2lnbih4KSB7XG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgcmV0dXJuICh4ID0gK3gpID09IDAgfHwgeCAhPSB4ID8geCA6IHggPCAwID8gLTEgOiAxO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1zaWduLmpzXG4vLyBtb2R1bGUgaWQgPSAxMTBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///110\n")},function(module,exports){eval("// 20.2.2.14 Math.expm1(x)\nvar $expm1 = Math.expm1;\nmodule.exports = (!$expm1\n // Old FF bug\n || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168\n // Tor Browser bug\n || $expm1(-2e-17) != -2e-17\n) ? function expm1(x) {\n return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;\n} : $expm1;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTExLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1leHBtMS5qcz9jN2JmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4xNCBNYXRoLmV4cG0xKHgpXG52YXIgJGV4cG0xID0gTWF0aC5leHBtMTtcbm1vZHVsZS5leHBvcnRzID0gKCEkZXhwbTFcbiAgLy8gT2xkIEZGIGJ1Z1xuICB8fCAkZXhwbTEoMTApID4gMjIwMjUuNDY1Nzk0ODA2NzE5IHx8ICRleHBtMSgxMCkgPCAyMjAyNS40NjU3OTQ4MDY3MTY1MTY4XG4gIC8vIFRvciBCcm93c2VyIGJ1Z1xuICB8fCAkZXhwbTEoLTJlLTE3KSAhPSAtMmUtMTdcbikgPyBmdW5jdGlvbiBleHBtMSh4KSB7XG4gIHJldHVybiAoeCA9ICt4KSA9PSAwID8geCA6IHggPiAtMWUtNiAmJiB4IDwgMWUtNiA/IHggKyB4ICogeCAvIDIgOiBNYXRoLmV4cCh4KSAtIDE7XG59IDogJGV4cG0xO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19tYXRoLWV4cG0xLmpzXG4vLyBtb2R1bGUgaWQgPSAxMTFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///111\n")},function(module,exports,__webpack_require__){eval("var toInteger = __webpack_require__(33);\nvar defined = __webpack_require__(32);\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLWF0LmpzP2UzZGEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHRvSW50ZWdlciA9IHJlcXVpcmUoJy4vX3RvLWludGVnZXInKTtcbnZhciBkZWZpbmVkID0gcmVxdWlyZSgnLi9fZGVmaW5lZCcpO1xuLy8gdHJ1ZSAgLT4gU3RyaW5nI2F0XG4vLyBmYWxzZSAtPiBTdHJpbmcjY29kZVBvaW50QXRcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKFRPX1NUUklORykge1xuICByZXR1cm4gZnVuY3Rpb24gKHRoYXQsIHBvcykge1xuICAgIHZhciBzID0gU3RyaW5nKGRlZmluZWQodGhhdCkpO1xuICAgIHZhciBpID0gdG9JbnRlZ2VyKHBvcyk7XG4gICAgdmFyIGwgPSBzLmxlbmd0aDtcbiAgICB2YXIgYSwgYjtcbiAgICBpZiAoaSA8IDAgfHwgaSA+PSBsKSByZXR1cm4gVE9fU1RSSU5HID8gJycgOiB1bmRlZmluZWQ7XG4gICAgYSA9IHMuY2hhckNvZGVBdChpKTtcbiAgICByZXR1cm4gYSA8IDB4ZDgwMCB8fCBhID4gMHhkYmZmIHx8IGkgKyAxID09PSBsIHx8IChiID0gcy5jaGFyQ29kZUF0KGkgKyAxKSkgPCAweGRjMDAgfHwgYiA+IDB4ZGZmZlxuICAgICAgPyBUT19TVFJJTkcgPyBzLmNoYXJBdChpKSA6IGFcbiAgICAgIDogVE9fU1RSSU5HID8gcy5zbGljZShpLCBpICsgMikgOiAoYSAtIDB4ZDgwMCA8PCAxMCkgKyAoYiAtIDB4ZGMwMCkgKyAweDEwMDAwO1xuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLWF0LmpzXG4vLyBtb2R1bGUgaWQgPSAxMTJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///112\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar LIBRARY = __webpack_require__(49);\nvar $export = __webpack_require__(0);\nvar redefine = __webpack_require__(19);\nvar hide = __webpack_require__(18);\nvar has = __webpack_require__(17);\nvar Iterators = __webpack_require__(63);\nvar $iterCreate = __webpack_require__(114);\nvar setToStringTag = __webpack_require__(61);\nvar getPrototypeOf = __webpack_require__(26);\nvar ITERATOR = __webpack_require__(8)('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = (!BUGGY && $native) || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXRlci1kZWZpbmUuanM/YjljZCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgTElCUkFSWSA9IHJlcXVpcmUoJy4vX2xpYnJhcnknKTtcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgcmVkZWZpbmUgPSByZXF1aXJlKCcuL19yZWRlZmluZScpO1xudmFyIGhpZGUgPSByZXF1aXJlKCcuL19oaWRlJyk7XG52YXIgaGFzID0gcmVxdWlyZSgnLi9faGFzJyk7XG52YXIgSXRlcmF0b3JzID0gcmVxdWlyZSgnLi9faXRlcmF0b3JzJyk7XG52YXIgJGl0ZXJDcmVhdGUgPSByZXF1aXJlKCcuL19pdGVyLWNyZWF0ZScpO1xudmFyIHNldFRvU3RyaW5nVGFnID0gcmVxdWlyZSgnLi9fc2V0LXRvLXN0cmluZy10YWcnKTtcbnZhciBnZXRQcm90b3R5cGVPZiA9IHJlcXVpcmUoJy4vX29iamVjdC1ncG8nKTtcbnZhciBJVEVSQVRPUiA9IHJlcXVpcmUoJy4vX3drcycpKCdpdGVyYXRvcicpO1xudmFyIEJVR0dZID0gIShbXS5rZXlzICYmICduZXh0JyBpbiBbXS5rZXlzKCkpOyAvLyBTYWZhcmk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uLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pdGVyLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMTEzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///113\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar create = __webpack_require__(52);\nvar descriptor = __webpack_require__(47);\nvar setToStringTag = __webpack_require__(61);\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(18)(IteratorPrototype, __webpack_require__(8)('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE0LmpzIiwic291cmNlcy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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///114\n")},function(module,exports,__webpack_require__){eval("// helper for String#{startsWith, endsWith, includes}\nvar isRegExp = __webpack_require__(82);\nvar defined = __webpack_require__(32);\n\nmodule.exports = function (that, searchString, NAME) {\n if (isRegExp(searchString)) throw TypeError('String#' + NAME + \" doesn't accept regex!\");\n return String(defined(that));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLWNvbnRleHQuanM/OTJhYSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBoZWxwZXIgZm9yIFN0cmluZyN7c3RhcnRzV2l0aCwgZW5kc1dpdGgsIGluY2x1ZGVzfVxudmFyIGlzUmVnRXhwID0gcmVxdWlyZSgnLi9faXMtcmVnZXhwJyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAodGhhdCwgc2VhcmNoU3RyaW5nLCBOQU1FKSB7XG4gIGlmIChpc1JlZ0V4cChzZWFyY2hTdHJpbmcpKSB0aHJvdyBUeXBlRXJyb3IoJ1N0cmluZyMnICsgTkFNRSArIFwiIGRvZXNuJ3QgYWNjZXB0IHJlZ2V4IVwiKTtcbiAgcmV0dXJuIFN0cmluZyhkZWZpbmVkKHRoYXQpKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3N0cmluZy1jb250ZXh0LmpzXG4vLyBtb2R1bGUgaWQgPSAxMTVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///115\n")},function(module,exports,__webpack_require__){eval("var MATCH = __webpack_require__(8)('match');\nmodule.exports = function (KEY) {\n var re = /./;\n try {\n '/./'[KEY](re);\n } catch (e) {\n try {\n re[MATCH] = false;\n return !'/./'[KEY](re);\n } catch (f) { /* empty */ }\n } return true;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZmFpbHMtaXMtcmVnZXhwLmpzP2Q0NDQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIE1BVENIID0gcmVxdWlyZSgnLi9fd2tzJykoJ21hdGNoJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChLRVkpIHtcbiAgdmFyIHJlID0gLy4vO1xuICB0cnkge1xuICAgICcvLi8nW0tFWV0ocmUpO1xuICB9IGNhdGNoIChlKSB7XG4gICAgdHJ5IHtcbiAgICAgIHJlW01BVENIXSA9IGZhbHNlO1xuICAgICAgcmV0dXJuICEnLy4vJ1tLRVldKHJlKTtcbiAgICB9IGNhdGNoIChmKSB7IC8qIGVtcHR5ICovIH1cbiAgfSByZXR1cm4gdHJ1ZTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2ZhaWxzLWlzLXJlZ2V4cC5qc1xuLy8gbW9kdWxlIGlkID0gMTE2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///116\n")},function(module,exports,__webpack_require__){eval("// check on default Array iterator\nvar Iterators = __webpack_require__(63);\nvar ITERATOR = __webpack_require__(8)('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXMtYXJyYXktaXRlci5qcz9mNmY2Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGNoZWNrIG9uIGRlZmF1bHQgQXJyYXkgaXRlcmF0b3JcbnZhciBJdGVyYXRvcnMgPSByZXF1aXJlKCcuL19pdGVyYXRvcnMnKTtcbnZhciBJVEVSQVRPUiA9IHJlcXVpcmUoJy4vX3drcycpKCdpdGVyYXRvcicpO1xudmFyIEFycmF5UHJvdG8gPSBBcnJheS5wcm90b3R5cGU7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBpdCAhPT0gdW5kZWZpbmVkICYmIChJdGVyYXRvcnMuQXJyYXkgPT09IGl0IHx8IEFycmF5UHJvdG9bSVRFUkFUT1JdID09PSBpdCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1hcnJheS1pdGVyLmpzXG4vLyBtb2R1bGUgaWQgPSAxMTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///117\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $defineProperty = __webpack_require__(11);\nvar createDesc = __webpack_require__(47);\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fY3JlYXRlLXByb3BlcnR5LmpzPzZkMjMiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRkZWZpbmVQcm9wZXJ0eSA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpO1xudmFyIGNyZWF0ZURlc2MgPSByZXF1aXJlKCcuL19wcm9wZXJ0eS1kZXNjJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKG9iamVjdCwgaW5kZXgsIHZhbHVlKSB7XG4gIGlmIChpbmRleCBpbiBvYmplY3QpICRkZWZpbmVQcm9wZXJ0eS5mKG9iamVjdCwgaW5kZXgsIGNyZWF0ZURlc2MoMCwgdmFsdWUpKTtcbiAgZWxzZSBvYmplY3RbaW5kZXhdID0gdmFsdWU7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jcmVhdGUtcHJvcGVydHkuanNcbi8vIG1vZHVsZSBpZCA9IDExOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///118\n")},function(module,exports,__webpack_require__){eval("var classof = __webpack_require__(72);\nvar ITERATOR = __webpack_require__(8)('iterator');\nvar Iterators = __webpack_require__(63);\nmodule.exports = __webpack_require__(30).getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9jb3JlLmdldC1pdGVyYXRvci1tZXRob2QuanM/NDg3NyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY2xhc3NvZiA9IHJlcXVpcmUoJy4vX2NsYXNzb2YnKTtcbnZhciBJVEVSQVRPUiA9IHJlcXVpcmUoJy4vX3drcycpKCdpdGVyYXRvcicpO1xudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4vX2l0ZXJhdG9ycycpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL19jb3JlJykuZ2V0SXRlcmF0b3JNZXRob2QgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKGl0ICE9IHVuZGVmaW5lZCkgcmV0dXJuIGl0W0lURVJBVE9SXVxuICAgIHx8IGl0WydAQGl0ZXJhdG9yJ11cbiAgICB8fCBJdGVyYXRvcnNbY2xhc3NvZihpdCldO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9jb3JlLmdldC1pdGVyYXRvci1tZXRob2QuanNcbi8vIG1vZHVsZSBpZCA9IDExOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///119\n")},function(module,exports,__webpack_require__){eval("// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = __webpack_require__(305);\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktc3BlY2llcy1jcmVhdGUuanM/YTY1NCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA5LjQuMi4zIEFycmF5U3BlY2llc0NyZWF0ZShvcmlnaW5hbEFycmF5LCBsZW5ndGgpXG52YXIgc3BlY2llc0NvbnN0cnVjdG9yID0gcmVxdWlyZSgnLi9fYXJyYXktc3BlY2llcy1jb25zdHJ1Y3RvcicpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChvcmlnaW5hbCwgbGVuZ3RoKSB7XG4gIHJldHVybiBuZXcgKHNwZWNpZXNDb25zdHJ1Y3RvcihvcmlnaW5hbCkpKGxlbmd0aCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hcnJheS1zcGVjaWVzLWNyZWF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMTIwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///120\n")},function(module,exports,__webpack_require__){"use strict";eval("// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\n\nvar toObject = __webpack_require__(15);\nvar toAbsoluteIndex = __webpack_require__(51);\nvar toLength = __webpack_require__(12);\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var aLen = arguments.length;\n var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);\n var end = aLen > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktZmlsbC5qcz9jYzI2Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIyLjEuMy42IEFycmF5LnByb3RvdHlwZS5maWxsKHZhbHVlLCBzdGFydCA9IDAsIGVuZCA9IHRoaXMubGVuZ3RoKVxuJ3VzZSBzdHJpY3QnO1xudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgdG9BYnNvbHV0ZUluZGV4ID0gcmVxdWlyZSgnLi9fdG8tYWJzb2x1dGUtaW5kZXgnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4vX3RvLWxlbmd0aCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBmaWxsKHZhbHVlIC8qICwgc3RhcnQgPSAwLCBlbmQgPSBAbGVuZ3RoICovKSB7XG4gIHZhciBPID0gdG9PYmplY3QodGhpcyk7XG4gIHZhciBsZW5ndGggPSB0b0xlbmd0aChPLmxlbmd0aCk7XG4gIHZhciBhTGVuID0gYXJndW1lbnRzLmxlbmd0aDtcbiAgdmFyIGluZGV4ID0gdG9BYnNvbHV0ZUluZGV4KGFMZW4gPiAxID8gYXJndW1lbnRzWzFdIDogdW5kZWZpbmVkLCBsZW5ndGgpO1xuICB2YXIgZW5kID0gYUxlbiA+IDIgPyBhcmd1bWVudHNbMl0gOiB1bmRlZmluZWQ7XG4gIHZhciBlbmRQb3MgPSBlbmQgPT09IHVuZGVmaW5lZCA/IGxlbmd0aCA6IHRvQWJzb2x1dGVJbmRleChlbmQsIGxlbmd0aCk7XG4gIHdoaWxlIChlbmRQb3MgPiBpbmRleCkgT1tpbmRleCsrXSA9IHZhbHVlO1xuICByZXR1cm4gTztcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2FycmF5LWZpbGwuanNcbi8vIG1vZHVsZSBpZCA9IDEyMVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///121\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar addToUnscopables = __webpack_require__(43);\nvar step = __webpack_require__(165);\nvar Iterators = __webpack_require__(63);\nvar toIObject = __webpack_require__(24);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(113)(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuaXRlcmF0b3IuanM/NWEwNCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgYWRkVG9VbnNjb3BhYmxlcyA9IHJlcXVpcmUoJy4vX2FkZC10by11bnNjb3BhYmxlcycpO1xudmFyIHN0ZXAgPSByZXF1aXJlKCcuL19pdGVyLXN0ZXAnKTtcbnZhciBJdGVyYXRvcnMgPSByZXF1aXJlKCcuL19pdGVyYXRvcnMnKTtcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG5cbi8vIDIyLjEuMy40IEFycmF5LnByb3RvdHlwZS5lbnRyaWVzKClcbi8vIDIyLjEuMy4xMyBBcnJheS5wcm90b3R5cGUua2V5cygpXG4vLyAyMi4xLjMuMjkgQXJyYXkucHJvdG90eXBlLnZhbHVlcygpXG4vLyAyMi4xLjMuMzAgQXJyYXkucHJvdG90eXBlW0BAaXRlcmF0b3JdKClcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9faXRlci1kZWZpbmUnKShBcnJheSwgJ0FycmF5JywgZnVuY3Rpb24gKGl0ZXJhdGVkLCBraW5kKSB7XG4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bW9kdWxlIGlkID0gMTIyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///122\n")},function(module,exports,__webpack_require__){eval("var ctx = __webpack_require__(27);\nvar invoke = __webpack_require__(155);\nvar html = __webpack_require__(105);\nvar cel = __webpack_require__(101);\nvar global = __webpack_require__(4);\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (__webpack_require__(28)(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdGFzay5qcz80OWU4Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBjdHggPSByZXF1aXJlKCcuL19jdHgnKTtcbnZhciBpbnZva2UgPSByZXF1aXJlKCcuL19pbnZva2UnKTtcbnZhciBodG1sID0gcmVxdWlyZSgnLi9faHRtbCcpO1xudmFyIGNlbCA9IHJlcXVpcmUoJy4vX2RvbS1jcmVhdGUnKTtcbnZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBwcm9jZXNzID0gZ2xvYmFsLnByb2Nlc3M7XG52YXIgc2V0VGFzayA9IGdsb2JhbC5zZXRJbW1lZGlhdGU7XG52YXIgY2xlYXJUYXNrID0gZ2xvYmFsLmNsZWFySW1tZWRpYXRlO1xudmFyIE1lc3NhZ2VDaGFubmV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TtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///123\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar macrotask = __webpack_require__(123).set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = __webpack_require__(28)(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n var promise = Promise.resolve();\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWljcm90YXNrLmpzPzgzN2UiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIG1hY3JvdGFzayA9IHJlcXVpcmUoJy4vX3Rhc2snKS5zZXQ7XG52YXIgT2JzZXJ2ZXIgPSBnbG9iYWwuTXV0YXRpb25PYnNlcnZlciB8fCBnbG9iYWwuV2ViS2l0TXV0YXRpb25PYnNlcnZlcjtcbnZhciBwcm9jZXNzID0gZ2xvYmFsLnByb2Nlc3M7XG52YXIgUHJvbWlzZSA9IGdsb2JhbC5Qcm9taXNlO1xudmFyIGlzTm9kZSA9IHJlcXVpcmUoJy4vX2NvZicpKHByb2Nlc3MpID09ICdwcm9jZXNzJztcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoKSB7XG4gIHZhciBoZWFkLCBsYXN0LCBub3RpZnk7XG5cbiAgdmFyIGZsdXNoID0gZnVuY3Rpb24gKCkge1xuIC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Ly8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19taWNyb3Rhc2suanNcbi8vIG1vZHVsZSBpZCA9IDEyNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///124\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = __webpack_require__(16);\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI1LmpzIiw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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///125\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar global = __webpack_require__(4);\nvar DESCRIPTORS = __webpack_require__(10);\nvar LIBRARY = __webpack_require__(49);\nvar $typed = __webpack_require__(88);\nvar hide = __webpack_require__(18);\nvar redefineAll = __webpack_require__(57);\nvar fails = __webpack_require__(5);\nvar anInstance = __webpack_require__(55);\nvar toInteger = __webpack_require__(33);\nvar toLength = __webpack_require__(12);\nvar toIndex = __webpack_require__(174);\nvar gOPN = __webpack_require__(53).f;\nvar dP = __webpack_require__(11).f;\nvar arrayFill = __webpack_require__(121);\nvar setToStringTag = __webpack_require__(61);\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length!';\nvar WRONG_INDEX = 'Wrong index!';\nvar $ArrayBuffer = global[ARRAY_BUFFER];\nvar $DataView = global[DATA_VIEW];\nvar Math = global.Math;\nvar RangeError = global.RangeError;\n// eslint-disable-next-line no-shadow-restricted-names\nvar Infinity = global.Infinity;\nvar BaseBuffer = $ArrayBuffer;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\nvar BUFFER = 'buffer';\nvar BYTE_LENGTH = 'byteLength';\nvar BYTE_OFFSET = 'byteOffset';\nvar $BUFFER = DESCRIPTORS ? '_b' : BUFFER;\nvar $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;\nvar $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;\n\n// IEEE754 conversions based on https://github.com/feross/ieee754\nfunction packIEEE754(value, mLen, nBytes) {\n var buffer = new Array(nBytes);\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var i = 0;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n var e, m, c;\n value = abs(value);\n // eslint-disable-next-line no-self-compare\n if (value != value || value === Infinity) {\n // eslint-disable-next-line no-self-compare\n m = value != value ? 1 : 0;\n e = eMax;\n } else {\n e = floor(log(value) / LN2);\n if (value * (c = pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * pow(2, eBias - 1) * pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);\n buffer[--i] |= s * 128;\n return buffer;\n}\nfunction unpackIEEE754(buffer, mLen, nBytes) {\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = eLen - 7;\n var i = nBytes - 1;\n var s = buffer[i--];\n var e = s & 127;\n var m;\n s >>= 7;\n for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : s ? -Infinity : Infinity;\n } else {\n m = m + pow(2, mLen);\n e = e - eBias;\n } return (s ? -1 : 1) * m * pow(2, e - mLen);\n}\n\nfunction unpackI32(bytes) {\n return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];\n}\nfunction packI8(it) {\n return [it & 0xff];\n}\nfunction packI16(it) {\n return [it & 0xff, it >> 8 & 0xff];\n}\nfunction packI32(it) {\n return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];\n}\nfunction packF64(it) {\n return packIEEE754(it, 52, 8);\n}\nfunction packF32(it) {\n return packIEEE754(it, 23, 4);\n}\n\nfunction addGetter(C, key, internal) {\n dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });\n}\n\nfunction get(view, bytes, index, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = store.slice(start, start + bytes);\n return isLittleEndian ? pack : pack.reverse();\n}\nfunction set(view, bytes, index, conversion, value, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = conversion(+value);\n for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];\n}\n\nif (!$typed.ABV) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n this._b = arrayFill.call(new Array(byteLength), 0);\n this[$LENGTH] = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = buffer[$LENGTH];\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n this[$BUFFER] = buffer;\n this[$OFFSET] = offset;\n this[$LENGTH] = byteLength;\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, BYTE_LENGTH, '_l');\n addGetter($DataView, BUFFER, '_b');\n addGetter($DataView, BYTE_LENGTH, '_l');\n addGetter($DataView, BYTE_OFFSET, '_o');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1]));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packF32, value, arguments[2]);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packF64, value, arguments[2]);\n }\n });\n} else {\n if (!fails(function () {\n $ArrayBuffer(1);\n }) || !fails(function () {\n new $ArrayBuffer(-1); // eslint-disable-line no-new\n }) || fails(function () {\n new $ArrayBuffer(); // eslint-disable-line no-new\n new $ArrayBuffer(1.5); // eslint-disable-line no-new\n new $ArrayBuffer(NaN); // eslint-disable-line no-new\n return $ArrayBuffer.name != ARRAY_BUFFER;\n })) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new BaseBuffer(toIndex(length));\n };\n var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];\n for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);\n }\n if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;\n }\n // iOS Safari 7.x bug\n var view = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataView[PROTOTYPE].setInt8;\n view.setInt8(0, 2147483648);\n view.setInt8(1, 2147483649);\n if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, true);\n}\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\nhide($DataView[PROTOTYPE], $typed.VIEW, true);\nexports[ARRAY_BUFFER] = $ArrayBuffer;\nexports[DATA_VIEW] = $DataView;\n//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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///126\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar navigator = global.navigator;\n\nmodule.exports = navigator && navigator.userAgent || '';\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdXNlci1hZ2VudC5qcz9lMzVjIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBuYXZpZ2F0b3IgPSBnbG9iYWwubmF2aWdhdG9yO1xuXG5tb2R1bGUuZXhwb3J0cyA9IG5hdmlnYXRvciAmJiBuYXZpZ2F0b3IudXNlckFnZW50IHx8ICcnO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL191c2VyLWFnZW50LmpzXG4vLyBtb2R1bGUgaWQgPSAxMjdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///127\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $at = __webpack_require__(417)(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\n__webpack_require__(183)(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5zdHJpbmcuaXRlcmF0b3IuanM/Y2QwNCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGF0ID0gcmVxdWlyZSgnLi9fc3RyaW5nLWF0JykodHJ1ZSk7XG5cbi8vIDIxLjEuMy4yNyBTdHJpbmcucHJvdG90eXBlW0BAaXRlcmF0b3JdKClcbnJlcXVpcmUoJy4vX2l0ZXItZGVmaW5lJykoU3RyaW5nLCAnU3RyaW5nJywgZnVuY3Rpb24gKGl0ZXJhdGVkKSB7XG4gIHRoaXMuX3QgPSBTdHJpbmcoaXRlcmF0ZWQpOyAvLyB0YXJnZXRcbiAgdGhpcy5faSA9IDA7ICAgICAgICAgICAgICAgIC8vIG5leHQgaW5kZXhcbi8vIDIxLjEuNS4yLjEgJVN0cmluZ0l0ZXJhdG9yUHJvdG90eXBlJS5uZXh0KClcbn0sIGZ1bmN0aW9uICgpIHtcbiAgdmFyIE8gPSB0aGlzLl90O1xuICB2YXIgaW5kZXggPSB0aGlzLl9pO1xuICB2YXIgcG9pbnQ7XG4gIGlmIChpbmRleCA+PSBPLmxlbmd0aCkgcmV0dXJuIHsgdmFsdWU6IHVuZGVmaW5lZCwgZG9uZTogdHJ1ZSB9O1xuICBwb2ludCA9ICRhdChPLCBpbmRleCk7XG4gIHRoaXMuX2kgKz0gcG9pbnQubGVuZ3RoO1xuICByZXR1cm4geyB2YWx1ZTogcG9pbnQsIGRvbmU6IGZhbHNlIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5zdHJpbmcuaXRlcmF0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDEyOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///128\n")},function(module,exports){eval("// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1pbnRlZ2VyLmpzPzUyZTEiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4xLjQgVG9JbnRlZ2VyXG52YXIgY2VpbCA9IE1hdGguY2VpbDtcbnZhciBmbG9vciA9IE1hdGguZmxvb3I7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXNOYU4oaXQgPSAraXQpID8gMCA6IChpdCA+IDAgPyBmbG9vciA6IGNlaWwpKGl0KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fdG8taW50ZWdlci5qc1xuLy8gbW9kdWxlIGlkID0gMTI5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///129\n")},function(module,exports){eval('// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError("Can\'t call method on " + it);\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19kZWZpbmVkLmpzP2U3NjgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4yLjEgUmVxdWlyZU9iamVjdENvZXJjaWJsZShhcmd1bWVudClcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIGlmIChpdCA9PSB1bmRlZmluZWQpIHRocm93IFR5cGVFcnJvcihcIkNhbid0IGNhbGwgbWV0aG9kIG9uICBcIiArIGl0KTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19kZWZpbmVkLmpzXG4vLyBtb2R1bGUgaWQgPSAxMzBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///130\n')},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(36);\nvar document = __webpack_require__(22).document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19kb20tY3JlYXRlLmpzPzM4ZGQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgZG9jdW1lbnQgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5kb2N1bWVudDtcbi8vIHR5cGVvZiBkb2N1bWVudC5jcmVhdGVFbGVtZW50IGlzICdvYmplY3QnIGluIG9sZCBJRVxudmFyIGlzID0gaXNPYmplY3QoZG9jdW1lbnQpICYmIGlzT2JqZWN0KGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIGlzID8gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChpdCkgOiB7fTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZG9tLWNyZWF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMTMxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///131\n")},function(module,exports,__webpack_require__){eval("// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = __webpack_require__(36);\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1wcmltaXRpdmUuanM/MzI2MyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjEuMSBUb1ByaW1pdGl2ZShpbnB1dCBbLCBQcmVmZXJyZWRUeXBlXSlcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xuLy8gaW5zdGVhZCBvZiB0aGUgRVM2IHNwZWMgdmVyc2lvbiwgd2UgZGlkbid0IGltcGxlbWVudCBAQHRvUHJpbWl0aXZlIGNhc2Vcbi8vIGFuZCB0aGUgc2Vjb25kIGFyZ3VtZW50IC0gZmxhZyAtIHByZWZlcnJlZCB0eXBlIGlzIGEgc3RyaW5nXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCwgUykge1xuICBpZiAoIWlzT2JqZWN0KGl0KSkgcmV0dXJuIGl0O1xuICB2YXIgZm4sIHZhbDtcbiAgaWYgKFMgJiYgdHlwZW9mIChmbiA9IGl0LnRvU3RyaW5nKSA9PSAnZnVuY3Rpb24nICYmICFpc09iamVjdCh2YWwgPSBmbi5jYWxsKGl0KSkpIHJldHVybiB2YWw7XG4gIGlmICh0eXBlb2YgKGZuID0gaXQudmFsdWVPZikgPT0gJ2Z1bmN0aW9uJyAmJiAhaXNPYmplY3QodmFsID0gZm4uY2FsbChpdCkpKSByZXR1cm4gdmFsO1xuICBpZiAoIVMgJiYgdHlwZW9mIChmbiA9IGl0LnRvU3RyaW5nKSA9PSAnZnVuY3Rpb24nICYmICFpc09iamVjdCh2YWwgPSBmbi5jYWxsKGl0KSkpIHJldHVybiB2YWw7XG4gIHRocm93IFR5cGVFcnJvcihcIkNhbid0IGNvbnZlcnQgb2JqZWN0IHRvIHByaW1pdGl2ZSB2YWx1ZVwiKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fdG8tcHJpbWl0aXZlLmpzXG4vLyBtb2R1bGUgaWQgPSAxMzJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///132\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = __webpack_require__(41);\nvar dPs = __webpack_require__(419);\nvar enumBugKeys = __webpack_require__(137);\nvar IE_PROTO = __webpack_require__(135)('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(131)('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n __webpack_require__(188).appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtY3JlYXRlLmpzPzYyODYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjIgLyAxNS4yLjMuNSBPYmplY3QuY3JlYXRlKE8gWywgUHJvcGVydGllc10pXG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBkUHMgPSByZXF1aXJlKCcuL19vYmplY3QtZHBzJyk7XG52YXIgZW51bUJ1Z0tleXMgPSByZXF1aXJlKCcuL19lbnVtLWJ1Zy1rZXlzJyk7XG52YXIgSUVfUFJPVE8gPSByZXF1aXJlKCcuL19zaGFyZWQta2V5JykoJ0lFX1BST1RPJyk7XG52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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///133\n")},function(module,exports,__webpack_require__){eval("// 7.1.15 ToLength\nvar toInteger = __webpack_require__(129);\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1sZW5ndGguanM/NDExMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjEuMTUgVG9MZW5ndGhcbnZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgbWluID0gTWF0aC5taW47XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXQgPiAwID8gbWluKHRvSW50ZWdlcihpdCksIDB4MWZmZmZmZmZmZmZmZmYpIDogMDsgLy8gcG93KDIsIDUzKSAtIDEgPT0gOTAwNzE5OTI1NDc0MDk5MVxufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1sZW5ndGguanNcbi8vIG1vZHVsZSBpZCA9IDEzNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///134\n")},function(module,exports,__webpack_require__){eval("var shared = __webpack_require__(136)('keys');\nvar uid = __webpack_require__(94);\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zaGFyZWQta2V5LmpzPzZiMWQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHNoYXJlZCA9IHJlcXVpcmUoJy4vX3NoYXJlZCcpKCdrZXlzJyk7XG52YXIgdWlkID0gcmVxdWlyZSgnLi9fdWlkJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChrZXkpIHtcbiAgcmV0dXJuIHNoYXJlZFtrZXldIHx8IChzaGFyZWRba2V5XSA9IHVpZChrZXkpKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fc2hhcmVkLWtleS5qc1xuLy8gbW9kdWxlIGlkID0gMTM1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///135\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(22);\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zaGFyZWQuanM/N2JjMCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgU0hBUkVEID0gJ19fY29yZS1qc19zaGFyZWRfXyc7XG52YXIgc3RvcmUgPSBnbG9iYWxbU0hBUkVEXSB8fCAoZ2xvYmFsW1NIQVJFRF0gPSB7fSk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChrZXkpIHtcbiAgcmV0dXJuIHN0b3JlW2tleV0gfHwgKHN0b3JlW2tleV0gPSB7fSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NoYXJlZC5qc1xuLy8gbW9kdWxlIGlkID0gMTM2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///136\n")},function(module,exports){eval("// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19lbnVtLWJ1Zy1rZXlzLmpzP2M2NzciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gSUUgOC0gZG9uJ3QgZW51bSBidWcga2V5c1xubW9kdWxlLmV4cG9ydHMgPSAoXG4gICdjb25zdHJ1Y3RvcixoYXNPd25Qcm9wZXJ0eSxpc1Byb3RvdHlwZU9mLHByb3BlcnR5SXNFbnVtZXJhYmxlLHRvTG9jYWxlU3RyaW5nLHRvU3RyaW5nLHZhbHVlT2YnXG4pLnNwbGl0KCcsJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZW51bS1idWcta2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gMTM3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///137\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = __webpack_require__(93);\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19uZXctcHJvbWlzZS1jYXBhYmlsaXR5LmpzP2E4MDQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gMjUuNC4xLjUgTmV3UHJvbWlzZUNhcGFi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= Object.getOwnPropertySymbols;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wcy5qcz9kNjQ0Il0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydHMuZiA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWdvcHMuanNcbi8vIG1vZHVsZSBpZCA9IDEzOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///139\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nvar runtimeUtils = exports.runtimeUtils = {\n runtimeDescriptor: {},\n runtimeCapabilities: {\n constraints: {}\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL3J1bnRpbWVVdGlscy5qcz9iYWE0Il0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBsZXQgcnVudGltZVV0aWxzID0ge1xuICBydW50aW1lRGVzY3JpcHRvcjoge30sXG4gIHJ1bnRpbWVDYXBhYmlsaXRpZXM6IHtcbiAgICBjb25zdHJhaW50czoge31cbiAgfVxufTtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvcnVudGltZS9ydW50aW1lVXRpbHMuanMiXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFEQTtBQUZBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///140\n')},function(module,exports,__webpack_require__){eval("exports.f = __webpack_require__(23);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL193a3MtZXh0LmpzPzJhMWUiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0cy5mID0gcmVxdWlyZSgnLi9fd2tzJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fd2tzLWV4dC5qc1xuLy8gbW9kdWxlIGlkID0gMTQxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///141\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(22);\nvar core = __webpack_require__(13);\nvar LIBRARY = __webpack_require__(92);\nvar wksExt = __webpack_require__(141);\nvar defineProperty = __webpack_require__(40).f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL193a3MtZGVmaW5lLmpzPzcyYjkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIGNvcmUgPSByZXF1aXJlKCcuL19jb3JlJyk7XG52YXIgTElCUkFSWSA9IHJlcXVpcmUoJy4vX2xpYnJhcnknKTtcbnZhciB3a3NFeHQgPSByZXF1aXJlKCcuL193a3MtZXh0Jyk7XG52YXIgZGVmaW5lUHJvcGVydHkgPSByZXF1aXJlKCcuL19vYmplY3QtZHAnKS5mO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAobmFtZSkge1xuICB2YXIgJFN5bWJvbCA9IGNvcmUuU3ltYm9sIHx8IChjb3JlLlN5bWJvbCA9IExJQlJBUlkgPyB7fSA6IGdsb2JhbC5TeW1ib2wgfHwge30pO1xuICBpZiAobmFtZS5jaGFyQXQoMCkgIT0gJ18nICYmICEobmFtZSBpbiAkU3ltYm9sKSkgZGVmaW5lUHJvcGVydHkoJFN5bWJvbCwgbmFtZSwgeyB2YWx1ZTogd2tzRXh0LmYobmFtZSkgfSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy1kZWZpbmUuanNcbi8vIG1vZHVsZSBpZCA9IDE0MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///142\n")},function(module,exports,__webpack_require__){eval("var pIE = __webpack_require__(77);\nvar createDesc = __webpack_require__(73);\nvar toIObject = __webpack_require__(45);\nvar toPrimitive = __webpack_require__(132);\nvar has = __webpack_require__(59);\nvar IE8_DOM_DEFINE = __webpack_require__(184);\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = __webpack_require__(44) ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wZC5qcz8yY2E2Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBwSUUgPSByZXF1aXJlKCcuL19vYmplY3QtcGllJyk7XG52YXIgY3JlYXRlRGVzYyA9IHJlcXVpcmUoJy4vX3Byb3BlcnR5LWRlc2MnKTtcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgdG9QcmltaXRpdmUgPSByZXF1aXJlKCcuL190by1wcmltaXRpdmUnKTtcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciBJRThfRE9NX0RFRklORSA9IHJlcXVpcmUoJy4vX2llOC1kb20tZGVmaW5lJyk7XG52YXIgZ09QRCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3I7XG5cbmV4cG9ydHMuZiA9IHJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgPyBnT1BEIDogZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKE8sIFApIHtcbiAgTyA9IHRvSU9iamVjdChPKTtcbiAgUCA9IHRvUHJpbWl0aXZlKFAsIHRydWUpO1xuICBpZiAoSUU4X0RPTV9ERUZJTkUpIHRyeSB7XG4gICAgcmV0dXJuIGdPUEQoTywgUCk7XG4gIH0gY2F0Y2ggKGUpIHsgLyogZW1wdHkgKi8gfVxuICBpZiAoaGFzKE8sIFApKSByZXR1cm4gY3JlYXRlRGVzYyghcElFLmYuY2FsbChPLCBQKSwgT1tQXSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1nb3BkLmpzXG4vLyBtb2R1bGUgaWQgPSAxNDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///143\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar runtimeConfiguration = exports.runtimeConfiguration = {\n\n // TODO this should be changed with the definition used for indexeddb\n // look at: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore\n // Now we are using the definition for Dexie; (http://dexie.org/docs/Version/Version.stores())\n storageSchemas: {\n capabilities: {\n capabilities: 'key,version,value'\n },\n subscriptions: {\n subscriptions: 'key,version,value'\n },\n runtime: {\n 'runtime:URL': 'key,version,value',\n 'p2pHandler:URL': 'key,version,value'\n },\n registry: {\n 'registry:DataObjectURLs': 'key,version,value',\n 'registry:HypertyURLs': 'key,version,value'\n },\n cryptoManager: {\n userAsymmetricKey: 'key,version,value',\n dataObjectSessionKeys: 'key,version,value'\n },\n identity: {\n accessTokens: 'key,version,value',\n identities: 'userURL, userProfile.email, userProfile.userURL, userProfile.name'\n },\n runtimeCatalogue: {\n runtimeCatalogue: '&cguid, accessControlPolicy, constraints, dataObjects, hypertyType, objectName, sourcePackage, version'\n },\n policy: {\n 'rethink:activePolicy': 'key,version,value',\n 'rethink:groups': 'key,version,value',\n 'rethink:userPolicies': 'key,version,value',\n 'rethink:spPolicies': 'key,version,value'\n },\n syncherManager: {\n 'syncherManager:ObjectURLs': 'key,version,value'\n },\n hypertyResources: {\n hypertyResources: '&resourceURL, name, contentUrl, content, created, reporter, resourceType'\n }\n },\n\n runtimeURLS: {\n registry: {\n prefix: 'hyperty-runtime://',\n suffix: 'registry'\n },\n identityModule: {\n prefix: 'hyperty-runtime://',\n suffix: '/idm'\n },\n runtimeUA: {\n prefix: 'hyperty-runtime://',\n suffix: '/ua'\n },\n catalogue: {\n prefix: 'hyperty-runtime://',\n suffix: '/catalogue'\n },\n graphConnector: {\n prefix: 'hyperty-runtime://',\n suffix: '/graph'\n },\n syncManager: {\n prefix: 'hyperty-runtime://',\n suffix: '/sm'\n }\n },\n catalogueURLs: {\n protocolstub: {\n prefix: 'hyperty-catalogue://catalogue.',\n suffix: '/.well-known/protocolstub/',\n fallback: 'hyperty-catalogue://catalogue.%domain%/.well-known/protocolstub/'\n },\n idpProxy: {\n prefix: 'hyperty-catalogue://catalogue.',\n suffix: '/.well-known/idp-proxy/',\n fallback: 'hyperty-catalogue://catalogue.%domain%/.well-known/idp-proxy/'\n }\n },\n msgNodeURL: {\n prefix: 'domain://msg-node.',\n suffix: '',\n hypertyAddressAllocation: '/hyperty-address-allocation',\n objectAddressAllocation: '/object-address-allocation',\n subscriptionManagement: '/sm'\n },\n domainRegistryURL: {\n prefix: 'domain://registry.',\n suffix: ''\n },\n globalRegistryURL: 'global://registry.'\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL3J1bnRpbWVDb25maWd1cmF0aW9uLmpzPzZ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FBREE7QUFuQ0E7QUFDQTtBQXVDQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBSUE7QUFDQTtBQUNBO0FBRkE7QUFJQTtBQUNBO0FBQ0E7QUFGQTtBQUlBO0FBQ0E7QUFDQTtBQUZBO0FBSUE7QUFDQTtBQUNBO0FBRkE7QUFJQTtBQUNBO0FBQ0E7QUFGQTtBQXJCQTtBQTBCQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBSEE7QUFLQTtBQUNBO0FBQ0E7QUFDQTtBQUhBO0FBTkE7QUFZQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFMQTtBQU9BO0FBQ0E7QUFDQTtBQUZBO0FBSUE7QUE5RkEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///144\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Operators = function () {\n function Operators() {\n (0, _classCallCheck3.default)(this, Operators);\n }\n\n (0, _createClass3.default)(Operators, [{\n key: 'and',\n value: function and(params) {\n return params[0] && params[1];\n }\n }, {\n key: 'between',\n value: function between(params) {\n var start = parseInt(params[0][0]);\n var end = parseInt(params[0][1]);\n var now = params[1];\n\n if (end < start) {\n now = now < start ? now += 2400 : now;\n end += 2400;\n }\n\n return now > start && now < end;\n }\n }, {\n key: 'equals',\n value: function equals(params) {\n return String(params[0]) === '*' || String(params[0]) === String(params[1]);\n }\n }, {\n key: 'greaterThan',\n value: function greaterThan(params) {\n return params[1] > params[0];\n }\n }, {\n key: 'in',\n value: function _in(params) {\n return params[0].indexOf(params[1]) > -1;\n }\n }, {\n key: 'lessThan',\n value: function lessThan(params) {\n return params[1] < params[0];\n }\n }, {\n key: 'not',\n value: function not(params) {\n return !params[0];\n }\n }, {\n key: 'or',\n value: function or(params) {\n return params[0] || params[1];\n }\n }]);\n return Operators;\n}();\n\nexports.default = Operators;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvT3BlcmF0b3JzLmpzPzFjNDIiXSwic291cmNlc0NvbnRlbnQiOlsiY2xhc3MgT3BlcmF0b3JzIHtcblxuICBhbmQocGFyYW1zKSB7XG4gICAgcmV0dXJuIHBhcmFtc1swXSAmJiBwYXJhbXNbMV07XG4gIH1cblxuICBiZXR3ZWVuKHBhcmFtcykge1xuICAgIGxldCBzdGFydCA9IHBhcnNlSW50KHBhcmFtc1swXVswXSk7XG4gICAgbGV0IGVuZCA9IHBhcnNlSW50KHBhcmFtc1swXVsxXSk7XG4gICAgbGV0IG5vdyA9IHBhcmFtc1sxXTtcblxuICAgIGlmIChlbmQgPCBzdGFydCkge1xuICAgICAgbm93ID0gKG5vdyA8IHN0YXJ0KSA/IG5vdyArPSAyNDAwIDogbm93O1xuICAgICAgZW5kICs9IDI0MDA7XG4gICAgfVxuXG4gICAgcmV0dXJuIChub3cgPiBzdGFydCAmJiBub3cgPCBlbmQpO1xuICB9XG5cbiAgZXF1YWxzKHBhcmFtcykge1xuICAgIHJldHVybiBTdHJpbmcocGFyYW1zWzBdKSA9PT0gJyonIHx8IFN0cmluZyhwYXJhbXNbMF0pID09PSBTdHJpbmcocGFyYW1zWzFdKTtcbiAgfVxuXG4gIGdyZWF0ZXJUaGFuKHBhcmFtcykge1xuICAgIHJldHVybiBwYXJhbXNbMV0gPiBwYXJhbXNbMF07XG4gIH1cblxuICBpbihwYXJhbXMpIHtcbiAgICByZXR1cm4gcGFyYW1zWzBdLmluZGV4T2YocGFyYW1zWzFdKSA+IC0xO1xuICB9XG5cbiAgbGVzc1RoYW4ocGFyYW1zKSB7XG4gICAgcmV0dXJuIHBhcmFtc1sxXSA8IHBhcmFtc1swXTtcbiAgfVxuXG4gIG5vdChwYXJhbXMpIHtcbiAgICByZXR1cm4gIXBhcmFtc1swXTtcbiAgfVxuXG4gIG9yKHBhcmFtcykge1xuICAgIHJldHVybiBwYXJhbXNbMF0gfHwgcGFyYW1zWzFdO1xuICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgT3BlcmF0b3JzO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9wb2xpY3kvT3BlcmF0b3JzLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7Ozs7Ozs7QUFFQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///145\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _Operators = __webpack_require__(145);\n\nvar _Operators2 = _interopRequireDefault(_Operators);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* @author Ana Caldeira \n* @classdesc Class to represent a condition and evaluate its applicability.\n*/\nvar Condition = function () {\n\n /**\n * Creates a new Condition.\n * @class\n * @param {string} attribute\n * @param {string} operator\n * @param {*} params\n */\n function Condition(attribute, operator, params) {\n (0, _classCallCheck3.default)(this, Condition);\n\n this.attribute = attribute;\n this.operator = operator;\n this.params = params;\n this.operators = new _Operators2.default();\n }\n\n /**\n * Verifies if the condition is applicable to the message. First, the system value that corresponds to the attribute is retrieved; then, that value is compared with the parameter specified in the condition by executing the operator implementation. If the operator is 'in' and the name of a group is given, then the array holding the members of the group is retrieved before the comparison.\n * @param {Object} context environment where the Policy Engine is being used\n * @param {Object} message\n */\n\n\n (0, _createClass3.default)(Condition, [{\n key: 'isApplicable',\n value: function isApplicable(context, message) {\n context[this.attribute] = { message: message };\n var value = context[this.attribute];\n var tempParam = void 0;\n\n if (this.operator === 'in') {\n if (!Array.isArray(this.params)) {\n tempParam = context.getGroup(this.params, message.to);\n return this.operators[this.operator]([tempParam, value]);\n }\n }\n\n return this.operators[this.operator]([this.params, value]);\n }\n }]);\n return Condition;\n}(); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nexports.default = Condition;\nmodule.exports = exports['default'];//# sourceURL=[module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hZ2UudG8pO1xuICAgICAgICByZXR1cm4gdGhpcy5vcGVyYXRvcnNbdGhpcy5vcGVyYXRvcl0oW3RlbXBQYXJhbSwgdmFsdWVdKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gdGhpcy5vcGVyYXRvcnNbdGhpcy5vcGVyYXRvcl0oW3RoaXMucGFyYW1zLCB2YWx1ZV0pO1xuICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29uZGl0aW9uO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9wb2xpY3kvY29uZGl0aW9ucy9Db25kaXRpb24uanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7O0FBdUJBO0FBQ0E7Ozs7O0FBQ0E7Ozs7QUFJQTtBQUNBO0FBQ0E7Ozs7Ozs7QUFPQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBL0RBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQW1FQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///146\n")},function(module,exports){eval('var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function("return this")() || (1,eval)("this");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === "object")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it\'s\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=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5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///147\n')},function(module,exports,__webpack_require__){eval("module.exports = !__webpack_require__(10) && !__webpack_require__(5)(function () {\n return Object.defineProperty(__webpack_require__(101)('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faWU4LWRvbS1kZWZpbmUuanM/YzU5NiJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9ICFyZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpICYmICFyZXF1aXJlKCcuL19mYWlscycpKGZ1bmN0aW9uICgpIHtcbiAgcmV0dXJuIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShyZXF1aXJlKCcuL19kb20tY3JlYXRlJykoJ2RpdicpLCAnYScsIHsgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiA3OyB9IH0pLmEgIT0gNztcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pZTgtZG9tLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMTQ4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///148\n")},function(module,exports,__webpack_require__){eval("exports.f = __webpack_require__(8);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fd2tzLWV4dC5qcz8zM2M1Il0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydHMuZiA9IHJlcXVpcmUoJy4vX3drcycpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL193a3MtZXh0LmpzXG4vLyBtb2R1bGUgaWQgPSAxNDlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///149\n")},function(module,exports,__webpack_require__){eval("var has = __webpack_require__(17);\nvar toIObject = __webpack_require__(24);\nvar arrayIndexOf = __webpack_require__(79)(false);\nvar IE_PROTO = __webpack_require__(103)('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb2JqZWN0LWtleXMtaW50ZXJuYWwuanM/NDVlMSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgaGFzID0gc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J9\n//# sourceURL=webpack-internal:///150\n")},function(module,exports,__webpack_require__){eval("var dP = __webpack_require__(11);\nvar anObject = __webpack_require__(3);\nvar getKeys = __webpack_require__(50);\n\nmodule.exports = __webpack_require__(10) ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb2JqZWN0LWRwcy5qcz9iNzBjIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBkUCA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgZ2V0S2V5cyA9IHJlcXVpcmUoJy4vX29iamVjdC1rZXlzJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKSA/IE9iamVjdC5kZWZpbmVQcm9wZXJ0aWVzIDogZnVuY3Rpb24gZGVmaW5lUHJvcGVydGllcyhPLCBQcm9wZXJ0aWVzKSB7XG4gIGFuT2JqZWN0KE8pO1xuICB2YXIga2V5cyA9IGdldEtleXMoUHJvcGVydGllcyk7XG4gIHZhciBsZW5ndGggPSBrZXlzLmxlbmd0aDtcbiAgdmFyIGkgPSAwO1xuICB2YXIgUDtcbiAgd2hpbGUgKGxlbmd0aCA+IGkpIGRQLmYoTywgUCA9IGtleXNbaSsrXSwgUHJvcGVydGllc1tQXSk7XG4gIHJldHVybiBPO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb2JqZWN0LWRwcy5qc1xuLy8gbW9kdWxlIGlkID0gMTUxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///151\n")},function(module,exports,__webpack_require__){eval("// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(24);\nvar gOPN = __webpack_require__(53).f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb2JqZWN0LWdvcG4tZXh0LmpzPzZjNmYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZmFsbGJhY2sgZm9yIElFMTEgYnVnZ3kgT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMgd2l0aCBpZnJhbWUgYW5kIHdpbmRvd1xudmFyIHRvSU9iamVjdCA9IHJlcXVpcmUoJy4vX3RvLWlvYmplY3QnKTtcbnZhciBnT1BOID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcG4nKS5mO1xudmFyIHRvU3RyaW5nID0ge30udG9TdHJpbmc7XG5cbnZhciB3aW5kb3dOYW1lcyA9IHR5cGVvZiB3aW5kb3cgPT0gJ29iamVjdCcgJiYgd2luZG93ICYmIE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzXG4gID8gT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMod2luZG93KSA6IFtdO1xuXG52YXIgZ2V0V2luZG93TmFtZXMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgdHJ5IHtcbiAgICByZXR1cm4gZ09QTihpdCk7XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICByZXR1cm4gd2luZG93TmFtZXMuc2xpY2UoKTtcbiAgfVxufTtcblxubW9kdWxlLmV4cG9ydHMuZiA9IGZ1bmN0aW9uIGdldE93blByb3BlcnR5TmFtZXMoaXQpIHtcbiAgcmV0dXJuIHdpbmRvd05hbWVzICYmIHRvU3RyaW5nLmNhbGwoaXQpID09ICdbb2JqZWN0IFdpbmRvd10nID8gZ2V0V2luZG93TmFtZXMoaXQpIDogZ09QTih0b0lPYmplY3QoaXQpKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1nb3BuLWV4dC5qc1xuLy8gbW9kdWxlIGlkID0gMTUyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///152\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = __webpack_require__(50);\nvar gOPS = __webpack_require__(80);\nvar pIE = __webpack_require__(71);\nvar toObject = __webpack_require__(15);\nvar IObject = __webpack_require__(70);\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || __webpack_require__(5)(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb2JqZWN0LWFzc2lnbi5qcz9hMTg3Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDE5LjEuMi4xIE9iamVjdC5hc3NpZ24odGFyZ2V0LCBzb3VyY2UsIC4uLilcbnZhciBnZXRLZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMnKTtcbnZhciBnT1BTID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcHMnKTtcbnZhciBwSUUgPSByZXF1aXJlKCcuL19vYmplY3QtcGllJyk7XG52YXIgdG9PYmplY3QgPSByZXF1aXJlKCcuL190by1vYmplY3QnKTtcbnZhciBJT2JqZWN0ID0gcmVxdWlyZSgnLi9faW9iamVjdCcpO1xudmFyICRhc3NpZ24gPSBPYmplY3Qu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2YXIgaiA9IDA7XG4gICAgdmFyIGtleTtcbiAgICB3aGlsZSAobGVuZ3RoID4gaikgaWYgKGlzRW51bS5jYWxsKFMsIGtleSA9IGtleXNbaisrXSkpIFRba2V5XSA9IFNba2V5XTtcbiAgfSByZXR1cm4gVDtcbn0gOiAkYXNzaWduO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtYXNzaWduLmpzXG4vLyBtb2R1bGUgaWQgPSAxNTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///153\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar aFunction = __webpack_require__(16);\nvar isObject = __webpack_require__(6);\nvar invoke = __webpack_require__(155);\nvar arraySlice = [].slice;\nvar factories = {};\n\nvar construct = function (F, len, args) {\n if (!(len in factories)) {\n for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';\n // eslint-disable-next-line no-new-func\n factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');\n } return factories[len](F, args);\n};\n\nmodule.exports = Function.bind || function bind(that /* , ...args */) {\n var fn = aFunction(this);\n var partArgs = arraySlice.call(arguments, 1);\n var bound = function (/* args... */) {\n var args = partArgs.concat(arraySlice.call(arguments));\n return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);\n };\n if (isObject(fn.prototype)) bound.prototype = fn.prototype;\n return bound;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYmluZC5qcz82NmRjIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuL19hLWZ1bmN0aW9uJyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBpbnZva2UgPSByZXF1aXJlKCcuL19pbnZva2UnKTtcbnZhciBhcnJheVNsaWNlID0gW10uc2xpY2U7XG52YXIgZmFjdG9yaWVzID0ge307XG5cbnZhciBjb25zdHJ1Y3QgPSBmdW5jdGlvbiAoRiwgbGVuLCBhcmdzKSB7XG4gIGlmICghKGxlbiBpbiBmYWN0b3JpZXMpKSB7XG4gICAgZm9yICh2YXIgbiA9IFtdLCBpID0gMDsgaSA8IGxlbjsgaSsrKSBuW2ldID0gJ2FbJyArIGkgKyAnXSc7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLW5ldy1mdW5jXG4gICAgZmFjdG9yaWVzW2xlbl0gPSBGdW5jdGlvbignRixhJywgJ3JldHVybiBuZXcgRignICsgbi5qb2luKCcsJykgKyAnKScpO1xuICB9IHJldHVybiBmYWN0b3JpZXNbbGVuXShGLCBhcmdzKTtcbn07XG5cbm1vZHVsZS5leHBvcnRzID0gRnVuY3Rpb24uYmluZCB8fCBmdW5jdGlvbiBiaW5kKHRoYXQgLyogLCAuLi5hcmdzICovKSB7XG4gIHZhciBmbiA9IGFGdW5jdGlvbih0aGlzKTtcbiAgdmFyIHBhcnRBcmdzID0gYXJyYXlTbGljZS5jYWxsKGFyZ3VtZW50cywgMSk7XG4gIHZhciBib3VuZCA9IGZ1bmN0aW9uICgvKiBhcmdzLi4uICovKSB7XG4gICAgdmFyIGFyZ3MgPSBwYXJ0QXJncy5jb25jYXQoYXJyYXlTbGljZS5jYWxsKGFyZ3VtZW50cykpO1xuICAgIHJldHVybiB0aGlzIGluc3RhbmNlb2YgYm91bmQgPyBjb25zdHJ1Y3QoZm4sIGFyZ3MubGVuZ3RoLCBhcmdzKSA6IGludm9rZShmbiwgYXJncywgdGhhdCk7XG4gIH07XG4gIGlmIChpc09iamVjdChmbi5wcm90b3R5cGUpKSBib3VuZC5wcm90b3R5cGUgPSBmbi5wcm90b3R5cGU7XG4gIHJldHVybiBib3VuZDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2JpbmQuanNcbi8vIG1vZHVsZSBpZCA9IDE1NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///154\n")},function(module,exports){eval("// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faW52b2tlLmpzPzNjNzAiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZmFzdCBhcHBseSwgaHR0cDovL2pzcGVyZi5sbmtpdC5jb20vZmFzdC1hcHBseS81XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChmbiwgYXJncywgdGhhdCkge1xuICB2YXIgdW4gPSB0aGF0ID09PSB1bmRlZmluZWQ7XG4gIHN3aXRjaCAoYXJncy5sZW5ndGgpIHtcbiAgICBjYXNlIDA6IHJldHVybiB1biA/IGZuKClcbiAgICAgICAgICAgICAgICAgICAgICA6IGZuLmNhbGwodGhhdCk7XG4gICAgY2FzZSAxOiByZXR1cm4gdW4gPyBmbihhcmdzWzBdKVxuICAgICAgICAgICAgICAgICAgICAgIDogZm4uY2FsbCh0aGF0LCBhcmdzWzBdKTtcbiAgICBjYXNlIDI6IHJldHVybiB1biA/IGZuKGFyZ3NbMF0sIGFyZ3NbMV0pXG4gICAgICAgICAgICAgICAgICAgICAgOiBmbi5jYWxsKHRoYXQsIGFyZ3NbMF0sIGFyZ3NbMV0pO1xuICAgIGNhc2UgMzogcmV0dXJuIHVuID8gZm4oYXJnc1swXSwgYXJnc1sxXSwgYXJnc1syXSlcbiAgICAgICAgICAgICAgICAgICAgICA6IGZuLmNhbGwodGhhdCwgYXJnc1swXSwgYXJnc1sxXSwgYXJnc1syXSk7XG4gICAgY2FzZSA0OiByZXR1cm4gdW4gPyBmbihhcmdzWzBdLCBhcmdzWzFdLCBhcmdzWzJdLCBhcmdzWzNdKVxuICAgICAgICAgICAgICAgICAgICAgIDogZm4uY2FsbCh0aGF0LCBhcmdzWzBdLCBhcmdzWzFdLCBhcmdzWzJdLCBhcmdzWzNdKTtcbiAgfSByZXR1cm4gZm4uYXBwbHkodGhhdCwgYXJncyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pbnZva2UuanNcbi8vIG1vZHVsZSBpZCA9IDE1NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///155\n")},function(module,exports,__webpack_require__){eval("var $parseInt = __webpack_require__(4).parseInt;\nvar $trim = __webpack_require__(62).trim;\nvar ws = __webpack_require__(107);\nvar hex = /^[-+]?0[xX]/;\n\nmodule.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {\n var string = $trim(String(str), 3);\n return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));\n} : $parseInt;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcGFyc2UtaW50LmpzPzNhMDQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRwYXJzZUludCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpLnBhcnNlSW50O1xudmFyICR0cmltID0gcmVxdWlyZSgnLi9fc3RyaW5nLXRyaW0nKS50cmltO1xudmFyIHdzID0gcmVxdWlyZSgnLi9fc3RyaW5nLXdzJyk7XG52YXIgaGV4ID0gL15bLStdPzBbeFhdLztcblxubW9kdWxlLmV4cG9ydHMgPSAkcGFyc2VJbnQod3MgKyAnMDgnKSAhPT0gOCB8fCAkcGFyc2VJbnQod3MgKyAnMHgxNicpICE9PSAyMiA/IGZ1bmN0aW9uIHBhcnNlSW50KHN0ciwgcmFkaXgpIHtcbiAgdmFyIHN0cmluZyA9ICR0cmltKFN0cmluZyhzdHIpLCAzKTtcbiAgcmV0dXJuICRwYXJzZUludChzdHJpbmcsIChyYWRpeCA+Pj4gMCkgfHwgKGhleC50ZXN0KHN0cmluZykgPyAxNiA6IDEwKSk7XG59IDogJHBhcnNlSW50O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19wYXJzZS1pbnQuanNcbi8vIG1vZHVsZSBpZCA9IDE1NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///156\n")},function(module,exports,__webpack_require__){eval("var $parseFloat = __webpack_require__(4).parseFloat;\nvar $trim = __webpack_require__(62).trim;\n\nmodule.exports = 1 / $parseFloat(__webpack_require__(107) + '-0') !== -Infinity ? function parseFloat(str) {\n var string = $trim(String(str), 3);\n var result = $parseFloat(string);\n return result === 0 && string.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcGFyc2UtZmxvYXQuanM/ZjJkZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgJHBhcnNlRmxvYXQgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5wYXJzZUZsb2F0O1xudmFyICR0cmltID0gcmVxdWlyZSgnLi9fc3RyaW5nLXRyaW0nKS50cmltO1xuXG5tb2R1bGUuZXhwb3J0cyA9IDEgLyAkcGFyc2VGbG9hdChyZXF1aXJlKCcuL19zdHJpbmctd3MnKSArICctMCcpICE9PSAtSW5maW5pdHkgPyBmdW5jdGlvbiBwYXJzZUZsb2F0KHN0cikge1xuICB2YXIgc3RyaW5nID0gJHRyaW0oU3RyaW5nKHN0ciksIDMpO1xuICB2YXIgcmVzdWx0ID0gJHBhcnNlRmxvYXQoc3RyaW5nKTtcbiAgcmV0dXJuIHJlc3VsdCA9PT0gMCAmJiBzdHJpbmcuY2hhckF0KDApID09ICctJyA/IC0wIDogcmVzdWx0O1xufSA6ICRwYXJzZUZsb2F0O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19wYXJzZS1mbG9hdC5qc1xuLy8gbW9kdWxlIGlkID0gMTU3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///157\n")},function(module,exports,__webpack_require__){eval("var cof = __webpack_require__(28);\nmodule.exports = function (it, msg) {\n if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);\n return +it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYS1udW1iZXItdmFsdWUuanM/N2QyZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY29mID0gcmVxdWlyZSgnLi9fY29mJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCwgbXNnKSB7XG4gIGlmICh0eXBlb2YgaXQgIT0gJ251bWJlcicgJiYgY29mKGl0KSAhPSAnTnVtYmVyJykgdGhyb3cgVHlwZUVycm9yKG1zZyk7XG4gIHJldHVybiAraXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hLW51bWJlci12YWx1ZS5qc1xuLy8gbW9kdWxlIGlkID0gMTU4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///158\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.3 Number.isInteger(number)\nvar isObject = __webpack_require__(6);\nvar floor = Math.floor;\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXMtaW50ZWdlci5qcz85ZmRmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjEuMi4zIE51bWJlci5pc0ludGVnZXIobnVtYmVyKVxudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgZmxvb3IgPSBNYXRoLmZsb29yO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBpc0ludGVnZXIoaXQpIHtcbiAgcmV0dXJuICFpc09iamVjdChpdCkgJiYgaXNGaW5pdGUoaXQpICYmIGZsb29yKGl0KSA9PT0gaXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1pbnRlZ2VyLmpzXG4vLyBtb2R1bGUgaWQgPSAxNTlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///159\n")},function(module,exports){eval("// 20.2.2.20 Math.log1p(x)\nmodule.exports = Math.log1p || function log1p(x) {\n return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1sb2cxcC5qcz80NzNkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4yMCBNYXRoLmxvZzFwKHgpXG5tb2R1bGUuZXhwb3J0cyA9IE1hdGgubG9nMXAgfHwgZnVuY3Rpb24gbG9nMXAoeCkge1xuICByZXR1cm4gKHggPSAreCkgPiAtMWUtOCAmJiB4IDwgMWUtOCA/IHggLSB4ICogeCAvIDIgOiBNYXRoLmxvZygxICsgeCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19tYXRoLWxvZzFwLmpzXG4vLyBtb2R1bGUgaWQgPSAxNjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///160\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.16 Math.fround(x)\nvar sign = __webpack_require__(110);\nvar pow = Math.pow;\nvar EPSILON = pow(2, -52);\nvar EPSILON32 = pow(2, -23);\nvar MAX32 = pow(2, 127) * (2 - EPSILON32);\nvar MIN32 = pow(2, -126);\n\nvar roundTiesToEven = function (n) {\n return n + 1 / EPSILON - 1 / EPSILON;\n};\n\nmodule.exports = Math.fround || function fround(x) {\n var $abs = Math.abs(x);\n var $sign = sign(x);\n var a, result;\n if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;\n a = (1 + EPSILON32 / EPSILON) * $abs;\n result = a - (a - $abs);\n // eslint-disable-next-line no-self-compare\n if (result > MAX32 || result != result) return $sign * Infinity;\n return $sign * result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1mcm91bmQuanM/ODNmOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4yLjIuMTYgTWF0aC5mcm91bmQoeClcbnZhciBzaWduID0gcmVxdWlyZSgnLi9fbWF0aC1zaWduJyk7XG52YXIgcG93ID0gTWF0aC5wb3c7XG52YXIgRVBTSUxPTiA9IHBvdygyLCAtNTIpO1xudmFyIEVQU0lMT04zMiA9IHBvdygyLCAtMjMpO1xudmFyIE1BWDMyID0gcG93KDIsIDEyNykgKiAoMiAtIEVQU0lMT04zMik7XG52YXIgTUlOMzIgPSBwb3coMiwgLTEyNik7XG5cbnZhciBy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0=\n//# sourceURL=webpack-internal:///161\n")},function(module,exports,__webpack_require__){eval("// call something on iterator step with safe closing on error\nvar anObject = __webpack_require__(3);\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXRlci1jYWxsLmpzPzVlZjUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gY2FsbCBzb21ldGhpbmcgb24gaXRlcmF0b3Igc3RlcCB3aXRoIHNhZmUgY2xvc2luZyBvbiBlcnJvclxudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdGVyYXRvciwgZm4sIHZhbHVlLCBlbnRyaWVzKSB7XG4gIHRyeSB7XG4gICAgcmV0dXJuIGVudHJpZXMgPyBmbihhbk9iamVjdCh2YWx1ZSlbMF0sIHZhbHVlWzFdKSA6IGZuKHZhbHVlKTtcbiAgLy8gNy40LjYgSXRlcmF0b3JDbG9zZShpdGVyYXRvciwgY29tcGxldGlvbilcbiAgfSBjYXRjaCAoZSkge1xuICAgIHZhciByZXQgPSBpdGVyYXRvclsncmV0dXJuJ107XG4gICAgaWYgKHJldCAhPT0gdW5kZWZpbmVkKSBhbk9iamVjdChyZXQuY2FsbChpdGVyYXRvcikpO1xuICAgIHRocm93IGU7XG4gIH1cbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2l0ZXItY2FsbC5qc1xuLy8gbW9kdWxlIGlkID0gMTYyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///162\n")},function(module,exports,__webpack_require__){eval("var aFunction = __webpack_require__(16);\nvar toObject = __webpack_require__(15);\nvar IObject = __webpack_require__(70);\nvar toLength = __webpack_require__(12);\n\nmodule.exports = function (that, callbackfn, aLen, memo, isRight) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IObject(O);\n var length = toLength(O.length);\n var index = isRight ? length - 1 : 0;\n var i = isRight ? -1 : 1;\n if (aLen < 2) for (;;) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (isRight ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktcmVkdWNlLmpzPzE2NDIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGFGdW5jdGlvbiA9IHJlcXVpcmUoJy4vX2EtZnVuY3Rpb24nKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIElPYmplY3QgPSByZXF1aXJlKCcuL19pb2JqZWN0Jyk7XG52YXIgdG9MZW5ndGggPSByZXF1aXJlKCcuL190by1sZW5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WxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///163\n")},function(module,exports,__webpack_require__){"use strict";eval("// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\n\nvar toObject = __webpack_require__(15);\nvar toAbsoluteIndex = __webpack_require__(51);\nvar toLength = __webpack_require__(12);\n\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktY29weS13aXRoaW4uanM/MGNmYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMi4xLjMuMyBBcnJheS5wcm90b3R5cGUuY29weVdpdGhpbih0YXJnZXQsIHN0YXJ0LCBlbmQgPSB0aGlzLmxlbmd0aClcbid1c2Ugc3RyaWN0JztcbnZhciB0b09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Ly8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktY29weS13aXRoaW4uanNcbi8vIG1vZHVsZSBpZCA9IDE2NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///164\n")},function(module,exports){eval("module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXRlci1zdGVwLmpzPzI4MWQiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoZG9uZSwgdmFsdWUpIHtcbiAgcmV0dXJuIHsgdmFsdWU6IHZhbHVlLCBkb25lOiAhIWRvbmUgfTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2l0ZXItc3RlcC5qc1xuLy8gbW9kdWxlIGlkID0gMTY1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///165\n")},function(module,exports,__webpack_require__){eval("// 21.2.5.3 get RegExp.prototype.flags()\nif (__webpack_require__(10) && /./g.flags != 'g') __webpack_require__(11).f(RegExp.prototype, 'flags', {\n configurable: true,\n get: __webpack_require__(84)\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLmZsYWdzLmpzP2E1ZGYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjEuMi41LjMgZ2V0IFJlZ0V4cC5wcm90b3R5cGUuZmxhZ3MoKVxuaWYgKHJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgJiYgLy4vZy5mbGFncyAhPSAnZycpIHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmYoUmVnRXhwLnByb3RvdHlwZSwgJ2ZsYWdzJywge1xuICBjb25maWd1cmFibGU6IHRydWUsXG4gIGdldDogcmVxdWlyZSgnLi9fZmxhZ3MnKVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnJlZ2V4cC5mbGFncy5qc1xuLy8gbW9kdWxlIGlkID0gMTY2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///166\n")},function(module,exports){eval("module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcGVyZm9ybS5qcz80ODM1Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGV4ZWMpIHtcbiAgdHJ5IHtcbiAgICByZXR1cm4geyBlOiBmYWxzZSwgdjogZXhlYygpIH07XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICByZXR1cm4geyBlOiB0cnVlLCB2OiBlIH07XG4gIH1cbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3BlcmZvcm0uanNcbi8vIG1vZHVsZSBpZCA9IDE2N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///167\n")},function(module,exports,__webpack_require__){eval("var anObject = __webpack_require__(3);\nvar isObject = __webpack_require__(6);\nvar newPromiseCapability = __webpack_require__(125);\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcHJvbWlzZS1yZXNvbHZlLmpzPzllOTgiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBuZXdQcm9taXNlQ2FwYWJpbGl0eSA9IHJlcXVpcmUoJy4vX25ldy1wcm9taXNlLWNhcGFiaWxpdHknKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoQywgeCkge1xuICBhbk9iamVjdChDKTtcbiAgaWYgKGlzT2JqZWN0KHgpICYmIHguY29uc3RydWN0b3IgPT09IEMpIHJldHVybiB4O1xuICB2YXIgcHJvbWlzZUNhcGFiaWxpdHkgPSBuZXdQcm9taXNlQ2FwYWJpbGl0eS5mKEMpO1xuICB2YXIgcmVzb2x2ZSA9IHByb21pc2VDYXBhYmlsaXR5LnJlc29sdmU7XG4gIHJlc29sdmUoeCk7XG4gIHJldHVybiBwcm9taXNlQ2FwYWJpbGl0eS5wcm9taXNlO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcHJvbWlzZS1yZXNvbHZlLmpzXG4vLyBtb2R1bGUgaWQgPSAxNjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///168\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar strong = __webpack_require__(170);\nvar validate = __webpack_require__(64);\nvar MAP = 'Map';\n\n// 23.1 Map Objects\nmodule.exports = __webpack_require__(87)(MAP, function (get) {\n return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = strong.getEntry(validate(this, MAP), key);\n return entry && entry.v;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);\n }\n}, strong, true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWFwLmpzPzMyY2IiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIHN0cm9uZyA9IHJlcXVpcmUoJy4vX2NvbGxlY3Rpb24tc3Ryb25nJyk7XG52YXIgdmFsaWRhdGUgPSByZXF1aXJlKCcuL192YWxpZGF0ZS1jb2xsZWN0aW9uJyk7XG52YXIgTUFQID0gJ01hcCc7XG5cbi8vIDIzLjEgTWFwIE9iamVjdHNcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9fY29sbGVjdGlvbicpKE1BUCwgZnVuY3Rpb24gKGdldCkge1xuICByZXR1cm4gZnVuY3Rpb24gTWFwKCkgeyByZXR1cm4gZ2V0KHRoaXMsIGFyZ3VtZW50cy5sZW5ndGggPiAwID8gYXJndW1lbnRzWzBdIDogdW5kZWZpbmVkKTsgfTtcbn0sIHtcbiAgLy8gMjMuMS4zLjYgTWFwLnByb3RvdHlwZS5nZXQoa2V5KVxuICBnZXQ6IGZ1bmN0aW9uIGdldChrZXkpIHtcbiAgICB2YXIgZW50cnkgPSBzdHJvbmcuZ2V0RW50cnkodmFsaWRhdGUodGhpcywgTUFQKSwga2V5KTtcbiAgICByZXR1cm4gZW50cnkgJiYgZW50cnkudjtcbiAgfSxcbiAgLy8gMjMuMS4zLjkgTWFwLnByb3RvdHlwZS5zZXQoa2V5LCB2YWx1ZSlcbiAgc2V0OiBmdW5jdGlvbiBzZXQoa2V5LCB2YWx1ZSkge1xuICAgIHJldHVybiBzdHJvbmcuZGVmKHZhbGlkYXRlKHRoaXMsIE1BUCksIGtleSA9PT0gMCA/IDAgOiBrZXksIHZhbHVlKTtcbiAgfVxufSwgc3Ryb25nLCB0cnVlKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWFwLmpzXG4vLyBtb2R1bGUgaWQgPSAxNjlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///169\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar dP = __webpack_require__(11).f;\nvar create = __webpack_require__(52);\nvar redefineAll = __webpack_require__(57);\nvar ctx = __webpack_require__(27);\nvar anInstance = __webpack_require__(55);\nvar forOf = __webpack_require__(56);\nvar $iterDefine = __webpack_require__(113);\nvar step = __webpack_require__(165);\nvar setSpecies = __webpack_require__(54);\nvar DESCRIPTORS = __webpack_require__(10);\nvar fastKey = __webpack_require__(42).fastKey;\nvar validate = __webpack_require__(64);\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return that._i[index];\n // frozen object case\n for (entry = that._f; entry; entry = entry.n) {\n if (entry.k == key) return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n entry.r = true;\n if (entry.p) entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = validate(this, NAME);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.n;\n var prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if (prev) prev.n = next;\n if (next) next.p = prev;\n if (that._f == entry) that._f = next;\n if (that._l == entry) that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n validate(this, NAME);\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.n : this._f) {\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(validate(this, NAME), key);\n }\n });\n if (DESCRIPTORS) dP(C.prototype, 'size', {\n get: function () {\n return validate(this, NAME)[SIZE];\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var entry = getEntry(that, key);\n var prev, index;\n // change existing entry\n if (entry) {\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if (!that._f) that._f = entry;\n if (prev) prev.n = entry;\n that[SIZE]++;\n // add to index\n if (index !== 'F') that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function (C, NAME, IS_MAP) {\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function (iterated, kind) {\n this._t = validate(iterated, NAME); // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function () {\n var that = this;\n var kind = that._k;\n var entry = that._l;\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n // get next entry\n if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if (kind == 'keys') return step(0, entry.k);\n if (kind == 'values') return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fY29sbGVjdGlvbi1zdHJvbmcuanM/MGUwOCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgZFAgPSByZXF1aXJlKCcuL19vYmplY3QtZHAnKS5mO1xudmFyIGNyZWF0ZSA9IHJlcXVpcmUoJy4vX29iamVjdC1jcmVhdGUnKTtcbnZhciByZWRlZmluZUFsbCA9IHJlcXVpcmUoJy4vX3JlZGVmaW5lLWFsbCcpO1xudmFyIGN0eCA9IHJlcXVpcmUoJy4vX2N0eCcpO1xudmFyIGFuSW5zdGFuY2UgPSByZXF1aXJlKCcuL19hbi1pbnN0YW5jZScpO1xudmFyIGZvck9mID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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///170\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar strong = __webpack_require__(170);\nvar validate = __webpack_require__(64);\nvar SET = 'Set';\n\n// 23.2 Set Objects\nmodule.exports = __webpack_require__(87)(SET, function (get) {\n return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);\n }\n}, strong);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc2V0LmpzPzc1MjUiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIHN0cm9uZyA9IHJlcXVpcmUoJy4vX2NvbGxlY3Rpb24tc3Ryb25nJyk7XG52YXIgdmFsaWRhdGUgPSByZXF1aXJlKCcuL192YWxpZGF0ZS1jb2xsZWN0aW9uJyk7XG52YXIgU0VUID0gJ1NldCc7XG5cbi8vIDIzLjIgU2V0IE9iamVjdHNcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9fY29sbGVjdGlvbicpKFNFVCwgZnVuY3Rpb24gKGdldCkge1xuICByZXR1cm4gZnVuY3Rpb24gU2V0KCkgeyByZXR1cm4gZ2V0KHRoaXMsIGFyZ3VtZW50cy5sZW5ndGggPiAwID8gYXJndW1lbnRzWzBdIDogdW5kZWZpbmVkKTsgfTtcbn0sIHtcbiAgLy8gMjMuMi4zLjEgU2V0LnByb3RvdHlwZS5hZGQodmFsdWUpXG4gIGFkZDogZnVuY3Rpb24gYWRkKHZhbHVlKSB7XG4gICAgcmV0dXJuIHN0cm9uZy5kZWYodmFsaWRhdGUodGhpcywgU0VUKSwgdmFsdWUgPSB2YWx1ZSA9PT0gMCA/IDAgOiB2YWx1ZSwgdmFsdWUpO1xuICB9XG59LCBzdHJvbmcpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5zZXQuanNcbi8vIG1vZHVsZSBpZCA9IDE3MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///171\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar each = __webpack_require__(35)(0);\nvar redefine = __webpack_require__(19);\nvar meta = __webpack_require__(42);\nvar assign = __webpack_require__(153);\nvar weak = __webpack_require__(173);\nvar isObject = __webpack_require__(6);\nvar fails = __webpack_require__(5);\nvar validate = __webpack_require__(64);\nvar WEAK_MAP = 'WeakMap';\nvar getWeak = meta.getWeak;\nvar isExtensible = Object.isExtensible;\nvar uncaughtFrozenStore = weak.ufstore;\nvar tmp = {};\nvar InternalMap;\n\nvar wrapper = function (get) {\n return function WeakMap() {\n return get(this, arguments.length > 0 ? arguments[0] : undefined);\n };\n};\n\nvar methods = {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n if (isObject(key)) {\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);\n return data ? data[this._i] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return weak.def(validate(this, WEAK_MAP), key, value);\n }\n};\n\n// 23.3 WeakMap Objects\nvar $WeakMap = module.exports = __webpack_require__(87)(WEAK_MAP, wrapper, methods, weak, true, true);\n\n// IE11 WeakMap frozen keys fix\nif (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {\n InternalMap = weak.getConstructor(wrapper, WEAK_MAP);\n assign(InternalMap.prototype, methods);\n meta.NEED = true;\n each(['delete', 'has', 'get', 'set'], function (key) {\n var proto = $WeakMap.prototype;\n var method = proto[key];\n redefine(proto, key, function (a, b) {\n // store frozen objects on internal weakmap shim\n if (isObject(a) && !isExtensible(a)) {\n if (!this._f) this._f = new InternalMap();\n var result = this._f[key](a, b);\n return key == 'set' ? this : result;\n // store all the rest on native weakmap\n } return method.call(this, a, b);\n });\n });\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYud2Vhay1tYXAuanM/NjQzNSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgZWFjaCA9IHJlcXVpcmUoJy4vX2FycmF5LW1ldGhvZHMnKSgwKTtcbnZhciByZWRlZmluZSA9IHJlcXVpcmUoJy4vX3JlZGVmaW5lJyk7XG52YXIgbWV0YSA9IHJlcXVpcmUoJy4vX21ldGEnKTtcbnZhciBhc3NpZ24gPSByZXF1aXJlKCcuL19vYmplY3QtYXNzaWduJyk7XG52YXIgd2VhayA9IHJlcXVpcmUoJy4vX2NvbGxlY3Rpb24td2VhaycpO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgZ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JyA/IHRoaXMgOiByZXN1bHQ7XG4gICAgICAvLyBzdG9yZSBhbGwgdGhlIHJlc3Qgb24gbmF0aXZlIHdlYWttYXBcbiAgICAgIH0gcmV0dXJuIG1ldGhvZC5jYWxsKHRoaXMsIGEsIGIpO1xuICAgIH0pO1xuICB9KTtcbn1cblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYud2Vhay1tYXAuanNcbi8vIG1vZHVsZSBpZCA9IDE3MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///172\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar redefineAll = __webpack_require__(57);\nvar getWeak = __webpack_require__(42).getWeak;\nvar anObject = __webpack_require__(3);\nvar isObject = __webpack_require__(6);\nvar anInstance = __webpack_require__(55);\nvar forOf = __webpack_require__(56);\nvar createArrayMethod = __webpack_require__(35);\nvar $has = __webpack_require__(17);\nvar validate = __webpack_require__(64);\nvar arrayFind = createArrayMethod(5);\nvar arrayFindIndex = createArrayMethod(6);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (that) {\n return that._l || (that._l = new UncaughtFrozenStore());\n};\nvar UncaughtFrozenStore = function () {\n this.a = [];\n};\nvar findUncaughtFrozen = function (store, key) {\n return arrayFind(store.a, function (it) {\n return it[0] === key;\n });\n};\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.a.push([key, value]);\n },\n 'delete': function (key) {\n var index = arrayFindIndex(this.a, function (it) {\n return it[0] === key;\n });\n if (~index) this.a.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = id++; // collection id\n that._l = undefined; // leak store for uncaught frozen objects\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);\n return data && $has(data, this._i) && delete data[this._i];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);\n return data && $has(data, this._i);\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var data = getWeak(anObject(key), true);\n if (data === true) uncaughtFrozenStore(that).set(key, value);\n else data[that._i] = value;\n return that;\n },\n ufstore: uncaughtFrozen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7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///173\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/ecma262/#sec-toindex\nvar toInteger = __webpack_require__(33);\nvar toLength = __webpack_require__(12);\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length!');\n return length;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdG8taW5kZXguanM/ZjAzZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy10b2luZGV4XG52YXIgdG9JbnRlZ2VyID0gcmVxdWlyZSgnLi9fdG8taW50ZWdlcicpO1xudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi9fdG8tbGVuZ3RoJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICBpZiAoaXQgPT09IHVuZGVmaW5lZCkgcmV0dXJuIDA7XG4gIHZhciBudW1iZXIgPSB0b0ludGVnZXIoaXQpO1xuICB2YXIgbGVuZ3RoID0gdG9MZW5ndGgobnVtYmVyKTtcbiAgaWYgKG51bWJlciAhPT0gbGVuZ3RoKSB0aHJvdyBSYW5nZUVycm9yKCdXcm9uZyBsZW5ndGghJyk7XG4gIHJldHVybiBsZW5ndGg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gMTc0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///174\n")},function(module,exports,__webpack_require__){eval("// all object keys, includes non-enumerable and symbols\nvar gOPN = __webpack_require__(53);\nvar gOPS = __webpack_require__(80);\nvar anObject = __webpack_require__(3);\nvar Reflect = __webpack_require__(4).Reflect;\nmodule.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {\n var keys = gOPN.f(anObject(it));\n var getSymbols = gOPS.f;\n return getSymbols ? keys.concat(getSymbols(it)) : keys;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb3duLWtleXMuanM/NjE0YSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBhbGwgb2JqZWN0IGtleXMsIGluY2x1ZGVzIG5vbi1lbnVtZXJhYmxlIGFuZCBzeW1ib2xzXG52YXIgZ09QTiA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BuJyk7XG52YXIgZ09QUyA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BzJyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBSZWZsZWN0ID0gcmVxdWlyZSgnLi9fZ2xvYmFsJykuUmVmbGVjdDtcbm1vZHVsZS5leHBvcnRzID0gUmVmbGVjdCAmJiBSZWZsZWN0Lm93bktleXMgfHwgZnVuY3Rpb24gb3duS2V5cyhpdCkge1xuICB2YXIga2V5cyA9IGdPUE4uZihhbk9iamVjdChpdCkpO1xuICB2YXIgZ2V0U3ltYm9scyA9IGdPUFMuZjtcbiAgcmV0dXJuIGdldFN5bWJvbHMgPyBrZXlzLmNvbmNhdChnZXRTeW1ib2xzKGl0KSkgOiBrZXlzO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb3duLWtleXMuanNcbi8vIG1vZHVsZSBpZCA9IDE3NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///175\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar isArray = __webpack_require__(81);\nvar isObject = __webpack_require__(6);\nvar toLength = __webpack_require__(12);\nvar ctx = __webpack_require__(27);\nvar IS_CONCAT_SPREADABLE = __webpack_require__(8)('isConcatSpreadable');\n\nfunction flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;\n var element, spreadable;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n spreadable = false;\n if (isObject(element)) {\n spreadable = element[IS_CONCAT_SPREADABLE];\n spreadable = spreadable !== undefined ? !!spreadable : isArray(element);\n }\n\n if (spreadable && depth > 0) {\n targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1fffffffffffff) throw TypeError();\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n}\n\nmodule.exports = flattenIntoArray;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZmxhdHRlbi1pbnRvLWFycmF5LmpzPzIwNWEiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9wcm9wb3NhbC1mbGF0TWFwLyNzZWMtRmxhdHRlbkludG9BcnJheVxudmFyIGlzQXJyYXkgPSByZXF1aXJlKCcuL19pcy1hcnJheScpO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgdG9MZW5ndGggPSByZXF1aXJlKCcuL190by1sZW5ndGgnKTtcbnZhciBjdHggPSByZXF1aXJlKCcuL19jdHgnKTtcbnZhciBJU19DT05DQVRfU1BS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IDEpIC0gMTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGlmICh0YXJnZXRJbmRleCA+PSAweDFmZmZmZmZmZmZmZmZmKSB0aHJvdyBUeXBlRXJyb3IoKTtcbiAgICAgICAgdGFyZ2V0W3RhcmdldEluZGV4XSA9IGVsZW1lbnQ7XG4gICAgICB9XG5cbiAgICAgIHRhcmdldEluZGV4Kys7XG4gICAgfVxuICAgIHNvdXJjZUluZGV4Kys7XG4gIH1cbiAgcmV0dXJuIHRhcmdldEluZGV4O1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IGZsYXR0ZW5JbnRvQXJyYXk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2ZsYXR0ZW4taW50by1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gMTc2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///176\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = __webpack_require__(12);\nvar repeat = __webpack_require__(109);\nvar defined = __webpack_require__(32);\n\nmodule.exports = function (that, maxLength, fillString, left) {\n var S = String(defined(that));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n if (intMaxLength <= stringLength || fillStr == '') return S;\n var fillLen = intMaxLength - stringLength;\n var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return left ? stringFiller + S : S + stringFiller;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLXBhZC5qcz9kOTU0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS90YzM5L3Byb3Bvc2FsLXN0cmluZy1wYWQtc3RhcnQtZW5kXG52YXIgdG9MZW5ndGggPSByZXF1aXJlKCcuL190by1sZW5ndGgnKTtcbnZhciByZXBlYXQgPSByZXF1aXJlKCcuL19zdHJpbmctcmVwZWF0Jyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAodGhhdCwgbWF4TGVuZ3RoLCBmaWxsU3RyaW5nLCBsZWZ0KSB7XG4gIHZhciBTID0gU3RyaW5nKGRlZmluZWQodGhhdCkpO1xuICB2YXIgc3RyaW5nTGVuZ3RoID0gUy5sZW5ndGg7XG4gIHZhciBmaWxsU3RyID0gZmlsbFN0cmluZyA9PT0gdW5kZWZpbmVkID8gJyAnIDogU3RyaW5nKGZpbGxTdHJpbmcpO1xuICB2YXIgaW50TWF4TGVuZ3RoID0gdG9MZW5ndGgobWF4TGVuZ3RoKTtcbiAgaWYgKGludE1heExlbmd0aCA8PSBzdHJpbmdMZW5ndGggfHwgZmlsbFN0ciA9PSAnJykgcmV0dXJuIFM7XG4gIHZhciBmaWxsTGVuID0gaW50TWF4TGVuZ3RoIC0gc3RyaW5nTGVuZ3RoO1xuICB2YXIgc3RyaW5nRmlsbGVyID0gcmVwZWF0LmNhbGwoZmlsbFN0ciwgTWF0aC5jZWlsKGZpbGxMZW4gLyBmaWxsU3RyLmxlbmd0aCkpO1xuICBpZiAoc3RyaW5nRmlsbGVyLmxlbmd0aCA+IGZpbGxMZW4pIHN0cmluZ0ZpbGxlciA9IHN0cmluZ0ZpbGxlci5zbGljZSgwLCBmaWxsTGVuKTtcbiAgcmV0dXJuIGxlZnQgPyBzdHJpbmdGaWxsZXIgKyBTIDogUyArIHN0cmluZ0ZpbGxlcjtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3N0cmluZy1wYWQuanNcbi8vIG1vZHVsZSBpZCA9IDE3N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///177\n")},function(module,exports,__webpack_require__){eval("var getKeys = __webpack_require__(50);\nvar toIObject = __webpack_require__(24);\nvar isEnum = __webpack_require__(71).f;\nmodule.exports = function (isEntries) {\n return function (it) {\n var O = toIObject(it);\n var keys = getKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) if (isEnum.call(O, key = keys[i++])) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n } return result;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb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pack-internal:///178\n")},function(module,exports,__webpack_require__){eval('// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar classof = __webpack_require__(72);\nvar from = __webpack_require__(180);\nmodule.exports = function (NAME) {\n return function toJSON() {\n if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn\'t generic");\n return from(this);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fY29sbGVjdGlvbi10by1qc29uLmpzPzVkNzAiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9naXRodWIuY29tL0RhdmlkQnJ1YW50L01hcC1TZXQucHJvdG90eXBlLnRvSlNPTlxudmFyIGNsYXNzb2YgPSByZXF1aXJlKCcuL19jbGFzc29mJyk7XG52YXIgZnJvbSA9IHJlcXVpcmUoJy4vX2FycmF5LWZyb20taXRlcmFibGUnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKE5BTUUpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHRvSlNPTigpIHtcbiAgICBpZiAoY2xhc3NvZih0aGlzKSAhPSBOQU1FKSB0aHJvdyBUeXBlRXJyb3IoTkFNRSArIFwiI3RvSlNPTiBpc24ndCBnZW5lcmljXCIpO1xuICAgIHJldHVybiBmcm9tKHRoaXMpO1xuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fY29sbGVjdGlvbi10by1qc29uLmpzXG4vLyBtb2R1bGUgaWQgPSAxNzlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///179\n')},function(module,exports,__webpack_require__){eval("var forOf = __webpack_require__(56);\n\nmodule.exports = function (iter, ITERATOR) {\n var result = [];\n forOf(iter, false, result.push, result, ITERATOR);\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTgwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktZnJvbS1pdGVyYWJsZS5qcz80MDZlIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBmb3JPZiA9IHJlcXVpcmUoJy4vX2Zvci1vZicpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdGVyLCBJVEVSQVRPUikge1xuICB2YXIgcmVzdWx0ID0gW107XG4gIGZvck9mKGl0ZXIsIGZhbHNlLCByZXN1bHQucHVzaCwgcmVzdWx0LCBJVEVSQVRPUik7XG4gIHJldHVybiByZXN1bHQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hcnJheS1mcm9tLWl0ZXJhYmxlLmpzXG4vLyBtb2R1bGUgaWQgPSAxODBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///180\n")},function(module,exports){eval("// https://rwaldron.github.io/proposal-math-extensions/\nmodule.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {\n if (\n arguments.length === 0\n // eslint-disable-next-line no-self-compare\n || x != x\n // eslint-disable-next-line no-self-compare\n || inLow != inLow\n // eslint-disable-next-line no-self-compare\n || inHigh != inHigh\n // eslint-disable-next-line no-self-compare\n || outLow != outLow\n // eslint-disable-next-line no-self-compare\n || outHigh != outHigh\n ) return NaN;\n if (x === Infinity || x === -Infinity) return x;\n return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTgxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1zY2FsZS5qcz81OThmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vcndhbGRyb24uZ2l0aHViLmlvL3Byb3Bvc2FsLW1hdGgtZXh0ZW5zaW9ucy9cbm1vZHVsZS5leHBvcnRzID0gTWF0aC5zY2FsZSB8fCBmdW5jdGlvbiBzY2FsZSh4LCBpbkxvdywgaW5IaWdoLCBvdXRMb3csIG91dEhpZ2gpIHtcbiAgaWYgKFxuICAgIGFyZ3VtZW50cy5sZW5ndGggPT09IDBcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICAgIHx8IHggIT0geFxuICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXNlbGYtY29tcGFyZVxuICAgICAgfHwgaW5Mb3cgIT0gaW5Mb3dcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICAgIHx8IGluSGlnaCAhPSBpbkhpZ2hcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICAgIHx8IG91dExvdyAhPSBvdXRMb3dcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICAgIHx8IG91dEhpZ2ggIT0gb3V0SGlnaFxuICApIHJldHVybiBOYU47XG4gIGlmICh4ID09PSBJbmZpbml0eSB8fCB4ID09PSAtSW5maW5pdHkpIHJldHVybiB4O1xuICByZXR1cm4gKHggLSBpbkxvdykgKiAob3V0SGlnaCAtIG91dExvdykgLyAoaW5IaWdoIC0gaW5Mb3cpICsgb3V0TG93O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1zY2FsZS5qc1xuLy8gbW9kdWxlIGlkID0gMTgxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///181\n")},function(module,exports){eval("//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTgyLmpzIiwic291cmNlcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///182\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar LIBRARY = __webpack_require__(92);\nvar $export = __webpack_require__(21);\nvar redefine = __webpack_require__(185);\nvar hide = __webpack_require__(58);\nvar has = __webpack_require__(59);\nvar Iterators = __webpack_require__(74);\nvar $iterCreate = __webpack_require__(418);\nvar setToStringTag = __webpack_require__(95);\nvar getPrototypeOf = __webpack_require__(189);\nvar ITERATOR = __webpack_require__(23)('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = (!BUGGY && $native) || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTgzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLWRlZmluZS5qcz9iYzgwIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBMSUJSQVJZID0gcmVxdWlyZSgnLi9fbGlicmFyeScpO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciByZWRlZmluZSA9IHJlcXVpcmUoJy4vX3JlZGVmaW5lJyk7XG52YXIgaGlkZSA9IHJlcXVpcmUoJy4vX2hpZGUnKTtcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciBJdGVyYXRvcnMgPSByZXF1aXJlKCcuL19pdGVyYXRvcnMnKTtcbnZhciAkaXRlckNyZWF0ZSA9IHJlcXVpcmUoJy4vX2l0ZXItY3JlYXRlJyk7XG52YXIgc2V0VG9TdHJpbmdUYWcgPSByZXF1aXJlKCcuL19zZXQtdG8tc3RyaW5nLXRhZycpO1xudmFyIGdldFByb3RvdHlwZU9mID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdwbycpO1xudmFyIElURVJBVE9SID0gcmVxdWlyZSgnLi9fd2tzJykoJ2l0ZXJhdG9yJyk7XG52YXIgQlVHR1kgPSAhKFtdLmtleXMgJiYgJ25leHQnIGluIFtdLmtleXMoKSk7IC8vIFNhZmFyaSBoYXMgYnVnZ3kgaXRlcmF0b3JzIHcvbyBgbmV4dGBcbnZhciBGRl9JVEVSQVRPUiA9ICdAQGl0ZXJhdG9yJztcbnZhciBLRVlTID0gJ2tleXMnO1xudmFyIFZBTFVFUyA9ICd2YWx1ZXM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iJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///183\n")},function(module,exports,__webpack_require__){eval("module.exports = !__webpack_require__(44) && !__webpack_require__(66)(function () {\n return Object.defineProperty(__webpack_require__(131)('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pZTgtZG9tLWRlZmluZS5qcz80OWYwIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gIXJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgJiYgIXJlcXVpcmUoJy4vX2ZhaWxzJykoZnVuY3Rpb24gKCkge1xuICByZXR1cm4gT2JqZWN0LmRlZmluZVByb3BlcnR5KHJlcXVpcmUoJy4vX2RvbS1jcmVhdGUnKSgnZGl2JyksICdhJywgeyBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIDc7IH0gfSkuYSAhPSA3O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faWU4LWRvbS1kZWZpbmUuanNcbi8vIG1vZHVsZSBpZCA9IDE4NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///184\n")},function(module,exports,__webpack_require__){eval("module.exports = __webpack_require__(58);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19yZWRlZmluZS5qcz9mM2NkIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9faGlkZScpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3JlZGVmaW5lLmpzXG4vLyBtb2R1bGUgaWQgPSAxODVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///185\n")},function(module,exports,__webpack_require__){eval("var has = __webpack_require__(59);\nvar toIObject = __webpack_require__(45);\nvar arrayIndexOf = __webpack_require__(420)(false);\nvar IE_PROTO = __webpack_require__(135)('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3Qta2V5cy1pbnRlcm5hbC5qcz8yMWI4Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgYXJyYXlJbmRleE9mID0gcmVxdWlyZSgnLi9fYXJyYXktaW5jbHVkZXMnKShmYWxzZSk7XG52YXIgSUVfUFJPVE8gPSByZXF1aXJlKCcuL19zaGFyZWQta2V5JykoJ0lFX1BST1RPJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKG9iamVjdCwgbmFtZXMpIHtcbiAgdmFyIE8gPSB0b0lPYmplY3Qob2JqZWN0KTtcbiAgdmFyIGkgPSAwO1xuICB2YXIgcmVzdWx0ID0gW107XG4gIHZhciBrZXk7XG4gIGZvciAoa2V5IGluIE8pIGlmIChrZXkgIT0gSUVfUFJPVE8pIGhhcyhPLCBrZXkpICYmIHJlc3VsdC5wdXNoKGtleSk7XG4gIC8vIERvbid0IGVudW0gYnVnICYgaGlkZGVuIGtleXNcbiAgd2hpbGUgKG5hbWVzLmxlbmd0aCA+IGkpIGlmIChoYXMoTywga2V5ID0gbmFtZXNbaSsrXSkpIHtcbiAgICB+YXJyYXlJbmRleE9mKHJlc3VsdCwga2V5KSB8fCByZXN1bHQucHVzaChrZXkpO1xuICB9XG4gIHJldHVybiByZXN1bHQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1rZXlzLWludGVybmFsLmpzXG4vLyBtb2R1bGUgaWQgPSAxODZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///186\n")},function(module,exports,__webpack_require__){eval("// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = __webpack_require__(75);\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pb2JqZWN0LmpzPzMxNGUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZmFsbGJhY2sgZm9yIG5vbi1hcnJheS1saWtlIEVTMyBhbmQgbm9uLWVudW1lcmFibGUgb2xkIFY4IHN0cmluZ3NcbnZhciBjb2YgPSByZXF1aXJlKCcuL19jb2YnKTtcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1wcm90b3R5cGUtYnVpbHRpbnNcbm1vZHVsZS5leHBvcnRzID0gT2JqZWN0KCd6JykucHJvcGVydHlJc0VudW1lcmFibGUoMCkgPyBPYmplY3QgOiBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIGNvZihpdCkgPT0gJ1N0cmluZycgPyBpdC5zcGxpdCgnJykgOiBPYmplY3QoaXQpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pb2JqZWN0LmpzXG4vLyBtb2R1bGUgaWQgPSAxODdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///187\n")},function(module,exports,__webpack_require__){eval("var document = __webpack_require__(22).document;\nmodule.exports = document && document.documentElement;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19odG1sLmpzPzQ0ZjIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGRvY3VtZW50ID0gcmVxdWlyZSgnLi9fZ2xvYmFsJykuZG9jdW1lbnQ7XG5tb2R1bGUuZXhwb3J0cyA9IGRvY3VtZW50ICYmIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19odG1sLmpzXG4vLyBtb2R1bGUgaWQgPSAxODhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///188\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = __webpack_require__(59);\nvar toObject = __webpack_require__(76);\nvar IE_PROTO = __webpack_require__(135)('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ3BvLmpzPzNmM2MiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjkgLyAxNS4yLjMuMiBPYmplY3QuZ2V0UHJvdG90eXBlT2YoTylcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIElFX1BST1RPID0gcmVxdWlyZSgnLi9fc2hhcmVkLWtleScpKCdJRV9QUk9UTycpO1xudmFyIE9iamVjdFByb3RvID0gT2JqZWN0LnByb3RvdHlwZTtcblxubW9kdWxlLmV4cG9ydHMgPSBPYmplY3QuZ2V0UHJvdG90eXBlT2YgfHwgZnVuY3Rpb24gKE8pIHtcbiAgTyA9IHRvT2JqZWN0KE8pO1xuICBpZiAoaGFzKE8sIElFX1BST1RPKSkgcmV0dXJuIE9bSUVfUFJPVE9dO1xuICBpZiAodHlwZW9mIE8uY29uc3RydWN0b3IgPT0gJ2Z1bmN0aW9uJyAmJiBPIGluc3RhbmNlb2YgTy5jb25zdHJ1Y3Rvcikge1xuICAgIHJldHVybiBPLmNvbnN0cnVjdG9yLnByb3RvdHlwZTtcbiAgfSByZXR1cm4gTyBpbnN0YW5jZW9mIE9iamVjdCA/IE9iamVjdFByb3RvIDogbnVsbDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWdwby5qc1xuLy8gbW9kdWxlIGlkID0gMTg5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///189\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(422);\nvar global = __webpack_require__(22);\nvar hide = __webpack_require__(58);\nvar Iterators = __webpack_require__(74);\nvar TO_STRING_TAG = __webpack_require__(23)('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n//# sourceURL=[module]\n//# source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dFRyYWNrQ3VlTGlzdCwnICtcbiAgJ1RleHRUcmFja0xpc3QsVG91Y2hMaXN0Jykuc3BsaXQoJywnKTtcblxuZm9yICh2YXIgaSA9IDA7IGkgPCBET01JdGVyYWJsZXMubGVuZ3RoOyBpKyspIHtcbiAgdmFyIE5BTUUgPSBET01JdGVyYWJsZXNbaV07XG4gIHZhciBDb2xsZWN0aW9uID0gZ2xvYmFsW05BTUVdO1xuICB2YXIgcHJvdG8gPSBDb2xsZWN0aW9uICYmIENvbGxlY3Rpb24ucHJvdG90eXBlO1xuICBpZiAocHJvdG8gJiYgIXByb3RvW1RPX1NUUklOR19UQUddKSBoaWRlKHByb3RvLCBUT19TVFJJTkdfVEFHLCBOQU1FKTtcbiAgSXRlcmF0b3JzW05BTUVdID0gSXRlcmF0b3JzLkFycmF5O1xufVxuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvd2ViLmRvbS5pdGVyYWJsZS5qc1xuLy8gbW9kdWxlIGlkID0gMTkwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///190\n")},function(module,exports,__webpack_require__){eval("// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = __webpack_require__(75);\nvar TAG = __webpack_require__(23)('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19jbGFzc29mLmpzPzQ1OGYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZ2V0dGluZyB0YWcgZnJvbSAxOS4xLjMuNiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nKClcbnZhciBjb2YgPSByZXF1aXJlKCcuL19jb2YnKTtcbnZhciBUQUcgPSByZXF1aXJlKCcuL193a3MnKSgndG9TdHJpbmdUYWcnKTtcbi8vIEVTMyB3cm9uZyBoZXJlXG52YXIgQVJHID0gY29mKGZ1bmN0aW9uICgpIHsgcmV0dXJuIGFyZ3VtZW50czsgfSgpKSA9PSAnQXJndW1lbnRzJztcblxuLy8gZmFsbGJhY2sgZm9yIElFMTEgU2NyaXB0IEFjY2VzcyBEZW5pZWQgZXJyb3JcbnZhciB0cnlHZXQgPSBmdW5jdGlvbiAoaXQsIGtleSkge1xuICB0cnkge1xuICAgIHJldHVybiBpdFtrZXldO1xuICB9IGNhdGNoIChlKSB7IC8qIGVtcHR5ICovIH1cbn07XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHZhciBPLCBULCBCO1xuICByZXR1cm4gaXQgPT09IHVuZGVmaW5lZCA/ICdVbmRlZmluZWQnIDogaXQgPT09IG51bGwgPyAnTnVsbCdcbiAgICAvLyBAQHRvU3RyaW5nVGFnIGNhc2VcbiAgICA6IHR5cGVvZiAoVCA9IHRyeUdldChPID0gT2JqZWN0KGl0KSwgVEFHKSkgPT0gJ3N0cmluZycgPyBUXG4gICAgLy8gYnVpbHRpblRhZyBjYXNlXG4gICAgOiBBUkcgPyBjb2YoTylcbiAgICAvLyBFUzMgYXJndW1lbnRzIGZhbGxiYWNrXG4gICAgOiAoQiA9IGNvZihPKSkgPT0gJ09iamVjdCcgJiYgdHlwZW9mIE8uY2FsbGVlID09ICdmdW5jdGlvbicgPyAnQXJndW1lbnRzJyA6IEI7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NsYXNzb2YuanNcbi8vIG1vZHVsZSBpZCA9IDE5MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///191\n")},function(module,exports,__webpack_require__){eval("// call something on iterator step with safe closing on error\nvar anObject = __webpack_require__(41);\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLWNhbGwuanM/OWFjNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBjYWxsIHNvbWV0aGluZyBvbiBpdGVyYXRvciBzdGVwIHdpdGggc2FmZSBjbG9zaW5nIG9uIGVycm9yXG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0ZXJhdG9yLCBmbiwgdmFsdWUsIGVudHJpZXMpIHtcbiAgdHJ5IHtcbiAgICByZXR1cm4gZW50cmllcyA/IGZuKGFuT2JqZWN0KHZhbHVlKVswXSwgdmFsdWVbMV0pIDogZm4odmFsdWUpO1xuICAvLyA3LjQuNiBJdGVyYXRvckNsb3NlKGl0ZXJhdG9yLCBjb21wbGV0aW9uKVxuICB9IGNhdGNoIChlKSB7XG4gICAgdmFyIHJldCA9IGl0ZXJhdG9yWydyZXR1cm4nXTtcbiAgICBpZiAocmV0ICE9PSB1bmRlZmluZWQpIGFuT2JqZWN0KHJldC5jYWxsKGl0ZXJhdG9yKSk7XG4gICAgdGhyb3cgZTtcbiAgfVxufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLWNhbGwuanNcbi8vIG1vZHVsZSBpZCA9IDE5MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///192\n")},function(module,exports,__webpack_require__){eval("// check on default Array iterator\nvar Iterators = __webpack_require__(74);\nvar ITERATOR = __webpack_require__(23)('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pcy1hcnJheS1pdGVyLmpzPzMyMWMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gY2hlY2sgb24gZGVmYXVsdCBBcnJheSBpdGVyYXRvclxudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4vX2l0ZXJhdG9ycycpO1xudmFyIElURVJBVE9SID0gcmVxdWlyZSgnLi9fd2tzJykoJ2l0ZXJhdG9yJyk7XG52YXIgQXJyYXlQcm90byA9IEFycmF5LnByb3RvdHlwZTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIGl0ICE9PSB1bmRlZmluZWQgJiYgKEl0ZXJhdG9ycy5BcnJheSA9PT0gaXQgfHwgQXJyYXlQcm90b1tJVEVSQVRPUl0gPT09IGl0KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXMtYXJyYXktaXRlci5qc1xuLy8gbW9kdWxlIGlkID0gMTkzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///193\n")},function(module,exports,__webpack_require__){eval("var classof = __webpack_require__(191);\nvar ITERATOR = __webpack_require__(23)('iterator');\nvar Iterators = __webpack_require__(74);\nmodule.exports = __webpack_require__(13).getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2NvcmUuZ2V0LWl0ZXJhdG9yLW1ldGhvZC5qcz9kZGZiIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBjbGFzc29mID0gcmVxdWlyZSgnLi9fY2xhc3NvZicpO1xudmFyIElURVJBVE9SID0gcmVxdWlyZSgnLi9fd2tzJykoJ2l0ZXJhdG9yJyk7XG52YXIgSXRlcmF0b3JzID0gcmVxdWlyZSgnLi9faXRlcmF0b3JzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vX2NvcmUnKS5nZXRJdGVyYXRvck1ldGhvZCA9IGZ1bmN0aW9uIChpdCkge1xuICBpZiAoaXQgIT0gdW5kZWZpbmVkKSByZXR1cm4gaXRbSVRFUkFUT1JdXG4gICAgfHwgaXRbJ0BAaXRlcmF0b3InXVxuICAgIHx8IEl0ZXJhdG9yc1tjbGFzc29mKGl0KV07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvY29yZS5nZXQtaXRlcmF0b3ItbWV0aG9kLmpzXG4vLyBtb2R1bGUgaWQgPSAxOTRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///194\n")},function(module,exports,__webpack_require__){eval("// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = __webpack_require__(41);\nvar aFunction = __webpack_require__(93);\nvar SPECIES = __webpack_require__(23)('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zcGVjaWVzLWNvbnN0cnVjdG9yLmpzP2I3Y2MiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4zLjIwIFNwZWNpZXNDb25zdHJ1Y3RvcihPLCBkZWZhdWx0Q29uc3RydWN0b3IpXG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuL19hLWZ1bmN0aW9uJyk7XG52YXIgU1BFQ0lFUyA9IHJlcXVpcmUoJy4vX3drcycpKCdzcGVjaWVzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChPLCBEKSB7XG4gIHZhciBDID0gYW5PYmplY3QoTykuY29uc3RydWN0b3I7XG4gIHZhciBTO1xuICByZXR1cm4gQyA9PT0gdW5kZWZpbmVkIHx8IChTID0gYW5PYmplY3QoQylbU1BFQ0lFU10pID09IHVuZGVmaW5lZCA/IEQgOiBhRnVuY3Rpb24oUyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NwZWNpZXMtY29uc3RydWN0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDE5NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///195\n")},function(module,exports,__webpack_require__){eval("var ctx = __webpack_require__(65);\nvar invoke = __webpack_require__(428);\nvar html = __webpack_require__(188);\nvar cel = __webpack_require__(131);\nvar global = __webpack_require__(22);\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (__webpack_require__(75)(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190YXNrLmpzPzJmOGQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGN0eCA9IHJlcXVpcmUoJy4vX2N0eCcpO1xudmFyIGludm9rZSA9IHJlcXVpcmUoJy4vX2ludm9rZScpO1xudmFyIGh0bWwgPSByZXF1aXJlKCcuL19odG1sJyk7XG52YXIgY2VsID0gcmVxdWlyZSgnLi9fZG9tLWNyZWF0ZScpO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIHByb2Nlc3MgPSBnbG9iYWwucHJvY2VzcztcbnZhciBzZXRUYXNrID0gZ2xvYmFsLnNldEltbWVkaWF0ZTtcbnZhciBjbGVhclRhc2sgPSBnbG9iYWwuY2xlYXJJbW1lZGlhdGU7XG52YXIgTWVzc2FnZUNoYW5uZWwgPSBnbG9iYWwuTWVzc2FnZUNoYW5uZWw7XG52YXIgRGlzcGF0Y2ggPSBnbG9iYWwuRGlzcGF0Y2g7XG52YXIgY291bnRlciA9IDA7XG52YXIgcXVldWUgPSB7fTtcbnZhciBPTlJFQURZU1RBVEVDSEFOR0UgPSAnb25yZWFkeXN0YXRlY2hhbmdlJ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BQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///196\n")},function(module,exports){eval("module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19wZXJmb3JtLmpzPzc0ZDAiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoZXhlYykge1xuICB0cnkge1xuICAgIHJldHVybiB7IGU6IGZhbHNlLCB2OiBleGVjKCkgfTtcbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiB7IGU6IHRydWUsIHY6IGUgfTtcbiAgfVxufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19wZXJmb3JtLmpzXG4vLyBtb2R1bGUgaWQgPSAxOTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///197\n")},function(module,exports,__webpack_require__){eval("var anObject = __webpack_require__(41);\nvar isObject = __webpack_require__(36);\nvar newPromiseCapability = __webpack_require__(138);\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19wcm9taXNlLXJlc29sdmUuanM/N2M5NSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIG5ld1Byb21pc2VDYXBhYmlsaXR5ID0gcmVxdWlyZSgnLi9fbmV3LXByb21pc2UtY2FwYWJpbGl0eScpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChDLCB4KSB7XG4gIGFuT2JqZWN0KEMpO1xuICBpZiAoaXNPYmplY3QoeCkgJiYgeC5jb25zdHJ1Y3RvciA9PT0gQykgcmV0dXJuIHg7XG4gIHZhciBwcm9taXNlQ2FwYWJpbGl0eSA9IG5ld1Byb21pc2VDYXBhYmlsaXR5LmYoQyk7XG4gIHZhciByZXNvbHZlID0gcHJvbWlzZUNhcGFiaWxpdHkucmVzb2x2ZTtcbiAgcmVzb2x2ZSh4KTtcbiAgcmV0dXJuIHByb21pc2VDYXBhYmlsaXR5LnByb21pc2U7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3Byb21pc2UtcmVzb2x2ZS5qc1xuLy8gbW9kdWxlIGlkID0gMTk4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///198\n")},function(module,exports,__webpack_require__){eval("var ITERATOR = __webpack_require__(23)('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLWRldGVjdC5qcz83NThkIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBJVEVSQVRPUiA9IHJlcXVpcmUoJy4vX3drcycpKCdpdGVyYXRvcicpO1xudmFy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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///199\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(437), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvZGVmaW5lLXByb3BlcnR5LmpzPzBiODMiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9kZWZpbmUtcHJvcGVydHlcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvb2JqZWN0L2RlZmluZS1wcm9wZXJ0eS5qc1xuLy8gbW9kdWxlIGlkID0gMjAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///200\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.log = undefined;\n\nvar _loglevel = __webpack_require__(7);\n\nvar _loglevel2 = _interopRequireDefault(_loglevel);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar a = _loglevel2.default.getLogger('address-allocation');\nvar b = _loglevel2.default.getLogger('Bus');\nvar c = _loglevel2.default.getLogger('MessageBus');\nvar d = _loglevel2.default.getLogger('CoreDiscovery');\nvar e = _loglevel2.default.getLogger('GraphConnector');\nvar f = _loglevel2.default.getLogger('HypertyResourcesStorage');\nvar g = _loglevel2.default.getLogger('IdentityModule');\nvar h = _loglevel2.default.getLogger('PEP');\nvar i = _loglevel2.default.getLogger('P2PConnectionResolve');\nvar j = _loglevel2.default.getLogger('Registry');\nvar k = _loglevel2.default.getLogger('RuntimeUA');\nvar l = _loglevel2.default.getLogger('Loader');\nvar m = _loglevel2.default.getLogger('Descriptors');\nvar n = _loglevel2.default.getLogger('DataObjectsStorage');\nvar o = _loglevel2.default.getLogger('Subscription');\nvar p = _loglevel2.default.getLogger('SubscriptionManager');\nvar q = _loglevel2.default.getLogger('ObserverObject');\nvar r = _loglevel2.default.getLogger('ReporterObject');\nvar s = _loglevel2.default.getLogger('SynSubscription');\nvar t = _loglevel2.default.getLogger('SyncherManager');\nvar u = _loglevel2.default.getLogger('IdentityManager');\nvar v = _loglevel2.default.getLogger('CryptoManager');\nvar x = _loglevel2.default.getLogger('Pipeline');\n\nexports.log = _loglevel2.default;\n\n/**\n 0 actual logging methods, ordered and available as:\n\n 0 - log.trace(msg)\n 1 - log.debug(msg)\n 2 - log.info(msg)\n 3 - log.warn(msg)\n 4 - log.error(msg)\n\n log.log(msg) is also available, as an alias for log.debug(msg), to improve compatibility with console, and make migration easier.\n\n Exact output formatting of these will depend on the console available in the current context of your application. For example, many environments will include a full stack trace with all trace() calls, and icons or similar to highlight other calls.\n\n These methods should never fail in any environment, even if no console object is currently available, and should always fall back to an available log method even if the specific method called (e.g. warn) isn't available.\n\n Be aware that all this means that these method won't necessarily always produce exactly the output you expect in every environment; loglevel only guarantees that these methods will never explode on you, and that it will call the most relevant method it can find, with your argument. Firefox is a notable example here: due to a current Firefox bug log.trace(msg) calls in Firefox will print only the stacktrace, and won't include any passed message arguments.\n\n*/\n\n// address-allocation\n\na.setLevel(3);\n\n// Bus\nb.setLevel(3);\n\n// MessageBus\nc.setLevel(0);\n\n// CoreDiscovery\nd.setLevel(5);\n\n// GraphConnector\ne.setLevel(5);\n\n// HypertyResourcesStorage\nf.setLevel(3);\n\n// IdentityModule\ng.setLevel(0);\n\n// PEP\nh.setLevel(3);\n\n// P2PConnectionResolve\ni.setLevel(3);\n\n// Registry\nj.setLevel(3);\n\n// RuntimeUA\nk.setLevel(3);\n\n// Loader\nl.setLevel(3);\n\n// Descriptors\nm.setLevel(3);\n\n// DataObjectsStorage\nn.setLevel(3);\n\n// Subscription\no.setLevel(3);\n\n// SubscriptionManager\np.setLevel(3);\n\n// ObserverObject\nq.setLevel(3);\n\n// ReporterObject\nr.setLevel(3);\n\n// SynSubscription\ns.setLevel(3);\n\n// SyncherManager\nt.setLevel(3);\n\n// IdentityManager\nu.setLevel(3);\n\n// CryptoManager\nv.setLevel(3);\n\n// Pipeline\nx.setLevel(3);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9sb2dMZXZlbHMuanM/ZjM5MSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgbG9nIGZyb20gJ2xvZ2xldmVsJztcblxuY29uc3QgYSA9IGxvZy5nZXRMb2dnZXIoJ2FkZHJlc3MtYWxsb2NhdGlvbicpO1xuY29uc3QgYiA9IGxvZy5nZXRMb2dnZXIoJ0J1cycpO1xuY29uc3QgYyA9IGxvZy5nZXRMb2dnZXIoJ01lc3NhZ2VCdXMnKTtcbmNvbnN0IGQgPSBsb2cuZ2V0TG9nZ2VyKCdDb3JlRGlzY292ZXJ5Jyk7XG5jb25zdCBlID0gbG9nLmdldExvZ2dlcignR3JhcGhDb25uZWN0b3InKTtcbmNvbnN0IGYgPSBsb2cuZ2V0TG9nZ2VyKCdIeXBlcnR5UmV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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///201\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = __webpack_require__(186);\nvar hiddenKeys = __webpack_require__(137).concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wbi5qcz85ZjQ0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi43IC8gMTUuMi4zLjQgT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMoTylcbnZhciAka2V5cyA9IHJlcXVpcmUoJy4vX29iamVjdC1rZXlzLWludGVybmFsJyk7XG52YXIgaGlkZGVuS2V5cyA9IHJlcXVpcmUoJy4vX2VudW0tYnVnLWtleXMnKS5jb25jYXQoJ2xlbmd0aCcsICdwcm90b3R5cGUnKTtcblxuZXhwb3J0cy5mID0gT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMgfHwgZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlOYW1lcyhPKSB7XG4gIHJldHVybiAka2V5cyhPLCBoaWRkZW5LZXlzKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWdvcG4uanNcbi8vIG1vZHVsZSBpZCA9IDIwMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///202\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(460), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvY3JlYXRlLmpzPzNhZjQiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9jcmVhdGVcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvb2JqZWN0L2NyZWF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///203\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('Bus');\n\n/**\n* @author micaelpedrosa@gmail.com\n* Minimal interface and implementation to send and receive messages. It can be reused in many type of components.\n* Components that need a message system should receive this class as a dependency or extend it.\n* Extensions should implement the following private methods: _onPostMessage and _registerExternalListener\n*/\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n// Log system\n\nvar Bus = function () {\n /* private\n _msgId: number;\n _subscriptions: \n _responseTimeOut: number\n _responseCallbacks: void>\n */\n\n function Bus() {\n (0, _classCallCheck3.default)(this, Bus);\n\n var _this = this;\n _this._msgId = 0;\n _this._subscriptions = {};\n\n _this._responseTimeOut = 15000; //default to 3s\n _this._responseCallbacks = {};\n\n _this._registerExternalListener();\n }\n\n /**\n * Register listener to receive message when \"msg.to === url\".\n * Special url \"*\" for default listener is accepted to intercept all messages.\n * @param {URL} url Address to intercept, tha is in the message \"to\"\n * @param {Listener} listener listener\n * @return {MsgListener} instance of MsgListener\n */\n\n\n (0, _createClass3.default)(Bus, [{\n key: 'addListener',\n value: function addListener(url, listener) {\n var _this = this;\n\n var item = new MsgListener(_this._subscriptions, url, listener);\n var itemList = _this._subscriptions[url];\n if (!itemList) {\n itemList = [];\n _this._subscriptions[url] = itemList;\n }\n\n itemList.push(item);\n return item;\n }\n\n /**\n * Manually add a response listener. Only one listener per message ID should exist.\n * ATENTION, there is no timeout for this listener.\n * The listener should be removed with a removeResponseListener, failing to do this will result in a unreleased memory problem.\n * @param {URL} url Origin address of the message sent, \"msg.from\".\n * @param {number} msgId Message ID that is returned from the postMessage.\n * @param {Function} responseListener Callback function for the response\n */\n\n }, {\n key: 'addResponseListener',\n value: function addResponseListener(url, msgId, responseListener) {\n this._responseCallbacks[url + msgId] = responseListener;\n }\n\n /**\n * Remove the response listener.\n * @param {URL} url Origin address of the message sent, \"msg.from\".\n * @param {number} msgId Message ID that is returned from the postMessage\n */\n\n }, {\n key: 'removeResponseListener',\n value: function removeResponseListener(url, msgId) {\n delete this._responseCallbacks[url + msgId];\n }\n\n /**\n * Remove all existent listeners for the URL\n * @param {URL} url Address registered\n */\n\n }, {\n key: 'removeAllListenersOf',\n value: function removeAllListenersOf(url) {\n delete this._subscriptions[url];\n }\n\n /**\n * Helper method to bind listeners (in both directions) into other MiniBus target.\n * @param {URL} outUrl Outbound URL, register listener for url in direction \"this -> target\"\n * @param {URL} inUrl Inbound URL, register listener for url in direction \"target -> this\"\n * @param {MiniBus} target The other target MiniBus\n * @return {Bound} an object that contains the properties [thisListener, targetListener] and the unbind method.\n */\n\n }, {\n key: 'bind',\n value: function bind(outUrl, inUrl, target) {\n var _this2 = this;\n\n var _this = this;\n\n var thisListn = _this.addListener(outUrl, function (msg) {\n target.postMessage(msg);\n });\n\n var targetListn = target.addListener(inUrl, function (msg) {\n _this.postMessage(msg);\n });\n\n return {\n thisListener: thisListn,\n targetListener: targetListn,\n unbind: function unbind() {\n _this2.thisListener.remove();\n _this2.targetListener.remove();\n }\n };\n }\n\n //publish on default listeners\n\n }, {\n key: '_publishOnDefault',\n value: function _publishOnDefault(msg) {\n //is there any \"*\" (default) listeners?\n var itemList = this._subscriptions['*'];\n if (itemList) {\n this._publishOn(itemList, msg);\n }\n }\n\n //publish on a subscription list.\n\n }, {\n key: '_publishOn',\n value: function _publishOn(itemList, msg) {\n itemList.forEach(function (sub) {\n sub._callback(msg);\n });\n }\n }, {\n key: '_responseCallback',\n value: function _responseCallback(inMsg, responseCallback) {\n var timeout = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n var _this = this;\n\n //automatic management of response handlers\n if (responseCallback) {\n var responseId = inMsg.from + inMsg.id;\n _this._responseCallbacks[responseId] = responseCallback;\n\n if (timeout) {\n setTimeout(function () {\n var responseFun = _this._responseCallbacks[responseId];\n delete _this._responseCallbacks[responseId];\n\n if (responseFun) {\n var errorMsg = {\n id: inMsg.id, type: 'response',\n body: { code: 408, desc: 'Response timeout!', value: inMsg }\n };\n\n responseFun(errorMsg);\n }\n }, _this._responseTimeOut);\n }\n }\n }\n\n //TODO: provisional responses should reset timeout\n\n }, {\n key: '_onResponse',\n value: function _onResponse(msg) {\n var _this = this;\n\n if (msg.type === 'response') {\n var responseId = msg.to + msg.id;\n var responseFun = _this._responseCallbacks[responseId];\n\n if (msg.body.code >= 200) {\n //if it's a provisional response, don't delete response listener\n delete _this._responseCallbacks[responseId];\n }\n\n if (responseFun) {\n responseFun(msg);\n return true;\n }\n }\n\n return false;\n }\n\n //receive messages from external interface\n\n }, {\n key: '_onMessage',\n value: function _onMessage(msg) {\n var _this = this;\n\n if (!_this._onResponse(msg)) {\n var itemList = _this._subscriptions[msg.to];\n if (itemList) {\n _this._publishOn(itemList, msg);\n } else {\n _this._publishOnDefault(msg);\n }\n }\n }\n }, {\n key: '_genId',\n value: function _genId(inMsg) {\n //TODO: how do we manage message ID's? Should it be a global runtime counter, or per URL address?\n //Global counter will not work, because there will be multiple MiniBus instances!\n //Per URL, can be a lot of data to maintain!\n //Maybe a counter per MiniBus instance. This is the assumed solution for now.\n if (!inMsg.id || inMsg.id === 0) {\n this._msgId++;\n inMsg.id = this._msgId;\n }\n }\n\n /**\n * Send messages to local listeners, or if not exists to external listeners.\n * It's has an optional mechanism for automatic management of response handlers.\n * The response handler will be unregistered after receiving the response, or after response timeout (default to 3s).\n * @param {Message} msg Message to send. Message ID is automatically added to the message.\n * @param {Function} responseCallback Optional parameter, if the developer what's automatic response management.\n * @return {number} Returns the message ID, in case it should be needed for manual management of the response handler.\n */\n\n }, {\n key: 'postMessage',\n value: function postMessage(inMsg, responseCallback) {}\n\n /**\n * Function to post messages with a number of retries in case timeouts occur.\n * @param {Message} msg Message to send. Message ID is automatically added to the message.\n * @param {Function} responseCallback Optional parameter, if the developer what's automatic response management.\n * @param {integer} retries number of retries when timeouts occur\n * @return {boolean} message delivery result;\n */\n\n }, {\n key: 'postMessageWithRetries',\n value: function postMessageWithRetries(msg, retries, callback) {\n\n var _this = this;\n\n var retry = 0;\n //let timeout = true;\n\n var sendMsg = function sendMsg() {\n\n return new _promise2.default(function (resolve, reject) {\n _this.postMessage(msg, function (reply) {\n if (reply.body.code === 408 || reply.body.code === 500) reject();else {\n log.info('[Bus.postMessageWithRetries] msg delivered: ', msg);\n callback(reply);\n resolve();\n }\n });\n });\n };\n\n var tryAgain = function tryAgain() {\n sendMsg().then(function () {\n //timeout = false;\n return;\n }, function () {\n log.warn('[Bus.postMessageWithRetries] Message Bounced (retry ' + retry + '): \\'', msg);\n if (retry++ < retries) {\n tryAgain();\n // setTimeout(() => { tryAgain(); }, 1000);\n } else {\n var error = '[Error] Message Bounced (delivery attempts ' + retries + '): \\'';\n throw new Error(error + msg);\n }\n });\n };\n tryAgain();\n }\n\n /**\n * Not public available, used by the class extension implementation, to process messages from the public \"postMessage\" without a registered listener.\n * Used to send the message to an external interface, like a WebWorker, IFrame, etc.\n * @param {Message.Message} msg Message\n */\n\n }, {\n key: '_onPostMessage',\n value: function _onPostMessage(msg) {} /*implementation will send message to external system*/\n\n /**\n * Not public available, used by the class extension implementation, to process all messages that enter the MiniBus from an external interface, like a WebWorker, IFrame, etc.\n * This method is called one time in the constructor to register external listeners.\n * The implementation will probably call the \"_onMessage\" method to publish in the local listeners.\n * DO NOT call \"postMessage\", there is a danger that the message enters in a cycle!\n */\n\n }, {\n key: '_registerExternalListener',\n value: function _registerExternalListener() {/*implementation will register external listener and call \"this._onMessage(msg)\" */}\n }]);\n return Bus;\n}();\n\nvar MsgListener = function () {\n /* private\n _subscriptions: ;\n _url: string;\n _callback: (msg) => void;\n */\n\n function MsgListener(subscriptions, url, callback) {\n (0, _classCallCheck3.default)(this, MsgListener);\n\n var _this = this;\n\n _this._subscriptions = subscriptions;\n _this._url = url;\n _this._callback = callback;\n }\n\n (0, _createClass3.default)(MsgListener, [{\n key: 'remove',\n\n\n /**\n * Remove this listener from the Bus\n */\n value: function remove() {\n var _this = this;\n\n var subs = _this._subscriptions[_this._url];\n if (subs) {\n var index = subs.indexOf(_this);\n subs.splice(index, 1);\n\n //if there are no listeners, remove the subscription entirely.\n if (subs.length === 0) {\n delete _this._subscriptions[_this._url];\n }\n }\n }\n }, {\n key: 'url',\n get: function get() {\n return this._url;\n }\n }]);\n return MsgListener;\n}();\n\nexports.default = Bus;\nmodule.exports = exports['default'];//# source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E7Ozs7Ozs7Ozs7QUFTQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7O0FBS0E7QUFDQTtBQUNBOzs7Ozs7Ozs7QUFNQTs7Ozs7QUFJQTtBQUNBOzs7Ozs7QUFNQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFHQTs7O0FBR0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBbEJBO0FBQUE7QUFBQTs7Ozs7QUFxQkE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///204\n")},function(module,exports,__webpack_require__){eval('// version: 0.8.0\n// date: Tue Jan 09 2018 17:01:37 GMT+0000 (WET)\n// licence: \n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the "License");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an "AS IS" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n\n!function(e,t){ true?module.exports=t():"function"==typeof define&&define.amd?define("Utils",[],t):"object"==typeof exports?exports.Utils=t():(e[""]=e[""]||{},e[""].Utils=t())}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=196)}({0:function(e,t){var n=e.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},1:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},10:function(e,t,n){var r=n(8),o=n(15);e.exports=n(3)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},12:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},121:function(e,t){!function(){"use strict";if(!Object.observe&&"function"==typeof Proxy){function e(e,t,n,r,o,i){var u,c=this;function s(e,r){if(s.delay=r,!s.pause&&c.changeset.length>0){if(!e){var o=c.changeset.filter(function(e){return!n||n.indexOf(e.type)>=0});o.length>0&&t(o)}c.changeset=[]}}return s.pause=o,s.delay=i,c.get=function(e,t){return"__observer__"===t?c:"unobserve"===t?function(){return Object.unobserve(e),e}:"deliver"===t?s:e[t]},c.target=e,c.changeset=[],c.target.__observerCallbacks__||(Object.defineProperty(e,"__observerCallbacks__",{enumerable:!1,configurable:!0,writable:!1,value:[]}),Object.defineProperty(e,"__observers__",{enumerable:!1,configurable:!0,writable:!1,value:[]})),c.target.__observerCallbacks__.push(t),c.target.__observers__.push(this),u=new Proxy(e,c),s(!1,i),u}e.prototype.deliver=function(){return this.get(null,"deliver")},e.prototype.set=function(e,t,n){var r=e[t],o=void 0===r?"add":"update";if(e[t]=n,e.__observers__.indexOf(this)>=0&&(!this.acceptlist||this.acceptlist.indexOf(o)>=0)){var i={object:e,name:t,type:o},u=0===this.changeset.length,c=this.deliver();"update"===o&&(i.oldValue=r),this.changeset.push(i),u&&c(!1,"number"==typeof c.delay?c.delay:10)}return!0},e.prototype.deleteProperty=function(e,t){var n=e[t];if(delete e[t],e.__observers__.indexOf(this)>=0&&!this.acceptlist||this.acceptlist.indexOf("delete")>=0){var r={object:e,name:t,type:"delete",oldValue:n},o=0===this.changeset.length,i=this.deliver();this.changeset.push(r),o&&i(!1,"number"==typeof i.delay?i.delay:10)}return!0},e.prototype.defineProperty=function(e,t,n){if(Object.defineProperty(e,t,n),e.__observers__.indexOf(this)>=0&&!this.acceptlist||this.acceptlist.indexOf("reconfigure")>=0){var r={object:e,name:t,type:"reconfigure"},o=0===this.changeset.length,i=this.deliver();this.changeset.push(r),o&&i(!1,"number"==typeof i.delay?i.delay:10)}return!0},e.prototype.setPrototypeOf=function(e,t){var n=Object.getPrototypeOf(e);if(Object.setPrototypeOf(e,t),e.__observers__.indexOf(this)>=0&&!this.acceptlist||this.acceptlist.indexOf("setPrototype")>=0){var r={object:e,name:"__proto__",type:"setPrototype",oldValue:n},o=0===this.changeset.length,i=this.deliver();this.changeset.push(r),o&&i(!1,"number"==typeof i.delay?i.delay:10)}return!0},e.prototype.preventExtensions=function(e){if(Object.preventExtensions(e),e.__observers__.indexOf(this)>=0&&!this.acceptlist||this.acceptlist.indexOf("preventExtensions")>=0){var t={object:e,type:"preventExtensions"},n=0===this.changeset.length,r=this.deliver();this.changeset.push(t),n&&r(!1,"number"==typeof r.delay?r.delay:10)}return!0},Object.observe=function(t,n,r,o,i,u){return new e(t,n,r,o,i,u)},Object.unobserve=function(e,t){if(e.__observerCallbacks__){if(!t)return e.__observerCallbacks__.splice(0,e.__observerCallbacks__.length),void e.__observers__.splice(0,e.__observers__.length);e.__observerCallbacks__.forEach(function(n,r){t===n&&(e.__observerCallbacks__.splice(r,1),delete e.__observers__[r].callback,e.__observers__.splice(r,1))})}},Array.observe=function(e,t,n,r,o,i){if(!(e instanceof Array||Array.isArray(e)))throw new TypeError("First argument to Array.observer is not an Array");n=n||["add","update","delete","splice"];var u=new Proxy(e,{get:function(t,r){return"unobserve"===r?function(e){return e?Object.unobserve(t,e):t.unobserve()}:"splice"===r?function(r,o){if("number"!=typeof r||"number"!=typeof o)throw new TypeError("First two arguments to Array splice are not number, number");var i=this.slice(r,r+o),u=arguments.length>1?arguments.length-2:0,s={object:e,type:"splice",index:r,removed:i,addedCount:u};if(t.splice.apply(t,arguments),n.indexOf("splice")>=0){r=0===c.__observer__.changeset.length;var a=c.__observer__.deliver();c.__observer__.changeset.push(s),r&&a(!1,"number"==typeof a.delay?a.delay:10)}}:"push"===r?function(e){return this.splice(this.length,0,e)}:"pop"===r?function(){return this.splice(this.length-1,1)}:"unshift"===r?function(e){return this.splice(0,0,e)}:"shift"===r?function(){return this.splice(0,1)}:t[r]}}),c=Object.observe(u,function(e){var r=e.filter(function(e){return"length"!==e.name&&"add"!==e.name&&(!n||n.indexOf(e.type)>=0)});r.length>0&&t(r)},n,r,o,i);return c},Array.unobserve=function(e,t){return e.unobserve(t)}}Object.deepObserve=function(e,t,n){var r=function(e){return{}.toString.call(e).match(/\\s([a-zA-Z]+)/)[1].toLowerCase()};function o(e,n){Object.keys(e).forEach(function(o){if(("object"===r(e[o])||"array"===r(e[o]))&&!e[o].hasOwnProperty("__observers__")){var i=n.slice(0);i.push(o),e[o]=Object.deepObserve(e[o],t,i)}})}return o(e,n=n||[]),Object.observe(e,function(e){var r=[];e.forEach(function(e){var t=(n.length>0?n.join(".")+".":"")+e.name;"update"!==e.type&&"add"!==e.type||o(e.object,n),r.push({name:e.name,object:e.object,type:e.type,oldValue:e.oldValue,newValue:e.object[e.name],keypath:t}),function e(t,n,o,i,u){i instanceof Object?Object.keys(i).forEach(function(c){if(!o||o[c]!==i[c]){var s=o&&void 0!==o[c]?o[c]:void 0,a=void 0===s?"add":"update",f=u+"."+c;r.push({name:t,object:n,type:a,oldValue:s,newValue:i[c],keypath:f}),e(t,n,s,i[c],f)}}):o instanceof Object&&Object.keys(o).forEach(function(c){var s=null===i?"update":"delete",a=u+"."+c;r.push({name:t,object:n,type:s,oldValue:o[c],newValue:i,keypath:a}),e(t,n,o[c],void 0,a)})}(e.name,e.object,e.oldValue,e.object[e.name],t)}),t(r)})}}()},14:function(e,t,n){var r=n(22);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},15:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},196:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatchingYou=void 0;var r,o=n(197),i=(r=o)&&r.__esModule?r:{default:r};t.WatchingYou=i.default},197:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(4)),o=i(n(7));function i(e){return e&&e.__esModule?e:{default:e}}n(121);var u=function(){function e(){(0,r.default)(this,e),this._watching={},this._observers=[]}return(0,o.default)(e,[{key:"watch",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this._watching[e]=r?Object.deepObserve(t,function(t){t.every(function(t){n._fireEvent(e,t)})}):Object.observe(t,function(t){t.every(function(t){n._fireEvent(e,t)})}),this._watching[e]}},{key:"observe",value:function(e,t){this._observers.push({key:e,callback:t})}},{key:"_fireEvent",value:function(e,t){this._observers.filter(function(t){return t.key===e}).forEach(function(e){e.callback(t)})}}]),e}();t.default=u,e.exports=t.default},22:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},24:function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can\'t convert object to primitive value")}},26:function(e,t,n){var r=n(6),o=n(1).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},3:function(e,t,n){e.exports=!n(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},38:function(e,t,n){e.exports=!n(3)&&!n(12)(function(){return 7!=Object.defineProperty(n(26)("div"),"a",{get:function(){return 7}}).a})},4:function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},5:function(e,t,n){var r=n(1),o=n(0),i=n(14),u=n(10),c="prototype",s=function(e,t,n){var a,f,l,p=e&s.F,d=e&s.G,v=e&s.S,b=e&s.P,h=e&s.B,_=e&s.W,y=d?o:o[t]||(o[t]={}),g=y[c],j=d?r:v?r[t]:(r[t]||{})[c];d&&(n=t);for(a in n)(f=!p&&j&&void 0!==j[a])&&a in y||(l=f?j[a]:n[a],y[a]=d&&"function"!=typeof j[a]?n[a]:h&&f?i(l,r):_&&j[a]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[c]=e[c],t}(l):b&&"function"==typeof l?i(Function.call,l):l,b&&((y.virtual||(y.virtual={}))[a]=l,e&s.R&&g&&!g[a]&&u(g,a,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},55:function(e,t,n){e.exports={default:n(60),__esModule:!0}},6:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},60:function(e,t,n){n(61);var r=n(0).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},61:function(e,t,n){var r=n(5);r(r.S+r.F*!n(3),"Object",{defineProperty:n(8).f})},7:function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(55),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n\n* @classdesc Class to combine the authorization decisions that result from rules evaluation.\n*/\nvar AllowOverrides = function () {\n function AllowOverrides() {\n (0, _classCallCheck3.default)(this, AllowOverrides);\n }\n\n (0, _createClass3.default)(AllowOverrides, [{\n key: 'combine',\n\n\n /**\n * Given an array of individual authorization decisions, prioritizes a positive one.\n * @param {boolean[]} decisions\n * @returns {boolean}\n */\n value: function combine(decisions) {\n if (decisions.indexOf(true) !== -1) {\n return true;\n } else {\n if (decisions.indexOf(false) !== -1) {\n return false;\n } else {\n return 'Not Applicable';\n }\n }\n }\n }]);\n return AllowOverrides;\n}();\n\nexports.default = AllowOverrides;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjA2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29tYmluaW5nQWxnb3JpdGhtcy9BbGxvd092ZXJyaWRlcy5qcz80YzQ3Il0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1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J9\n//# sourceURL=webpack-internal:///206\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n/**\n* @author Ana Caldeira \n* @classdesc Class to combine the authorization decisions that result from rules evaluation.\n*/\nvar BlockOverrides = function () {\n function BlockOverrides() {\n (0, _classCallCheck3.default)(this, BlockOverrides);\n }\n\n (0, _createClass3.default)(BlockOverrides, [{\n key: 'combine',\n\n\n /**\n * Given an array of individual authorisation decisions, prioritises a negative one.\n * @param {boolean[]} decisions\n * @returns {boolean}\n */\n value: function combine(decisions) {\n if (decisions.indexOf(false) !== -1) {\n return false;\n } else {\n if (decisions.indexOf(true) !== -1) {\n return true;\n } else {\n return 'Not Applicable';\n }\n }\n }\n }]);\n return BlockOverrides;\n}();\n\nexports.default = BlockOverrides;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjA3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29tYmluaW5nQWxnb3JpdGhtcy9CbG9ja092ZXJyaWRlcy5qcz82MWM3Il0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1JTQ0hVTkcgRS5WXG4qIENvcHlyaWdodCAyMDE2IE9SQU5HRSBTQVxuKiBDb3B5cmlnaHQgMjAxNiBEZXV0c2NoZSBUZWxla29tIEFHXG4qIENvcHlyaWdodCAyMDE2IEFwaXplZVxuKiBDb3B5cmlnaHQgMjAxNiBURUNITklTQ0hFIFVOSVZFUlNJVEFUIEJFUkxJTlxuKlxuKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgXCJMaWNlbnNlXCIpO1xuKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuXG4qIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdFxuKlxuKiAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMFxuKlxuKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRv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Uge1xuICAgICAgICByZXR1cm4gJ05vdCBBcHBsaWNhYmxlJztcbiAgICAgIH1cbiAgICB9XG4gIH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCBCbG9ja092ZXJyaWRlcztcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvcG9saWN5L2NvbWJpbmluZ0FsZ29yaXRobXMvQmxvY2tPdmVycmlkZXMuanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUF1QkE7Ozs7QUFJQTs7Ozs7Ozs7O0FBRUE7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///207\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n/**\n* @author Ana Caldeira \n* @classdesc Class to combine the authorization decisions that result from rules evaluation.\n*/\nvar FirstApplicable = function () {\n function FirstApplicable() {\n (0, _classCallCheck3.default)(this, FirstApplicable);\n }\n\n (0, _createClass3.default)(FirstApplicable, [{\n key: 'combine',\n\n\n /**\n * Given an array of individual authorisation decisions, returns the first one different from 'Not Applicable', either positive or negative.\n * @param {boolean[]} decisions\n * @returns {boolean}\n */\n value: function combine(decisions) {\n for (var i in decisions) {\n if (decisions[i] !== 'Not Applicable') {\n return decisions[i];\n }\n }\n return 'Not Applicable';\n }\n }]);\n return FirstApplicable;\n}();\n\nexports.default = FirstApplicable;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjA4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29tYmluaW5nQWxnb3JpdGhtcy9GaXJzdEFwcGxpY2FibGUuanM/MzNkZSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE2IFFVT0JJUyBORVRXT1JLUyBTTFxuKiBDb3B5cmlnaHQgMjAxNiBGUkFVTkhPRkVSLUdFU0VMTFNDSEFGVCBaVVIgRk9FUkRFUlVORyBERVIgQU5HRVdBTkRURU4gRk9SU0NIVU5HIEUuVlxuKiBDb3B5cmlnaHQgMjAxNiBPUkFOR0UgU0FcbiogQ29weXJpZ2h0IDIwMTYgRGV1dHNjaGUgVGVsZWtvbSBBR1x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1xuY2xhc3MgRmlyc3RBcHBsaWNhYmxlIHtcblxuICAvKipcbiAgKiBHaXZlbiBhbiBhcnJheSBvZiBpbmRpdmlkdWFsIGF1dGhvcmlzYXRpb24gZGVjaXNpb25zLCByZXR1cm5zIHRoZSBmaXJzdCBvbmUgZGlmZmVyZW50IGZyb20gJ05vdCBBcHBsaWNhYmxlJywgZWl0aGVyIHBvc2l0aXZlIG9yIG5lZ2F0aXZlLlxuICAqIEBwYXJhbSAgICB7Ym9vbGVhbltdfSAgICAgZGVjaXNpb25zXG4gICogQHJldHVybnMgIHtib29sZWFufVxuICAqL1xuICBjb21iaW5lKGRlY2lzaW9ucykge1xuICAgIGZvciAobGV0IGkgaW4gZGVjaXNpb25zKSB7XG4gICAgICBpZiAoZGVjaXNpb25zW2ldICE9PSAnTm90IEFwcGxpY2FibGUnKSB7XG4gICAgICAgIHJldHVybiBkZWNpc2lvbnNbaV07XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiAnTm90IEFwcGxpY2FibGUnO1xuICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgRmlyc3RBcHBsaWNhYmxlO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9wb2xpY3kvY29tYmluaW5nQWxnb3JpdGhtcy9GaXJzdEFwcGxpY2FibGUuanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUF1QkE7Ozs7QUFJQTs7Ozs7Ozs7O0FBRUE7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///208\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(500), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjA5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9hcnJheS9mcm9tLmpzPzczZjQiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL2FycmF5L2Zyb21cIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvYXJyYXkvZnJvbS5qc1xuLy8gbW9kdWxlIGlkID0gMjA5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///209\n')},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(507), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjEwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvdmFsdWVzLmpzPzgxMTEiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC92YWx1ZXNcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvb2JqZWN0L3ZhbHVlcy5qc1xuLy8gbW9kdWxlIGlkID0gMjEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///210\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('SynSubscription'); // Log System\n\nvar Subscription = function () {\n function Subscription(bus, owner, url, childrens, isReporter) {\n (0, _classCallCheck3.default)(this, Subscription);\n\n var _this = this;\n var childBaseURL = url + '/children/';\n var changeURL = url + '/changes';\n\n //process delete message\n _this._deleteListener = bus.addListener(changeURL, function (msg) {\n if (msg.type === 'delete') {\n log.log('Subscription-DELETE: ', msg);\n\n //FLOW-OUT: message sent to all subscribers\n var deleteMessageToHyperty = {\n type: 'delete', from: msg.from, to: owner,\n body: { identity: msg.body.identity, resource: url }\n };\n\n //send delete to hyperty\n bus.postMessage(deleteMessageToHyperty, function (reply) {\n log.log('Subscription-DELETE-REPLY: ', reply);\n if (reply.body.code === 200) {\n _this._releaseListeners();\n }\n });\n }\n });\n\n //add change publish address or forward\n if (isReporter) {\n _this._changeListener = bus.addPublish(changeURL);\n } else {\n _this._changeListener = bus.addForward(changeURL, owner);\n }\n\n _this._childrenListeners = [];\n log.log('[Subscription] - childID', childrens);\n childrens.forEach(function (child) {\n var childId = childBaseURL + child;\n\n log.log('[Subscription] - childID', childBaseURL, childId, child);\n\n //add children publish address\n var childrenForward = bus.addPublish(childId);\n _this._childrenListeners.push(childrenForward);\n\n //add self forward if an observer\n if (!isReporter) {\n var selfForward = bus.addForward(childId, owner);\n _this._childrenListeners.push(selfForward);\n }\n });\n }\n\n (0, _createClass3.default)(Subscription, [{\n key: '_releaseListeners',\n value: function _releaseListeners() {\n var _this = this;\n\n _this._deleteListener.remove();\n\n _this._changeListener.remove();\n\n _this._childrenListeners.forEach(function (forward) {\n forward.remove();\n });\n }\n }]);\n return Subscription;\n}();\n\nexports.default = Subscription;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjExLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zeW5jaGVyL1N1YnNjcmlwdGlvbi5qcz8yZTg1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIExvZyBTeXN0ZW1cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignU3luU3Vic2NyaXB0aW9uJyk7XG5cbmNsYXNzIFN1YnNjcmlwdGlvbiB7XG5cbiAgY29uc3RydWN0b3IoYnVzLCBvd25lciwgdXJsLCBjaGlsZHJlbnMsIGlzUmVwb3J0ZXIpIHtcbiAgICBsZXQgX3RoaXMgPSB0aGlzO1xuICAgIGxldCBjaGlsZEJhc2VVUkwgPSB1cmwgKyAnL2NoaWxkcmVuLyc7XG4gICAgbGV0IGNoYW5nZVVSTCA9IHVybCArICcvY2hhbmdlcyc7XG5cbiAgICAvL3Byb2Nlc3MgZGVsZXRlIG1lc3NhZ2VcbiAgICBfdGhpcy5fZGVsZXRlTGlzdGVuZXIgPSBidXMuYWRkTGlz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gIH0pO1xuICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgU3Vic2NyaXB0aW9uO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9zeW5jaGVyL1N1YnNjcmlwdGlvbi5qcyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFDQTtBQUNBO0FBREE7QUFDQTs7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFFQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBQ0E7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///211\n")},function(e,n,t){t(213),e.exports=t(415)},function(module,exports,__webpack_require__){"use strict";eval('/* WEBPACK VAR INJECTION */(function(global) {\n\n__webpack_require__(214);\n\n__webpack_require__(411);\n\n__webpack_require__(412);\n\nif (global._babelPolyfill) {\n throw new Error("only one instance of babel-polyfill is allowed");\n}\nglobal._babelPolyfill = true;\n\nvar DEFINE_PROPERTY = "defineProperty";\nfunction define(O, key, value) {\n O[key] || Object[DEFINE_PROPERTY](O, key, {\n writable: true,\n configurable: true,\n value: value\n });\n}\n\ndefine(String.prototype, "padLeft", "".padStart);\ndefine(String.prototype, "padRight", "".padEnd);\n\n"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) {\n [][key] && define(Array, key, Function.call.bind([][key]));\n});\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(147)))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjEzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXBvbHlmaWxsL2xpYi9pbmRleC5qcz84ZjU4Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5yZXF1aXJlKFwiY29yZS1qcy9zaGltXCIpO1xuXG5yZXF1aXJlKFwicmVnZW5lcmF0b3ItcnVudGltZS9ydW50aW1lXCIpO1xuXG5yZXF1aXJlKFwiY29yZS1qcy9mbi9yZWdleHAvZXNjYXBlXCIpO1xuXG5pZiAoZ2xvYmFsLl9iYWJlbFBvbHlmaWxsKSB7XG4gIHRocm93IG5ldyBFcnJvcihcIm9ubHkgb25lIGluc3RhbmNlIG9mIGJhYmVsLXBvbHlmaWxsIGlzIGFsbG93ZWRcIik7XG59XG5nbG9iYWwuX2JhYmVsUG9seWZpbGwgPSB0cnVlO1xuXG52YXIgREVGSU5FX1BST1BFUlRZID0gXCJkZWZpbmVQcm9wZXJ0eVwiO1xuZnVuY3Rpb24gZGVmaW5lKE8sIGtleSwgdmFsdWUpIHtcbiAgT1trZXldIHx8IE9iamVjdFtERUZJTkVfUFJPUEVSVFldKE8sIGtleSwge1xuICAgIHdyaXRhYmxlOiB0cnVlLFxuICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICB2YWx1ZTogdmFsdWVcbiAgfSk7XG59XG5cbmRlZmluZShTdHJpbmcucHJvdG90eXBlLCBcInBhZExlZnRcIiwgXCJcIi5wYWRTdGFydCk7XG5kZWZpbmUoU3RyaW5nLnByb3RvdHlwZSwgXCJwYWRSaWdodFwiLCBcIlwiLnBhZEVuZCk7XG5cblwicG9wLHJldmVyc2Usc2hpZnQsa2V5cyx2YWx1ZXMsZW50cmllcyxpbmRleE9mLGV2ZXJ5LHNvbWUsZm9yRWFjaCxtYXAsZmlsdGVyLGZpbmQsZmluZEluZGV4LGluY2x1ZGVzLGpvaW4sc2xpY2UsY29uY2F0LHB1c2gsc3BsaWNlLHVuc2hpZnQsc29ydCxsYXN0SW5kZXhPZixyZWR1Y2UscmVkdWNlUmlnaHQsY29weVdpdGhpbixmaWxsXCIuc3BsaXQoXCIsXCIpLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xuICBbXVtrZXldICYmIGRlZmluZShBcnJheSwga2V5LCBGdW5jdGlvbi5jYWxsLmJpbmQoW11ba2V5XSkpO1xufSk7XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcG9seWZpbGwvbGliL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSAyMTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///213\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(215);\n__webpack_require__(217);\n__webpack_require__(218);\n__webpack_require__(219);\n__webpack_require__(220);\n__webpack_require__(221);\n__webpack_require__(222);\n__webpack_require__(223);\n__webpack_require__(224);\n__webpack_require__(225);\n__webpack_require__(226);\n__webpack_require__(227);\n__webpack_require__(228);\n__webpack_require__(229);\n__webpack_require__(230);\n__webpack_require__(231);\n__webpack_require__(233);\n__webpack_require__(234);\n__webpack_require__(235);\n__webpack_require__(236);\n__webpack_require__(237);\n__webpack_require__(238);\n__webpack_require__(239);\n__webpack_require__(240);\n__webpack_require__(241);\n__webpack_require__(242);\n__webpack_require__(243);\n__webpack_require__(244);\n__webpack_require__(245);\n__webpack_require__(246);\n__webpack_require__(247);\n__webpack_require__(248);\n__webpack_require__(249);\n__webpack_require__(250);\n__webpack_require__(251);\n__webpack_require__(252);\n__webpack_require__(253);\n__webpack_require__(254);\n__webpack_require__(255);\n__webpack_require__(256);\n__webpack_require__(257);\n__webpack_require__(258);\n__webpack_require__(259);\n__webpack_require__(260);\n__webpack_require__(261);\n__webpack_require__(262);\n__webpack_require__(263);\n__webpack_require__(264);\n__webpack_require__(265);\n__webpack_require__(266);\n__webpack_require__(267);\n__webpack_require__(268);\n__webpack_require__(269);\n__webpack_require__(270);\n__webpack_require__(271);\n__webpack_require__(272);\n__webpack_require__(273);\n__webpack_require__(274);\n__webpack_require__(275);\n__webpack_require__(276);\n__webpack_require__(277);\n__webpack_require__(278);\n__webpack_require__(279);\n__webpack_require__(280);\n__webpack_require__(281);\n__webpack_require__(282);\n__webpack_require__(283);\n__webpack_require__(284);\n__webpack_require__(285);\n__webpack_require__(286);\n__webpack_require__(287);\n__webpack_require__(288);\n__webpack_require__(289);\n__webpack_require__(290);\n__webpack_require__(291);\n__webpack_require__(292);\n__webpack_require__(293);\n__webpack_require__(295);\n__webpack_require__(296);\n__webpack_require__(298);\n__webpack_require__(299);\n__webpack_require__(300);\n__webpack_require__(301);\n__webpack_require__(302);\n__webpack_require__(303);\n__webpack_require__(304);\n__webpack_require__(306);\n__webpack_require__(307);\n__webpack_require__(308);\n__webpack_require__(309);\n__webpack_require__(310);\n__webpack_require__(311);\n__webpack_require__(312);\n__webpack_require__(313);\n__webpack_require__(314);\n__webpack_require__(315);\n__webpack_require__(316);\n__webpack_require__(317);\n__webpack_require__(318);\n__webpack_require__(122);\n__webpack_require__(319);\n__webpack_require__(320);\n__webpack_require__(166);\n__webpack_require__(321);\n__webpack_require__(322);\n__webpack_require__(323);\n__webpack_require__(324);\n__webpack_require__(325);\n__webpack_require__(169);\n__webpack_require__(171);\n__webpack_require__(172);\n__webpack_require__(326);\n__webpack_require__(327);\n__webpack_require__(328);\n__webpack_require__(329);\n__webpack_require__(330);\n__webpack_require__(331);\n__webpack_require__(332);\n__webpack_require__(333);\n__webpack_require__(334);\n__webpack_require__(335);\n__webpack_require__(336);\n__webpack_require__(337);\n__webpack_require__(338);\n__webpack_require__(339);\n__webpack_require__(340);\n__webpack_require__(341);\n__webpack_require__(342);\n__webpack_require__(343);\n__webpack_require__(344);\n__webpack_require__(345);\n__webpack_require__(346);\n__webpack_require__(347);\n__webpack_require__(348);\n__webpack_require__(349);\n__webpack_require__(350);\n__webpack_require__(351);\n__webpack_require__(352);\n__webpack_require__(353);\n__webpack_require__(354);\n__webpack_require__(355);\n__webpack_require__(356);\n__webpack_require__(357);\n__webpack_require__(358);\n__webpack_require__(359);\n__webpack_require__(360);\n__webpack_require__(361);\n__webpack_require__(362);\n__webpack_require__(363);\n__webpack_require__(364);\n__webpack_require__(365);\n__webpack_require__(366);\n__webpack_require__(367);\n__webpack_require__(368);\n__webpack_require__(369);\n__webpack_require__(370);\n__webpack_require__(371);\n__webpack_require__(372);\n__webpack_require__(373);\n__webpack_require__(374);\n__webpack_require__(375);\n__webpack_require__(376);\n__webpack_require__(377);\n__webpack_require__(378);\n__webpack_require__(379);\n__webpack_require__(380);\n__webpack_require__(381);\n__webpack_require__(382);\n__webpack_require__(383);\n__webpack_require__(384);\n__webpack_require__(385);\n__webpack_require__(386);\n__webpack_require__(387);\n__webpack_require__(388);\n__webpack_require__(389);\n__webpack_require__(390);\n__webpack_require__(391);\n__webpack_require__(392);\n__webpack_require__(393);\n__webpack_require__(394);\n__webpack_require__(395);\n__webpack_require__(396);\n__webpack_require__(397);\n__webpack_require__(398);\n__webpack_require__(399);\n__webpack_require__(400);\n__webpack_require__(401);\n__webpack_require__(402);\n__webpack_require__(403);\n__webpack_require__(404);\n__webpack_require__(405);\n__webpack_require__(406);\n__webpack_require__(407);\n__webpack_require__(408);\n__webpack_require__(409);\n__webpack_require__(410);\nmodule.exports = __webpack_require__(30);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvc2hpbS5qcz9lMGNkIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vbW9kdWxlcy9lczYuc3ltYm9sJyk7XG5yZXF1aXJlKCcuL21vZHVsZXMvZXM2Lm9iamVjdC5jcmVhdGUnKTtcbnJlcXVpcmUoJy4vbW9kdWxlcy9lczYub2JqZWN0LmRlZmluZS1wcm9wZXJ0eScpO1xucmVxdWlyZSgnLi9tb2R1bGVzL2VzNi5vYmplY3QuZGVmaW5lLXByb3BlcnRpZXMnKTtcbnJlcXVpcmUoJy4vbW9kdWxlcy9lczYub2JqZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvcicpO1xucmVxdWlyZSgnLi9tb2R1bGVzL2VzNi5vYmplY3QuZ2V0LXByb3RvdHlwZS1vZicpO1xucmVxdWlyZSgnLi9tb2R1bGVzL2VzNi5vYmplY3Qua2V5cycpO1xucmVxdWlyZSgnLi9tb2R1bGVzL2VzNi5vYmplY3QuZ2V0LW93bi1wcm9wZXJ0eS1uYW1lcycpO1xucmVxdWlyZSgnLi9tb2R1bGVzL2VzNi5vYmplY3QuZnJlZXplJyk7XG5yZXF1aXJlKCcuL21vZHVsZXMvZXM2Lm9iamVjdC5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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///214\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// ECMAScript 6 symbols shim\nvar global = __webpack_require__(4);\nvar has = __webpack_require__(17);\nvar DESCRIPTORS = __webpack_require__(10);\nvar $export = __webpack_require__(0);\nvar redefine = __webpack_require__(19);\nvar META = __webpack_require__(42).KEY;\nvar $fails = __webpack_require__(5);\nvar shared = __webpack_require__(78);\nvar setToStringTag = __webpack_require__(61);\nvar uid = __webpack_require__(48);\nvar wks = __webpack_require__(8);\nvar wksExt = __webpack_require__(149);\nvar wksDefine = __webpack_require__(102);\nvar enumKeys = __webpack_require__(216);\nvar isArray = __webpack_require__(81);\nvar anObject = __webpack_require__(3);\nvar isObject = __webpack_require__(6);\nvar toIObject = __webpack_require__(24);\nvar toPrimitive = __webpack_require__(31);\nvar createDesc = __webpack_require__(47);\nvar _create = __webpack_require__(52);\nvar gOPNExt = __webpack_require__(152);\nvar $GOPD = __webpack_require__(25);\nvar $DP = __webpack_require__(11);\nvar $keys = __webpack_require__(50);\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(53).f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(71).f = $propertyIsEnumerable;\n __webpack_require__(80).f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !__webpack_require__(49)) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(18)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxl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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///215\n")},function(module,exports,__webpack_require__){eval("// all enumerable object keys, includes symbols\nvar getKeys = __webpack_require__(50);\nvar gOPS = __webpack_require__(80);\nvar pIE = __webpack_require__(71);\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZW51bS1rZXlzLmpzPzBiZTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gYWxsIGVudW1lcmFibGUgb2JqZWN0IGtleXMsIGluY2x1ZGVzIHN5bWJvbHNcbnZhciBnZXRLZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMnKTtcbnZhciBnT1BTID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcHMnKTtcbnZhciBwSUUgPSByZXF1aXJlKCcuL19vYmplY3QtcGllJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICB2YXIgcmVzdWx0ID0gZ2V0S2V5cyhpdCk7XG4gIHZhciBnZXRTeW1ib2xzID0gZ09QUy5mO1xuICBpZiAoZ2V0U3ltYm9scykge1xuICAgIHZhciBzeW1ib2xzID0gZ2V0U3ltYm9scyhpdCk7XG4gICAgdmFyIGlzRW51bSA9IHBJRS5mO1xuICAgIHZhciBpID0gMDtcbiAgICB2YXIga2V5O1xuICAgIHdoaWxlIChzeW1ib2xzLmxlbmd0aCA+IGkpIGlmIChpc0VudW0uY2FsbChpdCwga2V5ID0gc3ltYm9sc1tpKytdKSkgcmVzdWx0LnB1c2goa2V5KTtcbiAgfSByZXR1cm4gcmVzdWx0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZW51bS1rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSAyMTZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///216\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: __webpack_require__(52) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmNyZWF0ZS5qcz84YmFmIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG4vLyAxOS4xLjIuMiAvIDE1LjIuMy41IE9iamVjdC5jcmVhdGUoTyBbLCBQcm9wZXJ0aWVzXSlcbiRleHBvcnQoJGV4cG9ydC5TLCAnT2JqZWN0JywgeyBjcmVhdGU6IHJlcXVpcmUoJy4vX29iamVjdC1jcmVhdGUnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmNyZWF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjE3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///217\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !__webpack_require__(10), 'Object', { defineProperty: __webpack_require__(11).f });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmRlZmluZS1wcm9wZXJ0eS5qcz80MzMyIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG4vLyAxOS4xLjIuNCAvIDE1LjIuMy42IE9iamVjdC5kZWZpbmVQcm9wZXJ0eShPLCBQLCBBdHRyaWJ1dGVzKVxuJGV4cG9ydCgkZXhwb3J0LlMgKyAkZXhwb3J0LkYgKiAhcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKSwgJ09iamVjdCcsIHsgZGVmaW5lUHJvcGVydHk6IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmYgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC5kZWZpbmUtcHJvcGVydHkuanNcbi8vIG1vZHVsZSBpZCA9IDIxOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///218\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\n// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)\n$export($export.S + $export.F * !__webpack_require__(10), 'Object', { defineProperties: __webpack_require__(151) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmRlZmluZS1wcm9wZXJ0aWVzLmpzPzFlMTkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbi8vIDE5LjEuMi4zIC8gMTUuMi4zLjcgT2JqZWN0LmRlZmluZVByb3BlcnRpZXMoTywgUHJvcGVydGllcylcbiRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJyksICdPYmplY3QnLCB7IGRlZmluZVByb3BlcnRpZXM6IHJlcXVpcmUoJy4vX29iamVjdC1kcHMnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmRlZmluZS1wcm9wZXJ0aWVzLmpzXG4vLyBtb2R1bGUgaWQgPSAyMTlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///219\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\nvar toIObject = __webpack_require__(24);\nvar $getOwnPropertyDescriptor = __webpack_require__(25).f;\n\n__webpack_require__(34)('getOwnPropertyDescriptor', function () {\n return function getOwnPropertyDescriptor(it, key) {\n return $getOwnPropertyDescriptor(toIObject(it), key);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvci5qcz8wYmVlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi42IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoTywgUClcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgJGdldE93blByb3BlcnR5RGVzY3JpcHRvciA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BkJykuZjtcblxucmVxdWlyZSgnLi9fb2JqZWN0LXNhcCcpKCdnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3InLCBmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBmdW5jdGlvbiBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoaXQsIGtleSkge1xuICAgIHJldHVybiAkZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKHRvSU9iamVjdChpdCksIGtleSk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvci5qc1xuLy8gbW9kdWxlIGlkID0gMjIwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///220\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = __webpack_require__(15);\nvar $getPrototypeOf = __webpack_require__(26);\n\n__webpack_require__(34)('getPrototypeOf', function () {\n return function getPrototypeOf(it) {\n return $getPrototypeOf(toObject(it));\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmdldC1wcm90b3R5cGUtb2YuanM/NWI4NiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuOSBPYmplY3QuZ2V0UHJvdG90eXBlT2YoTylcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyICRnZXRQcm90b3R5cGVPZiA9IHJlcXVpcmUoJy4vX29iamVjdC1ncG8nKTtcblxucmVxdWlyZSgnLi9fb2JqZWN0LXNhcCcpKCdnZXRQcm90b3R5cGVPZicsIGZ1bmN0aW9uICgpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGdldFByb3RvdHlwZU9mKGl0KSB7XG4gICAgcmV0dXJuICRnZXRQcm90b3R5cGVPZih0b09iamVjdChpdCkpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC5nZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSAyMjFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///221\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.14 Object.keys(O)\nvar toObject = __webpack_require__(15);\nvar $keys = __webpack_require__(50);\n\n__webpack_require__(34)('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmtleXMuanM/YjQ5YyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuMTQgT2JqZWN0LmtleXMoTylcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyICRrZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMnKTtcblxucmVxdWlyZSgnLi9fb2JqZWN0LXNhcCcpKCdrZXlzJywgZnVuY3Rpb24gKCkge1xuICByZXR1cm4gZnVuY3Rpb24ga2V5cyhpdCkge1xuICAgIHJldHVybiAka2V5cyh0b09iamVjdChpdCkpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC5rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSAyMjJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///222\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.7 Object.getOwnPropertyNames(O)\n__webpack_require__(34)('getOwnPropertyNames', function () {\n return __webpack_require__(152).f;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmdldC1vd24tcHJvcGVydHktbmFtZXMuanM/NzgyZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuNyBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyhPKVxucmVxdWlyZSgnLi9fb2JqZWN0LXNhcCcpKCdnZXRPd25Qcm9wZXJ0eU5hbWVzJywgZnVuY3Rpb24gKCkge1xuICByZXR1cm4gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcG4tZXh0JykuZjtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5vYmplY3QuZ2V0LW93bi1wcm9wZXJ0eS1uYW1lcy5qc1xuLy8gbW9kdWxlIGlkID0gMjIzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///223\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.5 Object.freeze(O)\nvar isObject = __webpack_require__(6);\nvar meta = __webpack_require__(42).onFreeze;\n\n__webpack_require__(34)('freeze', function ($freeze) {\n return function freeze(it) {\n return $freeze && isObject(it) ? $freeze(meta(it)) : it;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmZyZWV6ZS5qcz81NTM5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi41IE9iamVjdC5mcmVlemUoTylcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIG1ldGEgPSByZXF1aXJlKCcuL19tZXRhJykub25GcmVlemU7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgnZnJlZXplJywgZnVuY3Rpb24gKCRmcmVlemUpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGZyZWV6ZShpdCkge1xuICAgIHJldHVybiAkZnJlZXplICYmIGlzT2JqZWN0KGl0KSA/ICRmcmVlemUobWV0YShpdCkpIDogaXQ7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmZyZWV6ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjI0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///224\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.17 Object.seal(O)\nvar isObject = __webpack_require__(6);\nvar meta = __webpack_require__(42).onFreeze;\n\n__webpack_require__(34)('seal', function ($seal) {\n return function seal(it) {\n return $seal && isObject(it) ? $seal(meta(it)) : it;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LnNlYWwuanM/NWJmMiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuMTcgT2JqZWN0LnNlYWwoTylcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIG1ldGEgPSByZXF1aXJlKCcuL19tZXRhJykub25GcmVlemU7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgnc2VhbCcsIGZ1bmN0aW9uICgkc2VhbCkge1xuICByZXR1cm4gZnVuY3Rpb24gc2VhbChpdCkge1xuICAgIHJldHVybiAkc2VhbCAmJiBpc09iamVjdChpdCkgPyAkc2VhbChtZXRhKGl0KSkgOiBpdDtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5vYmplY3Quc2VhbC5qc1xuLy8gbW9kdWxlIGlkID0gMjI1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///225\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.15 Object.preventExtensions(O)\nvar isObject = __webpack_require__(6);\nvar meta = __webpack_require__(42).onFreeze;\n\n__webpack_require__(34)('preventExtensions', function ($preventExtensions) {\n return function preventExtensions(it) {\n return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LnByZXZlbnQtZXh0ZW5zaW9ucy5qcz82Mzk3Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi4xNSBPYmplY3QucHJldmVudEV4dGVuc2lvbnMoTylcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIG1ldGEgPSByZXF1aXJlKCcuL19tZXRhJykub25GcmVlemU7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgncHJldmVudEV4dGVuc2lvbnMnLCBmdW5jdGlvbiAoJHByZXZlbnRFeHRlbnNpb25zKSB7XG4gIHJldHVybiBmdW5jdGlvbiBwcmV2ZW50RXh0ZW5zaW9ucyhpdCkge1xuICAgIHJldHVybiAkcHJldmVudEV4dGVuc2lvbnMgJiYgaXNPYmplY3QoaXQpID8gJHByZXZlbnRFeHRlbnNpb25zKG1ldGEoaXQpKSA6IGl0O1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC5wcmV2ZW50LWV4dGVuc2lvbnMuanNcbi8vIG1vZHVsZSBpZCA9IDIyNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///226\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.12 Object.isFrozen(O)\nvar isObject = __webpack_require__(6);\n\n__webpack_require__(34)('isFrozen', function ($isFrozen) {\n return function isFrozen(it) {\n return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLWZyb3plbi5qcz81YTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi4xMiBPYmplY3QuaXNGcm96ZW4oTylcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xuXG5yZXF1aXJlKCcuL19vYmplY3Qtc2FwJykoJ2lzRnJvemVuJywgZnVuY3Rpb24gKCRpc0Zyb3plbikge1xuICByZXR1cm4gZnVuY3Rpb24gaXNGcm96ZW4oaXQpIHtcbiAgICByZXR1cm4gaXNPYmplY3QoaXQpID8gJGlzRnJvemVuID8gJGlzRnJvemVuKGl0KSA6IGZhbHNlIDogdHJ1ZTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5vYmplY3QuaXMtZnJvemVuLmpzXG4vLyBtb2R1bGUgaWQgPSAyMjdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///227\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.13 Object.isSealed(O)\nvar isObject = __webpack_require__(6);\n\n__webpack_require__(34)('isSealed', function ($isSealed) {\n return function isSealed(it) {\n return isObject(it) ? $isSealed ? $isSealed(it) : false : true;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLXNlYWxlZC5qcz9mYjI4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi4xMyBPYmplY3QuaXNTZWFsZWQoTylcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xuXG5yZXF1aXJlKCcuL19vYmplY3Qtc2FwJykoJ2lzU2VhbGVkJywgZnVuY3Rpb24gKCRpc1NlYWxlZCkge1xuICByZXR1cm4gZnVuY3Rpb24gaXNTZWFsZWQoaXQpIHtcbiAgICByZXR1cm4gaXNPYmplY3QoaXQpID8gJGlzU2VhbGVkID8gJGlzU2VhbGVkKGl0KSA6IGZhbHNlIDogdHJ1ZTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5vYmplY3QuaXMtc2VhbGVkLmpzXG4vLyBtb2R1bGUgaWQgPSAyMjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///228\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.11 Object.isExtensible(O)\nvar isObject = __webpack_require__(6);\n\n__webpack_require__(34)('isExtensible', function ($isExtensible) {\n return function isExtensible(it) {\n return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLWV4dGVuc2libGUuanM/ODBmYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuMTEgT2JqZWN0LmlzRXh0ZW5zaWJsZShPKVxudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgnaXNFeHRlbnNpYmxlJywgZnVuY3Rpb24gKCRpc0V4dGVuc2libGUpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGlzRXh0ZW5zaWJsZShpdCkge1xuICAgIHJldHVybiBpc09iamVjdChpdCkgPyAkaXNFeHRlbnNpYmxlID8gJGlzRXh0ZW5zaWJsZShpdCkgOiB0cnVlIDogZmFsc2U7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLWV4dGVuc2libGUuanNcbi8vIG1vZHVsZSBpZCA9IDIyOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///229\n")},function(module,exports,__webpack_require__){eval("// 19.1.3.1 Object.assign(target, source)\nvar $export = __webpack_require__(0);\n\n$export($export.S + $export.F, 'Object', { assign: __webpack_require__(153) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmFzc2lnbi5qcz85ZjVkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMy4xIE9iamVjdC5hc3NpZ24odGFyZ2V0LCBzb3VyY2UpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiwgJ09iamVjdCcsIHsgYXNzaWduOiByZXF1aXJlKCcuL19vYmplY3QtYXNzaWduJykgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC5hc3NpZ24uanNcbi8vIG1vZHVsZSBpZCA9IDIzMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///230\n")},function(module,exports,__webpack_require__){eval("// 19.1.3.10 Object.is(value1, value2)\nvar $export = __webpack_require__(0);\n$export($export.S, 'Object', { is: __webpack_require__(232) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLmpzPzlkMWIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4zLjEwIE9iamVjdC5pcyh2YWx1ZTEsIHZhbHVlMilcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG4kZXhwb3J0KCRleHBvcnQuUywgJ09iamVjdCcsIHsgaXM6IHJlcXVpcmUoJy4vX3NhbWUtdmFsdWUnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLmpzXG4vLyBtb2R1bGUgaWQgPSAyMzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///231\n")},function(module,exports){eval("// 7.2.9 SameValue(x, y)\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc2FtZS12YWx1ZS5qcz9lMDg2Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMi45IFNhbWVWYWx1ZSh4LCB5KVxubW9kdWxlLmV4cG9ydHMgPSBPYmplY3QuaXMgfHwgZnVuY3Rpb24gaXMoeCwgeSkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tc2VsZi1jb21wYXJlXG4gIHJldHVybiB4ID09PSB5ID8geCAhPT0gMCB8fCAxIC8geCA9PT0gMSAvIHkgOiB4ICE9IHggJiYgeSAhPSB5O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc2FtZS12YWx1ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjMyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///232\n")},function(module,exports,__webpack_require__){eval("// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = __webpack_require__(0);\n$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(106).set });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LnNldC1wcm90b3R5cGUtb2YuanM/OGViMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjMuMTkgT2JqZWN0LnNldFByb3RvdHlwZU9mKE8sIHByb3RvKVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbiRleHBvcnQoJGV4cG9ydC5TLCAnT2JqZWN0JywgeyBzZXRQcm90b3R5cGVPZjogcmVxdWlyZSgnLi9fc2V0LXByb3RvJykuc2V0IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5vYmplY3Quc2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gMjMzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///233\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 19.1.3.6 Object.prototype.toString()\nvar classof = __webpack_require__(72);\nvar test = {};\ntest[__webpack_require__(8)('toStringTag')] = 'z';\nif (test + '' != '[object z]') {\n __webpack_require__(19)(Object.prototype, 'toString', function toString() {\n return '[object ' + classof(this) + ']';\n }, true);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LnRvLXN0cmluZy5qcz84MTg2Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDE5LjEuMy42IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcoKVxudmFyIGNsYXNzb2YgPSByZXF1aXJlKCcuL19jbGFzc29mJyk7XG52YXIgdGVzdCA9IHt9O1xudGVzdFtyZXF1aXJlKCcuL193a3MnKSgndG9TdHJpbmdUYWcnKV0gPSAneic7XG5pZiAodGVzdCArICcnICE9ICdbb2JqZWN0IHpdJykge1xuICByZXF1aXJlKCcuL19yZWRlZmluZScpKE9iamVjdC5wcm90b3R5cGUsICd0b1N0cmluZycsIGZ1bmN0aW9uIHRvU3RyaW5nKCkge1xuICAgIHJldHVybiAnW29iamVjdCAnICsgY2xhc3NvZih0aGlzKSArICddJztcbiAgfSwgdHJ1ZSk7XG59XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC50by1zdHJpbmcuanNcbi8vIG1vZHVsZSBpZCA9IDIzNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///234\n")},function(module,exports,__webpack_require__){eval("// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)\nvar $export = __webpack_require__(0);\n\n$export($export.P, 'Function', { bind: __webpack_require__(154) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZnVuY3Rpb24uYmluZC5qcz9kZDBhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjIuMy4yIC8gMTUuMy40LjUgRnVuY3Rpb24ucHJvdG90eXBlLmJpbmQodGhpc0FyZywgYXJncy4uLilcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QLCAnRnVuY3Rpb24nLCB7IGJpbmQ6IHJlcXVpcmUoJy4vX2JpbmQnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZnVuY3Rpb24uYmluZC5qc1xuLy8gbW9kdWxlIGlkID0gMjM1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///235\n")},function(module,exports,__webpack_require__){eval("var dP = __webpack_require__(11).f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || __webpack_require__(10) && dP(FProto, NAME, {\n configurable: true,\n get: function () {\n try {\n return ('' + this).match(nameRE)[1];\n } catch (e) {\n return '';\n }\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZnVuY3Rpb24ubmFtZS5qcz8xMmU1Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBkUCA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmY7XG52YXIgRlByb3RvID0gRnVuY3Rpb24ucHJvdG90eXBlO1xudmFyIG5hbWVSRSA9IC9eXFxzKmZ1bmN0aW9uIChbXiAoXSopLztcbnZhciBOQU1FID0gJ25hbWUnO1xuXG4vLyAxOS4yLjQuMiBuYW1lXG5OQU1FIGluIEZQcm90byB8fCByZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpICYmIGRQKEZQcm90bywgTkFNRSwge1xuICBjb25maWd1cmFibGU6IHRydWUsXG4gIGdldDogZnVuY3Rpb24gKCkge1xuICAgIHRyeSB7XG4gICAgICByZXR1cm4gKCcnICsgdGhpcykubWF0Y2gobmFtZVJFKVsxXTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZXR1cm4gJyc7XG4gICAgfVxuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZnVuY3Rpb24ubmFtZS5qc1xuLy8gbW9kdWxlIGlkID0gMjM2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///236\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar isObject = __webpack_require__(6);\nvar getPrototypeOf = __webpack_require__(26);\nvar HAS_INSTANCE = __webpack_require__(8)('hasInstance');\nvar FunctionProto = Function.prototype;\n// 19.2.3.6 Function.prototype[@@hasInstance](V)\nif (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(11).f(FunctionProto, HAS_INSTANCE, { value: function (O) {\n if (typeof this != 'function' || !isObject(O)) return false;\n if (!isObject(this.prototype)) return O instanceof this;\n // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:\n while (O = getPrototypeOf(O)) if (this.prototype === O) return true;\n return false;\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZnVuY3Rpb24uaGFzLWluc3RhbmNlLmpzPzNkYjMiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgZ2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKCcuL19vYmplY3QtZ3BvJyk7XG52YXIgSEFTX0lOU1RBTkNFID0gcmVxdWlyZSgnLi9fd2tzJykoJ2hhc0luc3RhbmNlJyk7XG52YXIgRnVuY3Rpb25Qcm90byA9IEZ1bmN0aW9uLnByb3RvdHlwZTtcbi8vIDE5LjIuMy42IEZ1bmN0aW9uLnByb3RvdHlwZVtAQGhhc0luc3RhbmNlXShWKVxuaWYgKCEoSEFTX0lOU1RBTkNFIGluIEZ1bmN0aW9uUHJvdG8pKSByZXF1aXJlKCcuL19vYmplY3QtZHAnKS5mKEZ1bmN0aW9uUHJvdG8sIEhBU19JTlNUQU5DRSwgeyB2YWx1ZTogZnVuY3Rpb24gKE8pIHtcbiAgaWYgKHR5cGVvZiB0aGlzICE9ICdmdW5jdGlvbicgfHwgIWlzT2JqZWN0KE8pKSByZXR1cm4gZmFsc2U7XG4gIGlmICghaXNPYmplY3QodGhpcy5wcm90b3R5cGUpKSByZXR1cm4gTyBpbnN0YW5jZW9mIHRoaXM7XG4gIC8vIGZvciBlbnZpcm9ubWVudCB3L28gbmF0aXZlIGBAQGhhc0luc3RhbmNlYCBsb2dpYyBlbm91Z2ggYGluc3RhbmNlb2ZgLCBidXQgYWRkIHRoaXM6XG4gIHdoaWxlIChPID0gZ2V0UHJvdG90eXBlT2YoTykpIGlmICh0aGlzLnByb3RvdHlwZSA9PT0gTykgcmV0dXJuIHRydWU7XG4gIHJldHVybiBmYWxzZTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmZ1bmN0aW9uLmhhcy1pbnN0YW5jZS5qc1xuLy8gbW9kdWxlIGlkID0gMjM3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///237\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar $parseInt = __webpack_require__(156);\n// 18.2.5 parseInt(string, radix)\n$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucGFyc2UtaW50LmpzPzRiZTEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkcGFyc2VJbnQgPSByZXF1aXJlKCcuL19wYXJzZS1pbnQnKTtcbi8vIDE4LjIuNSBwYXJzZUludChzdHJpbmcsIHJhZGl4KVxuJGV4cG9ydCgkZXhwb3J0LkcgKyAkZXhwb3J0LkYgKiAocGFyc2VJbnQgIT0gJHBhcnNlSW50KSwgeyBwYXJzZUludDogJHBhcnNlSW50IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5wYXJzZS1pbnQuanNcbi8vIG1vZHVsZSBpZCA9IDIzOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///238\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar $parseFloat = __webpack_require__(157);\n// 18.2.4 parseFloat(string)\n$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucGFyc2UtZmxvYXQuanM/MTJmMSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRwYXJzZUZsb2F0ID0gcmVxdWlyZSgnLi9fcGFyc2UtZmxvYXQnKTtcbi8vIDE4LjIuNCBwYXJzZUZsb2F0KHN0cmluZylcbiRleHBvcnQoJGV4cG9ydC5HICsgJGV4cG9ydC5GICogKHBhcnNlRmxvYXQgIT0gJHBhcnNlRmxvYXQpLCB7IHBhcnNlRmxvYXQ6ICRwYXJzZUZsb2F0IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5wYXJzZS1mbG9hdC5qc1xuLy8gbW9kdWxlIGlkID0gMjM5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///239\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar global = __webpack_require__(4);\nvar has = __webpack_require__(17);\nvar cof = __webpack_require__(28);\nvar inheritIfRequired = __webpack_require__(108);\nvar toPrimitive = __webpack_require__(31);\nvar fails = __webpack_require__(5);\nvar gOPN = __webpack_require__(53).f;\nvar gOPD = __webpack_require__(25).f;\nvar dP = __webpack_require__(11).f;\nvar $trim = __webpack_require__(62).trim;\nvar NUMBER = 'Number';\nvar $Number = global[NUMBER];\nvar Base = $Number;\nvar proto = $Number.prototype;\n// Opera ~12 has broken Object#toString\nvar BROKEN_COF = cof(__webpack_require__(52)(proto)) == NUMBER;\nvar TRIM = 'trim' in String.prototype;\n\n// 7.1.3 ToNumber(argument)\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n if (typeof it == 'string' && it.length > 2) {\n it = TRIM ? it.trim() : $trim(it, 3);\n var first = it.charCodeAt(0);\n var third, radix, maxCode;\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i\n default: return +it;\n }\n for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {\n code = digits.charCodeAt(i);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\nif (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {\n $Number = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var that = this;\n return that instanceof $Number\n // check on 1..constructor(foo) case\n && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)\n ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);\n };\n for (var keys = __webpack_require__(10) ? gOPN(Base) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES6 (in case, if modules with ES6 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(Base, key = keys[j]) && !has($Number, key)) {\n dP($Number, key, gOPD(Base, key));\n }\n }\n $Number.prototype = proto;\n proto.constructor = $Number;\n __webpack_require__(19)(global, NUMBER, $Number);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmNvbnN0cnVjdG9yLmpzPzQwMWIiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIGhhcyA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7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///240\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toInteger = __webpack_require__(33);\nvar aNumberValue = __webpack_require__(158);\nvar repeat = __webpack_require__(109);\nvar $toFixed = 1.0.toFixed;\nvar floor = Math.floor;\nvar data = [0, 0, 0, 0, 0, 0];\nvar ERROR = 'Number.toFixed: incorrect invocation!';\nvar ZERO = '0';\n\nvar multiply = function (n, c) {\n var i = -1;\n var c2 = c;\n while (++i < 6) {\n c2 += n * data[i];\n data[i] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n};\nvar divide = function (n) {\n var i = 6;\n var c = 0;\n while (--i >= 0) {\n c += data[i];\n data[i] = floor(c / n);\n c = (c % n) * 1e7;\n }\n};\nvar numToString = function () {\n var i = 6;\n var s = '';\n while (--i >= 0) {\n if (s !== '' || i === 0 || data[i] !== 0) {\n var t = String(data[i]);\n s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;\n }\n } return s;\n};\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\n$export($export.P + $export.F * (!!$toFixed && (\n 0.00008.toFixed(3) !== '0.000' ||\n 0.9.toFixed(0) !== '1' ||\n 1.255.toFixed(2) !== '1.25' ||\n 1000000000000000128.0.toFixed(0) !== '1000000000000000128'\n) || !__webpack_require__(5)(function () {\n // V8 ~ Android 4.3-\n $toFixed.call({});\n})), 'Number', {\n toFixed: function toFixed(fractionDigits) {\n var x = aNumberValue(this, ERROR);\n var f = toInteger(fractionDigits);\n var s = '';\n var m = ZERO;\n var e, z, j, k;\n if (f < 0 || f > 20) throw RangeError(ERROR);\n // eslint-disable-next-line no-self-compare\n if (x != x) return 'NaN';\n if (x <= -1e21 || x >= 1e21) return String(x);\n if (x < 0) {\n s = '-';\n x = -x;\n }\n if (x > 1e-21) {\n e = log(x * pow(2, 69, 1)) - 69;\n z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(0, z);\n j = f;\n while (j >= 7) {\n multiply(1e7, 0);\n j -= 7;\n }\n multiply(pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(1 << 23);\n j -= 23;\n }\n divide(1 << j);\n multiply(1, 1);\n divide(2);\n m = numToString();\n } else {\n multiply(0, z);\n multiply(1 << -e, 0);\n m = numToString() + repeat.call(ZERO, f);\n }\n }\n if (f > 0) {\n k = m.length;\n m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));\n } else {\n m = s + m;\n } return m;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnRvLWZpeGVkLmpzPzQxNjIiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgYU51bWJlclZhbHVlID0gcmVxdWlyZSgnLi9fYS1udW1iZXItdmFsdWUnKTtcbnZhciByZXBlYXQgPSByZXF1aXJlKCcuL19zdHJpbmctcmVwZWF0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1uZXh0LWxpbmUgbm8tc2VsZi1jb21wYXJlXG4gICAgaWYgKHggIT0geCkgcmV0dXJuICdOYU4nO1xuICAgIGlmICh4IDw9IC0xZTIxIHx8IHggPj0gMWUyMSkgcmV0dXJuIFN0cmluZyh4KTtcbiAgICBpZiAoeCA8IDApIHtcbiAgICAgIHMgPSAnLSc7XG4gICAgICB4ID0gLXg7XG4gICAgfVxuICAgIGlmICh4ID4gMWUtMjEpIHtcbiAgICAgIGUgPSBsb2coeCAqIHBvdygyLCA2OSwgMSkpIC0gNjk7XG4gICAgICB6ID0gZSA8IDAgPyB4ICogcG93KDIsIC1lLCAxKSA6IHggLyBwb3coMiwgZSwgMSk7XG4gICAgICB6ICo9IDB4MTAwMDAwMDAwMDAwMDA7XG4gICAgICBlID0gNTIgLSBlO1xuICAgICAgaWYgKGUgPiAwKSB7XG4gICAgICAgIG11bHRpcGx5KDAsIHopO1xuICAgICAgICBqID0gZjtcbiAgICAgICAgd2hpbGUgKGogPj0gNykge1xuICAgICAgICAgIG11bHRpcGx5KDFlNywgMCk7XG4gICAgICAgICAgaiAtPSA3O1xuICAgICAgICB9XG4gICAgICAgIG11bHRpcGx5KHBvdygxMCwgaiwgMSksIDApO1xuICAgICAgICBqID0gZSAtIDE7XG4gICAgICAgIHdoaWxlIChqID49IDIzKSB7XG4gICAgICAgICAgZGl2aWRlKDEgPDwgMjMpO1xuICAgICAgICAgIGogLT0gMjM7XG4gICAgICAgIH1cbiAgICAgICAgZGl2aWRlKDEgPDwgaik7XG4gICAgICAgIG11bHRpcGx5KDEsIDEpO1xuICAgICAgICBkaXZpZGUoMik7XG4gICAgICAgIG0gPSBudW1Ub1N0cmluZygpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgbXVsdGlwbHkoMCwgeik7XG4gICAgICAgIG11bHRpcGx5KDEgPDwgLWUsIDApO1xuICAgICAgICBtID0gbnVtVG9TdHJpbmcoKSArIHJlcGVhdC5jYWxsKFpFUk8sIGYpO1xuICAgICAgf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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///241\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $fails = __webpack_require__(5);\nvar aNumberValue = __webpack_require__(158);\nvar $toPrecision = 1.0.toPrecision;\n\n$export($export.P + $export.F * ($fails(function () {\n // IE7-\n return $toPrecision.call(1, undefined) !== '1';\n}) || !$fails(function () {\n // V8 ~ Android 4.3-\n $toPrecision.call({});\n})), 'Number', {\n toPrecision: function toPrecision(precision) {\n var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');\n return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnRvLXByZWNpc2lvbi5qcz82NTEyIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJGZhaWxzID0gcmVxdWlyZSgnLi9fZmFpbHMnKTtcbnZhciBhTnVtYmVyVmFsdWUgPSByZXF1aXJlKCcuL19hLW51bWJlci12YWx1ZScpO1xudmFyICR0b1ByZWNpc2lvbiA9IDEuMC50b1ByZWNpc2lvbjtcblxuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAoJGZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgLy8gSUU3LVxuICByZXR1cm4gJHRvUHJlY2lzaW9uLmNhbGwoMSwgdW5kZWZpbmVkKSAhPT0gJzEnO1xufSkgfHwgISRmYWlscyhmdW5jdGlvbiAoKSB7XG4gIC8vIFY4IH4gQW5kcm9pZCA0LjMtXG4gICR0b1ByZWNpc2lvbi5jYWxsKHt9KTtcbn0pKSwgJ051bWJlcicsIHtcbiAgdG9QcmVjaXNpb246IGZ1bmN0aW9uIHRvUHJlY2lzaW9uKHByZWNpc2lvbikge1xuICAgIHZhciB0aGF0ID0gYU51bWJlclZhbHVlKHRoaXMsICdOdW1iZXIjdG9QcmVjaXNpb246IGluY29ycmVjdCBpbnZvY2F0aW9uIScpO1xuICAgIHJldHVybiBwcmVjaXNpb24gPT09IHVuZGVmaW5lZCA/ICR0b1ByZWNpc2lvbi5jYWxsKHRoYXQpIDogJHRvUHJlY2lzaW9uLmNhbGwodGhhdCwgcHJlY2lzaW9uKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm51bWJlci50by1wcmVjaXNpb24uanNcbi8vIG1vZHVsZSBpZCA9IDI0MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///242\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.1 Number.EPSILON\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmVwc2lsb24uanM/NGFkYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4xLjIuMSBOdW1iZXIuRVBTSUxPTlxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdOdW1iZXInLCB7IEVQU0lMT046IE1hdGgucG93KDIsIC01MikgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm51bWJlci5lcHNpbG9uLmpzXG4vLyBtb2R1bGUgaWQgPSAyNDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///243\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.2 Number.isFinite(number)\nvar $export = __webpack_require__(0);\nvar _isFinite = __webpack_require__(4).isFinite;\n\n$export($export.S, 'Number', {\n isFinite: function isFinite(it) {\n return typeof it == 'number' && _isFinite(it);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLWZpbml0ZS5qcz9jYWU1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjEuMi4yIE51bWJlci5pc0Zpbml0ZShudW1iZXIpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIF9pc0Zpbml0ZSA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpLmlzRmluaXRlO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ051bWJlcicsIHtcbiAgaXNGaW5pdGU6IGZ1bmN0aW9uIGlzRmluaXRlKGl0KSB7XG4gICAgcmV0dXJuIHR5cGVvZiBpdCA9PSAnbnVtYmVyJyAmJiBfaXNGaW5pdGUoaXQpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLWZpbml0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjQ0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///244\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.3 Number.isInteger(number)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Number', { isInteger: __webpack_require__(159) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLWludGVnZXIuanM/NWVkOCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4xLjIuMyBOdW1iZXIuaXNJbnRlZ2VyKG51bWJlcilcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTnVtYmVyJywgeyBpc0ludGVnZXI6IHJlcXVpcmUoJy4vX2lzLWludGVnZXInKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLWludGVnZXIuanNcbi8vIG1vZHVsZSBpZCA9IDI0NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///245\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.4 Number.isNaN(number)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Number', {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare\n return number != number;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLW5hbi5qcz8yYzZlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjEuMi40IE51bWJlci5pc05hTihudW1iZXIpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ051bWJlcicsIHtcbiAgaXNOYU46IGZ1bmN0aW9uIGlzTmFOKG51bWJlcikge1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICByZXR1cm4gbnVtYmVyICE9IG51bWJlcjtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm51bWJlci5pcy1uYW4uanNcbi8vIG1vZHVsZSBpZCA9IDI0NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///246\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.5 Number.isSafeInteger(number)\nvar $export = __webpack_require__(0);\nvar isInteger = __webpack_require__(159);\nvar abs = Math.abs;\n\n$export($export.S, 'Number', {\n isSafeInteger: function isSafeInteger(number) {\n return isInteger(number) && abs(number) <= 0x1fffffffffffff;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLXNhZmUtaW50ZWdlci5qcz8wMzU5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjEuMi41IE51bWJlci5pc1NhZmVJbnRlZ2VyKG51bWJlcilcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgaXNJbnRlZ2VyID0gcmVxdWlyZSgnLi9faXMtaW50ZWdlcicpO1xudmFyIGFicyA9IE1hdGguYWJzO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ051bWJlcicsIHtcbiAgaXNTYWZlSW50ZWdlcjogZnVuY3Rpb24gaXNTYWZlSW50ZWdlcihudW1iZXIpIHtcbiAgICByZXR1cm4gaXNJbnRlZ2VyKG51bWJlcikgJiYgYWJzKG51bWJlcikgPD0gMHgxZmZmZmZmZmZmZmZmZjtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm51bWJlci5pcy1zYWZlLWludGVnZXIuanNcbi8vIG1vZHVsZSBpZCA9IDI0N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///247\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.6 Number.MAX_SAFE_INTEGER\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLm1heC1zYWZlLWludGVnZXIuanM/NWEyMiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4xLjIuNiBOdW1iZXIuTUFYX1NBRkVfSU5URUdFUlxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdOdW1iZXInLCB7IE1BWF9TQUZFX0lOVEVHRVI6IDB4MWZmZmZmZmZmZmZmZmYgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm51bWJlci5tYXgtc2FmZS1pbnRlZ2VyLmpzXG4vLyBtb2R1bGUgaWQgPSAyNDhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///248\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.10 Number.MIN_SAFE_INTEGER\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLm1pbi1zYWZlLWludGVnZXIuanM/Njg5ZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4xLjIuMTAgTnVtYmVyLk1JTl9TQUZFX0lOVEVHRVJcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTnVtYmVyJywgeyBNSU5fU0FGRV9JTlRFR0VSOiAtMHgxZmZmZmZmZmZmZmZmZiB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLm1pbi1zYWZlLWludGVnZXIuanNcbi8vIG1vZHVsZSBpZCA9IDI0OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///249\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar $parseFloat = __webpack_require__(157);\n// 20.1.2.12 Number.parseFloat(string)\n$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnBhcnNlLWZsb2F0LmpzPzZhNWIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkcGFyc2VGbG9hdCA9IHJlcXVpcmUoJy4vX3BhcnNlLWZsb2F0Jyk7XG4vLyAyMC4xLjIuMTIgTnVtYmVyLnBhcnNlRmxvYXQoc3RyaW5nKVxuJGV4cG9ydCgkZXhwb3J0LlMgKyAkZXhwb3J0LkYgKiAoTnVtYmVyLnBhcnNlRmxvYXQgIT0gJHBhcnNlRmxvYXQpLCAnTnVtYmVyJywgeyBwYXJzZUZsb2F0OiAkcGFyc2VGbG9hdCB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnBhcnNlLWZsb2F0LmpzXG4vLyBtb2R1bGUgaWQgPSAyNTBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///250\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar $parseInt = __webpack_require__(156);\n// 20.1.2.13 Number.parseInt(string, radix)\n$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnBhcnNlLWludC5qcz83NTQyIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJHBhcnNlSW50ID0gcmVxdWlyZSgnLi9fcGFyc2UtaW50Jyk7XG4vLyAyMC4xLjIuMTMgTnVtYmVyLnBhcnNlSW50KHN0cmluZywgcmFkaXgpXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqIChOdW1iZXIucGFyc2VJbnQgIT0gJHBhcnNlSW50KSwgJ051bWJlcicsIHsgcGFyc2VJbnQ6ICRwYXJzZUludCB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnBhcnNlLWludC5qc1xuLy8gbW9kdWxlIGlkID0gMjUxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///251\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.3 Math.acosh(x)\nvar $export = __webpack_require__(0);\nvar log1p = __webpack_require__(160);\nvar sqrt = Math.sqrt;\nvar $acosh = Math.acosh;\n\n$export($export.S + $export.F * !($acosh\n // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509\n && Math.floor($acosh(Number.MAX_VALUE)) == 710\n // Tor Browser bug: Math.acosh(Infinity) -> NaN\n && $acosh(Infinity) == Infinity\n), 'Math', {\n acosh: function acosh(x) {\n return (x = +x) < 1 ? NaN : x > 94906265.62425156\n ? Math.log(x) + Math.LN2\n : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5hY29zaC5qcz9iZjY5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4zIE1hdGguYWNvc2goeClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgbG9nMXAgPSByZXF1aXJlKCcuL19tYXRoLWxvZzFwJyk7XG52YXIgc3FydCA9IE1hdGguc3FydDtcbnZhciAkYWNvc2ggPSBNYXRoLmFjb3NoO1xuXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqICEoJGFjb3NoXG4gIC8vIFY4IGJ1ZzogaHR0cHM6Ly9jb2RlLmdvb2dsZS5jb20vcC92OC9pc3N1ZXMvZGV0YWlsP2lkPTM1MDlcbiAgJiYgTWF0aC5mbG9vcigkYWNvc2goTnVtYmVyLk1BWF9WQUxVRSkpID09IDcxMFxuICAvLyBUb3IgQnJvd3NlciBidWc6IE1hdGguYWNvc2goSW5maW5pdHkpIC0+IE5hTlxuICAmJiAkYWNvc2goSW5maW5pdHkpID09IEluZmluaXR5XG4pLCAnTWF0aCcsIHtcbiAgYWNvc2g6IGZ1bmN0aW9uIGFjb3NoKHgpIHtcbiAgICByZXR1cm4gKHggPSAreCkgPCAxID8gTmFOIDogeCA+IDk0OTA2MjY1LjYyNDI1MTU2XG4gICAgICA/IE1hdGgubG9nKHgpICsgTWF0aC5MTjJcbiAgICAgIDogbG9nMXAoeCAtIDEgKyBzcXJ0KHggLSAxKSAqIHNxcnQoeCArIDEpKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGguYWNvc2guanNcbi8vIG1vZHVsZSBpZCA9IDI1MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///252\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.5 Math.asinh(x)\nvar $export = __webpack_require__(0);\nvar $asinh = Math.asinh;\n\nfunction asinh(x) {\n return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));\n}\n\n// Tor Browser bug: Math.asinh(0) -> -0\n$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5hc2luaC5qcz9lYzliIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi41IE1hdGguYXNpbmgoeClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJGFzaW5oID0gTWF0aC5hc2luaDtcblxuZnVuY3Rpb24gYXNpbmgoeCkge1xuICByZXR1cm4gIWlzRmluaXRlKHggPSAreCkgfHwgeCA9PSAwID8geCA6IHggPCAwID8gLWFzaW5oKC14KSA6IE1hdGgubG9nKHggKyBNYXRoLnNxcnQoeCAqIHggKyAxKSk7XG59XG5cbi8vIFRvciBCcm93c2VyIGJ1ZzogTWF0aC5hc2luaCgwKSAtPiAtMFxuJGV4cG9ydCgkZXhwb3J0LlMgKyAkZXhwb3J0LkYgKiAhKCRhc2luaCAmJiAxIC8gJGFzaW5oKDApID4gMCksICdNYXRoJywgeyBhc2luaDogYXNpbmggfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGguYXNpbmguanNcbi8vIG1vZHVsZSBpZCA9IDI1M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///253\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.7 Math.atanh(x)\nvar $export = __webpack_require__(0);\nvar $atanh = Math.atanh;\n\n// Tor Browser bug: Math.atanh(-0) -> 0\n$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {\n atanh: function atanh(x) {\n return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5hdGFuaC5qcz85NzI4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi43IE1hdGguYXRhbmgoeClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJGF0YW5oID0gTWF0aC5hdGFuaDtcblxuLy8gVG9yIEJyb3dzZXIgYnVnOiBNYXRoLmF0YW5oKC0wKSAtPiAwXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqICEoJGF0YW5oICYmIDEgLyAkYXRhbmgoLTApIDwgMCksICdNYXRoJywge1xuICBhdGFuaDogZnVuY3Rpb24gYXRhbmgoeCkge1xuICAgIHJldHVybiAoeCA9ICt4KSA9PSAwID8geCA6IE1hdGgubG9nKCgxICsgeCkgLyAoMSAtIHgpKSAvIDI7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5tYXRoLmF0YW5oLmpzXG4vLyBtb2R1bGUgaWQgPSAyNTRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///254\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.9 Math.cbrt(x)\nvar $export = __webpack_require__(0);\nvar sign = __webpack_require__(110);\n\n$export($export.S, 'Math', {\n cbrt: function cbrt(x) {\n return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5jYnJ0LmpzPzkwMTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjkgTWF0aC5jYnJ0KHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHNpZ24gPSByZXF1aXJlKCcuL19tYXRoLXNpZ24nKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywge1xuICBjYnJ0OiBmdW5jdGlvbiBjYnJ0KHgpIHtcbiAgICByZXR1cm4gc2lnbih4ID0gK3gpICogTWF0aC5wb3coTWF0aC5hYnMoeCksIDEgLyAzKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGguY2JydC5qc1xuLy8gbW9kdWxlIGlkID0gMjU1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///255\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.11 Math.clz32(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n clz32: function clz32(x) {\n return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5jbHozMi5qcz9jNGUzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4xMSBNYXRoLmNsejMyKHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIGNsejMyOiBmdW5jdGlvbiBjbHozMih4KSB7XG4gICAgcmV0dXJuICh4ID4+Pj0gMCkgPyAzMSAtIE1hdGguZmxvb3IoTWF0aC5sb2coeCArIDAuNSkgKiBNYXRoLkxPRzJFKSA6IDMyO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5jbHozMi5qc1xuLy8gbW9kdWxlIGlkID0gMjU2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///256\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.12 Math.cosh(x)\nvar $export = __webpack_require__(0);\nvar exp = Math.exp;\n\n$export($export.S, 'Math', {\n cosh: function cosh(x) {\n return (exp(x = +x) + exp(-x)) / 2;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5jb3NoLmpzPzJlNTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjEyIE1hdGguY29zaCh4KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBleHAgPSBNYXRoLmV4cDtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywge1xuICBjb3NoOiBmdW5jdGlvbiBjb3NoKHgpIHtcbiAgICByZXR1cm4gKGV4cCh4ID0gK3gpICsgZXhwKC14KSkgLyAyO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5jb3NoLmpzXG4vLyBtb2R1bGUgaWQgPSAyNTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///257\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.14 Math.expm1(x)\nvar $export = __webpack_require__(0);\nvar $expm1 = __webpack_require__(111);\n\n$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5leHBtMS5qcz9mNzEyIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4xNCBNYXRoLmV4cG0xKHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRleHBtMSA9IHJlcXVpcmUoJy4vX21hdGgtZXhwbTEnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMgKyAkZXhwb3J0LkYgKiAoJGV4cG0xICE9IE1hdGguZXhwbTEpLCAnTWF0aCcsIHsgZXhwbTE6ICRleHBtMSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5leHBtMS5qc1xuLy8gbW9kdWxlIGlkID0gMjU4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///258\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.16 Math.fround(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { fround: __webpack_require__(161) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5mcm91bmQuanM/OWJhNiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4yLjIuMTYgTWF0aC5mcm91bmQoeClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHsgZnJvdW5kOiByZXF1aXJlKCcuL19tYXRoLWZyb3VuZCcpIH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5tYXRoLmZyb3VuZC5qc1xuLy8gbW9kdWxlIGlkID0gMjU5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///259\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])\nvar $export = __webpack_require__(0);\nvar abs = Math.abs;\n\n$export($export.S, 'Math', {\n hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars\n var sum = 0;\n var i = 0;\n var aLen = arguments.length;\n var larg = 0;\n var arg, div;\n while (i < aLen) {\n arg = abs(arguments[i++]);\n if (larg < arg) {\n div = larg / arg;\n sum = sum * div * div + 1;\n larg = arg;\n } else if (arg > 0) {\n div = arg / larg;\n sum += div * div;\n } else sum += arg;\n }\n return larg === Infinity ? Infinity : larg * Math.sqrt(sum);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5oeXBvdC5qcz9jMmJiIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4xNyBNYXRoLmh5cG90KFt2YWx1ZTFbLCB2YWx1ZTJbLCDigKYgXV1dKVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBhYnMgPSBNYXRoLmFicztcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywge1xuICBoeXBvdDogZnVuY3Rpb24gaHlwb3QodmFsdWUxLCB2YWx1ZTIpIHsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby11bnVzZWQtdmFyc1xuICAgIHZhciBzdW0gPSAwO1xuICAgIHZhciBpID0gMDtcbiAgICB2YXIgYUxlbiA9IGFyZ3VtZW50cy5sZW5ndGg7XG4gICAgdmFyIGxhcmcgPSAwO1xuICAgIHZhciBhcmcsIGRpdjtcbiAgICB3aGlsZSAoaSA8IGFMZW4pIHtcbiAgICAgIGFyZyA9IGFicyhhcmd1bWVudHNbaSsrXSk7XG4gICAgICBpZiAobGFyZyA8IGFyZykge1xuICAgICAgICBkaXYgPSBsYXJnIC8gYXJnO1xuICAgICAgICBzdW0gPSBzdW0gKiBkaXYgKiBkaXYgKyAxO1xuICAgICAgICBsYXJnID0gYXJnO1xuICAgICAgfSBlbHNlIGlmIChhcmcgPiAwKSB7XG4gICAgICAgIGRpdiA9IGFyZyAvIGxhcmc7XG4gICAgICAgIHN1bSArPSBkaXYgKiBkaXY7XG4gICAgICB9IGVsc2Ugc3VtICs9IGFyZztcbiAgICB9XG4gICAgcmV0dXJuIGxhcmcgPT09IEluZmluaXR5ID8gSW5maW5pdHkgOiBsYXJnICogTWF0aC5zcXJ0KHN1bSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5tYXRoLmh5cG90LmpzXG4vLyBtb2R1bGUgaWQgPSAyNjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///260\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.18 Math.imul(x, y)\nvar $export = __webpack_require__(0);\nvar $imul = Math.imul;\n\n// some WebKit versions fails with big numbers, some has wrong arity\n$export($export.S + $export.F * __webpack_require__(5)(function () {\n return $imul(0xffffffff, 5) != -5 || $imul.length != 2;\n}), 'Math', {\n imul: function imul(x, y) {\n var UINT16 = 0xffff;\n var xn = +x;\n var yn = +y;\n var xl = UINT16 & xn;\n var yl = UINT16 & yn;\n return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVz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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///261\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.21 Math.log10(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n log10: function log10(x) {\n return Math.log(x) * Math.LOG10E;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5sb2cxMC5qcz9kNjJhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4yMSBNYXRoLmxvZzEwKHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIGxvZzEwOiBmdW5jdGlvbiBsb2cxMCh4KSB7XG4gICAgcmV0dXJuIE1hdGgubG9nKHgpICogTWF0aC5MT0cxMEU7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5tYXRoLmxvZzEwLmpzXG4vLyBtb2R1bGUgaWQgPSAyNjJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///262\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.20 Math.log1p(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { log1p: __webpack_require__(160) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5sb2cxcC5qcz9hNTYxIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4yMCBNYXRoLmxvZzFwKHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7IGxvZzFwOiByZXF1aXJlKCcuL19tYXRoLWxvZzFwJykgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGgubG9nMXAuanNcbi8vIG1vZHVsZSBpZCA9IDI2M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///263\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.22 Math.log2(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n log2: function log2(x) {\n return Math.log(x) / Math.LN2;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5sb2cyLmpzPzM3ODIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjIyIE1hdGgubG9nMih4KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywge1xuICBsb2cyOiBmdW5jdGlvbiBsb2cyKHgpIHtcbiAgICByZXR1cm4gTWF0aC5sb2coeCkgLyBNYXRoLkxOMjtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGgubG9nMi5qc1xuLy8gbW9kdWxlIGlkID0gMjY0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///264\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.28 Math.sign(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { sign: __webpack_require__(110) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5zaWduLmpzPzFlNWYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjI4IE1hdGguc2lnbih4KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywgeyBzaWduOiByZXF1aXJlKCcuL19tYXRoLXNpZ24nKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5zaWduLmpzXG4vLyBtb2R1bGUgaWQgPSAyNjVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///265\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.30 Math.sinh(x)\nvar $export = __webpack_require__(0);\nvar expm1 = __webpack_require__(111);\nvar exp = Math.exp;\n\n// V8 near Chromium 38 has a problem with very small numbers\n$export($export.S + $export.F * __webpack_require__(5)(function () {\n return !Math.sinh(-2e-17) != -2e-17;\n}), 'Math', {\n sinh: function sinh(x) {\n return Math.abs(x = +x) < 1\n ? (expm1(x) - expm1(-x)) / 2\n : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5zaW5oLmpzPzMyMzEiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjMwIE1hdGguc2luaCh4KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBleHBtMSA9IHJlcXVpcmUoJy4vX21hdGgtZXhwbTEnKTtcbnZhciBleHAgPSBNYXRoLmV4cDtcblxuLy8gVjggbmVhciBDaHJvbWl1bSAzOCBoYXMgYSBwcm9ibGVtIHdpdGggdmVyeSBzbWFsbCBudW1iZXJzXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqIHJlcXVpcmUoJy4vX2ZhaWxzJykoZnVuY3Rpb24gKCkge1xuICByZXR1cm4gIU1hdGguc2luaCgtMmUtMTcpICE9IC0yZS0xNztcbn0pLCAnTWF0aCcsIHtcbiAgc2luaDogZnVuY3Rpb24gc2luaCh4KSB7XG4gICAgcmV0dXJuIE1hdGguYWJzKHggPSAreCkgPCAxXG4gICAgICA/IChleHBtMSh4KSAtIGV4cG0xKC14KSkgLyAyXG4gICAgICA6IChleHAoeCAtIDEpIC0gZXhwKC14IC0gMSkpICogKE1hdGguRSAvIDIpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5zaW5oLmpzXG4vLyBtb2R1bGUgaWQgPSAyNjZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///266\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.33 Math.tanh(x)\nvar $export = __webpack_require__(0);\nvar expm1 = __webpack_require__(111);\nvar exp = Math.exp;\n\n$export($export.S, 'Math', {\n tanh: function tanh(x) {\n var a = expm1(x = +x);\n var b = expm1(-x);\n return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC50YW5oLmpzPzQ5MTAiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjMzIE1hdGgudGFuaCh4KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBleHBtMSA9IHJlcXVpcmUoJy4vX21hdGgtZXhwbTEnKTtcbnZhciBleHAgPSBNYXRoLmV4cDtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywge1xuICB0YW5oOiBmdW5jdGlvbiB0YW5oKHgpIHtcbiAgICB2YXIgYSA9IGV4cG0xKHggPSAreCk7XG4gICAgdmFyIGIgPSBleHBtMSgteCk7XG4gICAgcmV0dXJuIGEgPT0gSW5maW5pdHkgPyAxIDogYiA9PSBJbmZpbml0eSA/IC0xIDogKGEgLSBiKSAvIChleHAoeCkgKyBleHAoLXgpKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGgudGFuaC5qc1xuLy8gbW9kdWxlIGlkID0gMjY3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///267\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.34 Math.trunc(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n trunc: function trunc(it) {\n return (it > 0 ? Math.floor : Math.ceil)(it);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC50cnVuYy5qcz8xZjQ5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4zNCBNYXRoLnRydW5jKHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIHRydW5jOiBmdW5jdGlvbiB0cnVuYyhpdCkge1xuICAgIHJldHVybiAoaXQgPiAwID8gTWF0aC5mbG9vciA6IE1hdGguY2VpbCkoaXQpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC50cnVuYy5qc1xuLy8gbW9kdWxlIGlkID0gMjY4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///268\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar toAbsoluteIndex = __webpack_require__(51);\nvar fromCharCode = String.fromCharCode;\nvar $fromCodePoint = String.fromCodePoint;\n\n// length should be 1, old FF problem\n$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {\n // 21.1.2.2 String.fromCodePoint(...codePoints)\n fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars\n var res = [];\n var aLen = arguments.length;\n var i = 0;\n var code;\n while (aLen > i) {\n code = +arguments[i++];\n if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');\n res.push(code < 0x10000\n ? fromCharCode(code)\n : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)\n );\n } return res.join('');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2Nvcm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2RlKGNvZGUpXG4gICAgICAgIDogZnJvbUNoYXJDb2RlKCgoY29kZSAtPSAweDEwMDAwKSA+PiAxMCkgKyAweGQ4MDAsIGNvZGUgJSAweDQwMCArIDB4ZGMwMClcbiAgICAgICk7XG4gICAgfSByZXR1cm4gcmVzLmpvaW4oJycpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZyb20tY29kZS1wb2ludC5qc1xuLy8gbW9kdWxlIGlkID0gMjY5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///269\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar toIObject = __webpack_require__(24);\nvar toLength = __webpack_require__(12);\n\n$export($export.S, 'String', {\n // 21.1.2.4 String.raw(callSite, ...substitutions)\n raw: function raw(callSite) {\n var tpl = toIObject(callSite.raw);\n var len = toLength(tpl.length);\n var aLen = arguments.length;\n var res = [];\n var i = 0;\n while (len > i) {\n res.push(String(tpl[i++]));\n if (i < aLen) res.push(String(arguments[i]));\n } return res.join('');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjcwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnJhdy5qcz8xNzdi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BOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///270\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 21.1.3.25 String.prototype.trim()\n__webpack_require__(62)('trim', function ($trim) {\n return function trim() {\n return $trim(this, 3);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjcxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnRyaW0uanM/OWExOSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyAyMS4xLjMuMjUgU3RyaW5nLnByb3RvdHlwZS50cmltKClcbnJlcXVpcmUoJy4vX3N0cmluZy10cmltJykoJ3RyaW0nLCBmdW5jdGlvbiAoJHRyaW0pIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHRyaW0oKSB7XG4gICAgcmV0dXJuICR0cmltKHRoaXMsIDMpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy50cmltLmpzXG4vLyBtb2R1bGUgaWQgPSAyNzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///271\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $at = __webpack_require__(112)(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\n__webpack_require__(113)(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjcyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLml0ZXJhdG9yLmpzP2Q0MGQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRhdCA9IHJlcXVpcmUoJy4vX3N0cmluZy1hdCcpKHRydWUpO1xuXG4vLyAyMS4xLjMuMjcgU3RyaW5nLnByb3RvdHlwZVtAQGl0ZXJhdG9yXSgpXG5yZXF1aXJlKCcuL19pdGVyLWRlZmluZScpKFN0cmluZywgJ1N0cmluZycsIGZ1bmN0aW9uIChpdGVyYXRlZCkge1xuICB0aGlzLl90ID0gU3RyaW5nKGl0ZXJhdGVkKTsgLy8gdGFyZ2V0XG4gIHRoaXMuX2kgPSAwOyAgICAgICAgICAgICAgICAvLyBuZXh0IGluZGV4XG4vLyAyMS4xLjUuMi4xICVTdHJpbmdJdGVyYXRvclByb3RvdHlwZSUubmV4dCgpXG59LCBmdW5jdGlvbiAoKSB7XG4gIHZhciBPID0gdGhpcy5fdDtcbiAgdmFyIGluZGV4ID0gdGhpcy5faTtcbiAgdmFyIHBvaW50O1xuICBpZiAoaW5kZXggPj0gTy5sZW5ndGgpIHJldHVybiB7IHZhbHVlOiB1bmRlZmluZWQsIGRvbmU6IHRydWUgfTtcbiAgcG9pbnQgPSAkYXQoTywgaW5kZXgpO1xuICB0aGlzLl9pICs9IHBvaW50Lmxlbmd0aDtcbiAgcmV0dXJuIHsgdmFsdWU6IHBvaW50LCBkb25lOiBmYWxzZSB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gMjcyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///272\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $at = __webpack_require__(112)(false);\n$export($export.P, 'String', {\n // 21.1.3.3 String.prototype.codePointAt(pos)\n codePointAt: function codePointAt(pos) {\n return $at(this, pos);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjczLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmNvZGUtcG9pbnQtYXQuanM/NDVhNyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRhdCA9IHJlcXVpcmUoJy4vX3N0cmluZy1hdCcpKGZhbHNlKTtcbiRleHBvcnQoJGV4cG9ydC5QLCAnU3RyaW5nJywge1xuICAvLyAyMS4xLjMuMyBTdHJpbmcucHJvdG90eXBlLmNvZGVQb2ludEF0KHBvcylcbiAgY29kZVBvaW50QXQ6IGZ1bmN0aW9uIGNvZGVQb2ludEF0KHBvcykge1xuICAgIHJldHVybiAkYXQodGhpcywgcG9zKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5jb2RlLXBvaW50LWF0LmpzXG4vLyBtb2R1bGUgaWQgPSAyNzNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///273\n")},function(module,exports,__webpack_require__){"use strict";eval("// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])\n\nvar $export = __webpack_require__(0);\nvar toLength = __webpack_require__(12);\nvar context = __webpack_require__(115);\nvar ENDS_WITH = 'endsWith';\nvar $endsWith = ''[ENDS_WITH];\n\n$export($export.P + $export.F * __webpack_require__(116)(ENDS_WITH), 'String', {\n endsWith: function endsWith(searchString /* , endPosition = @length */) {\n var that = context(this, searchString, ENDS_WITH);\n var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n var len = toLength(that.length);\n var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);\n var search = String(searchString);\n return $endsWith\n ? $endsWith.call(that, search, end)\n : that.slice(end - search.length, end) === search;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmVuZHMtd2l0aC5qcz82MzU0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIxLjEuMy42IFN0cmluZy5wcm90b3R5cGUuZW5kc1dpdGgoc2VhcmNoU3RyaW5nIFssIGVuZFBvc2l0aW9uXSlcbid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID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Ly8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5zdHJpbmcuZW5kcy13aXRoLmpzXG4vLyBtb2R1bGUgaWQgPSAyNzRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///274\n")},function(module,exports,__webpack_require__){"use strict";eval("// 21.1.3.7 String.prototype.includes(searchString, position = 0)\n\nvar $export = __webpack_require__(0);\nvar context = __webpack_require__(115);\nvar INCLUDES = 'includes';\n\n$export($export.P + $export.F * __webpack_require__(116)(INCLUDES), 'String', {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~context(this, searchString, INCLUDES)\n .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmluY2x1ZGVzLmpzPzFhMWUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjEuMS4zLjcgU3RyaW5nLnByb3RvdHlwZS5pbmNsdWRlcyhzZWFyY2hTdHJpbmcsIHBvc2l0aW9uID0gMClcbid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgY29udGV4dCA9IHJlcXVpcmUoJy4vX3N0cmluZy1jb250ZXh0Jyk7XG52YXIgSU5DTFVERVMgPSAnaW5jbHVkZXMnO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqIHJlcXVpcmUoJy4vX2ZhaWxzLWlzLXJlZ2V4cCcpKElOQ0xVREVTKSwgJ1N0cmluZycsIHtcbiAgaW5jbHVkZXM6IGZ1bmN0aW9uIGluY2x1ZGVzKHNlYXJjaFN0cmluZyAvKiAsIHBvc2l0aW9uID0gMCAqLykge1xuICAgIHJldHVybiAhIX5jb250ZXh0KHRoaXMsIHNlYXJjaFN0cmluZywgSU5DTFVERVMpXG4gICAgICAuaW5kZXhPZihzZWFyY2hTdHJpbmcsIGFyZ3VtZW50cy5sZW5ndGggPiAxID8gYXJndW1lbnRzWzFdIDogdW5kZWZpbmVkKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5pbmNsdWRlcy5qc1xuLy8gbW9kdWxlIGlkID0gMjc1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///275\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\n\n$export($export.P, 'String', {\n // 21.1.3.13 String.prototype.repeat(count)\n repeat: __webpack_require__(109)\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnJlcGVhdC5qcz9iNmE0Il0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QLCAnU3RyaW5nJywge1xuICAvLyAyMS4xLjMuMTMgU3RyaW5nLnByb3RvdHlwZS5yZXBlYXQoY291bnQpXG4gIHJlcGVhdDogcmVxdWlyZSgnLi9fc3RyaW5nLXJlcGVhdCcpXG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnJlcGVhdC5qc1xuLy8gbW9kdWxlIGlkID0gMjc2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///276\n")},function(module,exports,__webpack_require__){"use strict";eval("// 21.1.3.18 String.prototype.startsWith(searchString [, position ])\n\nvar $export = __webpack_require__(0);\nvar toLength = __webpack_require__(12);\nvar context = __webpack_require__(115);\nvar STARTS_WITH = 'startsWith';\nvar $startsWith = ''[STARTS_WITH];\n\n$export($export.P + $export.F * __webpack_require__(116)(STARTS_WITH), 'String', {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = context(this, searchString, STARTS_WITH);\n var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = String(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN0YXJ0cy13aXRoLmpzPzBhZjUiXSwic291cmNl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8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5zdHJpbmcuc3RhcnRzLXdpdGguanNcbi8vIG1vZHVsZSBpZCA9IDI3N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///277\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.2 String.prototype.anchor(name)\n__webpack_require__(20)('anchor', function (createHTML) {\n return function anchor(name) {\n return createHTML(this, 'a', 'name', name);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmFuY2hvci5qcz9mMGRhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjIgU3RyaW5nLnByb3RvdHlwZS5hbmNob3IobmFtZSlcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ2FuY2hvcicsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBhbmNob3IobmFtZSkge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICdhJywgJ25hbWUnLCBuYW1lKTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5zdHJpbmcuYW5jaG9yLmpzXG4vLyBtb2R1bGUgaWQgPSAyNzhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///278\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.3 String.prototype.big()\n__webpack_require__(20)('big', function (createHTML) {\n return function big() {\n return createHTML(this, 'big', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmJpZy5qcz80NzhhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjMgU3RyaW5nLnByb3RvdHlwZS5iaWcoKVxucmVxdWlyZSgnLi9fc3RyaW5nLWh0bWwnKSgnYmlnJywgZnVuY3Rpb24gKGNyZWF0ZUhUTUwpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGJpZygpIHtcbiAgICByZXR1cm4gY3JlYXRlSFRNTCh0aGlzLCAnYmlnJywgJycsICcnKTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5zdHJpbmcuYmlnLmpzXG4vLyBtb2R1bGUgaWQgPSAyNzlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///279\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.4 String.prototype.blink()\n__webpack_require__(20)('blink', function (createHTML) {\n return function blink() {\n return createHTML(this, 'blink', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjgwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmJsaW5rLmpzP2UxMTkiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gQi4yLjMuNCBTdHJpbmcucHJvdG90eXBlLmJsaW5rKClcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ2JsaW5rJywgZnVuY3Rpb24gKGNyZWF0ZUhUTUwpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGJsaW5rKCkge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICdibGluaycsICcnLCAnJyk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmJsaW5rLmpzXG4vLyBtb2R1bGUgaWQgPSAyODBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///280\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.5 String.prototype.bold()\n__webpack_require__(20)('bold', function (createHTML) {\n return function bold() {\n return createHTML(this, 'b', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjgxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmJvbGQuanM/ODhjZCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBCLjIuMy41IFN0cmluZy5wcm90b3R5cGUuYm9sZCgpXG5yZXF1aXJlKCcuL19zdHJpbmctaHRtbCcpKCdib2xkJywgZnVuY3Rpb24gKGNyZWF0ZUhUTUwpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGJvbGQoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2InLCAnJywgJycpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5ib2xkLmpzXG4vLyBtb2R1bGUgaWQgPSAyODFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///281\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.6 String.prototype.fixed()\n__webpack_require__(20)('fixed', function (createHTML) {\n return function fixed() {\n return createHTML(this, 'tt', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjgyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZpeGVkLmpzPzI3ZTgiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gQi4yLjMuNiBTdHJpbmcucHJvdG90eXBlLmZpeGVkKClcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ2ZpeGVkJywgZnVuY3Rpb24gKGNyZWF0ZUhUTUwpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGZpeGVkKCkge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICd0dCcsICcnLCAnJyk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZpeGVkLmpzXG4vLyBtb2R1bGUgaWQgPSAyODJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///282\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.7 String.prototype.fontcolor(color)\n__webpack_require__(20)('fontcolor', function (createHTML) {\n return function fontcolor(color) {\n return createHTML(this, 'font', 'color', color);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjgzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZvbnRjb2xvci5qcz9mMzZhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjcgU3RyaW5nLnByb3RvdHlwZS5mb250Y29sb3IoY29sb3IpXG5yZXF1aXJlKCcuL19zdHJpbmctaHRtbCcpKCdmb250Y29sb3InLCBmdW5jdGlvbiAoY3JlYXRlSFRNTCkge1xuICByZXR1cm4gZnVuY3Rpb24gZm9udGNvbG9yKGNvbG9yKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2ZvbnQnLCAnY29sb3InLCBjb2xvcik7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZvbnRjb2xvci5qc1xuLy8gbW9kdWxlIGlkID0gMjgzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///283\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.8 String.prototype.fontsize(size)\n__webpack_require__(20)('fontsize', function (createHTML) {\n return function fontsize(size) {\n return createHTML(this, 'font', 'size', size);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZvbnRzaXplLmpzPzVmZjEiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gQi4yLjMuOCBTdHJpbmcucHJvdG90eXBlLmZvbnRzaXplKHNpemUpXG5yZXF1aXJlKCcuL19zdHJpbmctaHRtbCcpKCdmb250c2l6ZScsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBmb250c2l6ZShzaXplKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2ZvbnQnLCAnc2l6ZScsIHNpemUpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5mb250c2l6ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjg0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///284\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.9 String.prototype.italics()\n__webpack_require__(20)('italics', function (createHTML) {\n return function italics() {\n return createHTML(this, 'i', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLml0YWxpY3MuanM/Nzk1MiJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBCLjIuMy45IFN0cmluZy5wcm90b3R5cGUuaXRhbGljcygpXG5yZXF1aXJlKCcuL19zdHJpbmctaHRtbCcpKCdpdGFsaWNzJywgZnVuY3Rpb24gKGNyZWF0ZUhUTUwpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGl0YWxpY3MoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2knLCAnJywgJycpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5pdGFsaWNzLmpzXG4vLyBtb2R1bGUgaWQgPSAyODVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///285\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.10 String.prototype.link(url)\n__webpack_require__(20)('link', function (createHTML) {\n return function link(url) {\n return createHTML(this, 'a', 'href', url);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmxpbmsuanM/NTA5OCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBCLjIuMy4xMCBTdHJpbmcucHJvdG90eXBlLmxpbmsodXJsKVxucmVxdWlyZSgnLi9fc3RyaW5nLWh0bWwnKSgnbGluaycsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBsaW5rKHVybCkge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICdhJywgJ2hyZWYnLCB1cmwpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5saW5rLmpzXG4vLyBtb2R1bGUgaWQgPSAyODZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///286\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.11 String.prototype.small()\n__webpack_require__(20)('small', function (createHTML) {\n return function small() {\n return createHTML(this, 'small', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnNtYWxsLmpzPzQ5NGYiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gQi4yLjMuMTEgU3RyaW5nLnByb3RvdHlwZS5zbWFsbCgpXG5yZXF1aXJlKCcuL19zdHJpbmctaHRtbCcpKCdzbWFsbCcsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBzbWFsbCgpIHtcbiAgICByZXR1cm4gY3JlYXRlSFRNTCh0aGlzLCAnc21hbGwnLCAnJywgJycpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5zbWFsbC5qc1xuLy8gbW9kdWxlIGlkID0gMjg3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///287\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.12 String.prototype.strike()\n__webpack_require__(20)('strike', function (createHTML) {\n return function strike() {\n return createHTML(this, 'strike', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN0cmlrZS5qcz9lNjJjIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjEyIFN0cmluZy5wcm90b3R5cGUuc3RyaWtlKClcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ3N0cmlrZScsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBzdHJpa2UoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ3N0cmlrZScsICcnLCAnJyk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN0cmlrZS5qc1xuLy8gbW9kdWxlIGlkID0gMjg4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///288\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.13 String.prototype.sub()\n__webpack_require__(20)('sub', function (createHTML) {\n return function sub() {\n return createHTML(this, 'sub', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN1Yi5qcz8xMTZhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjEzIFN0cmluZy5wcm90b3R5cGUuc3ViKClcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ3N1YicsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBzdWIoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ3N1YicsICcnLCAnJyk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN1Yi5qc1xuLy8gbW9kdWxlIGlkID0gMjg5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///289\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.14 String.prototype.sup()\n__webpack_require__(20)('sup', function (createHTML) {\n return function sup() {\n return createHTML(this, 'sup', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN1cC5qcz8yNzZhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjE0IFN0cmluZy5wcm90b3R5cGUuc3VwKClcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ3N1cCcsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBzdXAoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ3N1cCcsICcnLCAnJyk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN1cC5qc1xuLy8gbW9kdWxlIGlkID0gMjkwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///290\n")},function(module,exports,__webpack_require__){eval("// 20.3.3.1 / 15.9.4.4 Date.now()\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS5ub3cuanM/NDFhMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4zLjMuMSAvIDE1LjkuNC40IERhdGUubm93KClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnRGF0ZScsIHsgbm93OiBmdW5jdGlvbiAoKSB7IHJldHVybiBuZXcgRGF0ZSgpLmdldFRpbWUoKTsgfSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS5ub3cuanNcbi8vIG1vZHVsZSBpZCA9IDI5MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///291\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar toPrimitive = __webpack_require__(31);\n\n$export($export.P + $export.F * __webpack_require__(5)(function () {\n return new Date(NaN).toJSON() !== null\n || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;\n}), 'Date', {\n // eslint-disable-next-line no-unused-vars\n toJSON: function toJSON(key) {\n var O = toObject(this);\n var pv = toPrimitive(O);\n return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS50by1qc29uLmpzP2YxZjgiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIHRvUHJpbWl0aXZlID0gcmVxdWlyZSgnLi9fdG8tcHJpbWl0aXZlJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QICsgJGV4cG9ydC5GICogcmVxdWlyZSgnLi9fZmFpbHMnKShmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBuZXcgRGF0ZShOYU4pLnRvSlNPTigpICE9PSBudWxsXG4gICAgfHwgRGF0ZS5wcm90b3R5cGUudG9KU09OLmNhbGwoeyB0b0lTT1N0cmluZzogZnVuY3Rpb24gKCkgeyByZXR1cm4gMTsgfSB9KSAhPT0gMTtcbn0pLCAnRGF0ZScsIHtcbiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXVudXNlZC12YXJzXG4gIHRvSlNPTjogZnVuY3Rpb24gdG9KU09OKGtleSkge1xuICAgIHZhciBPID0gdG9PYmplY3QodGhpcyk7XG4gICAgdmFyIHB2ID0gdG9QcmltaXRpdmUoTyk7XG4gICAgcmV0dXJuIHR5cGVvZiBwdiA9PSAnbnVtYmVyJyAmJiAhaXNGaW5pdGUocHYpID8gbnVsbCA6IE8udG9JU09TdHJpbmcoKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmRhdGUudG8tanNvbi5qc1xuLy8gbW9kdWxlIGlkID0gMjkyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///292\n")},function(module,exports,__webpack_require__){eval("// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()\nvar $export = __webpack_require__(0);\nvar toISOString = __webpack_require__(294);\n\n// PhantomJS / old WebKit has a broken implementations\n$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {\n toISOString: toISOString\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS50by1pc28tc3RyaW5nLmpzPzUxYjUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMy40LjM2IC8gMTUuOS41LjQzIERhdGUucHJvdG90eXBlLnRvSVNPU3RyaW5nKClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgdG9JU09TdHJpbmcgPSByZXF1aXJlKCcuL19kYXRlLXRvLWlzby1zdHJpbmcnKTtcblxuLy8gUGhhbnRvbUpTIC8gb2xkIFdlYktpdCBoYXMgYSBicm9rZW4gaW1wbGVtZW50YXRpb25zXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqIChEYXRlLnByb3RvdHlwZS50b0lTT1N0cmluZyAhPT0gdG9JU09TdHJpbmcpLCAnRGF0ZScsIHtcbiAgdG9JU09TdHJpbmc6IHRvSVNPU3RyaW5nXG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS50by1pc28tc3RyaW5nLmpzXG4vLyBtb2R1bGUgaWQgPSAyOTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///293\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()\nvar fails = __webpack_require__(5);\nvar getTime = Date.prototype.getTime;\nvar $toISOString = Date.prototype.toISOString;\n\nvar lz = function (num) {\n return num > 9 ? num : '0' + num;\n};\n\n// PhantomJS / old WebKit has a broken implementations\nmodule.exports = (fails(function () {\n return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';\n}) || !fails(function () {\n $toISOString.call(new Date(NaN));\n})) ? function toISOString() {\n if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');\n var d = this;\n var y = d.getUTCFullYear();\n var m = d.getUTCMilliseconds();\n var s = y < 0 ? '-' : y > 9999 ? '+' : '';\n return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +\n '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +\n 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +\n ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';\n} : $toISOString;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZGF0ZS10by1pc28tc3RyaW5nLmpzPzYzYjQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gMjAuMy40LjM2IC8gMTUuOS41LjQzIERhdGUucHJvdG90eXBlLnRvSVNPU3RyaW5nKClcbnZhciBmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG52YXIgZ2V0VGltZSA9IERhdGUucHJvdG90eXBlLmdldFRpbWU7XG52YXIgJHRvSVNPU3RyaW5nID0gRGF0ZS5wcm90b3R5cGUudG9JU09TdHJpbmc7XG5cbnZhciBseiA9IGZ1bmN0aW9uIChudW0pIHtcbiAgcmV0dXJuIG51bSA+IDkgPyBudW0gOiAnMCcgKyBudW07XG59O1xuXG4vLyBQaGFudG9tSlMgLyBvbGQgV2ViS2l0IGhhcyBhIGJyb2tlbiBpbXBsZW1lbnRhdGlvbnNcbm1vZHVsZS5leHBvcnRzID0gKGZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgcmV0dXJuICR0b0lTT1N0cmluZy5jYWxsKG5ldyBEYXRlKC01ZTEzIC0gMSkpICE9ICcwMzg1LTA3LTI1VDA3OjA2OjM5Ljk5OVonO1xufSkgfHwgIWZhaWxzKGZ1b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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///294\n")},function(module,exports,__webpack_require__){eval("var DateProto = Date.prototype;\nvar INVALID_DATE = 'Invalid Date';\nvar TO_STRING = 'toString';\nvar $toString = DateProto[TO_STRING];\nvar getTime = DateProto.getTime;\nif (new Date(NaN) + '' != INVALID_DATE) {\n __webpack_require__(19)(DateProto, TO_STRING, function toString() {\n var value = getTime.call(this);\n // eslint-disable-next-line no-self-compare\n return value === value ? $toString.call(this) : INVALID_DATE;\n });\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS50by1zdHJpbmcuanM/NDY0ZSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgRGF0ZVByb3RvID0gRGF0ZS5wcm90b3R5cGU7XG52YXIgSU5WQUxJRF9EQVRFID0gJ0ludmFsaWQgRGF0ZSc7XG52YXIgVE9fU1RSSU5HID0gJ3RvU3RyaW5nJztcbnZhciAkdG9TdHJpbmcgPSBEYXRlUHJvdG9bVE9fU1RSSU5HXTtcbnZhciBnZXRUaW1lID0gRGF0ZVByb3RvLmdldFRpbWU7XG5pZiAobmV3IERhdGUoTmFOKSArICcnICE9IElOVkFMSURfREFURSkge1xuICByZXF1aXJlKCcuL19yZWRlZmluZScpKERhdGVQcm90bywgVE9fU1RSSU5HLCBmdW5jdGlvbiB0b1N0cmluZygpIHtcbiAgICB2YXIgdmFsdWUgPSBnZXRUaW1lLmNhbGwodGhpcyk7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXNlbGYtY29tcGFyZVxuICAgIHJldHVybiB2YWx1ZSA9PT0gdmFsdWUgPyAkdG9TdHJpbmcuY2FsbCh0aGlzKSA6IElOVkFMSURfREFURTtcbiAgfSk7XG59XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmRhdGUudG8tc3RyaW5nLmpzXG4vLyBtb2R1bGUgaWQgPSAyOTVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///295\n")},function(module,exports,__webpack_require__){eval("var TO_PRIMITIVE = __webpack_require__(8)('toPrimitive');\nvar proto = Date.prototype;\n\nif (!(TO_PRIMITIVE in proto)) __webpack_require__(18)(proto, TO_PRIMITIVE, __webpack_require__(297));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS50by1wcmltaXRpdmUuanM/ZTEwZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgVE9fUFJJTUlUSVZFID0gcmVxdWlyZSgnLi9fd2tzJykoJ3RvUHJpbWl0aXZlJyk7XG52YXIgcHJvdG8gPSBEYXRlLnByb3RvdHlwZTtcblxuaWYgKCEoVE9fUFJJTUlUSVZFIGluIHByb3RvKSkgcmVxdWlyZSgnLi9faGlkZScpKHByb3RvLCBUT19QUklNSVRJVkUsIHJlcXVpcmUoJy4vX2RhdGUtdG8tcHJpbWl0aXZlJykpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5kYXRlLnRvLXByaW1pdGl2ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjk2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///296\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar anObject = __webpack_require__(3);\nvar toPrimitive = __webpack_require__(31);\nvar NUMBER = 'number';\n\nmodule.exports = function (hint) {\n if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');\n return toPrimitive(anObject(this), hint != NUMBER);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZGF0ZS10by1wcmltaXRpdmUuanM/OGMxZCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciB0b1ByaW1pdGl2ZSA9IHJlcXVpcmUoJy4vX3RvLXByaW1pdGl2ZScpO1xudmFyIE5VTUJFUiA9ICdudW1iZXInO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChoaW50KSB7XG4gIGlmIChoaW50ICE9PSAnc3RyaW5nJyAmJiBoaW50ICE9PSBOVU1CRVIgJiYgaGludCAhPT0gJ2RlZmF1bHQnKSB0aHJvdyBUeXBlRXJyb3IoJ0luY29ycmVjdCBoaW50Jyk7XG4gIHJldHVybiB0b1ByaW1pdGl2ZShhbk9iamVjdCh0aGlzKSwgaGludCAhPSBOVU1CRVIpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZGF0ZS10by1wcmltaXRpdmUuanNcbi8vIG1vZHVsZSBpZCA9IDI5N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///297\n")},function(module,exports,__webpack_require__){eval("// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Array', { isArray: __webpack_require__(81) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuaXMtYXJyYXkuanM/MjBjNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMi4xLjIuMiAvIDE1LjQuMy4yIEFycmF5LmlzQXJyYXkoYXJnKVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdBcnJheScsIHsgaXNBcnJheTogcmVxdWlyZSgnLi9faXMtYXJyYXknKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuaXMtYXJyYXkuanNcbi8vIG1vZHVsZSBpZCA9IDI5OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///298\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar ctx = __webpack_require__(27);\nvar $export = __webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar call = __webpack_require__(162);\nvar isArrayIter = __webpack_require__(117);\nvar toLength = __webpack_require__(12);\nvar createProperty = __webpack_require__(118);\nvar getIterFn = __webpack_require__(119);\n\n$export($export.S + $export.F * !__webpack_require__(83)(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZnJvbS5qcz82ZGUxIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBjdHggPS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cmV0dXJuIHJlc3VsdDtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LmZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDI5OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///299\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar createProperty = __webpack_require__(118);\n\n// WebKit Array.of isn't generic\n$export($export.S + $export.F * __webpack_require__(5)(function () {\n function F() { /* empty */ }\n return !(Array.of.call(F) instanceof F);\n}), 'Array', {\n // 22.1.2.3 Array.of( ...items)\n of: function of(/* ...args */) {\n var index = 0;\n var aLen = arguments.length;\n var result = new (typeof this == 'function' ? this : Array)(aLen);\n while (aLen > index) createProperty(result, index, arguments[index++]);\n result.length = aLen;\n return result;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkub2YuanM/YzRjYSJdLCJzb3VyY2VzQ29udGVudCI6WyIndX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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///300\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 22.1.3.13 Array.prototype.join(separator)\nvar $export = __webpack_require__(0);\nvar toIObject = __webpack_require__(24);\nvar arrayJoin = [].join;\n\n// fallback for not array-like strings\n$export($export.P + $export.F * (__webpack_require__(70) != Object || !__webpack_require__(29)(arrayJoin)), 'Array', {\n join: function join(separator) {\n return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuam9pbi5qcz84ZjhkIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDIyLjEuMy4xMyBBcnJheS5wcm90b3R5cGUuam9pbihzZXBhcmF0b3IpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHRvSU9iamVjdCA9IHJlcXVpcmUoJy4vX3RvLWlvYmplY3QnKTtcbnZhciBhcnJheUpvaW4gPSBbXS5qb2luO1xuXG4vLyBmYWxsYmFjayBmb3Igbm90IGFycmF5LWxpa2Ugc3RyaW5nc1xuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAocmVxdWlyZSgnLi9faW9iamVjdCcpICE9IE9iamVjdCB8fCAhcmVxdWlyZSgnLi9fc3RyaWN0LW1ldGhvZCcpKGFycmF5Sm9pbikpLCAnQXJyYXknLCB7XG4gIGpvaW46IGZ1bmN0aW9uIGpvaW4oc2VwYXJhdG9yKSB7XG4gICAgcmV0dXJuIGFycmF5Sm9pbi5jYWxsKHRvSU9iamVjdCh0aGlzKSwgc2VwYXJhdG9yID09PSB1bmRlZmluZWQgPyAnLCcgOiBzZXBhcmF0b3IpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuam9pbi5qc1xuLy8gbW9kdWxlIGlkID0gMzAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///301\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar html = __webpack_require__(105);\nvar cof = __webpack_require__(28);\nvar toAbsoluteIndex = __webpack_require__(51);\nvar toLength = __webpack_require__(12);\nvar arraySlice = [].slice;\n\n// fallback for not array-like ES3 strings and DOM objects\n$export($export.P + $export.F * __webpack_require__(5)(function () {\n if (html) arraySlice.call(html);\n}), 'Array', {\n slice: function slice(begin, end) {\n var len = toLength(this.length);\n var klass = cof(this);\n end = end === undefined ? len : end;\n if (klass == 'Array') return arraySlice.call(this, begin, end);\n var start = toAbsoluteIndex(begin, len);\n var upTo = toAbsoluteIndex(end, len);\n var size = toLength(upTo - start);\n var cloned = new Array(size);\n var i = 0;\n for (; i < size; i++) cloned[i] = klass == 'String'\n ? this.charAt(start + i)\n : this[start + i];\n return cloned;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm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SA9IHRvTGVuZ3RoKHVwVG8gLSBzdGFydCk7XG4gICAgdmFyIGNsb25lZCA9IG5ldyBBcnJheShzaXplKTtcbiAgICB2YXIgaSA9IDA7XG4gICAgZm9yICg7IGkgPCBzaXplOyBpKyspIGNsb25lZFtpXSA9IGtsYXNzID09ICdTdHJpbmcnXG4gICAgICA/IHRoaXMuY2hhckF0KHN0YXJ0ICsgaSlcbiAgICAgIDogdGhpc1tzdGFydCArIGldO1xuICAgIHJldHVybiBjbG9uZWQ7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5hcnJheS5zbGljZS5qc1xuLy8gbW9kdWxlIGlkID0gMzAyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///302\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar aFunction = __webpack_require__(16);\nvar toObject = __webpack_require__(15);\nvar fails = __webpack_require__(5);\nvar $sort = [].sort;\nvar test = [1, 2, 3];\n\n$export($export.P + $export.F * (fails(function () {\n // IE8-\n test.sort(undefined);\n}) || !fails(function () {\n // V8 bug\n test.sort(null);\n // Old WebKit\n}) || !__webpack_require__(29)($sort)), 'Array', {\n // 22.1.3.25 Array.prototype.sort(comparefn)\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? $sort.call(toObject(this))\n : $sort.call(toObject(this), aFunction(comparefn));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuc29ydC5qcz9iODM2Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgYUZ1bmN0aW9uID0gcmVxdWlyZSgnLi9fYS1mdW5jdGlvbicpO1xudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgZmFpbHMgPSByZXF1aXJlKCcuL19mYWlscycpO1xudmFyICRzb3J0ID0gW10uc29ydDtcbnZhciB0ZXN0ID0gWzEsIDIsIDNdO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqIChmYWlscyhmdW5jdGlvbiAoKSB7XG4gIC8vIElFOC1cbiAgdGVzdC5zb3J0KHVuZGVmaW5lZCk7XG59KSB8fCAhZmFpbHMoZnVuY3Rpb24gKCkge1xuICAvLyBWOCBidWdcbiAgdGVzdC5zb3J0KG51bGwpO1xuICAvLyBPbGQgV2ViS2l0XG59KSB8fCAhcmVxdWlyZSgnLi9fc3RyaWN0LW1ldGhvZCcpKCRzb3J0KSksICdBcnJheScsIHtcbiAgLy8gMjIuMS4zLjI1IEFycmF5LnByb3RvdHlwZS5zb3J0KGNvbXBhcmVmbilcbiAgc29ydDogZnVuY3Rpb24gc29ydChjb21wYXJlZm4pIHtcbiAgICByZXR1cm4gY29tcGFyZWZuID09PSB1bmRlZmluZWRcbiAgICAgID8gJHNvcnQuY2FsbCh0b09iamVjdCh0aGlzKSlcbiAgICAgIDogJHNvcnQuY2FsbCh0b09iamVjdCh0aGlzKSwgYUZ1bmN0aW9uKGNvbXBhcmVmbikpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuc29ydC5qc1xuLy8gbW9kdWxlIGlkID0gMzAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///303\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $forEach = __webpack_require__(35)(0);\nvar STRICT = __webpack_require__(29)([].forEach, true);\n\n$export($export.P + $export.F * !STRICT, 'Array', {\n // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])\n forEach: function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZm9yLWVhY2guanM/MDg0MyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRmb3JFYWNoID0gcmVxdWlyZSgnLi9fYXJyYXktbWV0aG9kcycpKDApO1xudmFyIFNUUklDVCA9IHJlcXVpcmUoJy4vX3N0cmljdC1tZXRob2QnKShbXS5mb3JFYWNoLCB0cnVlKTtcblxuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAhU1RSSUNULCAnQXJyYXknLCB7XG4gIC8vIDIyLjEuMy4xMCAvIDE1LjQuNC4xOCBBcnJheS5wcm90b3R5cGUuZm9yRWFjaChjYWxsYmFja2ZuIFssIHRoaXNBcmddKVxuICBmb3JFYWNoOiBmdW5jdGlvbiBmb3JFYWNoKGNhbGxiYWNrZm4gLyogLCB0aGlzQXJnICovKSB7XG4gICAgcmV0dXJuICRmb3JFYWNoKHRoaXMsIGNhbGxiYWNrZm4sIGFyZ3VtZW50c1sxXSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5hcnJheS5mb3ItZWFjaC5qc1xuLy8gbW9kdWxlIGlkID0gMzA0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///304\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(6);\nvar isArray = __webpack_require__(81);\nvar SPECIES = __webpack_require__(8)('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA1LmpzIiwic291cmNlcyI6WyJ3ZWJwY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7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///305\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $map = __webpack_require__(35)(1);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].map, true), 'Array', {\n // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkubWFwLmpzP2MzYTUiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkbWFwID0gcmVxdWlyZSgnLi9fYXJyYXktbWV0aG9kcycpKDEpO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqICFyZXF1aXJlKCcuL19zdHJpY3QtbWV0aG9kJykoW10ubWFwLCB0cnVlKSwgJ0FycmF5Jywge1xuICAvLyAyMi4xLjMuMTUgLyAxNS40LjQuMTkgQXJyYXkucHJvdG90eXBlLm1hcChjYWxsYmFja2ZuIFssIHRoaXNBcmddKVxuICBtYXA6IGZ1bmN0aW9uIG1hcChjYWxsYmFja2ZuIC8qICwgdGhpc0FyZyAqLykge1xuICAgIHJldHVybiAkbWFwKHRoaXMsIGNhbGxiYWNrZm4sIGFyZ3VtZW50c1sxXSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5hcnJheS5tYXAuanNcbi8vIG1vZHVsZSBpZCA9IDMwNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///306\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $filter = __webpack_require__(35)(2);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].filter, true), 'Array', {\n // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZmlsdGVyLmpzPzdjZTciXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkZmlsdGVyID0gcmVxdWlyZSgnLi9fYXJyYXktbWV0aG9kcycpKDIpO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqICFyZXF1aXJlKCcuL19zdHJpY3QtbWV0aG9kJykoW10uZmlsdGVyLCB0cnVlKSwgJ0FycmF5Jywge1xuICAvLyAyMi4xLjMuNyAvIDE1LjQuNC4yMCBBcnJheS5wcm90b3R5cGUuZmlsdGVyKGNhbGxiYWNrZm4gWywgdGhpc0FyZ10pXG4gIGZpbHRlcjogZnVuY3Rpb24gZmlsdGVyKGNhbGxiYWNrZm4gLyogLCB0aGlzQXJnICovKSB7XG4gICAgcmV0dXJuICRmaWx0ZXIodGhpcywgY2FsbGJhY2tmbiwgYXJndW1lbnRzWzFdKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LmZpbHRlci5qc1xuLy8gbW9kdWxlIGlkID0gMzA3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///307\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $some = __webpack_require__(35)(3);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].some, true), 'Array', {\n // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])\n some: function some(callbackfn /* , thisArg */) {\n return $some(this, callbackfn, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuc29tZS5qcz9jMTU3Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJHNvbWUgPSByZXF1aXJlKCcuL19hcnJheS1tZXRob2RzJykoMyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX3N0cmljdC1tZXRob2QnKShbXS5zb21lLCB0cnVlKSwgJ0FycmF5Jywge1xuICAvLyAyMi4xLjMuMjMgLyAxNS40LjQuMTcgQXJyYXkucHJvdG90eXBlLnNvbWUoY2FsbGJhY2tmbiBbLCB0aGlzQXJnXSlcbiAgc29tZTogZnVuY3Rpb24gc29tZShjYWxsYmFja2ZuIC8qICwgdGhpc0FyZyAqLykge1xuICAgIHJldHVybiAkc29tZSh0aGlzLCBjYWxsYmFja2ZuLCBhcmd1bWVudHNbMV0pO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuc29tZS5qc1xuLy8gbW9kdWxlIGlkID0gMzA4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///308\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $every = __webpack_require__(35)(4);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].every, true), 'Array', {\n // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])\n every: function every(callbackfn /* , thisArg */) {\n return $every(this, callbackfn, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZXZlcnkuanM/MzY0YSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRldmVyeSA9IHJlcXVpcmUoJy4vX2FycmF5LW1ldGhvZHMnKSg0KTtcblxuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAhcmVxdWlyZSgnLi9fc3RyaWN0LW1ldGhvZCcpKFtdLmV2ZXJ5LCB0cnVlKSwgJ0FycmF5Jywge1xuICAvLyAyMi4xLjMuNSAvIDE1LjQuNC4xNiBBcnJheS5wcm90b3R5cGUuZXZlcnkoY2FsbGJhY2tmbiBbLCB0aGlzQXJnXSlcbiAgZXZlcnk6IGZ1bmN0aW9uIGV2ZXJ5KGNhbGxiYWNrZm4gLyogLCB0aGlzQXJnICovKSB7XG4gICAgcmV0dXJuICRldmVyeSh0aGlzLCBjYWxsYmFja2ZuLCBhcmd1bWVudHNbMV0pO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZXZlcnkuanNcbi8vIG1vZHVsZSBpZCA9IDMwOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///309\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $reduce = __webpack_require__(163);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].reduce, true), 'Array', {\n // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments[1], false);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkucmVkdWNlLmpzP2MyNzQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkcmVkdWNlID0gcmVxdWlyZSgnLi9fYXJyYXktcmVkdWNlJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX3N0cmljdC1tZXRob2QnKShbXS5yZWR1Y2UsIHRydWUpLCAnQXJyYXknLCB7XG4gIC8vIDIyLjEuMy4xOCAvIDE1LjQuNC4yMSBBcnJheS5wcm90b3R5cGUucmVkdWNlKGNhbGxiYWNrZm4gWywgaW5pdGlhbFZhbHVlXSlcbiAgcmVkdWNlOiBmdW5jdGlvbiByZWR1Y2UoY2FsbGJhY2tmbiAvKiAsIGluaXRpYWxWYWx1ZSAqLykge1xuICAgIHJldHVybiAkcmVkdWNlKHRoaXMsIGNhbGxiYWNrZm4sIGFyZ3VtZW50cy5sZW5ndGgsIGFyZ3VtZW50c1sxXSwgZmFsc2UpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkucmVkdWNlLmpzXG4vLyBtb2R1bGUgaWQgPSAzMTBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///310\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $reduce = __webpack_require__(163);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].reduceRight, true), 'Array', {\n // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])\n reduceRight: function reduceRight(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments[1], true);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzExLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkucmVkdWNlLXJpZ2h0LmpzPzk2NDQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkcmVkdWNlID0gcmVxdWlyZSgnLi9fYXJyYXktcmVkdWNlJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX3N0cmljdC1tZXRob2QnKShbXS5yZWR1Y2VSaWdodCwgdHJ1ZSksICdBcnJheScsIHtcbiAgLy8gMjIuMS4zLjE5IC8gMTUuNC40LjIyIEFycmF5LnByb3RvdHlwZS5yZWR1Y2VSaWdodChjYWxsYmFja2ZuIFssIGluaXRpYWxWYWx1ZV0pXG4gIHJlZHVjZVJpZ2h0OiBmdW5jdGlvbiByZWR1Y2VSaWdodChjYWxsYmFja2ZuIC8qICwgaW5pdGlhbFZhbHVlICovKSB7XG4gICAgcmV0dXJuICRyZWR1Y2UodGhpcywgY2FsbGJhY2tmbiwgYXJndW1lbnRzLmxlbmd0aCwgYXJndW1lbnRzWzFdLCB0cnVlKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LnJlZHVjZS1yaWdodC5qc1xuLy8gbW9kdWxlIGlkID0gMzExXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///311\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $indexOf = __webpack_require__(79)(false);\nvar $native = [].indexOf;\nvar NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;\n\n$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(29)($native)), 'Array', {\n // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? $native.apply(this, arguments) || 0\n : $indexOf(this, searchElement, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuaW5kZXgtb2YuanM/ZjgyMyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRpbmRleE9mID0gcmVxdWlyZSgnLi9fYXJyYXktaW5jbHVkZXMnKShmYWxzZSk7XG52YXIgJG5hdGl2ZSA9IFtdLmluZGV4T2Y7XG52YXIgTkVHQVRJVkVfWkVSTyA9ICEhJG5hdGl2ZSAmJiAxIC8gWzFdLmluZGV4T2YoMSwgLTApIDwgMDtcblxuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAoTkVHQVRJVkVfWkVSTyB8fCAhcmVxdWlyZSgnLi9fc3RyaWN0LW1ldGhvZCcpKCRuYXRpdmUpKSwgJ0FycmF5Jywge1xuICAvLyAyMi4xLjMuMTEgLyAxNS40LjQuMTQgQXJyYXkucHJvdG90eXBlLmluZGV4T2Yoc2VhcmNoRWxlbWVudCBbLCBmcm9tSW5kZXhdKVxuICBpbmRleE9mOiBmdW5jdGlvbiBpbmRleE9mKHNlYXJjaEVsZW1lbnQgLyogLCBmcm9tSW5kZXggPSAwICovKSB7XG4gICAgcmV0dXJuIE5FR0FUSVZFX1pFUk9cbiAgICAgIC8vIGNvbnZlcnQgLTAgdG8gKzBcbiAgICAgID8gJG5hdGl2ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IDBcbiAgICAgIDogJGluZGV4T2YodGhpcywgc2VhcmNoRWxlbWVudCwgYXJndW1lbnRzWzFdKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LmluZGV4LW9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzMTJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///312\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toIObject = __webpack_require__(24);\nvar toInteger = __webpack_require__(33);\nvar toLength = __webpack_require__(12);\nvar $native = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;\n\n$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(29)($native)), 'Array', {\n // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;\n var O = toIObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;\n return -1;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkubGFzdC1pbmRleC1vZi5qcz9hMDcyIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgdG9JT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8taW9iamVjdCcpO1xudmFyIHRvSW50ZWdlciA9IHJlcXVpcmUoJy4vX3RvLWludGVnZXInKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4vX3RvLWxlbmd0aCcpO1xudmFyICRuYXRpdmUgPSBbXS5sYXN0SW5kZXhPZjtcbnZhciBORUdBVElWRV9aRVJPID0gISEkbmF0aXZlICYmIDEgLyBbMV0ubGFzdEluZGV4T2YoMSwgLTApIDwgMDtcblxuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAoTkVHQVRJVkVfWkVSTyB8fCAhcmVxdWlyZSgnLi9fc3RyaWN0LW1ldGhvZCcpKCRuYXRpdmUpKSwgJ0FycmF5J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QUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///313\n")},function(module,exports,__webpack_require__){eval("// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\nvar $export = __webpack_require__(0);\n\n$export($export.P, 'Array', { copyWithin: __webpack_require__(164) });\n\n__webpack_require__(43)('copyWithin');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuY29weS13aXRoaW4uanM/ZjZmNyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMi4xLjMuMyBBcnJheS5wcm90b3R5cGUuY29weVdpdGhpbih0YXJnZXQsIHN0YXJ0LCBlbmQgPSB0aGlzLmxlbmd0aClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QLCAnQXJyYXknLCB7IGNvcHlXaXRoaW46IHJlcXVpcmUoJy4vX2FycmF5LWNvcHktd2l0aGluJykgfSk7XG5cbnJlcXVpcmUoJy4vX2FkZC10by11bnNjb3BhYmxlcycpKCdjb3B5V2l0aGluJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LmNvcHktd2l0aGluLmpzXG4vLyBtb2R1bGUgaWQgPSAzMTRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///314\n")},function(module,exports,__webpack_require__){eval("// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\nvar $export = __webpack_require__(0);\n\n$export($export.P, 'Array', { fill: __webpack_require__(121) });\n\n__webpack_require__(43)('fill');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZmlsbC5qcz8zNjhlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIyLjEuMy42IEFycmF5LnByb3RvdHlwZS5maWxsKHZhbHVlLCBzdGFydCA9IDAsIGVuZCA9IHRoaXMubGVuZ3RoKVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlAsICdBcnJheScsIHsgZmlsbDogcmVxdWlyZSgnLi9fYXJyYXktZmlsbCcpIH0pO1xuXG5yZXF1aXJlKCcuL19hZGQtdG8tdW5zY29wYWJsZXMnKSgnZmlsbCcpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5hcnJheS5maWxsLmpzXG4vLyBtb2R1bGUgaWQgPSAzMTVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///315\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = __webpack_require__(0);\nvar $find = __webpack_require__(35)(5);\nvar KEY = 'find';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n__webpack_require__(43)(KEY);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZmluZC5qcz81YTk0Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDIyLjEuMy44IEFycmF5LnByb3RvdHlwZS5maW5kKHByZWRpY2F0ZSwgdGhpc0FyZyA9IHVuZGVmaW5lZClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJGZpbmQgPSByZXF1aXJlKCcuL19hcnJheS1tZXRob2RzJykoNSk7XG52YXIgS0VZID0gJ2ZpbmQnO1xudmFyIGZvcmNlZCA9IHRydWU7XG4vLyBTaG91bGRuJ3Qgc2tpcCBob2xlc1xuaWYgKEtFWSBpbiBbXSkgQXJyYXkoMSlbS0VZXShmdW5jdGlvbiAoKSB7IGZvcmNlZCA9IGZhbHNlOyB9KTtcbiRleHBvcnQoJGV4cG9ydC5QICsgJGV4cG9ydC5GICogZm9yY2VkLCAnQXJyYXknLCB7XG4gIGZpbmQ6IGZ1bmN0aW9uIGZpbmQoY2FsbGJhY2tmbiAvKiAsIHRoYXQgPSB1bmRlZmluZWQgKi8pIHtcbiAgICByZXR1cm4gJGZpbmQodGhpcywgY2FsbGJhY2tmbiwgYXJndW1lbnRzLmxlbmd0aCA+IDEgPyBhcmd1bWVudHNbMV0gOiB1bmRlZmluZWQpO1xuICB9XG59KTtcbnJlcXVpcmUoJy4vX2FkZC10by11bnNjb3BhYmxlcycpKEtFWSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LmZpbmQuanNcbi8vIG1vZHVsZSBpZCA9IDMxNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///316\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)\nvar $export = __webpack_require__(0);\nvar $find = __webpack_require__(35)(6);\nvar KEY = 'findIndex';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n__webpack_require__(43)(KEY);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZmluZC1pbmRleC5qcz81M2FhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDIyLjEuMy45IEFycmF5LnByb3RvdHlwZS5maW5kSW5kZXgocHJlZGljYXRlLCB0aGlzQXJnID0gdW5kZWZpbmVkKVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkZmluZCA9IHJlcXVpcmUoJy4vX2FycmF5LW1ldGhvZHMnKSg2KTtcbnZhciBLRVkgPSAnZmluZEluZGV4JztcbnZhciBmb3JjZWQgPSB0cnVlO1xuLy8gU2hvdWxkbid0IHNraXAgaG9sZXNcbmlmIChLRVkgaW4gW10pIEFycmF5KDEpW0tFWV0oZnVuY3Rpb24gKCkgeyBmb3JjZWQgPSBmYWxzZTsgfSk7XG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqIGZvcmNlZCwgJ0FycmF5Jywge1xuICBmaW5kSW5kZXg6IGZ1bmN0aW9uIGZpbmRJbmRleChjYWxsYmFja2ZuIC8qICwgdGhhdCA9IHVuZGVmaW5lZCAqLykge1xuICAgIHJldHVybiAkZmluZCh0aGlzLCBjYWxsYmFja2ZuLCBhcmd1bWVudHMubGVuZ3RoID4gMSA/IGFyZ3VtZW50c1sxXSA6IHVuZGVmaW5lZCk7XG4gIH1cbn0pO1xucmVxdWlyZSgnLi9fYWRkLXRvLXVuc2NvcGFibGVzJykoS0VZKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZmluZC1pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gMzE3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///317\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(54)('Array');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuc3BlY2llcy5qcz80M2YwIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3NldC1zcGVjaWVzJykoJ0FycmF5Jyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LnNwZWNpZXMuanNcbi8vIG1vZHVsZSBpZCA9IDMxOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///318\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar inheritIfRequired = __webpack_require__(108);\nvar dP = __webpack_require__(11).f;\nvar gOPN = __webpack_require__(53).f;\nvar isRegExp = __webpack_require__(82);\nvar $flags = __webpack_require__(84);\nvar $RegExp = global.RegExp;\nvar Base = $RegExp;\nvar proto = $RegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n// \"new\" creates a new object, old webkit buggy here\nvar CORRECT_NEW = new $RegExp(re1) !== re1;\n\nif (__webpack_require__(10) && (!CORRECT_NEW || __webpack_require__(5)(function () {\n re2[__webpack_require__(8)('match')] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';\n}))) {\n $RegExp = function RegExp(p, f) {\n var tiRE = this instanceof $RegExp;\n var piRE = isRegExp(p);\n var fiU = f === undefined;\n return !tiRE && piRE && p.constructor === $RegExp && fiU ? p\n : inheritIfRequired(CORRECT_NEW\n ? new Base(piRE && !fiU ? p.source : p, f)\n : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)\n , tiRE ? this : proto, $RegExp);\n };\n var proxy = function (key) {\n key in $RegExp || dP($RegExp, key, {\n configurable: true,\n get: function () { return Base[key]; },\n set: function (it) { Base[key] = it; }\n });\n };\n for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);\n proto.constructor = $RegExp;\n $RegExp.prototype = proto;\n __webpack_require__(19)(global, 'RegExp', $RegExp);\n}\n\n__webpack_require__(54)('RegExp');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLmNvbnN0cnVjdG9yLmpzPzk2NzYiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIGluaGVyaXRJZlJlcXVpcmVkID0gcmVxdWlyZSgnLi9faW5oZXJpdC1pZi1yZXF1aXJlZCcpO1xudmFyIGRQID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJykuZjtcbnZhciBnT1BOID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcG4nKS5mO1xudmFyIGlzUmVnRXhwID0gcmVxdWlyZSgnLi9faXMtcmVnZXhwJyk7XG52YXIgJGZsYWdzID0gcmVxdWlyZSgnLi9fZmxhZ3MnKTtcbnZhciAkUmVnRXhwID0gZ2xvYmFsLlJlZ0V4cDtcbnZhciBCYXNlID0gJFJlZ0V4cDtcbnZhciBwcm90byA9ICRSZWdFeHAucHJvdG90eXBlO1xudmFyIHJlMSA9IC9hL2c7XG52YXIgcmUyID0gL2EvZztcbi8vIFwibmV3XCIgY3JlYXRlcyBhIG5ldyBvYmplY3QsIG9sZCB3ZWJraXQgYnVnZ3kgaGVyZVxudmFyIENPUlJFQ1RfTkVXID0gbmV3ICRSZ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ifQ==\n//# sourceURL=webpack-internal:///319\n")},function(module,exports,__webpack_require__){"use strict";eval("\n__webpack_require__(166);\nvar anObject = __webpack_require__(3);\nvar $flags = __webpack_require__(84);\nvar DESCRIPTORS = __webpack_require__(10);\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n __webpack_require__(19)(RegExp.prototype, TO_STRING, fn, true);\n};\n\n// 21.2.5.14 RegExp.prototype.toString()\nif (__webpack_require__(5)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {\n define(function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);\n });\n// FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLnRvLXN0cmluZy5qcz8xNWE2Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnJlcXVpcmUoJy4vZXM2LnJlZ2V4cC5mbGFncycpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgJGZsYWdzID0gcmVxdWlyZSgnLi9fZmxhZ3MnKTtcbnZhciBERVNDUklQVE9SUyA9IHJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJyk7XG52YXIgVE9fU1RSSU5HID0gJ3RvU3RyaW5nJztcbnZhciAkdG9TdHJpbmcgPSAvLi9bVE9fU1RSSU5HXTtcblxudmFyIGRlZmluZSA9IGZ1bmN0aW9uIChmbikge1xuICByZXF1aXJlKCcuL19yZWRlZmluZScpKFJl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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///320\n")},function(module,exports,__webpack_require__){eval("// @@match logic\n__webpack_require__(85)('match', 1, function (defined, MATCH, $match) {\n // 21.1.3.11 String.prototype.match(regexp)\n return [function match(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n }, $match];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLm1hdGNoLmpzPzMxZjciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQEBtYXRjaCBsb2dpY1xucmVxdWlyZSgnLi9fZml4LXJlLXdrcycpKCdtYXRjaCcsIDEsIGZ1bmN0aW9uIChkZWZpbmVkLCBNQVRDSCwgJG1hdGNoKSB7XG4gIC8vIDIxLjEuMy4xMSBTdHJpbmcucHJvdG90eXBlLm1hdGNoKHJlZ2V4cClcbiAgcmV0dXJuIFtmdW5jdGlvbiBtYXRjaChyZWdleHApIHtcbiAgICAndXNlIHN0cmljdCc7XG4gICAgdmFyIE8gPSBkZWZpbmVkKHRoaXMpO1xuICAgIHZhciBmbiA9IHJlZ2V4cCA9PSB1bmRlZmluZWQgPyB1bmRlZmluZWQgOiByZWdleHBbTUFUQ0hdO1xuICAgIHJldHVybiBmbiAhPT0gdW5kZWZpbmVkID8gZm4uY2FsbChyZWdleHAsIE8pIDogbmV3IFJlZ0V4cChyZWdleHApW01BVENIXShTdHJpbmcoTykpO1xuICB9LCAkbWF0Y2hdO1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnJlZ2V4cC5tYXRjaC5qc1xuLy8gbW9kdWxlIGlkID0gMzIxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///321\n")},function(module,exports,__webpack_require__){eval("// @@replace logic\n__webpack_require__(85)('replace', 2, function (defined, REPLACE, $replace) {\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return [function replace(searchValue, replaceValue) {\n 'use strict';\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n }, $replace];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLnJlcGxhY2UuanM/NTYzYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAQHJlcGxhY2UgbG9naWNcbnJlcXVpcmUoJy4vX2ZpeC1yZS13a3MnKSgncmVwbGFjZScsIDIsIGZ1bmN0aW9uIChkZWZpbmVkLCBSRVBMQUNFLCAkcmVwbGFjZSkge1xuICAvLyAyMS4xLjMuMTQgU3RyaW5nLnByb3RvdHlwZS5yZXBsYWNlKHNlYXJjaFZhbHVlLCByZXBsYWNlVmFsdWUpXG4gIHJldHVybiBbZnVuY3Rpb24gcmVwbGFjZShzZWFyY2hWYWx1ZSwgcmVwbGFjZVZhbHVlKSB7XG4gICAgJ3VzZSBzdHJpY3QnO1xuICAgIHZhciBPID0gZGVmaW5lZCh0aGlzKTtcbiAgICB2YXIgZm4gPSBzZWFyY2hWYWx1ZSA9PSB1bmRlZmluZWQgPyB1bmRlZmluZWQgOiBzZWFyY2hWYWx1ZVtSRVBMQUNFXTtcbiAgICByZXR1cm4gZm4gIT09IHVuZGVmaW5lZFxuICAgICAgPyBmbi5jYWxsKHNlYXJjaFZhbHVlLCBPLCByZXBsYWNlVmFsdWUpXG4gICAgICA6ICRyZXBsYWNlLmNhbGwoU3RyaW5nKE8pLCBzZWFyY2hWYWx1ZSwgcmVwbGFjZVZhbHVlKTtcbiAgfSwgJHJlcGxhY2VdO1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnJlZ2V4cC5yZXBsYWNlLmpzXG4vLyBtb2R1bGUgaWQgPSAzMjJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///322\n")},function(module,exports,__webpack_require__){eval("// @@search logic\n__webpack_require__(85)('search', 1, function (defined, SEARCH, $search) {\n // 21.1.3.15 String.prototype.search(regexp)\n return [function search(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[SEARCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n }, $search];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLnNlYXJjaC5qcz9hYjA0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIEBAc2VhcmNoIGxvZ2ljXG5yZXF1aXJlKCcuL19maXgtcmUtd2tzJykoJ3NlYXJjaCcsIDEsIGZ1bmN0aW9uIChkZWZpbmVkLCBTRUFSQ0gsICRzZWFyY2gpIHtcbiAgLy8gMjEuMS4zLjE1IFN0cmluZy5wcm90b3R5cGUuc2VhcmNoKHJlZ2V4cClcbiAgcmV0dXJuIFtmdW5jdGlvbiBzZWFyY2gocmVnZXhwKSB7XG4gICAgJ3VzZSBzdHJpY3QnO1xuICAgIHZhciBPID0gZGVmaW5lZCh0aGlzKTtcbiAgICB2YXIgZm4gPSByZWdleHAgPT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogcmVnZXhwW1NFQVJDSF07XG4gICAgcmV0dXJuIGZuICE9PSB1bmRlZmluZWQgPyBmbi5jYWxsKHJlZ2V4cCwgTykgOiBuZXcgUmVnRXhwKHJlZ2V4cClbU0VBUkNIXShTdHJpbmcoTykpO1xuICB9LCAkc2VhcmNoXTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWdleHAuc2VhcmNoLmpzXG4vLyBtb2R1bGUgaWQgPSAzMjNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///323\n")},function(module,exports,__webpack_require__){eval("// @@split logic\n__webpack_require__(85)('split', 2, function (defined, SPLIT, $split) {\n 'use strict';\n var isRegExp = __webpack_require__(82);\n var _split = $split;\n var $push = [].push;\n var $SPLIT = 'split';\n var LENGTH = 'length';\n var LAST_INDEX = 'lastIndex';\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group\n // based on es5-shim implementation, need to rework it\n $split = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return _split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var separator2, match, lastIndex, lastLength, i;\n // Doesn't need flags gy, but they don't hurt\n if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\\\s)', flags);\n while (match = separatorCopy.exec(string)) {\n // `separatorCopy.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0][LENGTH];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG\n // eslint-disable-next-line no-loop-func\n if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {\n for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;\n });\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n $split = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);\n };\n }\n // 21.1.3.17 String.prototype.split(separator, limit)\n return [function split(separator, limit) {\n var O = defined(this);\n var fn = separator == undefined ? undefined : separator[SPLIT];\n return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);\n }, $split];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLnNwbGl0LmpzPzk4OWMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQEBzcGxpdCBsb2dpY1xucmVxdWlyZSgnLi9fZml4LXJlLXdrcycpKCdzcGxpdCcsIDIsIGZ1bmN0aW9uIChkZWZpbmVkLCBTUExJVCwgJHNwbGl0KSB7XG4gICd1c2Ugc3RyaWN0JztcbiAgdmFyIGlzUmVnRXhwID0gcmVxdWlyZSgnLi9faXMtcmVnZXhwJyk7XG4gIHZhciBfc3BsaXQgPSAkc3BsaXQ7XG4gIHZhciAkcHVzaCA9IFtdLnB1c2g7XG4gIHZhciAkU1BMSVQgPSAnc3BsaXQnO1xuICB2YXIgTEVOR1RIID0gJ2xlbmd0aCc7XG4gIHZhciBMQVNUX0lOREVYID0gJ2xhc3RJbmRleCc7XG4gIGlmIChcbiAgICAnYWJiYydbJFNQTElUXSgvKG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gMzI0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///324\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar LIBRARY = __webpack_require__(49);\nvar global = __webpack_require__(4);\nvar ctx = __webpack_require__(27);\nvar classof = __webpack_require__(72);\nvar $export = __webpack_require__(0);\nvar isObject = __webpack_require__(6);\nvar aFunction = __webpack_require__(16);\nvar anInstance = __webpack_require__(55);\nvar forOf = __webpack_require__(56);\nvar speciesConstructor = __webpack_require__(86);\nvar task = __webpack_require__(123).set;\nvar microtask = __webpack_require__(124)();\nvar newPromiseCapabilityModule = __webpack_require__(125);\nvar perform = __webpack_require__(167);\nvar promiseResolve = __webpack_require__(168);\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[__webpack_require__(8)('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value);\n if (domain) domain.exit();\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = __webpack_require__(57)($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\n__webpack_require__(61)($Promise, PROMISE);\n__webpack_require__(54)(PROMISE);\nWrapper = __webpack_require__(30)[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(83)(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucHJvbWlzZS5qcz9jYmQ5Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBMSUJSQVJZID0gcmVxdWlyZSgnLi9fbGlicmFyeScpO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIGN0eCA9IHJlcXVpcmUoJy4vX2N0eCcpO1xudmFyIGNsYXNzb2YgPSByZXF1aXJlKCcuL19jbGFzc29mJyk7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgYUZ1bmN0aW9uID0gcmVxdWlyZSgnLi9fYS1mdW5jdGlvbicpO1xudmFyIGFuSW5zdGFuY2UgPSByZXF1aXJlKCcuL19hbi1pbnN0YW5jZScpO1xudmFyIGZvck9mID0gcmVxdWlyZSgnLi9fZm9yLW9mJyk7XG52YXIgc3BlY2llc0NvbnN0cnVjdG9yID0gcmVxdWlyZSgnLi9fc3BlY2llcy1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Vzb2x2ZSA9IHJlYWN0aW9uLnJlc29sdmU7XG4gICAgICB2YXIgcmVqZWN0ID0gcmVhY3Rpb24ucmVqZWN0O1xuICAgICAgdmFyIGRvbWFpbiA9IHJlYWN0aW9uLmRvbWFpbjtcbiAgICAgIHZhciByZXN1bHQsIHRoZW47XG4gICAgICB0cnkge1xuICAgICAgICBpZiAoaGFuZGxlcikge1xuICAgICAgICAgIGlmICghb2spIHtcbiAgICAgICAgICAgIGlmIChwcm9taXNlLl9oID09IDIpIG9uSGFuZGxlVW5oYW5kbGVkKHByb21pc2UpO1xuICAgICAgICAgICAgcHJvbWlzZS5faCA9IDE7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChoYW5kbGVyID09PSB0cnVlKSByZXN1bHQgPSB2YWx1ZTtcbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5lbnRlcigpO1xuICAgICAgICAgICAgcmVzdWx0ID0gaGFuZGxlcih2YWx1ZSk7XG4gICAgICAgICAgICBpZiAoZG9tYWluKSBkb21haW4uZXhpdCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAocmVzdWx0ID09PSByZWFjdGlvbi5wcm9taXNlKSB7XG4gICAgICAgICAgICByZWplY3QoVHlwZUVycm9yKCdQcm9taXNlLWNoYWluIGN5Y2xlJykpO1xuICAgICAgICAgIH0gZWxzZSBpZiAodGhlbiA9IGlzVGhlbmFibGUocmVzdWx0KSkge1xuICAgICAgICAgICAgdGhlbi5jYWxsKHJlc3VsdCwgcmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgICB9IGVsc2UgcmVzb2x2ZShyZXN1bHQpO1xuICAgICAgICB9IGVsc2UgcmVqZWN0KHZhbHVlKTtcbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgcmVqZWN0KGUpO1xuICAgICAgfVxuICAgIH07XG4gICAgd2hpbGUgKGNoYWluLmxlbmd0aCA+IGkpIHJ1bihjaGF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TtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///325\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar weak = __webpack_require__(173);\nvar validate = __webpack_require__(64);\nvar WEAK_SET = 'WeakSet';\n\n// 23.4 WeakSet Objects\n__webpack_require__(87)(WEAK_SET, function (get) {\n return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.4.3.1 WeakSet.prototype.add(value)\n add: function add(value) {\n return weak.def(validate(this, WEAK_SET), value, true);\n }\n}, weak, false, true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYud2Vhay1zZXQuanM/NTdmMSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgd2VhayA9IHJlcXVpcmUoJy4vX2NvbGxlY3Rpb24td2VhaycpO1xudmFyIHZhbGlkYXRlID0gcmVxdWlyZSgnLi9fdmFsaWRhdGUtY29sbGVjdGlvbicpO1xudmFyIFdFQUtfU0VUID0gJ1dlYWtTZXQnO1xuXG4vLyAyMy40IFdlYWtTZXQgT2JqZWN0c1xucmVxdWlyZSgnLi9fY29sbGVjdGlvbicpKFdFQUtfU0VULCBmdW5jdGlvbiAoZ2V0KSB7XG4gIHJldHVybiBmdW5jdGlvbiBXZWFrU2V0KCkgeyByZXR1cm4gZ2V0KHRoaXMsIGFyZ3VtZW50cy5sZW5ndGggPiAwID8gYXJndW1lbnRzWzBdIDogdW5kZWZpbmVkKTsgfTtcbn0sIHtcbiAgLy8gMjMuNC4zLjEgV2Vha1NldC5wcm90b3R5cGUuYWRkKHZhbHVlKVxuICBhZGQ6IGZ1bmN0aW9uIGFkZCh2YWx1ZSkge1xuICAgIHJldHVybiB3ZWFrLmRlZih2YWxpZGF0ZSh0aGlzLCBXRUFLX1NFVCksIHZhbHVlLCB0cnVlKTtcbiAgfVxufSwgd2VhaywgZmFsc2UsIHRydWUpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi53ZWFrLXNldC5qc1xuLy8gbW9kdWxlIGlkID0gMzI2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///326\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $typed = __webpack_require__(88);\nvar buffer = __webpack_require__(126);\nvar anObject = __webpack_require__(3);\nvar toAbsoluteIndex = __webpack_require__(51);\nvar toLength = __webpack_require__(12);\nvar isObject = __webpack_require__(6);\nvar ArrayBuffer = __webpack_require__(4).ArrayBuffer;\nvar speciesConstructor = __webpack_require__(86);\nvar $ArrayBuffer = buffer.ArrayBuffer;\nvar $DataView = buffer.DataView;\nvar $isView = $typed.ABV && ArrayBuffer.isView;\nvar $slice = $ArrayBuffer.prototype.slice;\nvar VIEW = $typed.VIEW;\nvar ARRAY_BUFFER = 'ArrayBuffer';\n\n$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });\n\n$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {\n // 24.1.3.1 ArrayBuffer.isView(arg)\n isView: function isView(it) {\n return $isView && $isView(it) || isObject(it) && VIEW in it;\n }\n});\n\n$export($export.P + $export.U + $export.F * __webpack_require__(5)(function () {\n return !new $ArrayBuffer(2).slice(1, undefined).byteLength;\n}), ARRAY_BUFFER, {\n // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)\n slice: function slice(start, end) {\n if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix\n var len = anObject(this).byteLength;\n var first = toAbsoluteIndex(start, len);\n var final = toAbsoluteIndex(end === undefined ? len : end, len);\n var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first));\n var viewS = new $DataView(this);\n var viewT = new $DataView(result);\n var index = 0;\n while (first < final) {\n viewT.setUint8(index++, viewS.getUint8(first++));\n } return result;\n }\n});\n\n__webpack_require__(54)(ARRAY_BUFFER);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuYXJyYXktYnVmZmVyLmpzP2Y2NjkiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkdHlwZWQgPSByZXF1aXJlKCcuL190eXBlZCcpO1xudmFyIGJ1ZmZlciA9IHJlcXVpcmUoJy4vX3R5cGVkLWJ1ZmZlcicpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgdG9BYnNvbHV0ZUluZGV4ID0gcmVxdWlyZSgnLi9fdG8tYWJzb2x1dGUtaW5kZXgnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4vX3RvLWxlb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1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuYXJyYXktYnVmZmVyLmpzXG4vLyBtb2R1bGUgaWQgPSAzMjdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///327\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\n$export($export.G + $export.W + $export.F * !__webpack_require__(88).ABV, {\n DataView: __webpack_require__(126).DataView\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuZGF0YS12aWV3LmpzP2Q2ZTIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbiRleHBvcnQoJGV4cG9ydC5HICsgJGV4cG9ydC5XICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX3R5cGVkJykuQUJWLCB7XG4gIERhdGFWaWV3OiByZXF1aXJlKCcuL190eXBlZC1idWZmZXInKS5EYXRhVmlld1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnR5cGVkLmRhdGEtdmlldy5qc1xuLy8gbW9kdWxlIGlkID0gMzI4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///328\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Int8', 1, function (init) {\n return function Int8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50OC1hcnJheS5qcz9lNzY1Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3R5cGVkLWFycmF5JykoJ0ludDgnLCAxLCBmdW5jdGlvbiAoaW5pdCkge1xuICByZXR1cm4gZnVuY3Rpb24gSW50OEFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50OC1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gMzI5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///329\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Uint8', 1, function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDgtYXJyYXkuanM/NGM1NSJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuL190eXBlZC1hcnJheScpKCdVaW50OCcsIDEsIGZ1bmN0aW9uIChpbml0KSB7XG4gIHJldHVybiBmdW5jdGlvbiBVaW50OEFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDgtYXJyYXkuanNcbi8vIG1vZHVsZSBpZCA9IDMzMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///330\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Uint8', 1, function (init) {\n return function Uint8ClampedArray(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n}, true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDgtY2xhbXBlZC1hcnJheS5qcz8zMzI4Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3R5cGVkLWFycmF5JykoJ1VpbnQ4JywgMSwgZnVuY3Rpb24gKGluaXQpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIFVpbnQ4Q2xhbXBlZEFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59LCB0cnVlKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDgtY2xhbXBlZC1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gMzMxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///331\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Int16', 2, function (init) {\n return function Int16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50MTYtYXJyYXkuanM/YWFkNCJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuL190eXBlZC1hcnJheScpKCdJbnQxNicsIDIsIGZ1bmN0aW9uIChpbml0KSB7XG4gIHJldHVybiBmdW5jdGlvbiBJbnQxNkFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50MTYtYXJyYXkuanNcbi8vIG1vZHVsZSBpZCA9IDMzMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///332\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Uint16', 2, function (init) {\n return function Uint16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDE2LWFycmF5LmpzPzRjNzkiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi9fdHlwZWQtYXJyYXknKSgnVWludDE2JywgMiwgZnVuY3Rpb24gKGluaXQpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIFVpbnQxNkFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDE2LWFycmF5LmpzXG4vLyBtb2R1bGUgaWQgPSAzMzNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///333\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Int32', 4, function (init) {\n return function Int32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzM0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50MzItYXJyYXkuanM/MmI0MiJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuL190eXBlZC1hcnJheScpKCdJbnQzMicsIDQsIGZ1bmN0aW9uIChpbml0KSB7XG4gIHJldHVybiBmdW5jdGlvbiBJbnQzMkFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50MzItYXJyYXkuanNcbi8vIG1vZHVsZSBpZCA9IDMzNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///334\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Uint32', 4, function (init) {\n return function Uint32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzM1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDMyLWFycmF5LmpzPzM1ZjYiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi9fdHlwZWQtYXJyYXknKSgnVWludDMyJywgNCwgZnVuY3Rpb24gKGluaXQpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIFVpbnQzMkFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDMyLWFycmF5LmpzXG4vLyBtb2R1bGUgaWQgPSAzMzVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///335\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Float32', 4, function (init) {\n return function Float32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzM2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuZmxvYXQzMi1hcnJheS5qcz83NTNjIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3R5cGVkLWFycmF5JykoJ0Zsb2F0MzInLCA0LCBmdW5jdGlvbiAoaW5pdCkge1xuICByZXR1cm4gZnVuY3Rpb24gRmxvYXQzMkFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuZmxvYXQzMi1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gMzM2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///336\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Float64', 8, function (init) {\n return function Float64Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzM3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuZmxvYXQ2NC1hcnJheS5qcz9mYWY1Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3R5cGVkLWFycmF5JykoJ0Zsb2F0NjQnLCA4LCBmdW5jdGlvbiAoaW5pdCkge1xuICByZXR1cm4gZnVuY3Rpb24gRmxvYXQ2NEFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuZmxvYXQ2NC1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gMzM3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///337\n")},function(module,exports,__webpack_require__){eval("// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)\nvar $export = __webpack_require__(0);\nvar aFunction = __webpack_require__(16);\nvar anObject = __webpack_require__(3);\nvar rApply = (__webpack_require__(4).Reflect || {}).apply;\nvar fApply = Function.apply;\n// MS Edge argumentsList argument is optional\n$export($export.S + $export.F * !__webpack_require__(5)(function () {\n rApply(function () { /* empty */ });\n}), 'Reflect', {\n apply: function apply(target, thisArgument, argumentsList) {\n var T = aFunction(target);\n var L = anObject(argumentsList);\n return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzM4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5hcHBseS5qcz8wOTU0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDI2LjEuMSBSZWZsZWN0LmFwcGx5KHRh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joiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///338\n")},function(module,exports,__webpack_require__){eval("// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])\nvar $export = __webpack_require__(0);\nvar create = __webpack_require__(52);\nvar aFunction = __webpack_require__(16);\nvar anObject = __webpack_require__(3);\nvar isObject = __webpack_require__(6);\nvar fails = __webpack_require__(5);\nvar bind = __webpack_require__(154);\nvar rConstruct = (__webpack_require__(4).Reflect || {}).construct;\n\n// MS Edge supports only 2 arguments and argumentsList argument is optional\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\nvar NEW_TARGET_BUG = fails(function () {\n function F() { /* empty */ }\n return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);\n});\nvar ARGS_BUG = !fails(function () {\n rConstruct(function () { /* empty */ });\n});\n\n$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {\n construct: function construct(Target, args /* , newTarget */) {\n aFunction(Target);\n anObject(args);\n var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);\n if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);\n if (Target == newTarget) {\n // w/o altered newTarget, optimization for 0-4 arguments\n switch (args.length) {\n case 0: return new Target();\n case 1: return new Target(args[0]);\n case 2: return new Target(args[0], args[1]);\n case 3: return new Target(args[0], args[1], args[2]);\n case 4: return new Target(args[0], args[1], args[2], args[3]);\n }\n // w/o altered newTarget, lot of arguments case\n var $args = [null];\n $args.push.apply($args, args);\n return new (bind.apply(Target, $args))();\n }\n // with altered newTarget, not support built-in constructors\n var proto = newTarget.prototype;\n var instance = create(isObject(proto) ? proto : Object.prototype);\n var result = Function.apply.call(Target, instance, args);\n return isObject(result) ? result : instance;\n }\n});\n//# s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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///339\n")},function(module,exports,__webpack_require__){eval("// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)\nvar dP = __webpack_require__(11);\nvar $export = __webpack_require__(0);\nvar anObject = __webpack_require__(3);\nvar toPrimitive = __webpack_require__(31);\n\n// MS Edge has broken Reflect.defineProperty - throwing instead of returning false\n$export($export.S + $export.F * __webpack_require__(5)(function () {\n // eslint-disable-next-line no-undef\n Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });\n}), 'Reflect', {\n defineProperty: function defineProperty(target, propertyKey, attributes) {\n anObject(target);\n propertyKey = toPrimitive(propertyKey, true);\n anObject(attributes);\n try {\n dP.f(target, propertyKey, attributes);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5kZWZpbmUtcHJvcGVydHkuanM/ZTE5NSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjMgUmVmbGVjdC5kZWZpbmVQcm9wZXJ0eSh0YXJnZXQsIHByb3BlcnR5S2V5LCBhdHRyaWJ1dGVzKVxudmFyIGRQID0gcmVx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jb3JlLWpzL21vZHVsZXMvZXM2LnJlZmxlY3QuZGVmaW5lLXByb3BlcnR5LmpzXG4vLyBtb2R1bGUgaWQgPSAzNDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///340\n")},function(module,exports,__webpack_require__){eval("// 26.1.4 Reflect.deleteProperty(target, propertyKey)\nvar $export = __webpack_require__(0);\nvar gOPD = __webpack_require__(25).f;\nvar anObject = __webpack_require__(3);\n\n$export($export.S, 'Reflect', {\n deleteProperty: function deleteProperty(target, propertyKey) {\n var desc = gOPD(anObject(target), propertyKey);\n return desc && !desc.configurable ? false : delete target[propertyKey];\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5kZWxldGUtcHJvcGVydHkuanM/Y2IxZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjQgUmVmbGVjdC5kZWxldGVQcm9wZXJ0eSh0YXJnZXQsIHByb3BlcnR5S2V5KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBnT1BEID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcGQnKS5mO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnUmVmbGVjdCcsIHtcbiAgZGVsZXRlUHJvcGVydHk6IGZ1bmN0aW9uIGRlbGV0ZVByb3BlcnR5KHRhcmdldCwgcHJvcGVydHlLZXkpIHtcbiAgICB2YXIgZGVzYyA9IGdPUEQoYW5PYmplY3QodGFyZ2V0KSwgcHJvcGVydHlLZXkpO1xuICAgIHJldHVybiBkZXNjICYmICFkZXNjLmNvbmZpZ3VyYWJsZSA/IGZhbHNlIDogZGVsZXRlIHRhcmdldFtwcm9wZXJ0eUtleV07XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmRlbGV0ZS1wcm9wZXJ0eS5qc1xuLy8gbW9kdWxlIGlkID0gMzQxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///341\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 26.1.5 Reflect.enumerate(target)\nvar $export = __webpack_require__(0);\nvar anObject = __webpack_require__(3);\nvar Enumerate = function (iterated) {\n this._t = anObject(iterated); // target\n this._i = 0; // next index\n var keys = this._k = []; // keys\n var key;\n for (key in iterated) keys.push(key);\n};\n__webpack_require__(114)(Enumerate, 'Object', function () {\n var that = this;\n var keys = that._k;\n var key;\n do {\n if (that._i >= keys.length) return { value: undefined, done: true };\n } while (!((key = keys[that._i++]) in that._t));\n return { value: key, done: false };\n});\n\n$export($export.S, 'Reflect', {\n enumerate: function enumerate(target) {\n return new Enumerate(target);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiM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ZTogZnVuY3Rpb24gZW51bWVyYXRlKHRhcmdldCkge1xuICAgIHJldHVybiBuZXcgRW51bWVyYXRlKHRhcmdldCk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmVudW1lcmF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMzQyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///342\n")},function(module,exports,__webpack_require__){eval("// 26.1.6 Reflect.get(target, propertyKey [, receiver])\nvar gOPD = __webpack_require__(25);\nvar getPrototypeOf = __webpack_require__(26);\nvar has = __webpack_require__(17);\nvar $export = __webpack_require__(0);\nvar isObject = __webpack_require__(6);\nvar anObject = __webpack_require__(3);\n\nfunction get(target, propertyKey /* , receiver */) {\n var receiver = arguments.length < 3 ? target : arguments[2];\n var desc, proto;\n if (anObject(target) === receiver) return target[propertyKey];\n if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')\n ? desc.value\n : desc.get !== undefined\n ? desc.get.call(receiver)\n : undefined;\n if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);\n}\n\n$export($export.S, 'Reflect', { get: get });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8v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wZXJ0eUtleSwgcmVjZWl2ZXIpO1xufVxuXG4kZXhwb3J0KCRleHBvcnQuUywgJ1JlZmxlY3QnLCB7IGdldDogZ2V0IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmdldC5qc1xuLy8gbW9kdWxlIGlkID0gMzQzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///343\n")},function(module,exports,__webpack_require__){eval("// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)\nvar gOPD = __webpack_require__(25);\nvar $export = __webpack_require__(0);\nvar anObject = __webpack_require__(3);\n\n$export($export.S, 'Reflect', {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {\n return gOPD.f(anObject(target), propertyKey);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5nZXQtb3duLXByb3BlcnR5LWRlc2NyaXB0b3IuanM/MDM5ZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjcgUmVmbGVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IodGFyZ2V0LCBwcm9wZXJ0eUtleSlcbnZhciBnT1BEID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcGQnKTtcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdSZWZsZWN0Jywge1xuICBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3I6IGZ1bmN0aW9uIGdldE93blByb3BlcnR5RGVzY3JpcHRvcih0YXJnZXQsIHByb3BlcnR5S2V5KSB7XG4gICAgcmV0dXJuIGdPUEQuZihhbk9iamVjdCh0YXJnZXQpLCBwcm9wZXJ0eUtleSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvci5qc1xuLy8gbW9kdWxlIGlkID0gMzQ0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///344\n")},function(module,exports,__webpack_require__){eval("// 26.1.8 Reflect.getPrototypeOf(target)\nvar $export = __webpack_require__(0);\nvar getProto = __webpack_require__(26);\nvar anObject = __webpack_require__(3);\n\n$export($export.S, 'Reflect', {\n getPrototypeOf: function getPrototypeOf(target) {\n return getProto(anObject(target));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5nZXQtcHJvdG90eXBlLW9mLmpzPzNlZTQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjYuMS44IFJlZmxlY3QuZ2V0UHJvdG90eXBlT2YodGFyZ2V0KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBnZXRQcm90byA9IHJlcXVpcmUoJy4vX29iamVjdC1ncG8nKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ1JlZmxlY3QnLCB7XG4gIGdldFByb3RvdHlwZU9mOiBmdW5jdGlvbiBnZXRQcm90b3R5cGVPZih0YXJnZXQpIHtcbiAgICByZXR1cm4gZ2V0UHJvdG8oYW5PYmplY3QodGFyZ2V0KSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmdldC1wcm90b3R5cGUtb2YuanNcbi8vIG1vZHVsZSBpZCA9IDM0NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///345\n")},function(module,exports,__webpack_require__){eval("// 26.1.9 Reflect.has(target, propertyKey)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Reflect', {\n has: function has(target, propertyKey) {\n return propertyKey in target;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5oYXMuanM/NzY2ZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjkgUmVmbGVjdC5oYXModGFyZ2V0LCBwcm9wZXJ0eUtleSlcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnUmVmbGVjdCcsIHtcbiAgaGFzOiBmdW5jdGlvbiBoYXModGFyZ2V0LCBwcm9wZXJ0eUtleSkge1xuICAgIHJldHVybiBwcm9wZXJ0eUtleSBpbiB0YXJnZXQ7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0Lmhhcy5qc1xuLy8gbW9kdWxlIGlkID0gMzQ2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///346\n")},function(module,exports,__webpack_require__){eval("// 26.1.10 Reflect.isExtensible(target)\nvar $export = __webpack_require__(0);\nvar anObject = __webpack_require__(3);\nvar $isExtensible = Object.isExtensible;\n\n$export($export.S, 'Reflect', {\n isExtensible: function isExtensible(target) {\n anObject(target);\n return $isExtensible ? $isExtensible(target) : true;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5pcy1leHRlbnNpYmxlLmpzPzI0NmQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjYuMS4xMCBSZWZsZWN0LmlzRXh0ZW5zaWJsZSh0YXJnZXQpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgJGlzRXh0ZW5zaWJsZSA9IE9iamVjdC5pc0V4dGVuc2libGU7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnUmVmbGVjdCcsIHtcbiAgaXNFeHRlbnNpYmxlOiBmdW5jdGlvbiBpc0V4dGVuc2libGUodGFyZ2V0KSB7XG4gICAgYW5PYmplY3QodGFyZ2V0KTtcbiAgICByZXR1cm4gJGlzRXh0ZW5zaWJsZSA/ICRpc0V4dGVuc2libGUodGFyZ2V0KSA6IHRydWU7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmlzLWV4dGVuc2libGUuanNcbi8vIG1vZHVsZSBpZCA9IDM0N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///347\n")},function(module,exports,__webpack_require__){eval("// 26.1.11 Reflect.ownKeys(target)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Reflect', { ownKeys: __webpack_require__(175) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5vd24ta2V5cy5qcz80NzBlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDI2LjEuMTEgUmVmbGVjdC5vd25LZXlzKHRhcmdldClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnUmVmbGVjdCcsIHsgb3duS2V5czogcmVxdWlyZSgnLi9fb3duLWtleXMnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5vd24ta2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gMzQ4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///348\n")},function(module,exports,__webpack_require__){eval("// 26.1.12 Reflect.preventExtensions(target)\nvar $export = __webpack_require__(0);\nvar anObject = __webpack_require__(3);\nvar $preventExtensions = Object.preventExtensions;\n\n$export($export.S, 'Reflect', {\n preventExtensions: function preventExtensions(target) {\n anObject(target);\n try {\n if ($preventExtensions) $preventExtensions(target);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5wcmV2ZW50LWV4dGVuc2lvbnMuanM/ZjY2MSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjEyIFJlZmxlY3QucHJldmVudEV4dGVuc2lvbnModGFyZ2V0KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyICRwcmV2ZW50RXh0ZW5zaW9ucyA9IE9iamVjdC5wcmV2ZW50RXh0ZW5zaW9ucztcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdSZWZsZWN0Jywge1xuICBwcmV2ZW50RXh0ZW5zaW9uczogZnVuY3Rpb24gcHJldmVudEV4dGVuc2lvbnModGFyZ2V0KSB7XG4gICAgYW5PYmplY3QodGFyZ2V0KTtcbiAgICB0cnkge1xuICAgICAgaWYgKCRwcmV2ZW50RXh0ZW5zaW9ucykgJHByZXZlbnRFeHRlbnNpb25zKHRhcmdldCk7XG4gICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5wcmV2ZW50LWV4dGVuc2lvbnMuanNcbi8vIG1vZHVsZSBpZCA9IDM0OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///349\n")},function(module,exports,__webpack_require__){eval("// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])\nvar dP = __webpack_require__(11);\nvar gOPD = __webpack_require__(25);\nvar getPrototypeOf = __webpack_require__(26);\nvar has = __webpack_require__(17);\nvar $export = __webpack_require__(0);\nvar createDesc = __webpack_require__(47);\nvar anObject = __webpack_require__(3);\nvar isObject = __webpack_require__(6);\n\nfunction set(target, propertyKey, V /* , receiver */) {\n var receiver = arguments.length < 4 ? target : arguments[3];\n var ownDesc = gOPD.f(anObject(target), propertyKey);\n var existingDescriptor, proto;\n if (!ownDesc) {\n if (isObject(proto = getPrototypeOf(target))) {\n return set(proto, propertyKey, V, receiver);\n }\n ownDesc = createDesc(0);\n }\n if (has(ownDesc, 'value')) {\n if (ownDesc.writable === false || !isObject(receiver)) return false;\n existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);\n existingDescriptor.value = V;\n dP.f(receiver, propertyKey, existingDescriptor);\n return true;\n }\n return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);\n}\n\n$export($export.S, 'Reflect', { set: set });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5zZXQuanM/NmQ0NiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjEzIFJlZmxlY3Quc2V0KHRhcmdldCwgcHJvcGVydHlLZXksIFYgWywgcmVjZWl2ZXJdKVxudmFyIGRQID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJyk7XG52YXIgZ09QRCA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BkJyk7XG52YXIgZ2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKCcuL19vYmplY3QtZ3BvJyk7XG52YXIgaGFzID0gcmVxdWlyZSgnLi9faGFzJyk7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGNyZWF0ZURlc2MgPSByZXF1aXJlKCcuL19wcm9wZXJ0eS1kZXNjJyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBpc09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QnLCB7IHNldDogc2V0IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LnNldC5qc1xuLy8gbW9kdWxlIGlkID0gMzUwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///350\n")},function(module,exports,__webpack_require__){eval("// 26.1.14 Reflect.setPrototypeOf(target, proto)\nvar $export = __webpack_require__(0);\nvar setProto = __webpack_require__(106);\n\nif (setProto) $export($export.S, 'Reflect', {\n setPrototypeOf: function setPrototypeOf(target, proto) {\n setProto.check(target, proto);\n try {\n setProto.set(target, proto);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5zZXQtcHJvdG90eXBlLW9mLmpzPzk5M2EiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjYuMS4xNCBSZWZsZWN0LnNldFByb3RvdHlwZU9mKHRhcmdldCwgcHJvdG8pXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHNldFByb3RvID0gcmVxdWlyZSgnLi9fc2V0LXByb3RvJyk7XG5cbmlmIChzZXRQcm90bykgJGV4cG9ydCgkZXhwb3J0LlMsICdSZWZsZWN0Jywge1xuICBzZXRQcm90b3R5cGVPZjogZnVuY3Rpb24gc2V0UHJvdG90eXBlT2YodGFyZ2V0LCBwcm90bykge1xuICAgIHNldFByb3RvLmNoZWNrKHRhcmdldCwgcHJvdG8pO1xuICAgIHRyeSB7XG4gICAgICBzZXRQcm90by5zZXQodGFyZ2V0LCBwcm90byk7XG4gICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5zZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzNTFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///351\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/tc39/Array.prototype.includes\nvar $export = __webpack_require__(0);\nvar $includes = __webpack_require__(79)(true);\n\n$export($export.P, 'Array', {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n__webpack_require__(43)('includes');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuYXJyYXkuaW5jbHVkZXMuanM/ODFiYyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9BcnJheS5wcm90b3R5cGUuaW5jbHVkZXNcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJGluY2x1ZGVzID0gcmVxdWlyZSgnLi9fYXJyYXktaW5jbHVkZXMnKSh0cnVlKTtcblxuJGV4cG9ydCgkZXhwb3J0LlAsICdBcnJheScsIHtcbiAgaW5jbHVkZXM6IGZ1bmN0aW9uIGluY2x1ZGVzKGVsIC8qICwgZnJvbUluZGV4ID0gMCAqLykge1xuICAgIHJldHVybiAkaW5jbHVkZXModGhpcywgZWwsIGFyZ3VtZW50cy5sZW5ndGggPiAxID8gYXJndW1lbnRzWzFdIDogdW5kZWZpbmVkKTtcbiAgfVxufSk7XG5cbnJlcXVpcmUoJy4vX2FkZC10by11bnNjb3BhYmxlcycpKCdpbmNsdWRlcycpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5hcnJheS5pbmNsdWRlcy5qc1xuLy8gbW9kdWxlIGlkID0gMzUyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///352\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap\nvar $export = __webpack_require__(0);\nvar flattenIntoArray = __webpack_require__(176);\nvar toObject = __webpack_require__(15);\nvar toLength = __webpack_require__(12);\nvar aFunction = __webpack_require__(16);\nvar arraySpeciesCreate = __webpack_require__(120);\n\n$export($export.P, 'Array', {\n flatMap: function flatMap(callbackfn /* , thisArg */) {\n var O = toObject(this);\n var sourceLen, A;\n aFunction(callbackfn);\n sourceLen = toLength(O.length);\n A = arraySpeciesCreate(O, 0);\n flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);\n return A;\n }\n});\n\n__webpack_require__(43)('flatMap');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuYXJyYXkuZmxhdC1tYXAuanM/YTA1ZCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL3Byb3Bvc2FsLWZsYXRNYXAvI3NlYy1BcnJheS5wcm90b3R5cGUuZmxhdE1hcFxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBmbGF0dGVuSW50b0FycmF5ID0gcmVxdWlyZSgnLi9fZmxhdHRlbi1pbnRvLWFycmF5Jyk7XG52YXIgdG9PYmplY3QgPSByZXF1aXJlKCcuL190by1vYmplY3QnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4vX3RvLWxlbmd0aCcpO1xudmFyIGFGdW5jdGlvbiA9IHJlcXVpcmUoJy4vX2EtZnVuY3Rpb24nKTtcbnZhciBhcnJheVNwZWNpZXNDcmVhdGUgPSByZXF1aXJlKCcuL19hcnJheS1zcGVjaWVzLWNyZWF0ZScpO1xuXG4kZXhwb3J0KCRleHBvcnQuUCwgJ0FycmF5Jywge1xuICBmbGF0TWFwOiBmdW5jdGlvbiBmbGF0TWFwKGNhbGxiYWNrZm4gLyogLCB0aGlzQXJnICovKSB7XG4gICAgdmFyIE8gPSB0b09iamVjdCh0aGlzKTtcbiAgICB2YXIgc291cmNlTGVuLCBBO1xuICAgIGFGdW5jdGlvbihjYWxsYmFja2ZuKTtcbiAgICBzb3VyY2VMZW4gPSB0b0xlbmd0aChPLmxlbmd0aCk7XG4gICAgQSA9IGFycmF5U3BlY2llc0NyZWF0ZShPLCAwKTtcbiAgICBmbGF0dGVuSW50b0FycmF5KEEsIE8sIE8sIHNvdXJjZUxlbiwgMCwgMSwgY2FsbGJhY2tmbiwgYXJndW1lbnRzWzFdKTtcbiAgICByZXR1cm4gQTtcbiAgfVxufSk7XG5cbnJlcXVpcmUoJy4vX2FkZC10by11bnNjb3BhYmxlcycpKCdmbGF0TWFwJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LmFycmF5LmZsYXQtbWFwLmpzXG4vLyBtb2R1bGUgaWQgPSAzNTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///353\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten\nvar $export = __webpack_require__(0);\nvar flattenIntoArray = __webpack_require__(176);\nvar toObject = __webpack_require__(15);\nvar toLength = __webpack_require__(12);\nvar toInteger = __webpack_require__(33);\nvar arraySpeciesCreate = __webpack_require__(120);\n\n$export($export.P, 'Array', {\n flatten: function flatten(/* depthArg = 1 */) {\n var depthArg = arguments[0];\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A = arraySpeciesCreate(O, 0);\n flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));\n return A;\n }\n});\n\n__webpack_require__(43)('flatten');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuYXJyYXkuZmxhdHRlbi5qcz9iZmRkIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vcHJvcG9zYWwtZmxhdE1hcC8jc2VjLUFycmF5LnByb3RvdHlwZS5mbGF0dGVuXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGZsYXR0ZW5JbnRvQXJyYXkgPSByZXF1aXJlKCcuL19mbGF0dGVuLWludG8tYXJyYXknKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi9fdG8tbGVuZ3RoJyk7XG52YXIgdG9JbnRlZ2VyID0gcmVxdWlyZSgnLi9fdG8taW50ZWdlcicpO1xudmFyIGFycmF5U3BlY2llc0NyZWF0ZSA9IHJlcXVpcmUoJy4vX2FycmF5LXNwZWNpZXMtY3JlYXRlJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QLCAnQXJyYXknLCB7XG4gIGZsYXR0ZW46IGZ1bmN0aW9uIGZsYXR0ZW4oLyogZGVwdGhBcmcgPSAxICovKSB7XG4gICAgdmFyIGRlcHRoQXJnID0gYXJndW1lbnRzWzBdO1xuICAgIHZhciBPID0gdG9PYmplY3QodGhpcyk7XG4gICAgdmFyIHNvdXJjZUxlbiA9IHRvTGVuZ3RoKE8ubGVuZ3RoKTtcbiAgICB2YXIgQSA9IGFycmF5U3BlY2llc0NyZWF0ZShPLCAwKTtcbiAgICBmbGF0dGVuSW50b0FycmF5KEEsIE8sIE8sIHNvdXJjZUxlbiwgMCwgZGVwdGhBcmcgPT09IHVuZGVmaW5lZCA/IDEgOiB0b0ludGVnZXIoZGVwdGhBcmcpKTtcbiAgICByZXR1cm4gQTtcbiAgfVxufSk7XG5cbnJlcXVpcmUoJy4vX2FkZC10by11bnNjb3BhYmxlcycpKCdmbGF0dGVuJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LmFycmF5LmZsYXR0ZW4uanNcbi8vIG1vZHVsZSBpZCA9IDM1NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///354\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/mathiasbynens/String.prototype.at\nvar $export = __webpack_require__(0);\nvar $at = __webpack_require__(112)(true);\n\n$export($export.P, 'String', {\n at: function at(pos) {\n return $at(this, pos);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3RyaW5nLmF0LmpzP2ZiNmYiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gaHR0cHM6Ly9naXRodWIuY29tL21hdGhpYXNieW5lbnMvU3RyaW5nLnByb3RvdHlwZS5hdFxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkYXQgPSByZXF1aXJlKCcuL19zdHJpbmctYXQnKSh0cnVlKTtcblxuJGV4cG9ydCgkZXhwb3J0LlAsICdTdHJpbmcnLCB7XG4gIGF0OiBmdW5jdGlvbiBhdChwb3MpIHtcbiAgICByZXR1cm4gJGF0KHRoaXMsIHBvcyk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5zdHJpbmcuYXQuanNcbi8vIG1vZHVsZSBpZCA9IDM1NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///355\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = __webpack_require__(0);\nvar $pad = __webpack_require__(177);\nvar userAgent = __webpack_require__(127);\n\n// https://github.com/zloirock/core-js/issues/280\n$export($export.P + $export.F * /Version\\/10\\.\\d+(\\.\\d+)? Safari\\//.test(userAgent), 'String', {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8v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UFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///356\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = __webpack_require__(0);\nvar $pad = __webpack_require__(177);\nvar userAgent = __webpack_require__(127);\n\n// https://github.com/zloirock/core-js/issues/280\n$export($export.P + $export.F * /Version\\/10\\.\\d+(\\.\\d+)? Safari\\//.test(userAgent), 'String', {\n padEnd: function padEnd(maxLength /* , fillString = ' ' */) {\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3RyaW5nLnBhZC1lbmQuanM/OWJjMSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9wcm9wb3NhbC1zdHJpbmctcGFkLXN0YXJ0LWVuZFxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkcGFkID0gcmVxdWlyZSgnLi9fc3RyaW5nLXBhZCcpO1xudmFyIHVzZXJBZ2VudCA9IHJlcXVpcmUoJy4vX3VzZXItYWdlbnQnKTtcblxuLy8gaHR0cHM6Ly9naXRodWIuY29tL3psb2lyb2NrL2NvcmUtanMvaXNzdWVzLzI4MFxuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAvVmVyc2lvblxcLzEwXFwuXFxkKyhcXC5cXGQrKT8gU2FmYXJpXFwvLy50ZXN0KHVzZXJBZ2VudCksICdTdHJpbmcnLCB7XG4gIHBhZEVuZDogZnVuY3Rpb24gcGFkRW5kKG1heExlbmd0aCAvKiAsIGZpbGxTdHJpbmcgPSAnICcgKi8pIHtcbiAgICByZXR1cm4gJHBhZCh0aGlzLCBtYXhMZW5ndGgsIGFyZ3VtZW50cy5sZW5ndGggPiAxID8gYXJndW1lbnRzWzFdIDogdW5kZWZpbmVkLCBmYWxzZSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5zdHJpbmcucGFkLWVuZC5qc1xuLy8gbW9kdWxlIGlkID0gMzU3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///357\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/sebmarkbage/ecmascript-string-left-right-trim\n__webpack_require__(62)('trimLeft', function ($trim) {\n return function trimLeft() {\n return $trim(this, 1);\n };\n}, 'trimStart');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3RyaW5nLnRyaW0tbGVmdC5qcz9jNjdmIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9zZWJtYXJrYmFnZS9lY21hc2NyaXB0LXN0cmluZy1sZWZ0LXJpZ2h0LXRyaW1cbnJlcXVpcmUoJy4vX3N0cmluZy10cmltJykoJ3RyaW1MZWZ0JywgZnVuY3Rpb24gKCR0cmltKSB7XG4gIHJldHVybiBmdW5jdGlvbiB0cmltTGVmdCgpIHtcbiAgICByZXR1cm4gJHRyaW0odGhpcywgMSk7XG4gIH07XG59LCAndHJpbVN0YXJ0Jyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnN0cmluZy50cmltLWxlZnQuanNcbi8vIG1vZHVsZSBpZCA9IDM1OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///358\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/sebmarkbage/ecmascript-string-left-right-trim\n__webpack_require__(62)('trimRight', function ($trim) {\n return function trimRight() {\n return $trim(this, 2);\n };\n}, 'trimEnd');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3RyaW5nLnRyaW0tcmlnaHQuanM/MmQxMiJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBodHRwczovL2dpdGh1Yi5jb20vc2VibWFya2JhZ2UvZWNtYXNjcmlwdC1zdHJpbmctbGVmdC1yaWdodC10cmltXG5yZXF1aXJlKCcuL19zdHJpbmctdHJpbScpKCd0cmltUmlnaHQnLCBmdW5jdGlvbiAoJHRyaW0pIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHRyaW1SaWdodCgpIHtcbiAgICByZXR1cm4gJHRyaW0odGhpcywgMik7XG4gIH07XG59LCAndHJpbUVuZCcpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5zdHJpbmcudHJpbS1yaWdodC5qc1xuLy8gbW9kdWxlIGlkID0gMzU5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///359\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://tc39.github.io/String.prototype.matchAll/\nvar $export = __webpack_require__(0);\nvar defined = __webpack_require__(32);\nvar toLength = __webpack_require__(12);\nvar isRegExp = __webpack_require__(82);\nvar getFlags = __webpack_require__(84);\nvar RegExpProto = RegExp.prototype;\n\nvar $RegExpStringIterator = function (regexp, string) {\n this._r = regexp;\n this._s = string;\n};\n\n__webpack_require__(114)($RegExpStringIterator, 'RegExp String', function next() {\n var match = this._r.exec(this._s);\n return { value: match, done: match === null };\n});\n\n$export($export.P, 'String', {\n matchAll: function matchAll(regexp) {\n defined(this);\n if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!');\n var S = String(this);\n var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp);\n var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);\n rx.lastIndex = toLength(regexp.lastIndex);\n return new $RegExpStringIterator(rx, S);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3RyaW5nLm1hdGNoLWFsbC5qcz9iMWNlIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztc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nZXhwLmZsYWdzKSA6IGdldEZsYWdzLmNhbGwocmVnZXhwKTtcbiAgICB2YXIgcnggPSBuZXcgUmVnRXhwKHJlZ2V4cC5zb3VyY2UsIH5mbGFncy5pbmRleE9mKCdnJykgPyBmbGFncyA6ICdnJyArIGZsYWdzKTtcbiAgICByeC5sYXN0SW5kZXggPSB0b0xlbmd0aChyZWdleHAubGFzdEluZGV4KTtcbiAgICByZXR1cm4gbmV3ICRSZWdFeHBTdHJpbmdJdGVyYXRvcihyeCwgUyk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5zdHJpbmcubWF0Y2gtYWxsLmpzXG4vLyBtb2R1bGUgaWQgPSAzNjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///360\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(102)('asyncIterator');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3ltYm9sLmFzeW5jLWl0ZXJhdG9yLmpzP2Y1ODgiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi9fd2tzLWRlZmluZScpKCdhc3luY0l0ZXJhdG9yJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnN5bWJvbC5hc3luYy1pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gMzYxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///361\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(102)('observable');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3ltYm9sLm9ic2VydmFibGUuanM/YmVlZiJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuL193a3MtZGVmaW5lJykoJ29ic2VydmFibGUnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3ltYm9sLm9ic2VydmFibGUuanNcbi8vIG1vZHVsZSBpZCA9IDM2MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///362\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-object-getownpropertydescriptors\nvar $export = __webpack_require__(0);\nvar ownKeys = __webpack_require__(175);\nvar toIObject = __webpack_require__(24);\nvar gOPD = __webpack_require__(25);\nvar createProperty = __webpack_require__(118);\n\n$export($export.S, 'Object', {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIObject(object);\n var getDesc = gOPD.f;\n var keys = ownKeys(O);\n var result = {};\n var i = 0;\n var key, desc;\n while (keys.length > i) {\n desc = getDesc(O, key = keys[i++]);\n if (desc !== undefined) createProperty(result, key, desc);\n }\n return result;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvcnMuanM/Y2U2YyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9wcm9wb3NhbC1vYmplY3QtZ2V0b3ducHJvcGVydHlkZXNjcmlwdG9yc1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBvd25LZXlzID0gcmVxdWlyZSgnLi9fb3duLWtleXMnKTtcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgZ09QRCA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BkJyk7XG52YXIgY3JlYXRlUHJvcGVydHkgPSByZXF1aXJlKCcuL19jcmVhdGUtcHJvcGVydHknKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdPYmplY3QnLCB7XG4gIGdldE93blByb3BlcnR5RGVzY3JpcHRvcnM6IGZ1bmN0aW9uIGdldE93blByb3BlcnR5RGVzY3JpcHRvcnMob2JqZWN0KSB7XG4gICAgdmFyIE8gPSB0b0lPYmplY3Qob2JqZWN0KTtcbiAgICB2YXIgZ2V0RGVzYyA9IGdPUEQuZjtcbiAgICB2YXIga2V5cyA9IG93bktleXMoTyk7XG4gICAgdmFyIHJlc3VsdCA9IHt9O1xuICAgIHZhciBpID0gMDtcbiAgICB2YXIga2V5LCBkZXNjO1xuICAgIHdoaWxlIChrZXlzLmxlbmd0aCA+IGkpIHtcbiAgICAgIGRlc2MgPSBnZXREZXNjKE8sIGtleSA9IGtleXNbaSsrXSk7XG4gICAgICBpZiAoZGVzYyAhPT0gdW5kZWZpbmVkKSBjcmVhdGVQcm9wZXJ0eShyZXN1bHQsIGtleSwgZGVzYyk7XG4gICAgfVxuICAgIHJldHVybiByZXN1bHQ7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5vYmplY3QuZ2V0LW93bi1wcm9wZXJ0eS1kZXNjcmlwdG9ycy5qc1xuLy8gbW9kdWxlIGlkID0gMzYzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///363\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-object-values-entries\nvar $export = __webpack_require__(0);\nvar $values = __webpack_require__(178)(false);\n\n$export($export.S, 'Object', {\n values: function values(it) {\n return $values(it);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0LnZhbHVlcy5qcz82MTU5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS90YzM5L3Byb3Bvc2FsLW9iamVjdC12YWx1ZXMtZW50cmllc1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkdmFsdWVzID0gcmVxdWlyZSgnLi9fb2JqZWN0LXRvLWFycmF5JykoZmFsc2UpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ09iamVjdCcsIHtcbiAgdmFsdWVzOiBmdW5jdGlvbiB2YWx1ZXMoaXQpIHtcbiAgICByZXR1cm4gJHZhbHVlcyhpdCk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5vYmplY3QudmFsdWVzLmpzXG4vLyBtb2R1bGUgaWQgPSAzNjRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///364\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-object-values-entries\nvar $export = __webpack_require__(0);\nvar $entries = __webpack_require__(178)(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it) {\n return $entries(it);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0LmVudHJpZXMuanM/MTRhNyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9wcm9wb3NhbC1vYmplY3QtdmFsdWVzLWVudHJpZXNcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJGVudHJpZXMgPSByZXF1aXJlKCcuL19vYmplY3QtdG8tYXJyYXknKSh0cnVlKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdPYmplY3QnLCB7XG4gIGVudHJpZXM6IGZ1bmN0aW9uIGVudHJpZXMoaXQpIHtcbiAgICByZXR1cm4gJGVudHJpZXMoaXQpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0LmVudHJpZXMuanNcbi8vIG1vZHVsZSBpZCA9IDM2NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///365\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar aFunction = __webpack_require__(16);\nvar $defineProperty = __webpack_require__(11);\n\n// B.2.2.2 Object.prototype.__defineGetter__(P, getter)\n__webpack_require__(10) && $export($export.P + __webpack_require__(89), 'Object', {\n __defineGetter__: function __defineGetter__(P, getter) {\n $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0LmRlZmluZS1nZXR0ZXIuanM/YTE4YSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmlj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__webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar aFunction = __webpack_require__(16);\nvar $defineProperty = __webpack_require__(11);\n\n// B.2.2.3 Object.prototype.__defineSetter__(P, setter)\n__webpack_require__(10) && $export($export.P + __webpack_require__(89), 'Object', {\n __defineSetter__: function __defineSetter__(P, setter) {\n $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0LmRlZmluZS1zZXR0ZXIuanM/NzcxNCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgYUZ1bmN0aW9uID0gcmVxdWlyZSgnLi9fYS1mdW5jdGlvbicpO1xudmFyICRkZWZpbmVQcm9wZXJ0eSA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpO1xuXG4vLyBCLjIuMi4zIE9iamVjdC5wcm90b3R5cGUuX19kZWZpbmVTZXR0ZXJfXyhQLCBzZXR0ZXIpXG5yZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpICYmICRleHBvcnQoJGV4cG9ydC5QICsgcmVxdWlyZSgnLi9fb2JqZWN0LWZvcmNlZC1wYW0nKSwgJ09iamVjdCcsIHtcbiAgX19kZWZpbmVTZXR0ZXJfXzogZnVuY3Rpb24gX19kZWZpbmVTZXR0ZXJfXyhQLCBzZXR0ZXIpIHtcbiAgICAkZGVmaW5lUHJvcGVydHkuZih0b09iamVjdCh0aGlzKSwgUCwgeyBzZXQ6IGFGdW5jdGlvbihzZXR0ZXIpLCBlbnVtZXJhYmxlOiB0cnVlLCBjb25maWd1cmFibGU6IHRydWUgfSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5vYmplY3QuZGVmaW5lLXNldHRlci5qc1xuLy8gbW9kdWxlIGlkID0gMzY3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///367\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar toPrimitive = __webpack_require__(31);\nvar getPrototypeOf = __webpack_require__(26);\nvar getOwnPropertyDescriptor = __webpack_require__(25).f;\n\n// B.2.2.4 Object.prototype.__lookupGetter__(P)\n__webpack_require__(10) && $export($export.P + __webpack_require__(89), 'Object', {\n __lookupGetter__: function __lookupGetter__(P) {\n var O = toObject(this);\n var K = toPrimitive(P, true);\n var D;\n do {\n if (D = getOwnPropertyDescriptor(O, K)) return D.get;\n } while (O = getPrototypeOf(O));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0Lmxvb2t1cC1nZXR0ZXIuanM/YzQyYSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHRvT2Jq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Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///368\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar toPrimitive = __webpack_require__(31);\nvar getPrototypeOf = __webpack_require__(26);\nvar getOwnPropertyDescriptor = __webpack_require__(25).f;\n\n// B.2.2.5 Object.prototype.__lookupSetter__(P)\n__webpack_require__(10) && $export($export.P + __webpack_require__(89), 'Object', {\n __lookupSetter__: function __lookupSetter__(P) {\n var O = toObject(this);\n var K = toPrimitive(P, true);\n var D;\n do {\n if (D = getOwnPropertyDescriptor(O, K)) return D.set;\n } while (O = getPrototypeOf(O));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0Lmxvb2t1cC1zZXR0ZXIuanM/MDI0NCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgdG9QcmltaXRpdmUgPSByZXF1aXJlKCcuL190by1wcmltaXRpdmUnKTtcbnZhciBnZXRQcm90b3R5cGVPZiA9IHJlcXVpcmUoJy4vX29iamVjdC1ncG8nKTtcbnZhciBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IgPSByZXF1aXJlKCcuL19vYmplY3QtZ29wZCcpLmY7XG5cbi8vIEIuMi4yLjUgT2JqZWN0LnByb3RvdHlwZS5fX2xvb2t1cFNldHRlcl9fKFApXG5yZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpICYmICRleHBvcnQoJGV4cG9ydC5QICsgcmVxdWlyZSgnLi9fb2JqZWN0LWZvcmNlZC1wYW0nKSwgJ09iamVjdCcsIHtcbiAgX19sb29rdXBTZXR0ZXJfXzogZnVuY3Rpb24gX19sb29rdXBTZXR0ZXJfXyhQKSB7XG4gICAgdmFyIE8gPSB0b09iamVjdCh0aGlzKTtcbiAgICB2YXIgSyA9IHRvUHJpbWl0aXZlKFAsIHRydWUpO1xuICAgIHZhciBEO1xuICAgIGRvIHtcbiAgICAgIGlmIChEID0gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKE8sIEspKSByZXR1cm4gRC5zZXQ7XG4gICAgfSB3aGlsZSAoTyA9IGdldFByb3RvdHlwZU9mKE8pKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm9iamVjdC5sb29rdXAtc2V0dGVyLmpzXG4vLyBtb2R1bGUgaWQgPSAzNjlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///369\n")},function(module,exports,__webpack_require__){eval("// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = __webpack_require__(0);\n\n$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(179)('Map') });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzcwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWFwLnRvLWpzb24uanM/ODdiNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vRGF2aWRCcnVhbnQvTWFwLVNldC5wcm90b3R5cGUudG9KU09OXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuUiwgJ01hcCcsIHsgdG9KU09OOiByZXF1aXJlKCcuL19jb2xsZWN0aW9uLXRvLWpzb24nKSgnTWFwJykgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hcC50by1qc29uLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///370\n")},function(module,exports,__webpack_require__){eval("// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = __webpack_require__(0);\n\n$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(179)('Set') });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzcxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc2V0LnRvLWpzb24uanM/NmFiMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vRGF2aWRCcnVhbnQvTWFwLVNldC5wcm90b3R5cGUudG9KU09OXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuUiwgJ1NldCcsIHsgdG9KU09OOiByZXF1aXJlKCcuL19jb2xsZWN0aW9uLXRvLWpzb24nKSgnU2V0JykgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnNldC50by1qc29uLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///371\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of\n__webpack_require__(90)('Map');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzcyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWFwLm9mLmpzPzI0OWQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9wcm9wb3NhbC1zZXRtYXAtb2Zmcm9tLyNzZWMtbWFwLm9mXG5yZXF1aXJlKCcuL19zZXQtY29sbGVjdGlvbi1vZicpKCdNYXAnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWFwLm9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///372\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of\n__webpack_require__(90)('Set');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzczLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc2V0Lm9mLmpzP2E5OTYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9wcm9wb3NhbC1zZXRtYXAtb2Zmcm9tLyNzZWMtc2V0Lm9mXG5yZXF1aXJlKCcuL19zZXQtY29sbGVjdGlvbi1vZicpKCdTZXQnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc2V0Lm9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///373\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of\n__webpack_require__(90)('WeakMap');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcud2Vhay1tYXAub2YuanM/MmRhZSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL3Byb3Bvc2FsLXNldG1hcC1vZmZyb20vI3NlYy13ZWFrbWFwLm9mXG5yZXF1aXJlKCcuL19zZXQtY29sbGVjdGlvbi1vZicpKCdXZWFrTWFwJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LndlYWstbWFwLm9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///374\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of\n__webpack_require__(90)('WeakSet');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcud2Vhay1zZXQub2YuanM/MDRlNiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL3Byb3Bvc2FsLXNldG1hcC1vZmZyb20vI3NlYy13ZWFrc2V0Lm9mXG5yZXF1aXJlKCcuL19zZXQtY29sbGVjdGlvbi1vZicpKCdXZWFrU2V0Jyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LndlYWstc2V0Lm9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///375\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from\n__webpack_require__(91)('Map');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWFwLmZyb20uanM/ZTJiOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL3Byb3Bvc2FsLXNldG1hcC1vZmZyb20vI3NlYy1tYXAuZnJvbVxucmVxdWlyZSgnLi9fc2V0LWNvbGxlY3Rpb24tZnJvbScpKCdNYXAnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWFwLmZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDM3NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///376\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from\n__webpack_require__(91)('Set');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc2V0LmZyb20uanM/NjIwOCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL3Byb3Bvc2FsLXNldG1hcC1vZmZyb20vI3NlYy1zZXQuZnJvbVxucmVxdWlyZSgnLi9fc2V0LWNvbGxlY3Rpb24tZnJvbScpKCdTZXQnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc2V0LmZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDM3N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///377\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from\n__webpack_require__(91)('WeakMap');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcud2Vhay1tYXAuZnJvbS5qcz9lOTdjIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vcHJvcG9zYWwtc2V0bWFwLW9mZnJvbS8jc2VjLXdlYWttYXAuZnJvbVxucmVxdWlyZSgnLi9fc2V0LWNvbGxlY3Rpb24tZnJvbScpKCdXZWFrTWFwJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LndlYWstbWFwLmZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDM3OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///378\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from\n__webpack_require__(91)('WeakSet');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcud2Vhay1zZXQuZnJvbS5qcz9hOWQxIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vcHJvcG9zYWwtc2V0bWFwLW9mZnJvbS8jc2VjLXdlYWtzZXQuZnJvbVxucmVxdWlyZSgnLi9fc2V0LWNvbGxlY3Rpb24tZnJvbScpKCdXZWFrU2V0Jyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LndlYWstc2V0LmZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDM3OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///379\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-global\nvar $export = __webpack_require__(0);\n\n$export($export.G, { global: __webpack_require__(4) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzgwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuZ2xvYmFsLmpzPzBkMDciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9naXRodWIuY29tL3RjMzkvcHJvcG9zYWwtZ2xvYmFsXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuRywgeyBnbG9iYWw6IHJlcXVpcmUoJy4vX2dsb2JhbCcpIH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5nbG9iYWwuanNcbi8vIG1vZHVsZSBpZCA9IDM4MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///380\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-global\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'System', { global: __webpack_require__(4) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzgxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3lzdGVtLmdsb2JhbC5qcz84ZmYyIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS90YzM5L3Byb3Bvc2FsLWdsb2JhbFxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdTeXN0ZW0nLCB7IGdsb2JhbDogcmVxdWlyZSgnLi9fZ2xvYmFsJykgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnN5c3RlbS5nbG9iYWwuanNcbi8vIG1vZHVsZSBpZCA9IDM4MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///381\n")},function(module,exports,__webpack_require__){eval("// https://github.com/ljharb/proposal-is-error\nvar $export = __webpack_require__(0);\nvar cof = __webpack_require__(28);\n\n$export($export.S, 'Error', {\n isError: function isError(it) {\n return cof(it) === 'Error';\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzgyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuZXJyb3IuaXMtZXJyb3IuanM/NTNlNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vbGpoYXJiL3Byb3Bvc2FsLWlzLWVycm9yXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGNvZiA9IHJlcXVpcmUoJy4vX2NvZicpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ0Vycm9yJywge1xuICBpc0Vycm9yOiBmdW5jdGlvbiBpc0Vycm9yKGl0KSB7XG4gICAgcmV0dXJuIGNvZihpdCkgPT09ICdFcnJvcic7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5lcnJvci5pcy1lcnJvci5qc1xuLy8gbW9kdWxlIGlkID0gMzgyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///382\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n clamp: function clamp(x, lower, upper) {\n return Math.min(upper, Math.max(lower, x));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzgzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5jbGFtcC5qcz81ZmEzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vcndhbGRyb24uZ2l0aHViLmlvL3Byb3Bvc2FsLW1hdGgtZXh0ZW5zaW9ucy9cbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHtcbiAgY2xhbXA6IGZ1bmN0aW9uIGNsYW1wKHgsIGxvd2VyLCB1cHBlcikge1xuICAgIHJldHVybiBNYXRoLm1pbih1cHBlciwgTWF0aC5tYXgobG93ZXIsIHgpKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguY2xhbXAuanNcbi8vIG1vZHVsZSBpZCA9IDM4M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///383\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5kZWctcGVyLXJhZC5qcz81YjRhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vcndhbGRyb24uZ2l0aHViLmlvL3Byb3Bvc2FsLW1hdGgtZXh0ZW5zaW9ucy9cbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHsgREVHX1BFUl9SQUQ6IE1hdGguUEkgLyAxODAgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguZGVnLXBlci1yYWQuanNcbi8vIG1vZHVsZSBpZCA9IDM4NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///384\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\nvar RAD_PER_DEG = 180 / Math.PI;\n\n$export($export.S, 'Math', {\n degrees: function degrees(radians) {\n return radians * RAD_PER_DEG;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5kZWdyZWVzLmpzP2I1YTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9yd2FsZHJvbi5naXRodWIuaW8vcHJvcG9zYWwtbWF0aC1leHRlbnNpb25zL1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBSQURfUEVSX0RFRyA9IDE4MCAvIE1hdGguUEk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHtcbiAgZGVncmVlczogZnVuY3Rpb24gZGVncmVlcyhyYWRpYW5zKSB7XG4gICAgcmV0dXJuIHJhZGlhbnMgKiBSQURfUEVSX0RFRztcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguZGVncmVlcy5qc1xuLy8gbW9kdWxlIGlkID0gMzg1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///385\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\nvar scale = __webpack_require__(181);\nvar fround = __webpack_require__(161);\n\n$export($export.S, 'Math', {\n fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {\n return fround(scale(x, inLow, inHigh, outLow, outHigh));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5mc2NhbGUuanM/YmU3NSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3J3YWxkcm9uLmdpdGh1Yi5pby9wcm9wb3NhbC1tYXRoLWV4dGVuc2lvbnMvXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHNjYWxlID0gcmVxdWlyZSgnLi9fbWF0aC1zY2FsZScpO1xudmFyIGZyb3VuZCA9IHJlcXVpcmUoJy4vX21hdGgtZnJvdW5kJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHtcbiAgZnNjYWxlOiBmdW5jdGlvbiBmc2NhbGUoeCwgaW5Mb3csIGluSGlnaCwgb3V0TG93LCBvdXRIaWdoKSB7XG4gICAgcmV0dXJuIGZyb3VuZChzY2FsZSh4LCBpbkxvdywgaW5IaWdoLCBvdXRMb3csIG91dEhpZ2gpKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguZnNjYWxlLmpzXG4vLyBtb2R1bGUgaWQgPSAzODZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///386\n")},function(module,exports,__webpack_require__){eval("// https://gist.github.com/BrendanEich/4294d5c212a6d2254703\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n iaddh: function iaddh(x0, x1, y0, y1) {\n var $x0 = x0 >>> 0;\n var $x1 = x1 >>> 0;\n var $y0 = y0 >>> 0;\n return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5pYWRkaC5qcz80NzcyIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2lzdC5naXRodWIuY29tL0JyZW5kYW5FaWNoLzQyOTRkNWMyMTJhNmQyMjU0NzAzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIGlhZGRoOiBmdW5jdGlvbiBpYWRkaCh4MCwgeDEsIHkwLCB5MSkge1xuICAgIHZhciAkeDAgPSB4MCA+Pj4gMDtcbiAgICB2YXIgJHgxID0geDEgPj4+IDA7XG4gICAgdmFyICR5MCA9IHkwID4+PiAwO1xuICAgIHJldHVybiAkeDEgKyAoeTEgPj4+IDApICsgKCgkeDAgJiAkeTAgfCAoJHgwIHwgJHkwKSAmIH4oJHgwICsgJHkwID4+PiAwKSkgPj4+IDMxKSB8IDA7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5tYXRoLmlhZGRoLmpzXG4vLyBtb2R1bGUgaWQgPSAzODdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///387\n")},function(module,exports,__webpack_require__){eval("// https://gist.github.com/BrendanEich/4294d5c212a6d2254703\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n isubh: function isubh(x0, x1, y0, y1) {\n var $x0 = x0 >>> 0;\n var $x1 = x1 >>> 0;\n var $y0 = y0 >>> 0;\n return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5pc3ViaC5qcz9lYTIzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2lzdC5naXRodWIuY29tL0JyZW5kYW5FaWNoLzQyOTRkNWMyMTJhNmQyMjU0NzAzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIGlzdWJoOiBmdW5jdGlvbiBpc3ViaCh4MCwgeDEsIHkwLCB5MSkge1xuICAgIHZhciAkeDAgPSB4MCA+Pj4gMDtcbiAgICB2YXIgJHgxID0geDEgPj4+IDA7XG4gICAgdmFyICR5MCA9IHkwID4+PiAwO1xuICAgIHJldHVybiAkeDEgLSAoeTEgPj4+IDApIC0gKCh+JHgwICYgJHkwIHwgfigkeDAgXiAkeTApICYgJHgwIC0gJHkwID4+PiAwKSA+Pj4gMzEpIHwgMDtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguaXN1YmguanNcbi8vIG1vZHVsZSBpZCA9IDM4OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///388\n")},function(module,exports,__webpack_require__){eval("// https://gist.github.com/BrendanEich/4294d5c212a6d2254703\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n imulh: function imulh(u, v) {\n var UINT16 = 0xffff;\n var $u = +u;\n var $v = +v;\n var u0 = $u & UINT16;\n var v0 = $v & UINT16;\n var u1 = $u >> 16;\n var v1 = $v >> 16;\n var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);\n return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5pbXVsaC5qcz8wNzc1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2lzdC5naXRodWIuY29tL0JyZW5kYW5FaWNoLzQyOTRkNWMyMTJhNmQyMjU0NzAzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIGltdWxoOiBmdW5jdGlvbiBpbXVsaCh1LCB2KSB7XG4gICAgdmFyIFVJTlQxNiA9IDB4ZmZmZjtcbiAgICB2YXIgJHUgPSArdTtcbiAgICB2YXIgJHYgPSArdjtcbiAgICB2YXIgdTAgPSAkdSAmIFVJTlQxNjtcbiAgICB2YXIgdjAgPSAkdiAmIFVJTlQxNjtcbiAgICB2YXIgdTEgPSAkdSA+PiAxNjtcbiAgICB2YXIgdjEgPSAkdiA+PiAxNjtcbiAgICB2YXIgdCA9ICh1MSAqIHYwID4+PiAwKSArICh1MCAqIHYwID4+PiAxNik7XG4gICAgcmV0dXJuIHUxICogdjEgKyAodCA+PiAxNikgKyAoKHUwICogdjEgPj4+IDApICsgKHQgJiBVSU5UMTYpID4+IDE2KTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguaW11bGguanNcbi8vIG1vZHVsZSBpZCA9IDM4OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///389\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5yYWQtcGVyLWRlZy5qcz9kZWNmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vcndhbGRyb24uZ2l0aHViLmlvL3Byb3Bvc2FsLW1hdGgtZXh0ZW5zaW9ucy9cbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHsgUkFEX1BFUl9ERUc6IDE4MCAvIE1hdGguUEkgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGgucmFkLXBlci1kZWcuanNcbi8vIG1vZHVsZSBpZCA9IDM5MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///390\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\nvar DEG_PER_RAD = Math.PI / 180;\n\n$export($export.S, 'Math', {\n radians: function radians(degrees) {\n return degrees * DEG_PER_RAD;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5yYWRpYW5zLmpzPzE3NWIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9yd2FsZHJvbi5naXRodWIuaW8vcHJvcG9zYWwtbWF0aC1leHRlbnNpb25zL1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBERUdfUEVSX1JBRCA9IE1hdGguUEkgLyAxODA7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHtcbiAgcmFkaWFuczogZnVuY3Rpb24gcmFkaWFucyhkZWdyZWVzKSB7XG4gICAgcmV0dXJuIGRlZ3JlZXMgKiBERUdfUEVSX1JBRDtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGgucmFkaWFucy5qc1xuLy8gbW9kdWxlIGlkID0gMzkxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///391\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { scale: __webpack_require__(181) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5zY2FsZS5qcz9iODQxIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vcndhbGRyb24uZ2l0aHViLmlvL3Byb3Bvc2FsLW1hdGgtZXh0ZW5zaW9ucy9cbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHsgc2NhbGU6IHJlcXVpcmUoJy4vX21hdGgtc2NhbGUnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5zY2FsZS5qc1xuLy8gbW9kdWxlIGlkID0gMzkyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///392\n")},function(module,exports,__webpack_require__){eval("// https://gist.github.com/BrendanEich/4294d5c212a6d2254703\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n umulh: function umulh(u, v) {\n var UINT16 = 0xffff;\n var $u = +u;\n var $v = +v;\n var u0 = $u & UINT16;\n var v0 = $v & UINT16;\n var u1 = $u >>> 16;\n var v1 = $v >>> 16;\n var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);\n return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC51bXVsaC5qcz84YjRkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2lzdC5naXRodWIuY29tL0JyZW5kYW5FaWNoLzQyOTRkNWMyMTJhNmQyMjU0NzAzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIHVtdWxoOiBmdW5jdGlvbiB1bXVsaCh1LCB2KSB7XG4gICAgdmFyIFVJTlQxNiA9IDB4ZmZmZjtcbiAgICB2YXIgJHUgPSArdTtcbiAgICB2YXIgJHYgPSArdjtcbiAgICB2YXIgdTAgPSAkdSAmIFVJTlQxNjtcbiAgICB2YXIgdjAgPSAkdiAmIFVJTlQxNjtcbiAgICB2YXIgdTEgPSAkdSA+Pj4gMTY7XG4gICAgdmFyIHYxID0gJHYgPj4+IDE2O1xuICAgIHZhciB0ID0gKHUxICogdjAgPj4+IDApICsgKHUwICogdjAgPj4+IDE2KTtcbiAgICByZXR1cm4gdTEgKiB2MSArICh0ID4+PiAxNikgKyAoKHUwICogdjEgPj4+IDApICsgKHQgJiBVSU5UMTYpID4+PiAxNik7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5tYXRoLnVtdWxoLmpzXG4vLyBtb2R1bGUgaWQgPSAzOTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///393\n")},function(module,exports,__webpack_require__){eval("// http://jfbastien.github.io/papers/Math.signbit.html\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { signbit: function signbit(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzk0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5zaWduYml0LmpzPzFmYmMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cDovL2pmYmFzdGllbi5naXRodWIuaW8vcGFwZXJzL01hdGguc2lnbmJpdC5odG1sXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7IHNpZ25iaXQ6IGZ1bmN0aW9uIHNpZ25iaXQoeCkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tc2VsZi1jb21wYXJlXG4gIHJldHVybiAoeCA9ICt4KSAhPSB4ID8geCA6IHggPT0gMCA/IDEgLyB4ID09IEluZmluaXR5IDogeCA+IDA7XG59IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5tYXRoLnNpZ25iaXQuanNcbi8vIG1vZHVsZSBpZCA9IDM5NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///394\n")},function(module,exports,__webpack_require__){"use strict";eval("// https://github.com/tc39/proposal-promise-finally\n\nvar $export = __webpack_require__(0);\nvar core = __webpack_require__(30);\nvar global = __webpack_require__(4);\nvar speciesConstructor = __webpack_require__(86);\nvar promiseResolve = __webpack_require__(168);\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzk1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucHJvbWlzZS5maW5hbGx5LmpzP2Y4Y2IiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9naXRodWIuY29tL3RjMzkvcHJvcG9zYWwtcHJvbWlzZS1maW5hbGx5XG4ndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGNvcmUgPSByZ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IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///395\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/tc39/proposal-promise-try\nvar $export = __webpack_require__(0);\nvar newPromiseCapability = __webpack_require__(125);\nvar perform = __webpack_require__(167);\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapability.f(this);\n var result = perform(callbackfn);\n (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n return promiseCapability.promise;\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzk2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucHJvbWlzZS50cnkuanM/NDFjNSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9wcm9wb3NhbC1wcm9taXNlLXRyeVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBuZXdQcm9taXNlQ2FwYWJpbGl0eSA9IHJlcXVpcmUoJy4vX25ldy1wcm9taXNlLWNhcGFiaWxpdHknKTtcbnZhciBwZXJmb3JtID0gcmVxdWlyZSgnLi9fcGVyZm9ybScpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ1Byb21pc2UnLCB7ICd0cnknOiBmdW5jdGlvbiAoY2FsbGJhY2tmbikge1xuICB2YXIgcHJvbWlzZUNhcGFiaWxpdHkgPSBuZXdQcm9taXNlQ2FwYWJpbGl0eS5mKHRoaXMpO1xuICB2YXIgcmVzdWx0ID0gcGVyZm9ybShjYWxsYmFja2ZuKTtcbiAgKHJlc3VsdC5lID8gcHJvbWlzZUNhcGFiaWxpdHkucmVqZWN0IDogcHJvbWlzZUNhcGFiaWxpdHkucmVzb2x2ZSkocmVzdWx0LnYpO1xuICByZXR1cm4gcHJvbWlzZUNhcGFiaWxpdHkucHJvbWlzZTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnByb21pc2UudHJ5LmpzXG4vLyBtb2R1bGUgaWQgPSAzOTZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///396\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar toMetaKey = metadata.key;\nvar ordinaryDefineOwnMetadata = metadata.set;\n\nmetadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {\n ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzk3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5kZWZpbmUtbWV0YWRhdGEuanM/Yzg5ZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgbWV0YWRhdGEgPSByZXF1aXJlKCcuL19tZXRhZGF0YScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgdG9NZXRhS2V5ID0gbWV0YWRhdGEua2V5O1xudmFyIG9yZGluYXJ5RGVmaW5lT3duTWV0YWRhdGEgPSBtZXRhZGF0YS5zZXQ7XG5cbm1ldGFkYXRhLmV4cCh7IGRlZmluZU1ldGFkYXRhOiBmdW5jdGlvbiBkZWZpbmVNZXRhZGF0YShtZXRhZGF0YUtleSwgbWV0YWRhdGFWYWx1ZSwgdGFyZ2V0LCB0YXJnZXRLZXkpIHtcbiAgb3JkaW5hcnlEZWZpbmVPd25NZXRhZGF0YShtZXRhZGF0YUtleSwgbWV0YWRhdGFWYWx1ZSwgYW5PYmplY3QodGFyZ2V0KSwgdG9NZXRhS2V5KHRhcmdldEtleSkpO1xufSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5kZWZpbmUtbWV0YWRhdGEuanNcbi8vIG1vZHVsZSBpZCA9IDM5N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///397\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar toMetaKey = metadata.key;\nvar getOrCreateMetadataMap = metadata.map;\nvar store = metadata.store;\n\nmetadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {\n var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);\n var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);\n if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;\n if (metadataMap.size) return true;\n var targetMetadata = store.get(target);\n targetMetadata['delete'](targetKey);\n return !!targetMetadata.size || store['delete'](target);\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzk4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5kZWxldGUtbWV0YWRhdGEuanM/ZGVhZSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgbWV0YWRhdGEgPSByZXF1aXJlKCcuL19tZXRhZGF0YScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgdG9NZXRhS2V5ID0gbWV0YWRhdGEua2V5O1xudmFyIGdldE9yQ3JlYXRlTWV0YWRhdGFNYXAgPSBtZXRhZGF0YS5tYXA7XG52YXIgc3RvcmUgPSBtZXRhZGF0YS5zdG9yZTtcblxubWV0YWRhdGEuZXhwKHsgZGVsZXRlTWV0YWRhdGE6IGZ1bmN0aW9uIGRlbGV0ZU1ldGFkYXRhKG1ldGFkYXRhS2V5LCB0YXJnZXQgLyogLCB0YXJnZXRLZXkgKi8pIHtcbiAgdmFyIHRhcmdldEtleSA9IGFyZ3VtZW50cy5sZW5ndGggPCAzID8gdW5kZWZpbmVkIDogdG9NZXRhS2V5KGFyZ3VtZW50c1syXSk7XG4gIHZhciBtZXRhZGF0YU1hcCA9IGdldE9yQ3JlYXRlTWV0YWRhdGFNYXAoYW5PYmplY3QodGFyZ2V0KSwgdGFyZ2V0S2V5LCBmYWxzZSk7XG4gIGlmIChtZXRhZGF0YU1hcCA9PT0gdW5kZWZpbmVkIHx8ICFtZXRhZGF0YU1hcFsnZGVsZXRlJ10obWV0YWRhdGFLZXkpKSByZXR1cm4gZmFsc2U7XG4gIGlmIChtZXRhZGF0YU1hcC5zaXplKSByZXR1cm4gdHJ1ZTtcbiAgdmFyIHRhcmdldE1ldGFkYXRhID0gc3RvcmUuZ2V0KHRhcmdldCk7XG4gIHRhcmdldE1ldGFkYXRhWydkZWxldGUnXSh0YXJnZXRLZXkpO1xuICByZXR1cm4gISF0YXJnZXRNZXRhZGF0YS5zaXplIHx8IHN0b3JlWydkZWxldGUnXSh0YXJnZXQpO1xufSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5kZWxldGUtbWV0YWRhdGEuanNcbi8vIG1vZHVsZSBpZCA9IDM5OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///398\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar getPrototypeOf = __webpack_require__(26);\nvar ordinaryHasOwnMetadata = metadata.has;\nvar ordinaryGetOwnMetadata = metadata.get;\nvar toMetaKey = metadata.key;\n\nvar ordinaryGetMetadata = function (MetadataKey, O, P) {\n var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);\n var parent = getPrototypeOf(O);\n return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;\n};\n\nmetadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaW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wgYW5PYmplY3QodGFyZ2V0KSwgYXJndW1lbnRzLmxlbmd0aCA8IDMgPyB1bmRlZmluZWQgOiB0b01ldGFLZXkoYXJndW1lbnRzWzJdKSk7XG59IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5yZWZsZWN0LmdldC1tZXRhZGF0YS5qc1xuLy8gbW9kdWxlIGlkID0gMzk5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///399\n")},function(module,exports,__webpack_require__){eval("var Set = __webpack_require__(171);\nvar from = __webpack_require__(180);\nvar metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar getPrototypeOf = __webpack_require__(26);\nvar ordinaryOwnMetadataKeys = metadata.keys;\nvar toMetaKey = metadata.key;\n\nvar ordinaryMetadataKeys = function (O, P) {\n var oKeys = ordinaryOwnMetadataKeys(O, P);\n var parent = getPrototypeOf(O);\n if (parent === null) return oKeys;\n var pKeys = ordinaryMetadataKeys(parent, P);\n return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;\n};\n\nmetadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {\n return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9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CBhcmd1bWVudHMubGVuZ3RoIDwgMiA/IHVuZGVmaW5lZCA6IHRvTWV0YUtleShhcmd1bWVudHNbMV0pKTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnJlZmxlY3QuZ2V0LW1ldGFkYXRhLWtleXMuanNcbi8vIG1vZHVsZSBpZCA9IDQwMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///400\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar ordinaryGetOwnMetadata = metadata.get;\nvar toMetaKey = metadata.key;\n\nmetadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryGetOwnMetadata(metadataKey, anObject(target)\n , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5nZXQtb3duLW1ldGFkYXRhLmpzP2NkOTEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIG1ldGFkYXRhID0gcmVxdWlyZSgnLi9fbWV0YWRhdGEnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIG9yZGluYXJ5R2V0T3duTWV0YWRhdGEgPSBtZXRhZGF0YS5nZXQ7XG52YXIgdG9NZXRhS2V5ID0gbWV0YWRhdGEua2V5O1xuXG5tZXRhZGF0YS5leHAoeyBnZXRPd25NZXRhZGF0YTogZnVuY3Rpb24gZ2V0T3duTWV0YWRhdGEobWV0YWRhdGFLZXksIHRhcmdldCAvKiAsIHRhcmdldEtleSAqLykge1xuICByZXR1cm4gb3JkaW5hcnlHZXRPd25NZXRhZGF0YShtZXRhZGF0YUtleSwgYW5PYmplY3QodGFyZ2V0KVxuICAgICwgYXJndW1lbnRzLmxlbmd0aCA8IDMgPyB1bmRlZmluZWQgOiB0b01ldGFLZXkoYXJndW1lbnRzWzJdKSk7XG59IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5yZWZsZWN0LmdldC1vd24tbWV0YWRhdGEuanNcbi8vIG1vZHVsZSBpZCA9IDQwMVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///401\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar ordinaryOwnMetadataKeys = metadata.keys;\nvar toMetaKey = metadata.key;\n\nmetadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {\n return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5nZXQtb3duLW1ldGFkYXRhLWtleXMuanM/YmVjOCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgbWV0YWRhdGEgPSByZXF1aXJlKCcuL19tZXRhZGF0YScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgb3JkaW5hcnlPd25NZXRhZGF0YUtleXMgPSBtZXRhZGF0YS5rZXlzO1xudmFyIHRvTWV0YUtleSA9IG1ldGFkYXRhLmtleTtcblxubWV0YWRhdGEuZXhwKHsgZ2V0T3duTWV0YWRhdGFLZXlzOiBmdW5jdGlvbiBnZXRPd25NZXRhZGF0YUtleXModGFyZ2V0IC8qICwgdGFyZ2V0S2V5ICovKSB7XG4gIHJldHVybiBvcmRpbmFyeU93bk1ldGFkYXRhS2V5cyhhbk9iamVjdCh0YXJnZXQpLCBhcmd1bWVudHMubGVuZ3RoIDwgMiA/IHVuZGVmaW5lZCA6IHRvTWV0YUtleShhcmd1bWVudHNbMV0pKTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnJlZmxlY3QuZ2V0LW93bi1tZXRhZGF0YS1rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSA0MDJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///402\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar getPrototypeOf = __webpack_require__(26);\nvar ordinaryHasOwnMetadata = metadata.has;\nvar toMetaKey = metadata.key;\n\nvar ordinaryHasMetadata = function (MetadataKey, O, P) {\n var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn) return true;\n var parent = getPrototypeOf(O);\n return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;\n};\n\nmetadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5oYXMtbWV0YWRhdGEuanM/ZjE2NiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgbWV0YWRhdGEgPSByZXF1aXJlKCcuL19tZXRhZGF0YScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgZ2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKCcuL19vYmplY3QtZ3BvJyk7XG52YXIgb3JkaW5hcnlIYXNPd25NZXRhZGF0YSA9IG1ldGFkYXRhLmhhcztcbnZhciB0b01ldGFLZXkgPSBtZXRhZGF0YS5rZXk7XG5cbnZhciBvcmRpbmFyeUhhc01ldGFkYXRhID0gZnVuY3Rpb24gKE1ldGFkYXRhS2V5LCBPLCBQKSB7XG4gIHZhciBoYXNPd24gPSBvcmRpbmFyeUhhc093bk1ldGFkYXRhKE1ldGFkYXRhS2V5LCBPLCBQKTtcbiAgaWYgKGhhc093bikgcmV0dXJuIHRydWU7XG4gIHZhciBwYXJlbnQgPSBnZXRQcm90b3R5cGVPZihPKTtcbiAgcmV0dXJuIHBhcmVudCAhPT0gbnVsbCA/IG9yZGluYXJ5SGFzTWV0YWRhdGEoTWV0YWRhdGFLZXksIHBhcmVudCwgUCkgOiBmYWxzZTtcbn07XG5cbm1ldGFkYXRhLmV4cCh7IGhhc01ldGFkYXRhOiBmdW5jdGlvbiBoYXNNZXRhZGF0YShtZXRhZGF0YUtleSwgdGFyZ2V0IC8qICwgdGFyZ2V0S2V5ICovKSB7XG4gIHJldHVybiBvcmRpbmFyeUhhc01ldGFkYXRhKG1ldGFkYXRhS2V5LCBhbk9iamVjdCh0YXJnZXQpLCBhcmd1bWVudHMubGVuZ3RoIDwgMyA/IHVuZGVmaW5lZCA6IHRvTWV0YUtleShhcmd1bWVudHNbMl0pKTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnJlZmxlY3QuaGFzLW1ldGFkYXRhLmpzXG4vLyBtb2R1bGUgaWQgPSA0MDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///403\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar ordinaryHasOwnMetadata = metadata.has;\nvar toMetaKey = metadata.key;\n\nmetadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryHasOwnMetadata(metadataKey, anObject(target)\n , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5oYXMtb3duLW1ldGFkYXRhLmpzP2M4ZWIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIG1ldGFkYXRhID0gcmVxdWlyZSgnLi9fbWV0YWRhdGEnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIG9yZGluYXJ5SGFzT3duTWV0YWRhdGEgPSBtZXRhZGF0YS5oYXM7XG52YXIgdG9NZXRhS2V5ID0gbWV0YWRhdGEua2V5O1xuXG5tZXRhZGF0YS5leHAoeyBoYXNPd25NZXRhZGF0YTogZnVuY3Rpb24gaGFzT3duTWV0YWRhdGEobWV0YWRhdGFLZXksIHRhcmdldCAvKiAsIHRhcmdldEtleSAqLykge1xuICByZXR1cm4gb3JkaW5hcnlIYXNPd25NZXRhZGF0YShtZXRhZGF0YUtleSwgYW5PYmplY3QodGFyZ2V0KVxuICAgICwgYXJndW1lbnRzLmxlbmd0aCA8IDMgPyB1bmRlZmluZWQgOiB0b01ldGFLZXkoYXJndW1lbnRzWzJdKSk7XG59IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5yZWZsZWN0Lmhhcy1vd24tbWV0YWRhdGEuanNcbi8vIG1vZHVsZSBpZCA9IDQwNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///404\n")},function(module,exports,__webpack_require__){eval("var $metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar aFunction = __webpack_require__(16);\nvar toMetaKey = $metadata.key;\nvar ordinaryDefineOwnMetadata = $metadata.set;\n\n$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {\n return function decorator(target, targetKey) {\n ordinaryDefineOwnMetadata(\n metadataKey, metadataValue,\n (targetKey !== undefined ? anObject : aFunction)(target),\n toMetaKey(targetKey)\n );\n };\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5tZXRhZGF0YS5qcz8xMTlmIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkbWV0YWRhdGEgPSByZXF1aXJlKCcuL19tZXRhZGF0YScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgYUZ1bmN0aW9uID0gcmVxdWlyZSgnLi9fYS1mdW5jdGlvbicpO1xudmFyIHRvTWV0YUtleSA9ICRtZXRhZGF0YS5rZXk7XG52YXIgb3JkaW5hcnlEZWZpbmVPd25NZXRhZGF0YSA9ICRtZXRhZGF0YS5zZXQ7XG5cbiRtZXRhZGF0YS5leHAoeyBtZXRhZGF0YTogZnVuY3Rpb24gbWV0YWRhdGEobWV0YWRhdGFLZXksIG1ldGFkYXRhVmFsdWUpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGRlY29yYXRvcih0YXJnZXQsIHRhcmdldEtleSkge1xuICAgIG9yZGluYXJ5RGVmaW5lT3duTWV0YWRhdGEoXG4gICAgICBtZXRhZGF0YUtleSwgbWV0YWRhdGFWYWx1ZSxcbiAgICAgICh0YXJnZXRLZXkgIT09IHVuZGVmaW5lZCA/IGFuT2JqZWN0IDogYUZ1bmN0aW9uKSh0YXJnZXQpLFxuICAgICAgdG9NZXRhS2V5KHRhcmdldEtleSlcbiAgICApO1xuICB9O1xufSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5tZXRhZGF0YS5qc1xuLy8gbW9kdWxlIGlkID0gNDA1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///405\n")},function(module,exports,__webpack_require__){eval("// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask\nvar $export = __webpack_require__(0);\nvar microtask = __webpack_require__(124)();\nvar process = __webpack_require__(4).process;\nvar isNode = __webpack_require__(28)(process) == 'process';\n\n$export($export.G, {\n asap: function asap(fn) {\n var domain = isNode && process.domain;\n microtask(domain ? domain.bind(fn) : fn);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuYXNhcC5qcz82OGNkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9yd2FsZHJvbi90YzM5LW5vdGVzL2Jsb2IvbWFzdGVyL2VzNi8yMDE0LTA5L3NlcHQtMjUubWQjNTEwLWdsb2JhbGFzYXAtZm9yLWVucXVldWluZy1hLW1pY3JvdGFza1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBtaWNyb3Rhc2sgPSByZXF1aXJlKCcuL19taWNyb3Rhc2snKSgpO1xudmFyIHByb2Nlc3MgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5wcm9jZXNzO1xudmFyIGlzTm9kZSA9IHJlcXVpcmUoJy4vX2NvZicpKHByb2Nlc3MpID09ICdwcm9jZXNzJztcblxuJGV4cG9ydCgkZXhwb3J0LkcsIHtcbiAgYXNhcDogZnVuY3Rpb24gYXNhcChmbikge1xuICAgIHZhciBkb21haW4gPSBpc05vZGUgJiYgcHJvY2Vzcy5kb21haW47XG4gICAgbWljcm90YXNrKGRvbWFpbiA/IGRvbWFpbi5iaW5kKGZuKSA6IGZuKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LmFzYXAuanNcbi8vIG1vZHVsZSBpZCA9IDQwNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///406\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/zenparsing/es-observable\nvar $export = __webpack_require__(0);\nvar global = __webpack_require__(4);\nvar core = __webpack_require__(30);\nvar microtask = __webpack_require__(124)();\nvar OBSERVABLE = __webpack_require__(8)('observable');\nvar aFunction = __webpack_require__(16);\nvar anObject = __webpack_require__(3);\nvar anInstance = __webpack_require__(55);\nvar redefineAll = __webpack_require__(57);\nvar hide = __webpack_require__(18);\nvar forOf = __webpack_require__(56);\nvar RETURN = forOf.RETURN;\n\nvar getMethod = function (fn) {\n return fn == null ? undefined : aFunction(fn);\n};\n\nvar cleanupSubscription = function (subscription) {\n var cleanup = subscription._c;\n if (cleanup) {\n subscription._c = undefined;\n cleanup();\n }\n};\n\nvar subscriptionClosed = function (subscription) {\n return subscription._o === undefined;\n};\n\nvar closeSubscription = function (subscription) {\n if (!subscriptionClosed(subscription)) {\n subscription._o = undefined;\n cleanupSubscription(subscription);\n }\n};\n\nvar Subscription = function (observer, subscriber) {\n anObject(observer);\n this._c = undefined;\n this._o = observer;\n observer = new SubscriptionObserver(this);\n try {\n var cleanup = subscriber(observer);\n var subscription = cleanup;\n if (cleanup != null) {\n if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); };\n else aFunction(cleanup);\n this._c = cleanup;\n }\n } catch (e) {\n observer.error(e);\n return;\n } if (subscriptionClosed(this)) cleanupSubscription(this);\n};\n\nSubscription.prototype = redefineAll({}, {\n unsubscribe: function unsubscribe() { closeSubscription(this); }\n});\n\nvar SubscriptionObserver = function (subscription) {\n this._s = subscription;\n};\n\nSubscriptionObserver.prototype = redefineAll({}, {\n next: function next(value) {\n var subscription = this._s;\n if (!subscriptionClosed(subscription)) {\n var observer = subscription._o;\n try {\n var m = getMethod(observer.next);\n if (m) return m.call(observer, value);\n } catch (e) {\n try {\n closeSubscription(subscription);\n } finally {\n throw e;\n }\n }\n }\n },\n error: function error(value) {\n var subscription = this._s;\n if (subscriptionClosed(subscription)) throw value;\n var observer = subscription._o;\n subscription._o = undefined;\n try {\n var m = getMethod(observer.error);\n if (!m) throw value;\n value = m.call(observer, value);\n } catch (e) {\n try {\n cleanupSubscription(subscription);\n } finally {\n throw e;\n }\n } cleanupSubscription(subscription);\n return value;\n },\n complete: function complete(value) {\n var subscription = this._s;\n if (!subscriptionClosed(subscription)) {\n var observer = subscription._o;\n subscription._o = undefined;\n try {\n var m = getMethod(observer.complete);\n value = m ? m.call(observer, value) : undefined;\n } catch (e) {\n try {\n cleanupSubscription(subscription);\n } finally {\n throw e;\n }\n } cleanupSubscription(subscription);\n return value;\n }\n }\n});\n\nvar $Observable = function Observable(subscriber) {\n anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);\n};\n\nredefineAll($Observable.prototype, {\n subscribe: function subscribe(observer) {\n return new Subscription(observer, this._f);\n },\n forEach: function forEach(fn) {\n var that = this;\n return new (core.Promise || global.Promise)(function (resolve, reject) {\n aFunction(fn);\n var subscription = that.subscribe({\n next: function (value) {\n try {\n return fn(value);\n } catch (e) {\n reject(e);\n subscription.unsubscribe();\n }\n },\n error: reject,\n complete: resolve\n });\n });\n }\n});\n\nredefineAll($Observable, {\n from: function from(x) {\n var C = typeof this === 'function' ? this : $Observable;\n var method = getMethod(anObject(x)[OBSERVABLE]);\n if (method) {\n var observable = anObject(method.call(x));\n return observable.constructor === C ? observable : new C(function (observer) {\n return observable.subscribe(observer);\n });\n }\n return new C(function (observer) {\n var done = false;\n microtask(function () {\n if (!done) {\n try {\n if (forOf(x, false, function (it) {\n observer.next(it);\n if (done) return RETURN;\n }) === RETURN) return;\n } catch (e) {\n if (done) throw e;\n observer.error(e);\n return;\n } observer.complete();\n }\n });\n return function () { done = true; };\n });\n },\n of: function of() {\n for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++];\n return new (typeof this === 'function' ? this : $Observable)(function (observer) {\n var done = false;\n microtask(function () {\n if (!done) {\n for (var j = 0; j < items.length; ++j) {\n observer.next(items[j]);\n if (done) return;\n } observer.complete();\n }\n });\n return function () { done = true; };\n });\n }\n});\n\nhide($Observable.prototype, OBSERVABLE, function () { return this; });\n\n$export($export.G, { Observable: $Observable });\n\n__webpack_require__(54)('Observable');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JzZXJ2YWJsZS5qcz85ZTFkIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS96Z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ZXJ2YWJsZSwge1xuICBmcm9tOiBmdW5jdGlvbiBmcm9tKHgpIHtcbiAgICB2YXIgQyA9IHR5cGVvZiB0aGlzID09PSAnZnVuY3Rpb24nID8gdGhpcyA6ICRPYnNlcnZhYmxlO1xuICAgIHZhciBtZXRob2QgPSBnZXRNZXRob2QoYW5PYmplY3QoeClbT0JTRVJWQUJMRV0pO1xuICAgIGlmIChtZXRob2QpIHtcbiAgICAgIHZhciBvYnNlcnZhYmxlID0gYW5PYmplY3QobWV0aG9kLmNhbGwoeCkpO1xuICAgICAgcmV0dXJuIG9ic2VydmFibGUuY29uc3RydWN0b3IgPT09IEMgPyBvYnNlcnZhYmxlIDogbmV3IEMoZnVuY3Rpb24gKG9ic2VydmVyKSB7XG4gICAgICAgIHJldHVybiBvYnNlcnZhYmxlLnN1YnNjcmliZShvYnNlcnZlcik7XG4gICAgICB9KTtcbiAgICB9XG4gICAgcmV0dXJuIG5ldyBDKGZ1bmN0aW9uIChvYnNlcnZlcikge1xuICAgICAgdmFyIGRvbmUgPSBmYWxzZTtcbiAgICAgIG1pY3JvdGFzayhmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICghZG9uZSkge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBpZiAoZm9yT2YoeCwgZmFsc2UsIGZ1bmN0aW9uIChpdCkge1xuICAgICAgICAgICAgICBvYnNlcnZlci5uZXh0KGl0KTtcbiAgICAgICAgICAgICAgaWYgKGRvbmUpIHJldHVybiBSRVRVUk47XG4gICAgICAgICAgICB9KSA9PT0gUkVUVVJOKSByZXR1cm47XG4gICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgaWYgKGRvbmUpIHRocm93IGU7XG4gICAgICAgICAgICBvYnNlcnZlci5lcnJvcihlKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9IG9ic2VydmVyLmNvbXBsZXRlKCk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJ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UNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///407\n")},function(module,exports,__webpack_require__){eval("// ie9- setTimeout & setInterval additional parameters fix\nvar global = __webpack_require__(4);\nvar $export = __webpack_require__(0);\nvar userAgent = __webpack_require__(127);\nvar slice = [].slice;\nvar MSIE = /MSIE .\\./.test(userAgent); // <- dirty ie9- check\nvar wrap = function (set) {\n return function (fn, time /* , ...args */) {\n var boundArgs = arguments.length > 2;\n var args = boundArgs ? slice.call(arguments, 2) : false;\n return set(boundArgs ? function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);\n } : fn, time);\n };\n};\n$export($export.G + $export.B + $export.F * MSIE, {\n setTimeout: wrap(global.setTimeout),\n setInterval: wrap(global.setInterval)\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kd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ZXJ2YWwpXG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy93ZWIudGltZXJzLmpzXG4vLyBtb2R1bGUgaWQgPSA0MDhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///408\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar $task = __webpack_require__(123);\n$export($export.G + $export.B, {\n setImmediate: $task.set,\n clearImmediate: $task.clear\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy93ZWIuaW1tZWRpYXRlLmpzPzc2MjciXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkdGFzayA9IHJlcXVpcmUoJy4vX3Rhc2snKTtcbiRleHBvcnQoJGV4cG9ydC5HICsgJGV4cG9ydC5CLCB7XG4gIHNldEltbWVkaWF0ZTogJHRhc2suc2V0LFxuICBjbGVhckltbWVkaWF0ZTogJHRhc2suY2xlYXJcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL3dlYi5pbW1lZGlhdGUuanNcbi8vIG1vZHVsZSBpZCA9IDQwOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///409\n")},function(module,exports,__webpack_require__){eval("var $iterators = __webpack_require__(122);\nvar getKeys = __webpack_require__(50);\nvar redefine = __webpack_require__(19);\nvar global = __webpack_require__(4);\nvar hide = __webpack_require__(18);\nvar Iterators = __webpack_require__(63);\nvar wks = __webpack_require__(8);\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy93ZWIuZG9tLml0ZXJhYmxlLmpzPzdmMWQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRpdGVyYXRvcnMgPSByZXF1aXJlKCcuL2VzNi5hcnJheS5pdGVyYXRvcicpO1xudmFyIGdldEtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cycpO1xudmFyIHJlZGVmaW5lID0gcmVxdWlyZSgnLi9fcmVkZWZpbmUnKTtcbnZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBoaWRlID0gcmVxdWlyZSgnLi9faGlkZScpO1xudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4vX2l0ZXJhdG9ycycpO1xudmFyIHdrcyA9IHJlcXVpcmUoJy4vX3drcycpO1xudmFyIElURVJBVE9SID0gd2tzKCdpdGVyYXRvcicpO1xudmFyIFRPX1NUUklOR19UQUcgPSB3a3MoJ3RvU3RyaW5nVGFnJyk7XG52YXIgQXJyYXlWYWx1ZXMgPSBJdGVyYXRvcnMuQXJyYXk7XG5cbnZhciBET01JdGVyYWJsZXMgPSB7XG4gIENTU1J1bGVMaXN0OiB0cnVlLCAvLyBUT0RPOiBOb3Qgc3BlYyBjb21wbGlhbnQsIHNob3VsZCBiZSBmYWxzZS5cbiAgQ1NTU3R5bGVEZWNsYXJhdGlvbjogZmFsc2UsXG4gIENTU1ZhbHVlTGlzdDogZmFsc2UsXG4gIENsaWVudFJlY3RMaXN0OiBmYWxzZSxcbiAgRE9NUmVjdExpc3Q6IGZhbHNlLFxuICBET01TdHJpbmdMaXN0OiBmYWxzZSxcbiAgRE9NVG9rZW5MaXN0Oi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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///410\n")},function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {/**\n * Copyright (c) 2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * https://raw.github.com/facebook/regenerator/master/LICENSE file. An\n * additional grant of patent rights can be found in the PATENTS file in\n * the same directory.\n */\n\n!(function(global) {\n "use strict";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === "function" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || "@@iterator";\n var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";\n var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";\n\n var inModule = typeof module === "object";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we\'re in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don\'t bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we\'re in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there\'s no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don\'t have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: "normal", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: "throw", arg: err };\n }\n }\n\n var GenStateSuspendedStart = "suspendedStart";\n var GenStateSuspendedYield = "suspendedYield";\n var GenStateExecuting = "executing";\n var GenStateCompleted = "completed";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don\'t natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = "GeneratorFunction";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n ["next", "throw", "return"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === "function" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === "GeneratorFunction"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = "GeneratorFunction";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, "__await")` to determine if the yielded value is\n // meant to be awaited.\n runtime.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === "throw") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === "object" &&\n hasOwn.call(value, "__await")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke("next", value, resolve, reject);\n }, function(err) {\n invoke("throw", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration. If the Promise is rejected, however, the\n // result for this iteration will be rejected with the same\n // reason. Note that rejections of yielded Promises are not\n // thrown back into the generator function, as is the case\n // when an awaited Promise is rejected. This difference in\n // behavior between yield and await is important, because it\n // allows the consumer to decide what to do with the yielded\n // rejection (swallow it and continue, manually .throw it back\n // into the generator, abandon iteration, whatever). With\n // await, by contrast, there is no opportunity to examine the\n // rejection reason outside the generator function, so the\n // only option is to throw it from the await expression, and\n // let the generator function handle the exception.\n result.value = unwrapped;\n resolve(result);\n }, reject);\n }\n }\n\n if (typeof global.process === "object" && global.process.domain) {\n invoke = global.process.domain.bind(invoke);\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n runtime.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error("Generator is already running");\n }\n\n if (state === GenStateCompleted) {\n if (method === "throw") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === "next") {\n // Setting context._sent for legacy support of Babel\'s\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === "throw") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === "return") {\n context.abrupt("return", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === "normal") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === "throw") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = "throw";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === "throw") {\n if (delegate.iterator.return) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = "return";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === "throw") {\n // If maybeInvokeDelegate(context) changed context.method from\n // "return" to "throw", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = "throw";\n context.arg = new TypeError(\n "The iterator does not provide a \'throw\' method");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === "throw") {\n context.method = "throw";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = "throw";\n context.arg = new TypeError("iterator result is not an object");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was "throw" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was "next", forget context.arg since it has been\n // "consumed" by the delegate iterator. If context.method was\n // "return", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== "return") {\n context.method = "next";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = "Generator";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers\' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn\'t happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return "[object Generator]";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = "normal";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: "root" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === "function") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel\'s\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = "next";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === "t" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === "throw") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = "throw";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = "next";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === "root") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle("end");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, "catchLoc");\n var hasFinally = hasOwn.call(entry, "finallyLoc");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error("try statement without catch or finally");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, "finallyLoc") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === "break" ||\n type === "continue") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = "next";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === "throw") {\n throw record.arg;\n }\n\n if (record.type === "break" ||\n record.type === "continue") {\n this.next = record.arg;\n } else if (record.type === "return") {\n this.rval = this.arg = record.arg;\n this.method = "return";\n this.next = "end";\n } else if (record.type === "normal" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n "catch": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === "throw") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error("illegal catch attempt");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === "next") {\n // Deliberately forget the last sent value so that we don\'t\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n})(\n // Among the various tricks for obtaining a reference to the global\n // object, this seems to be the most reliable technique that does not\n // use indirect eval (which violates Content Security Policy).\n typeof global === "object" ? global :\n typeof window === "object" ? window :\n typeof self === "object" ? self : this\n);\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(147)))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLC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5cbiAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKSBjYWxsIGFib3ZlLlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG4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9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGl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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///411\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(413);\nmodule.exports = __webpack_require__(30).RegExp.escape;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvZm4vcmVnZXhwL2VzY2FwZS5qcz81YjA5Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvY29yZS5yZWdleHAuZXNjYXBlJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5SZWdFeHAuZXNjYXBlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9mbi9yZWdleHAvZXNjYXBlLmpzXG4vLyBtb2R1bGUgaWQgPSA0MTJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///412\n")},function(module,exports,__webpack_require__){eval("// https://github.com/benjamingr/RexExp.escape\nvar $export = __webpack_require__(0);\nvar $re = __webpack_require__(414)(/[\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n\n$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9jb3JlLnJlZ2V4cC5lc2NhcGUuanM/YWY2MSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vYmVuamFtaW5nci9SZXhFeHAuZXNjYXBlXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRyZSA9IHJlcXVpcmUoJy4vX3JlcGxhY2VyJykoL1tcXFxcXiQqKz8uKCl8W1xcXXt9XS9nLCAnXFxcXCQmJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnUmVnRXhwJywgeyBlc2NhcGU6IGZ1bmN0aW9uIGVzY2FwZShpdCkgeyByZXR1cm4gJHJlKGl0KTsgfSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9jb3JlLnJlZ2V4cC5lc2NhcGUuanNcbi8vIG1vZHVsZSBpZCA9IDQxM1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///413\n")},function(module,exports){eval("module.exports = function (regExp, replace) {\n var replacer = replace === Object(replace) ? function (part) {\n return replace[part];\n } : replace;\n return function (it) {\n return String(it).replace(regExp, replacer);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcmVwbGFjZXIuanM/OWVhMyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChyZWdFeHAsIHJlcGxhY2UpIHtcbiAgdmFyIHJlcGxhY2VyID0gcmVwbGFjZSA9PT0gT2JqZWN0KHJlcGxhY2UpID8gZnVuY3Rpb24gKHBhcnQpIHtcbiAgICByZXR1cm4gcmVwbGFjZVtwYXJ0XTtcbiAgfSA6IHJlcGxhY2U7XG4gIHJldHVybiBmdW5jdGlvbiAoaXQpIHtcbiAgICByZXR1cm4gU3RyaW5nKGl0KS5yZXBsYWNlKHJlZ0V4cCwgcmVwbGFjZXIpO1xuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcmVwbGFjZXIuanNcbi8vIG1vZHVsZSBpZCA9IDQxNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///414\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _assign = __webpack_require__(96);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _logLevels = __webpack_require__(201);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _Registry = __webpack_require__(439);\n\nvar _Registry2 = _interopRequireDefault(_Registry);\n\nvar _IdentityModule = __webpack_require__(469);\n\nvar _IdentityModule2 = _interopRequireDefault(_IdentityModule);\n\nvar _IdentityManager = __webpack_require__(476);\n\nvar _IdentityManager2 = _interopRequireDefault(_IdentityManager);\n\nvar _PEP = __webpack_require__(477);\n\nvar _PEP2 = _interopRequireDefault(_PEP);\n\nvar _MessageBus = __webpack_require__(488);\n\nvar _MessageBus2 = _interopRequireDefault(_MessageBus);\n\nvar _utils = __webpack_require__(14);\n\nvar _AddressAllocation = __webpack_require__(99);\n\nvar _AddressAllocation2 = _interopRequireDefault(_AddressAllocation);\n\nvar _CryptoManager = __webpack_require__(100);\n\nvar _CryptoManager2 = _interopRequireDefault(_CryptoManager);\n\nvar _Loader = __webpack_require__(492);\n\nvar _Loader2 = _interopRequireDefault(_Loader);\n\nvar _Storage = __webpack_require__(493);\n\nvar _Descriptors = __webpack_require__(494);\n\nvar _Descriptors2 = _interopRequireDefault(_Descriptors);\n\nvar _runtimeConfiguration = __webpack_require__(144);\n\nvar _MsgBusHandlers = __webpack_require__(495);\n\nvar _MsgBusHandlers2 = _interopRequireDefault(_MsgBusHandlers);\n\nvar _runtimeUtils = __webpack_require__(140);\n\nvar _GraphConnector = __webpack_require__(496);\n\nvar _GraphConnector2 = _interopRequireDefault(_GraphConnector);\n\nvar _CoreDiscovery = __webpack_require__(498);\n\nvar _CoreDiscovery2 = _interopRequireDefault(_CoreDiscovery);\n\nvar _DataObjectsStorage = __webpack_require__(499);\n\nvar _DataObjectsStorage2 = _interopRequireDefault(_DataObjectsStorage);\n\nvar _HypertyResourcesStorage = __webpack_require__(503);\n\nvar _HypertyResourcesStorage2 = _interopRequireDefault(_HypertyResourcesStorage);\n\nvar _SyncherManager = __webpack_require__(506);\n\nvar _SyncherManager2 = _interopRequireDefault(_SyncherManager);\n\nvar _SubscriptionManager = __webpack_require__(517);\n\nvar _SubscriptionManager2 = _interopRequireDefault(_SubscriptionManager);\n\nvar _RuntimeCoreCtx = __webpack_require__(519);\n\nvar _RuntimeCoreCtx2 = _interopRequireDefault(_RuntimeCoreCtx);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n// import 'babel-polyfill';\n\nvar log = logger.getLogger('RuntimeUA');\n\n//Main dependecies\n\n\n// Log System\n\n/**\n * Runtime User Agent Interface will process all the dependecies of the core runtime;\n * @author Vitor Silva [vitor-t-silva@telecom.pt]\n * @version 0.4.0\n *\n * @property {runtimeFactory} runtimeFactory - Specific implementation for all environments;\n * @property {RuntimeCatalogue} runtimeCatalogue - Catalogue of components can be installed;\n * @property {runtimeURL} runtimeURL - This identify the core runtime, should be unique;\n * @property {IdentityModule} identityModule - Identity Module;\n * @property {PEP} policyEngine - Policy Engine Module;\n * @property {Registry} registry - Registry Module;\n * @property {MessageBus} messageBus - Message Bus is used like a router to redirect the messages from one component to other(s)\n * @property {GraphConnector} graphConnector - Graph Connector handling GUID and contacts\n * @property {CoreDiscovery} coreDiscovery - Discovery for discovery hyperties/dataObjects\n */\nvar RuntimeUA = function () {\n\n /**\n * Create a new instance of Runtime User Agent\n * @param {descriptor} runtimeDescriptor - pass all the hyperty runtime descriptor\n * @param {runtimeFactory} runtimeFactory - Specific implementation for the environment where the core runtime will run;\n * @param {domain} domainURL - specify the domain base for the runtime;\n */\n function RuntimeUA(runtimeDescriptor, runtimeFactory, domain) {\n (0, _classCallCheck3.default)(this, RuntimeUA);\n\n if (!runtimeDescriptor) throw new Error('The runtime descriptor is a needed parameter');\n if (!runtimeFactory) throw new Error('The sandbox factory is a needed parameter');\n if (!domain) throw new Error('You need the domain of runtime');\n\n // Configuration object with information related with servers\n this.runtimeConfiguration = (0, _assign2.default)({ domain: domain }, _runtimeConfiguration.runtimeConfiguration);\n this.runtimeFactory = runtimeFactory;\n\n this.log = log;\n this.logLevels = _logLevels.log;\n\n if (runtimeDescriptor.p2pHandlerStub && typeof runtimeDescriptor.p2pHandlerStub === 'string' && runtimeDescriptor.p2pHandlerStub.includes('://')) {\n this.p2p = true;\n } else {\n this.p2p = false;\n }\n\n _runtimeUtils.runtimeUtils.runtimeDescriptor = runtimeDescriptor;\n this.runtimeUtils = _runtimeUtils.runtimeUtils;\n\n this.storages = {};\n\n if (typeof runtimeFactory.createRuntimeCatalogue === 'function') {\n this.runtimeCatalogue = runtimeFactory.createRuntimeCatalogue();\n } else {\n throw new Error('Check your Runtime Factory because it needs the Runtime Catalogue implementation');\n }\n\n if (typeof runtimeFactory.persistenceManager === 'function') {\n this.persistenceManager = runtimeFactory.persistenceManager();\n } else {\n throw new Error('Check your Runtime Factory because it needs the Persistence Manager implementation');\n }\n\n if (typeof runtimeFactory.storageManager === 'function') {\n\n this.storages = (0, _Storage.storage)(runtimeFactory);\n } else {\n throw new Error('Check your Runtime Factory because it needs the Storage Manager implementation');\n }\n\n if (typeof runtimeFactory.runtimeCapabilities === 'function') {\n this.runtimeCapabilities = runtimeFactory.runtimeCapabilities(this.storages.capabilities);\n } else {\n log.info('Check your RuntimeFactory because it needs the Runtime Capabilities implementation');\n }\n }\n\n /**\n * Intialize the installation of runtime\n *\n * @access public\n * @return {Promise} this is Promise and if the installation process happened without any problems returns true otherwise the error.\n *\n * @memberOf RuntimeUA\n */\n\n\n (0, _createClass3.default)(RuntimeUA, [{\n key: 'init',\n value: function init() {\n var _this2 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this2.domain = _this2.runtimeConfiguration.domain;\n\n try {\n var getCapabilities = _this2.runtimeCapabilities.getRuntimeCapabilities();\n var getRuntimeURL = _this2.storages.runtime.get('runtime:URL');\n var getStoredDataObjects = _this2.storages.syncherManager.get('syncherManager:ObjectURLs');\n var getHypertyStorageObjects = _this2.storages.hypertyResources.get();\n var getP2PHandlerURL = _this2.storages.runtime.get('p2pHandler:URL');\n\n _promise2.default.all([getRuntimeURL, getCapabilities, getStoredDataObjects, getHypertyStorageObjects, getP2PHandlerURL]).then(function (results) {\n\n _this2.runtimeURL = results[0] ? results[0].runtimeURL : results[0];\n if (!_this2.runtimeURL) {\n _this2.runtimeURL = 'runtime://' + _this2.domain + '/' + (0, _utils.generateGUID)();\n _this2.storages.runtime.set('runtime:URL', 1, { runtimeURL: _this2.runtimeURL });\n }\n\n _this2.capabilities = results[1];\n (0, _assign2.default)(_runtimeUtils.runtimeUtils.runtimeCapabilities.constraints, results[1]);\n\n _this2._dataObjectsStorage = new _DataObjectsStorage2.default(_this2.storages.syncherManager, results[2] || {});\n\n _this2._hypertyResources = results[3] || {};\n\n _this2.p2pHandlerURL = results[4] ? results[4].p2pHandlerURL : results[4];\n if (!_this2.p2pHandlerURL) {\n _this2.p2pHandlerURL = _this2.runtimeURL + '/p2phandler/' + (0, _utils.generateGUID)();\n log.info('[RuntimeUA - init] P2PHandlerURL: ', _this2.p2pHandlerURL);\n\n _this2.storages.runtime.set('p2pHandler:URL', 1, { p2pHandlerURL: _this2.p2pHandlerURL });\n }\n\n return _this2._loadComponents();\n }).then(function (status) {\n\n _this2._hypertyResourcesStorage = new _HypertyResourcesStorage2.default(_this2.runtimeURL, _this2.messageBus, _this2.storages.hypertyResources, _this2._hypertyResources);\n\n if (_this2.p2p) {\n log.info('[RuntimeUA - init] load p2pHandler: ', status);\n return _this2._loadP2PHandler();\n } else {\n log.info('[RuntimeUA - init] P2P not supported');\n return 'P2P Not Supported';\n }\n }).then(function (result) {\n log.info('[runtime ua - init] - status: ', result);\n resolve(true);\n }, function (reason) {\n log.error('ERROR: ', reason);\n resolve(true);\n });\n } catch (e) {\n reject(e);\n }\n });\n }\n }, {\n key: '_loadP2PHandler',\n value: function _loadP2PHandler() {\n var _this3 = this;\n\n return new _promise2.default(function (resolve) {\n\n var runtimeDescriptor = _runtimeUtils.runtimeUtils.runtimeDescriptor;\n var p2pStubHandler = runtimeDescriptor.p2pHandlerStub;\n\n var p2pConfig = {\n isHandlerStub: true,\n runtimeURL: _this3.runtimeURL\n };\n\n log.log('[RuntimeUA loadP2PHandler] P2PStubHandler: ', p2pStubHandler);\n\n _this3.loader.loadStub(p2pStubHandler, p2pConfig).then(function (result) {\n\n var runtimeUAURL = _this3.runtimeURL + '/ua';\n var msg = {\n type: 'subscribe',\n from: runtimeUAURL,\n to: 'domain://msg-node.' + _this3.domain + '/sm',\n body: {\n subscribe: [result.url],\n source: _this3.runtimeURL\n }\n };\n\n _this3.messageBus.addListener(runtimeUAURL, function (msg) {\n log.log('[runtime ua - listener] - receive msg: ', msg);\n });\n\n _this3.messageBus.postMessage(msg, function (reply) {\n log.log('[runtime ua - postMessage] - reply: ', reply);\n });\n\n log.info('[runtime ua - p2p installation] - success: ', result);\n resolve(true);\n }).catch(function (reason) {\n log.info('[runtime ua - p2p installation] - fail: ', reason);\n resolve(false);\n });\n });\n }\n\n /**\n *\n * @access private\n * @return {Promise} this is Promise and returns true if all components are loaded with success or an error if someone fails.\n *\n * @memberOf RuntimeUA\n */\n\n }, {\n key: '_loadComponents',\n value: function _loadComponents() {\n var _this4 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n try {\n\n // Prepare the on instance to handle with the fallbacks and runtimeCatalogue;\n _this4.descriptorInstance = new _Descriptors2.default(_this4.runtimeURL, _this4.runtimeCatalogue, _this4.runtimeConfiguration);\n\n // Prepare the loader to load the hyperties, protostubs and idpproxy;\n _this4.loader = new _Loader2.default(_this4.runtimeURL, _this4.runtimeConfiguration, _this4.descriptorInstance);\n\n // Instantiate the identity Module\n _this4.identityModule = new _IdentityModule2.default(_this4.runtimeURL, _this4.runtimeCapabilities, _this4.storages.identity, _this4._dataObjectsStorage, _CryptoManager2.default, _this4.runtimeCatalogue);\n\n // Use the sandbox factory to create an AppSandbox;\n // In the future can be decided by policyEngine if we need\n // create a AppSandbox or not;\n var appSandbox = _this4.runtimeFactory.createAppSandbox();\n\n // Instantiate the Registry Module\n _this4.registry = new _Registry2.default(_this4.runtimeURL, appSandbox, _this4.identityModule, _this4.runtimeCatalogue, _this4.runtimeCapabilities, _this4.storages.registry, _this4.p2pHandlerURL);\n\n // Set the loader to load Hyperties, Stubs and IdpProxies\n _this4.registry.loader = _this4.loader;\n\n // Instantiate the Message Bus\n _this4.messageBus = new _MessageBus2.default(_this4.registry);\n\n // Prepare the address allocation instance;\n _this4.addressAllocation = new _AddressAllocation2.default(_this4.runtimeURL, _this4.messageBus, _this4.registry);\n\n // Instantiate the Policy Engine\n _this4.policyEngine = new _PEP2.default(new _RuntimeCoreCtx2.default(_this4.runtimeURL, _this4.identityModule, _this4.registry, _this4.storages.policy, _this4.runtimeCapabilities));\n\n // Instantiate Discovery\n _this4.coreDiscovery = new _CoreDiscovery2.default(_this4.runtimeURL, _this4.messageBus, _this4.graphConnector, _this4.runtimeFactory, _this4.registry);\n\n // Instantiate the IdentityManager\n _this4.identityManager = new _IdentityManager2.default(_this4.identityModule);\n\n // initialise the CryptoManager\n _CryptoManager2.default.init(_this4.runtimeURL, _this4.runtimeCapabilities, _this4.storages.cryptoManager, _this4._dataObjectsStorage, _this4.registry, _this4.coreDiscovery, _this4.identityModule, _this4.runtimeFactory);\n\n // Instantiate the Graph Connector\n _this4.graphConnector = true ? new _GraphConnector2.default(_this4.runtimeURL, _this4.messageBus, _this4.storageManager) : null;\n\n _this4.handlers = new _MsgBusHandlers2.default(_this4.policyEngine, _this4.identityManager, _CryptoManager2.default);\n\n _this4.messageBus.pipelineOut.handlers = [_this4.handlers.idmHandler, _this4.handlers.pepOutHandler, _this4.handlers.encryptHandler];\n _this4.messageBus.pipelineIn.handlers = [_this4.handlers.decryptHandler, _this4.handlers.pepInHandler];\n\n // Add to App Sandbox the listener;\n appSandbox.addListener('*', function (msg) {\n _this4.messageBus.postMessage(msg);\n });\n\n _CryptoManager2.default.messageBus = _this4.messageBus;\n\n // Register messageBus on Registry\n _this4.registry.messageBus = _this4.messageBus;\n\n // Policy Engine\n _this4.policyEngine.messageBus = _this4.messageBus;\n\n // Register messageBus on IDM\n _this4.identityModule.messageBus = _this4.messageBus;\n\n // Register registry on IdentityModule\n _this4.identityModule.registry = _this4.registry;\n\n // Register coreDiscovery on IdentityModule\n _this4.identityModule.coreDiscovery = _this4.coreDiscovery;\n\n // Use sandbox factory to use specific methods\n // and set the message bus to the factory\n _this4.runtimeFactory.messageBus = _this4.messageBus;\n\n // Instanciate the SyncherManager;\n _this4.syncherManager = new _SyncherManager2.default(_this4.runtimeURL, _this4.messageBus, _this4.registry, _this4.runtimeCatalogue, _this4.storages.syncherManager, null, _this4._dataObjectsStorage, _this4.identityModule);\n\n // Set into loader the needed components;\n _this4.loader.runtimeURL = _this4.runtimeURL;\n _this4.loader.messageBus = _this4.messageBus;\n _this4.loader.registry = _this4.registry;\n _this4.loader.runtimeCatalogue = _this4.runtimeCatalogue;\n _this4.loader.runtimeFactory = _this4.runtimeFactory;\n\n //Instantiate Discovery Lib for notification testing\n // this.discovery = new Discovery(\"hyperty://localhost/test\", this.runtimeURL, this.messageBus);\n // this.loadStub(\"localhost\");\n // setTimeout(() => {\n // this.discovery.discoverHypertiesDO(\"user://google.com/openidtest20@gmail.com\")\n // .then(hyperties => {\n // hyperties.forEach(hyperty =>{\n // hyperty.onLive(() => log.log(`Notification from ${hyperty.data.hypertyID} changed to live`));\n // hyperty.onDisconnected(() => log.log(`Notification from ${hyperty.data.hypertyID} changed to disconnected`));\n // });\n // });\n // }, 2000);\n\n // Instanciate the SubscriptionManager;\n _this4.subscriptionManager = new _SubscriptionManager2.default(_this4.runtimeURL, _this4.messageBus, _this4.storages.subscriptions);\n\n // this.subscriptionManager.init().then(()=>{\n // resolve(true);\n // });\n\n var prepareComponents = [];\n prepareComponents.push(_this4.subscriptionManager.init());\n prepareComponents.push(_this4.identityModule.init());\n prepareComponents.push(_CryptoManager2.default.loadSessionKeys());\n\n _promise2.default.all(prepareComponents).then(function (result) {\n if (result.length === 3) {\n resolve(true);\n } else {\n reject('[RuntimeUA._loadComponents] Error ] ', result);\n }\n }).catch(function (reason) {\n throw Error(reason);\n });\n } catch (e) {\n reject(e);\n }\n });\n }\n\n /**\n * Deploy Hyperty from Catalogue URL\n *\n * @see https://github.com/reTHINK-project/specs/tree/master/datamodel/core/address\n *\n * @param {URL.HypertyCatalogueURL} hypertyCatalogueURL - The Catalogue URL used to identify descriptors in the Catalogue.\n * @param {boolean|URL.HypertyURL} [reuseURL=false] reuseURL - reuseURL is used to reuse the hypertyURL previously registred, by default the reuse is disabled;\n * @param {URL} appURL - the app url address; // TODO: improve this description;\n * @returns {Promise} this is Promise and returns true if all components are loaded with success or an error if someone fails.\n *\n * @memberOf RuntimeUA\n */\n\n }, {\n key: 'loadHyperty',\n value: function loadHyperty(hypertyCatalogueURL) {\n var reuseURL = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var appURL = arguments[2];\n\n\n if (!hypertyCatalogueURL) throw new Error('Hyperty descriptor url parameter is needed');\n return this.loader.loadHyperty(hypertyCatalogueURL, reuseURL, appURL);\n }\n\n /**\n * Deploy Stub from Catalogue URL or domain url\n * @param {URL.URL} domain domain\n */\n\n }, {\n key: 'loadStub',\n value: function loadStub(protocolstubCatalogueURL) {\n\n if (!protocolstubCatalogueURL) throw new Error('ProtoStub descriptor url parameter is needed');\n return this.loader.loadStub(protocolstubCatalogueURL);\n }\n\n /**\n * Deploy idpProxy from Catalogue URL or domain url\n * @param {URL.URL} domain domain\n */\n\n }, {\n key: 'loadIdpProxy',\n value: function loadIdpProxy(ipdProxyCatalogueURL) {\n log.log('ipdProxyCatalogueURL', ipdProxyCatalogueURL);\n\n if (!ipdProxyCatalogueURL) throw new Error('The IDP Proxy URL is a needed parameter, could be a DOMAIN or a URL');\n return this.loader.loadIdpProxy(ipdProxyCatalogueURL);\n }\n\n /**\n * Used to close all the runtime; Unregister all hyperties;\n * @return {Promise} result of the close method, with true or false to the operation success;\n */\n\n }, {\n key: 'close',\n value: function close() {\n var _this = this;\n\n log.info('Unregister all hyperties');\n return new _promise2.default(function (resolve, reject) {\n\n _this.registry.unregisterAllHyperties().then(function (result) {\n log.info('All the hyperties are unregisted with Success:', result);\n resolve(true);\n }).catch(function (reason) {\n log.error('Failed to unregister the hyperties', reason);\n reject(false);\n });\n });\n }\n }]);\n return RuntimeUA;\n}();\n\nexports.default = RuntimeUA;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL1J1bnRpbWVVQS5qcz9iZmFlIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VT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ICAgICAgICBsb2cuZXJyb3IoJ0VSUk9SOiAnLCByZWFzb24pO1xuICAgICAgICAgIHJlc29sdmUodHJ1ZSk7XG4gICAgICAgIH0pO1xuXG4gICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIHJlamVjdChlKTtcbiAgICAgIH1cblxuICAgIH0pO1xuXG4gIH1cblxuICBfbG9hZFAyUEhhbmRsZXIoKSB7XG5cbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcblxuICAgICAgbGV0IHJ1bnRpbWVEZXNjcmlwdG9yID0gcnVudGltZVV0aWxzLnJ1bnRpbWVEZXNjcmlwdG9yO1xuICAgICAgbGV0IHAycFN0dWJIYW5kbGVyID0gcnVudGltZURlc2NyaXB0b3IucDJwSGFuZGxlclN0dWI7XG5cbiAgICAgIGxldCBwMnBDb25maWcgPSB7XG4gICAgICAgIGlzSGFuZGxlclN0dWI6IHRydWUsXG4gICAgICAgIHJ1bnRpbWVVUkw6IHRoaXMucnVudGltZVVSTFxuICAgICAgfTtcblxuICAgICAgbG9nLmxvZygnW1J1bnRpbWVVQSBsb2FkUDJQSGFuZGxlcl0gUDJQU3R1YkhhbmRsZXI6ICcsIHAycFN0dWJIYW5kbGVyKTtcblxuICAgICAgdGhpcy5sb2FkZXIubG9hZFN0dWIocDJwU3R1YkhhbmRsZXIsIHAycENvbmZpZykudGhlbigocmVzdWx0KSA9PiB7XG5cbiAgICAgICAgbGV0IHJ1bnRpbWVVQVVSTCA9IHRoaXMucnVudGltZVVSTCArICcvdWEnO1xuICAgICAgICBsZXQgbXNnID0ge1xuICAgICAgICAgIHR5cGU6ICdzdWJzY3JpYmUnLFxuICAgICAgICAgIGZyb206IHJ1bnRpbWVVQVVSTCxcbiAgICAgICAgICB0bzogJ2RvbWFpbjovL21zZy1ub2RlLicgKyB0aGlzLmRvbWFpbiArICcvc20nLFxuICAgICAgICAgIGJvZHk6IHtcbiAgICAgICAgICAgIHN1YnNjcmliZTogW3Jlc3V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s7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUVBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///415\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(182);\n__webpack_require__(128);\n__webpack_require__(190);\n__webpack_require__(425);\n__webpack_require__(432);\n__webpack_require__(433);\nmodule.exports = __webpack_require__(13).Promise;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9wcm9taXNlLmpzPzUzOTgiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vbW9kdWxlcy9lczYub2JqZWN0LnRvLXN0cmluZycpO1xucmVxdWlyZSgnLi4vbW9kdWxlcy9lczYuc3RyaW5nLml0ZXJhdG9yJyk7XG5yZXF1aXJlKCcuLi9tb2R1bGVzL3dlYi5kb20uaXRlcmFibGUnKTtcbnJlcXVpcmUoJy4uL21vZHVsZXMvZXM2LnByb21pc2UnKTtcbnJlcXVpcmUoJy4uL21vZHVsZXMvZXM3LnByb21pc2UuZmluYWxseScpO1xucmVxdWlyZSgnLi4vbW9kdWxlcy9lczcucHJvbWlzZS50cnknKTtcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi4vbW9kdWxlcy9fY29yZScpLlByb21pc2U7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvZm4vcHJvbWlzZS5qc1xuLy8gbW9kdWxlIGlkID0gNDE2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///416\n")},function(module,exports,__webpack_require__){eval("var toInteger = __webpack_require__(129);\nvar defined = __webpack_require__(130);\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zdHJpbmctYXQuanM/ODdhZSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgdG9JbnRlZ2VyID0gcmVxdWlyZSgnLi9fdG8taW50ZWdlcicpO1xudmFyIGRlZmluZWQgPSByZXF1aXJlKCcuL19kZWZpbmVkJyk7XG4vLyB0cnVlICAtPiBTdHJpbmcjYXRcbi8vIGZhbHNlIC0+IFN0cmluZyNjb2RlUG9pbnRBdFxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoVE9fU1RSSU5HKSB7XG4gIHJldHVybiBmdW5jdGlvbiAodGhhdCwgcG9zKSB7XG4gICAgdmFyIHMgPSBTdHJpbmcoZGVmaW5lZCh0aGF0KSk7XG4gICAgdmFyIGkgPSB0b0ludGVnZXIocG9zKTtcbiAgICB2YXIgbCA9IHMubGVuZ3RoO1xuICAgIHZhciBhLCBiO1xuICAgIGlmIChpIDwgMCB8fCBpID49IGwpIHJldHVybiBUT19TVFJJTkcgPyAnJyA6IHVuZGVmaW5lZDtcbiAgICBhID0gcy5jaGFyQ29kZUF0KGkpO1xuICAgIHJldHVybiBhIDwgMHhkODAwIHx8IGEgPiAweGRiZmYgfHwgaSArIDEgPT09IGwgfHwgKGIgPSBzLmNoYXJDb2RlQXQoaSArIDEpKSA8IDB4ZGMwMCB8fCBiID4gMHhkZmZmXG4gICAgICA/IFRPX1NUUklORyA/IHMuY2hhckF0KGkpIDogYVxuICAgICAgOiBUT19TVFJJTkcgPyBzLnNsaWNlKGksIGkgKyAyKSA6IChhIC0gMHhkODAwIDw8IDEwKSArIChiIC0gMHhkYzAwKSArIDB4MTAwMDA7XG4gIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3N0cmluZy1hdC5qc1xuLy8gbW9kdWxlIGlkID0gNDE3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///417\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar create = __webpack_require__(133);\nvar descriptor = __webpack_require__(73);\nvar setToStringTag = __webpack_require__(95);\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(58)(IteratorPrototype, __webpack_require__(23)('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLWNyZWF0ZS5qcz9mNzg1Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBjcmVhdGUgPSByZXF1aXJlKCcuL19vYmplY3QtY3JlYXRlJyk7XG52YXIgZGVzY3JpcHRvciA9IHJlcXVpcmUoJy4vX3Byb3BlcnR5LWRlc2MnKTtcbnZhciBzZXRUb1N0cmluZ1RhZyA9IHJlcXVpcmUoJy4vX3NldC10by1zdHJpbmctdGFnJyk7XG52YXIgSXRlcmF0b3JQcm90b3R5cGUgPSB7fTtcblxuLy8gMjUuMS4yLjEuMSAlSXRlcmF0b3JQcm90b3R5cGUlW0BAaXRlcmF0b3JdKClcbnJlcXVpcmUoJy4vX2hpZGUnKShJdGVyYXRvclByb3RvdHlwZSwgcmVxdWlyZSgnLi9fd2tzJykoJ2l0ZXJhdG9yJyksIGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRoaXM7IH0pO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChDb25zdHJ1Y3RvciwgTkFNRSwgbmV4dCkge1xuICBDb25zdHJ1Y3Rvci5wcm90b3R5cGUgPSBjcmVhdGUoSXRlcmF0b3JQcm90b3R5cGUsIHsgbmV4dDogZGVzY3JpcHRvcigxLCBuZXh0KSB9KTtcbiAgc2V0VG9TdHJpbmdUYWcoQ29uc3RydWN0b3IsIE5BTUUgKyAnIEl0ZXJhdG9yJyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXItY3JlYXRlLmpzXG4vLyBtb2R1bGUgaWQgPSA0MThcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///418\n")},function(module,exports,__webpack_require__){eval("var dP = __webpack_require__(40);\nvar anObject = __webpack_require__(41);\nvar getKeys = __webpack_require__(67);\n\nmodule.exports = __webpack_require__(44) ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZHBzLmpzP2FhMmEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGRQID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBnZXRLZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpID8gT2JqZWN0LmRlZmluZVByb3BlcnRpZXMgOiBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0aWVzKE8sIFByb3BlcnRpZXMpIHtcbiAgYW5PYmplY3QoTyk7XG4gIHZhciBrZXlzID0gZ2V0S2V5cyhQcm9wZXJ0aWVzKTtcbiAgdmFyIGxlbmd0aCA9IGtleXMubGVuZ3RoO1xuICB2YXIgaSA9IDA7XG4gIHZhciBQO1xuICB3aGlsZSAobGVuZ3RoID4gaSkgZFAuZihPLCBQID0ga2V5c1tpKytdLCBQcm9wZXJ0aWVzW1BdKTtcbiAgcmV0dXJuIE87XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1kcHMuanNcbi8vIG1vZHVsZSBpZCA9IDQxOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///419\n")},function(module,exports,__webpack_require__){eval("// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(45);\nvar toLength = __webpack_require__(134);\nvar toAbsoluteIndex = __webpack_require__(421);\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data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tc2VsZi1jb21wYXJlXG4gICAgICBpZiAodmFsdWUgIT0gdmFsdWUpIHJldHVybiB0cnVlO1xuICAgIC8vIEFycmF5I2luZGV4T2YgaWdub3JlcyBob2xlcywgQXJyYXkjaW5jbHVkZXMgLSBub3RcbiAgICB9IGVsc2UgZm9yICg7bGVuZ3RoID4gaW5kZXg7IGluZGV4KyspIGlmIChJU19JTkNMVURFUyB8fCBpbmRleCBpbiBPKSB7XG4gICAgICBpZiAoT1tpbmRleF0gPT09IGVsKSByZXR1cm4gSVNfSU5DTFVERVMgfHwgaW5kZXggfHwgMDtcbiAgICB9IHJldHVybiAhSVNfSU5DTFVERVMgJiYgLTE7XG4gIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FycmF5LWluY2x1ZGVzLmpzXG4vLyBtb2R1bGUgaWQgPSA0MjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///420\n")},function(module,exports,__webpack_require__){eval("var toInteger = __webpack_require__(129);\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDIxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1hYnNvbHV0ZS1pbmRleC5qcz83ZTQwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgbWF4ID0gTWF0aC5tYXg7XG52YXIgbWluID0gTWF0aC5taW47XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpbmRleCwgbGVuZ3RoKSB7XG4gIGluZGV4ID0gdG9JbnRlZ2VyKGluZGV4KTtcbiAgcmV0dXJuIGluZGV4IDwgMCA/IG1heChpbmRleCArIGxlbmd0aCwgMCkgOiBtaW4oaW5kZXgsIGxlbmd0aCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWFic29sdXRlLWluZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSA0MjFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///421\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar addToUnscopables = __webpack_require__(423);\nvar step = __webpack_require__(424);\nvar Iterators = __webpack_require__(74);\nvar toIObject = __webpack_require__(45);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(183)(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDIyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5hcnJheS5pdGVyYXRvci5qcz9jNDY5Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBhZGRUb1Vuc2NvcGFibGVzID0gcmVxdWlyZSgnLi9fYWRkLXRvLXVuc2NvcGFibGVzJyk7XG52YXIgc3RlcCA9IHJlcXVpcmUoJy4vX2l0ZXItc3RlcCcpO1xudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4vX2l0ZXJhdG9ycycpO1xudmFyIHRvSU9iamVjdCA9IHJlcXVpcmUoJy4vX3RvLWlvYmplY3QnKTtcblxuLy8gMjIuMS4zLjQgQXJyYXkucHJvdG90eXBlLmVudHJpZXMoKVxuLy8gMjIuMS4zLjEzIEFycmF5LnByb3RvdHlwZS5rZXlzKClcbi8vIDIyLjEuMy4yOSBBcnJheS5wcm90b3R5cGUudmFsdWVzKClcbi8vIDIyLjEuMy4zMCBBcnJheS5wcm90b3R5cGVbQEBpdGVyYXRvcl0oKVxubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL19pdGVyLWRlZmluZScpKEFycmF5LCAnQXJyYXknLCBmdW5jdGlvbiAoaXRlcmF0ZWQsIGtpbmQpIHtcbiAgdGhpcy5fdCA9IHRvSU9iamVjdChpdGVyYXRlZCk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lIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///422\n")},function(module,exports){eval("module.exports = function () { /* empty */ };\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDIzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hZGQtdG8tdW5zY29wYWJsZXMuanM/ZTI2NyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uICgpIHsgLyogZW1wdHkgKi8gfTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hZGQtdG8tdW5zY29wYWJsZXMuanNcbi8vIG1vZHVsZSBpZCA9IDQyM1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///423\n")},function(module,exports){eval("module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDI0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLXN0ZXAuanM/MTA2NiJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChkb25lLCB2YWx1ZSkge1xuICByZXR1cm4geyB2YWx1ZTogdmFsdWUsIGRvbmU6ICEhZG9uZSB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLXN0ZXAuanNcbi8vIG1vZHVsZSBpZCA9IDQyNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///424\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar LIBRARY = __webpack_require__(92);\nvar global = __webpack_require__(22);\nvar ctx = __webpack_require__(65);\nvar classof = __webpack_require__(191);\nvar $export = __webpack_require__(21);\nvar isObject = __webpack_require__(36);\nvar aFunction = __webpack_require__(93);\nvar anInstance = __webpack_require__(426);\nvar forOf = __webpack_require__(427);\nvar speciesConstructor = __webpack_require__(195);\nvar task = __webpack_require__(196).set;\nvar microtask = __webpack_require__(429)();\nvar newPromiseCapabilityModule = __webpack_require__(138);\nvar perform = __webpack_require__(197);\nvar promiseResolve = __webpack_require__(198);\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value);\n if (domain) domain.exit();\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = __webpack_require__(430)($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\n__webpack_require__(95)($Promise, PROMISE);\n__webpack_require__(431)(PROMISE);\nWrapper = __webpack_require__(13)[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(199)(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDI1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5wcm9taXNlLmpzPzA5N2MiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIExJQlJBUlkgPSByZXF1aXJlKCcuL19saWJyYXJ5Jyk7XG52YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgY3R4ID0gcmVxdWlyZSgnLi9fY3R4Jyk7XG52YXIgY2xhc3NvZiA9IHJlcXVpcmUoJy4vX2NsYXNzb2YnKTtcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuL19hLWZ1bmN0aW9uJyk7XG52YXIgYW5JbnN0YW5jZSA9IHJlcXVpcmUoJy4vX2FuLWluc3RhbmNlJyk7XG52YXIgZm9yT2YgPSByZXF1aXJlKCcuL19mb3Itb2YnKTtcbnZhciBzcGVjaWVzQ29uc3RydWN0b3IgPSByZXF1aXJlKCcuL19zcGVjaWVzLWNvbnN0cnVjdG9yJyk7XG52YXIgdGFzayA9IHJlcXVpcmUoJy4vX3Rhc2snKS5zZXQ7XG52YXIgbW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gICAgICB2YXIgZG9tYWluID0gcmVhY3Rpb24uZG9tYWluO1xuICAgICAgdmFyIHJlc3VsdCwgdGhlbjtcbiAgICAgIHRyeSB7XG4gICAgICAgIGlmIChoYW5kbGVyKSB7XG4gICAgICAgICAgaWYgKCFvaykge1xuICAgICAgICAgICAgaWYgKHByb21pc2UuX2ggPT0gMikgb25IYW5kbGVVbmhhbmRsZWQocHJvbWlzZSk7XG4gICAgICAgICAgICBwcm9taXNlLl9oID0gMTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGhhbmRsZXIgPT09IHRydWUpIHJlc3VsdCA9IHZhbHVlO1xuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaWYgKGRvbWFpbikgZG9tYWluLmVudGVyKCk7XG4gICAgICAgICAgICByZXN1bHQgPSBoYW5kbGVyKHZhbHVlKTtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5leGl0KCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyZXN1bHQgPT09IHJlYWN0aW9uLnByb21pc2UpIHtcbiAgICAgICAgICAgIHJlamVjdChUeXBlRXJyb3IoJ1Byb21pc2UtY2hhaW4gY3ljbGUnKSk7XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGVuID0gaXNUaGVuYWJsZShyZXN1bHQpKSB7XG4gICAgICAgICAgICB0aGVuLmNhbGwocmVzdWx0LCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH0gZWxzZSByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH0gZWxzZSByZWplY3QodmFsdWUpO1xuICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICByZWplY3QoZSk7XG4gICAgICB9XG4gICAgfTtcbiAgICB3aGlsZSAoY2hhaW4ubGVuZ3RoID4gaSkgcnVuKGNoYWluW2krK10pOyAvLyB2YXJpYWJsZSBsZW5ndGggLSBjYW4ndCB1c2UgZm9yRWFjaFxuICAgIHByb21pc2UuX2MgPSBbXTtcb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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///425\n")},function(module,exports){eval("module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDI2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hbi1pbnN0YW5jZS5qcz9kOGFjIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCBDb25zdHJ1Y3RvciwgbmFtZSwgZm9yYmlkZGVuRmllbGQpIHtcbiAgaWYgKCEoaXQgaW5zdGFuY2VvZiBDb25zdHJ1Y3RvcikgfHwgKGZvcmJpZGRlbkZpZWxkICE9PSB1bmRlZmluZWQgJiYgZm9yYmlkZGVuRmllbGQgaW4gaXQpKSB7XG4gICAgdGhyb3cgVHlwZUVycm9yKG5hbWUgKyAnOiBpbmNvcnJlY3QgaW52b2NhdGlvbiEnKTtcbiAgfSByZXR1cm4gaXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FuLWluc3RhbmNlLmpzXG4vLyBtb2R1bGUgaWQgPSA0MjZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///426\n")},function(module,exports,__webpack_require__){eval("var ctx = __webpack_require__(65);\nvar call = __webpack_require__(192);\nvar isArrayIter = __webpack_require__(193);\nvar anObject = __webpack_require__(41);\nvar toLength = __webpack_require__(134);\nvar getIterFn = __webpack_require__(194);\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDI3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19mb3Itb2YuanM/MzU2YiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY3R4ID0gcmVxdWlyZSgnLi9fY3R4Jyk7XG52YXIgY2FsbCA9IHJlcXVpcmUoJy4vX2l0ZXItY2FsbCcpO1xudmFyIGlzQXJyYXlJdGVyID0gcmVxdWlyZSgnLi9faXMtYXJyYXktaXRlcicpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgdG9MZW5ndGggPSByZXF1aXJlKCcuL190by1sZW5ndGgnKT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A9IGl0ZXJhdG9yLm5leHQoKSkuZG9uZTspIHtcbiAgICByZXN1bHQgPSBjYWxsKGl0ZXJhdG9yLCBmLCBzdGVwLnZhbHVlLCBlbnRyaWVzKTtcbiAgICBpZiAocmVzdWx0ID09PSBCUkVBSyB8fCByZXN1bHQgPT09IFJFVFVSTikgcmV0dXJuIHJlc3VsdDtcbiAgfVxufTtcbmV4cG9ydHMuQlJFQUsgPSBCUkVBSztcbmV4cG9ydHMuUkVUVVJOID0gUkVUVVJOO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2Zvci1vZi5qc1xuLy8gbW9kdWxlIGlkID0gNDI3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///427\n")},function(module,exports){eval("// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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HBseSh0aGF0LCBhcmdzKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faW52b2tlLmpzXG4vLyBtb2R1bGUgaWQgPSA0Mjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///428\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(22);\nvar macrotask = __webpack_require__(196).set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = __webpack_require__(75)(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n var promise = Promise.resolve();\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDI5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19taWNyb3Rhc2suanM/ZjM2MyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgbWFjcm90YXNrID0gcmVxdWlyZSgnLi9fdGFzaycpLnNldDtcbnZhciBPYnNlcnZlciA9IGdsb2JhbC5NdXRhdGlvbk9ic2VydmVyIHx8IGdsb2JhbC5XZWJLaXRNdXRhdGlvbk9ic2VydmVyO1xudmFyIHByb2Nlc3MgPSBnbG9iYWwucHJvY2VzcztcbnZhciBQcm9taXNlID0gZ2xvYmFsLlByb21pc2U7XG52YXIgaXNOb2RlID0gcmVxdWlyZSgnLi9fY29mJykocHJvY2VzcykgPT0gJ3Byb2Nlc3MnO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uICgpIHtcbiAgdmFyIGhlYWQsIGxhc3QsIG5vdGlmeTtcblxuICB2YXIgZmx1c2ggPSBmdW5jdGlvbiAoKSB7XG4gICAgdmFyIHBhcmVudCwgZm47XG4gICAgaWYgKGlzTm9kZSAmJiAocGFyZW50ID0gcHJvY2Vzcy5kb21haW4pKSBwYXJlbnQuZXhpdCgpO1xuICAgIHdoaWxlIChoZWFkKSB7XG4gICAgICBmbiA9IGhlYWQuZm47XG4gICAgICBoZWFkID0gaGVhZC5uZXh0O1xuICAgICAgdHJ5IHtcbiAgICAgICAgZm4oKTtcbiAgICAgIH0gY2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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///429\n")},function(module,exports,__webpack_require__){eval("var hide = __webpack_require__(58);\nmodule.exports = function (target, src, safe) {\n for (var key in src) {\n if (safe && target[key]) target[key] = src[key];\n else hide(target, key, src[key]);\n } return target;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19yZWRlZmluZS1hbGwuanM/YzQ3ZiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgaGlkZSA9IHJlcXVpcmUoJy4vX2hpZGUnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKHRhcmdldCwgc3JjLCBzYWZlKSB7XG4gIGZvciAodmFyIGtleSBpbiBzcmMpIHtcbiAgICBpZiAoc2FmZSAmJiB0YXJnZXRba2V5XSkgdGFyZ2V0W2tleV0gPSBzcmNba2V5XTtcbiAgICBlbHNlIGhpZGUodGFyZ2V0LCBrZXksIHNyY1trZXldKTtcbiAgfSByZXR1cm4gdGFyZ2V0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19yZWRlZmluZS1hbGwuanNcbi8vIG1vZHVsZSBpZCA9IDQzMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///430\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar global = __webpack_require__(22);\nvar core = __webpack_require__(13);\nvar dP = __webpack_require__(40);\nvar DESCRIPTORS = __webpack_require__(44);\nvar SPECIES = __webpack_require__(23)('species');\n\nmodule.exports = function (KEY) {\n var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zZXQtc3BlY2llcy5qcz82ZDFhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBjb3JlID0gcmVxdWlyZSgnLi9fY29yZScpO1xudmFyIGRQID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJyk7XG52YXIgREVTQ1JJUFRPUlMgPSByZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpO1xudmFyIFNQRUNJRVMgPSByZXF1aXJlKCcuL193a3MnKSgnc3BlY2llcycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChLRVkpIHtcbiAgdmFyIEMgPSB0eXBlb2YgY29yZVtLRVldID09ICdmdW5jdGlvbicgPyBjb3JlW0tFWV0gOiBnbG9iYWxbS0VZXTtcbiAgaWYgKERFU0NSSVBUT1JTICYmIEMgJiYgIUNbU1BFQ0lFU10pIGRQLmYoQywgU1BFQ0lFUywge1xuICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRoaXM7IH1cbiAgfSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NldC1zcGVjaWVzLmpzXG4vLyBtb2R1bGUgaWQgPSA0MzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///431\n")},function(module,exports,__webpack_require__){"use strict";eval("// https://github.com/tc39/proposal-promise-finally\n\nvar $export = __webpack_require__(21);\nvar core = __webpack_require__(13);\nvar global = __webpack_require__(22);\nvar speciesConstructor = __webpack_require__(195);\nvar promiseResolve = __webpack_require__(198);\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5wcm9taXNlLmZpbmFsbHkuanM/MTJhMCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9wcm9wb3NhbC1wcm9taXNlLWZpbmFsbHlcbid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgY29yZSA9IHJlcXVpcmUoJy4vX2NvcmUnKTtcbnZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBzcGVjaWVzQ29uc3RydWN0b3IgPSByZXF1aXJlKCcuL19zcGVjaWVzLWNvbnN0cnVjdG9yJyk7XG52YXIgcHJvbWlzZVJlc29sdmUgPSByZXF1aXJlKCcuL19wcm9taXNlLXJlc29sdmUnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LlIsICdQcm9taXNlJywgeyAnZmluYWxseSc6IGZ1bmN0aW9uIChvbkZpbmFsbHkpIHtcbiAgdmFyIEMgPSBzcGVjaWVzQ29uc3RydWN0b3IodGhpcywgY29yZS5Qcm9taXNlIHx8IGdsb2JhbC5Qcm9taXNlKTtcbiAgdmFyIGlzRnVuY3Rpb24gPSB0eXBlb2Ygb25GaW5hbGx5ID09ICdmdW5jdGlvbic7XG4gIHJldHVybiB0aGlzLnRoZW4oXG4gICAgaXNGdW5jdGlvbiA/IGZ1bmN0aW9uICh4KSB7XG4gICAgICByZXR1cm4gcHJvbWlzZVJlc29sdmUoQywgb25GaW5hbGx5KCkpLnRoZW4oZnVuY3Rpb24gKCkgeyByZXR1cm4geDsgfSk7XG4gICAgfSA6IG9uRmluYWxseSxcbiAgICBpc0Z1bmN0aW9uID8gZnVuY3Rpb24gKGUpIHtcbiAgICAgIHJldHVybiBwcm9taXNlUmVzb2x2ZShDLCBvbkZpbmFsbHkoKSkudGhlbihmdW5jdGlvbiAoKSB7IHRocm93IGU7IH0pO1xuICAgIH0gOiBvbkZpbmFsbHlcbiAgKTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczcucHJvbWlzZS5maW5hbGx5LmpzXG4vLyBtb2R1bGUgaWQgPSA0MzJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///432\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/tc39/proposal-promise-try\nvar $export = __webpack_require__(21);\nvar newPromiseCapability = __webpack_require__(138);\nvar perform = __webpack_require__(197);\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapability.f(this);\n var result = perform(callbackfn);\n (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n return promiseCapability.promise;\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5wcm9taXNlLnRyeS5qcz84Y2E1Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS90YzM5L3Byb3Bvc2FsLXByb21pc2UtdHJ5XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIG5ld1Byb21pc2VDYXBhYmlsaXR5ID0gcmVxdWlyZSgnLi9fbmV3LXByb21pc2UtY2FwYWJpbGl0eScpO1xudmFyIHBlcmZvcm0gPSByZXF1aXJlKCcuL19wZXJmb3JtJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnUHJvbWlzZScsIHsgJ3RyeSc6IGZ1bmN0aW9uIChjYWxsYmFja2ZuKSB7XG4gIHZhciBwcm9taXNlQ2FwYWJpbGl0eSA9IG5ld1Byb21pc2VDYXBhYmlsaXR5LmYodGhpcyk7XG4gIHZhciByZXN1bHQgPSBwZXJmb3JtKGNhbGxiYWNrZm4pO1xuICAocmVzdWx0LmUgPyBwcm9taXNlQ2FwYWJpbGl0eS5yZWplY3QgOiBwcm9taXNlQ2FwYWJpbGl0eS5yZXNvbHZlKShyZXN1bHQudik7XG4gIHJldHVybiBwcm9taXNlQ2FwYWJpbGl0eS5wcm9taXNlO1xufSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5wcm9taXNlLnRyeS5qc1xuLy8gbW9kdWxlIGlkID0gNDMzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///433\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(435);\nmodule.exports = __webpack_require__(13).Object.assign;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDM0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvYXNzaWduLmpzPzU3N2IiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmFzc2lnbicpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0LmFzc2lnbjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvYXNzaWduLmpzXG4vLyBtb2R1bGUgaWQgPSA0MzRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///434\n")},function(module,exports,__webpack_require__){eval("// 19.1.3.1 Object.assign(target, source)\nvar $export = __webpack_require__(21);\n\n$export($export.S + $export.F, 'Object', { assign: __webpack_require__(436) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDM1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuYXNzaWduLmpzPzQ3OGMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4zLjEgT2JqZWN0LmFzc2lnbih0YXJnZXQsIHNvdXJjZSlcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GLCAnT2JqZWN0JywgeyBhc3NpZ246IHJlcXVpcmUoJy4vX29iamVjdC1hc3NpZ24nKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuYXNzaWduLmpzXG4vLyBtb2R1bGUgaWQgPSA0MzVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///435\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = __webpack_require__(67);\nvar gOPS = __webpack_require__(139);\nvar pIE = __webpack_require__(77);\nvar toObject = __webpack_require__(76);\nvar IObject = __webpack_require__(187);\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || __webpack_require__(66)(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n//# sourceURL=[module]\n//# sourceMappingURL=data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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///436\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(438);\nvar $Object = __webpack_require__(13).Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDM3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvZGVmaW5lLXByb3BlcnR5LmpzP2Y1YjAiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmRlZmluZS1wcm9wZXJ0eScpO1xudmFyICRPYmplY3QgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0O1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0eShpdCwga2V5LCBkZXNjKSB7XG4gIHJldHVybiAkT2JqZWN0LmRlZmluZVByb3BlcnR5KGl0LCBrZXksIGRlc2MpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvZGVmaW5lLXByb3BlcnR5LmpzXG4vLyBtb2R1bGUgaWQgPSA0Mzdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///437\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(21);\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !__webpack_require__(44), 'Object', { defineProperty: __webpack_require__(40).f });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDM4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuZGVmaW5lLXByb3BlcnR5LmpzPzk4MjkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbi8vIDE5LjEuMi40IC8gMTUuMi4zLjYgT2JqZWN0LmRlZmluZVByb3BlcnR5KE8sIFAsIEF0dHJpYnV0ZXMpXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqICFyZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpLCAnT2JqZWN0JywgeyBkZWZpbmVQcm9wZXJ0eTogcmVxdWlyZSgnLi9fb2JqZWN0LWRwJykuZiB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuZGVmaW5lLXByb3BlcnR5LmpzXG4vLyBtb2R1bGUgaWQgPSA0Mzhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///438\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _runtimeUtils = __webpack_require__(140);\n\nvar _Sandbox = __webpack_require__(442);\n\nvar _AddressAllocation = __webpack_require__(99);\n\nvar _AddressAllocation2 = _interopRequireDefault(_AddressAllocation);\n\nvar _HypertyInstance = __webpack_require__(465);\n\nvar _HypertyInstance2 = _interopRequireDefault(_HypertyInstance);\n\nvar _P2PConnectionResolve = __webpack_require__(467);\n\nvar _P2PConnectionResolve2 = _interopRequireDefault(_P2PConnectionResolve);\n\nvar _utils = __webpack_require__(14);\n\n__webpack_require__(468);\n\nvar _Utils = __webpack_require__(205);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('Registry'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log System\n\n\n// import DiscoveryServiceFramework from './DiscoveryServiceFramework';\n\nvar STATUS = { CREATED: 'created', LIVE: 'live', DEPLOYING: 'deploying', DEPLOYED: 'deployed', PROGRESS: 'in-progress', DISCONNECTED: 'disconnected', FAILED: 'deployment-failed', DEAD: 'dead' };\n\n/*import IdentityManager from './IdentityManager';\nimport Discovery from './Discovery';*/\n\n/**\n* Runtime Registry Interface\n*/\n\nvar Registry = function () {\n\n /**\n * To initialise the Runtime Registry with the RuntimeURL that will be the basis to derive the internal runtime addresses when allocating addresses to internal runtime component. In addition, the Registry domain back-end to be used to remotely register Runtime components, is also passed as input parameter.\n * @param {MessageBus} msgbus msgbus\n * @param {HypertyRuntimeURL} runtimeURL runtimeURL\n * @param {AppSandbox} appSandbox appSandbox\n * @param {runtimeCatalogue} runtimeCatalogue runtimeCatalogue\n * @param {DomainURL} remoteRegistry remoteRegistry\n * @param {storageManager} storageManager\n */\n function Registry(runtimeURL, appSandbox, identityModule, runtimeCatalogue, runtimeCapabilities, storageManager, p2pHandlerURL, remoteRegistry) {\n (0, _classCallCheck3.default)(this, Registry);\n\n\n // how some functions receive the parameters for example:\n // new Registry('hyperty-runtime://sp1/123', appSandbox, idModule, remoteRegistry);\n // registry.registerStub(sandbox, 'sp1');\n // registry.registerHyperty(sandBox, 'hyperty-runtime://sp1/123');\n // registry.resolve('hyperty-runtime://sp1/123');\n\n if (!runtimeURL) throw new Error('runtimeURL is missing.');\n if (!storageManager) throw new Error('storageManager is missing.');\n\n /*if (!remoteRegistry) throw new Error('remoteRegistry is missing');*/\n\n var _this = this;\n\n _this.registryURL = runtimeURL + '/registry/';\n _this.appSandbox = appSandbox;\n _this.runtimeURL = runtimeURL;\n _this.p2pHandlerURL = p2pHandlerURL;\n _this.runtimeCatalogue = runtimeCatalogue;\n _this.remoteRegistry = remoteRegistry;\n _this.idModule = identityModule;\n _this.storageManager = storageManager;\n _this.runtimeCapabilities = runtimeCapabilities;\n _this.identifier = (0, _utils.generateGUID)();\n _this.registrationRetries = 5; // number of attempts to register Hyperties and DataObjects when errors occurs\n\n // the expires in 3600, represents 1 hour\n //the expires is in seconds, unit of measure received by the domain registry\n _this.expiresTime = 3600;\n\n _this.hypertiesListToRemove = {};\n _this.hypertiesList = [];\n _this.remoteHypertyList = [];\n _this.remoteDataObjectList = [];\n _this.idpLegacyProxyList = {};\n\n _this.watchingYou = new _Utils.WatchingYou();\n _this.p2pHandlerStub = {};\n _this.p2pRequesterStub = _this.watchingYou.watch('p2pRequesterStub', {}, true);\n _this.p2pConnectionList = _this.watchingYou.watch('p2pConnectionList', {}, true);\n _this.p2pHandlerAssociation = {};\n\n _this.protostubsList = _this.watchingYou.watch('protostubsList', {}, true);\n _this.idpProxyList = _this.watchingYou.watch('idpProxyList', {}, true);\n _this.dataObjectList = {};\n _this.subscribedDataObjectList = {};\n _this.sandboxesList = { sandbox: {}, appSandbox: {} };\n _this.pepList = {};\n _this.registries = {};\n\n _this._domain = (0, _utils.divideURL)(_this.registryURL).domain;\n _this.sandboxesList.appSandbox[runtimeURL] = appSandbox;\n var p2pConnectionResolve = new _P2PConnectionResolve2.default(_this);\n\n _this._p2pConnectionResolve = p2pConnectionResolve;\n }\n\n (0, _createClass3.default)(Registry, [{\n key: '_getIdentityAssociated',\n value: function _getIdentityAssociated(type, hypertyURL) {\n var _this = this;\n\n for (var hyperty in _this.hypertiesList) {\n var value = _this.hypertiesList[hyperty];\n\n if (value._hypertyURL === hypertyURL) {\n switch (type) {\n case 'username':\n return value._user.username;\n case 'cn':\n return value._user.cn;\n case 'locale':\n return value._user.locale;\n case 'avatar':\n return value._user.avatar;\n case 'userURL':\n return value._user.userURL;\n case '.':\n return value._user;\n default:\n return '';\n }\n }\n }\n return '';\n }\n\n /**\n * This function is used to return the sandbox instance where the Application is executing. It is assumed there is just one App per Runtime instance.\n */\n\n }, {\n key: 'getAppSandbox',\n value: function getAppSandbox() {\n var _this = this;\n return _this.appSandbox;\n }\n\n /**\n * This function returns the user associated to the hyperty URL\n * @param {String} hypertyURL hyperty URL\n * @return {String} userURL user URL\n */\n\n }, {\n key: 'getHypertyOwner',\n value: function getHypertyOwner(hypertyURL) {\n\n var _this = this;\n var userURL = void 0;\n\n for (var index in _this.hypertiesList) {\n var hyperty = _this.hypertiesList[index];\n\n if (hyperty.hypertyURL === hypertyURL) {\n userURL = hyperty.user.userURL;\n }\n }\n return userURL;\n }\n\n /**\n * returns the hyperty Name from a given url. This url could be from a dataObject or hyperty\n * @param {String} url hyperty or dataObject URL\n * @return {String} hypertyName hyperty Name\n */\n\n }, {\n key: 'getHypertyName',\n value: function getHypertyName(url) {\n var _this = this;\n\n var isHypertyURL = (0, _utils.divideURL)(url).type === 'hyperty';\n\n //value to be returned in the end\n var hypertyName = void 0;\n\n //if is not an hyperty, check if is a dataObject and obtain his reporter\n var hypertyURL = isHypertyURL ? url : _this.getReporterURLSynchonous(url);\n\n for (var index in _this.hypertiesList) {\n var hyperty = _this.hypertiesList[index];\n if (hyperty.hypertyURL === hypertyURL) {\n hypertyName = hyperty.objectName;\n break;\n }\n }\n return hypertyName;\n }\n\n /**\n * function to return the reporterURL associated with the dataobject URL\n * @param {String} dataObjectURL dataObjectURL\n * @return {String} reporterURL reporterURL\n */\n\n }, {\n key: 'getReporterURL',\n value: function getReporterURL(dataObjectURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var dataObject = _this.dataObjectList[dataObjectURL];\n\n if (dataObject) {\n resolve(dataObject.reporter);\n } else {\n reject('No reporter was found');\n }\n });\n }\n\n /**\n * function to return the reporterURL associated with the dataobject URL. no promise returned\n * @param {String} dataObjectURL dataObjectURL\n * @return {String} reporterURL reporterURL\n */\n\n }, {\n key: 'getReporterURLSynchonous',\n value: function getReporterURLSynchonous(dataObjectURL) {\n var _this = this;\n\n var dataObject = _this.dataObjectList[dataObjectURL];\n\n return dataObject ? dataObject.reporter : undefined;\n }\n\n /**\n * returns the hyperty URL that subscribed the dataObject\n * @param {String} url url format\n * @return {String} Hyperty URL subscribed to the URL\n */\n\n }, {\n key: 'getDataObjectSubscriberHyperty',\n value: function getDataObjectSubscriberHyperty(url) {\n var _this = this;\n\n return _this.subscribedDataObjectList[url];\n }\n\n /**\n * register a desired dataObject to subscribe\n * @param {String} dataObjectURL dataObject URL\n */\n\n }, {\n key: 'registerSubscribedDataObject',\n value: function registerSubscribedDataObject(dataObjectURL, hypertyURL) {\n var _this = this;\n if (_this.subscribedDataObjectList[dataObjectURL] === undefined) {\n _this.subscribedDataObjectList[dataObjectURL] = hypertyURL;\n }\n }\n\n /**\n * Function to return the list of pre authorised users received in the creation of a data object\n * @param {String} dataObjectURL dataObjectURL\n * @return {Array} preAuth List of pre authorised users\n */\n\n }, {\n key: 'getPreAuthSubscribers',\n value: function getPreAuthSubscribers(dataObjectURL) {\n var _this = this;\n var dataObject = _this.dataObjectList[dataObjectURL];\n var preAuth = [];\n\n if (dataObject) {\n preAuth = dataObject.authorise;\n }\n return preAuth;\n }\n\n /**\n * send requests to unregister all hyperties registered in domain registry\n * @return {Promise} return a promise if the result of unregistration all hyperties\n */\n\n }, {\n key: 'unregisterAllHyperties',\n value: function unregisterAllHyperties() {\n var _this = this;\n\n var unregisterResults = [];\n\n return new _promise2.default(function (resolve, reject) {\n\n for (var index in _this.hypertiesList) {\n var hyperty = _this.hypertiesList[index];\n var result = _this.unregisterHypertyInstance(hyperty.hypertyURL);\n unregisterResults.push(result);\n }\n\n _promise2.default.all(unregisterResults).then(function () {\n\n resolve('successfully unregistered all hyperties');\n }, function (error) {\n reject(error);\n });\n });\n }\n\n /**\n * function to unregister an hypertyInstance in the Domain Registry\n * @param {String} hypertyInstance HypertyInsntance url\n *\n */\n\n }, {\n key: 'unregisterHypertyInstance',\n value: function unregisterHypertyInstance(hypertyInstance) {\n //TODO working but the user\n var _this = this;\n\n var closeMsg = { type: 'execute', from: _this.registryURL,\n to: hypertyInstance,\n body: { method: 'close' } };\n\n // Send message to hyperty to close\n _this._messageBus.postMessage(closeMsg, function (reply) {\n log.log('[Registry.unregisterHypertyInstance] Close Reply', reply);\n\n var message = { type: 'update', from: _this.registryURL,\n to: 'domain://registry.' + _this._domain,\n body: { resource: '/hyperty/' + hypertyInstance, value: 'disconnected', attribute: 'status' } };\n\n _this._messageBus.postMessage(message, function (reply) {\n log.log('[Registry] unregister hyperty Reply', reply);\n });\n });\n }\n\n /**\n * function to unregister an hypertyInstance in the Domain Registry\n * @param {String} hypertyInstance HypertyInsntance url\n *\n */\n\n }, {\n key: 'unregisterDataObject',\n value: function unregisterDataObject(url) {\n var _this = this;\n\n var message = { type: 'update', from: _this.registryURL,\n to: 'domain://registry.' + _this._domain,\n body: {\n resource: url,\n value: {\n status: 'disconnected'\n }\n } };\n\n _this._messageBus.postMessage(message, function (reply) {\n log.log('[Registry] unregister dataObject Reply', reply);\n });\n }\n\n /**\n * function to delete an dataObjectInstance in the Domain Registry\n * @param {String} name DataObjectName\n */\n\n }, {\n key: 'deleteDataObjectInstance',\n value: function deleteDataObjectInstance(name) {\n var _this = this;\n\n var message = { type: 'delete', from: _this.registryURL,\n to: 'domain://registry.' + _this._domain,\n body: { value: { name: name } } };\n\n _this._messageBus.postMessage(message, function (reply) {\n log.log('[Registry] unregister dataObject Reply', reply);\n });\n }\n\n /**\n * Function to update an Hyperty\n */\n\n }, {\n key: 'updateHypertyInstance',\n value: function updateHypertyInstance(resource, value) {\n var _this = this;\n\n var message = { type: 'UPDATE', from: _this.registryURL,\n to: 'domain://registry.' + _this._domain,\n body: { resource: resource, value: value } };\n\n _this._messageBus.post.postMessage(message, function (reply) {\n // log.log('[Registry] Updated hyperty reply', reply);\n });\n }\n\n /**\n * register a new subscriber in the dataObject registered\n * @param {String} dataObjectURL dataObject URL\n * @param {String} subscriberURL subscriber URL\n */\n\n }, {\n key: 'registerSubscriber',\n value: function registerSubscriber(dataObjectURL, subscriberURL) {\n var _this = this;\n var dataObject = _this.dataObjectList[dataObjectURL];\n\n if (dataObject) {\n\n if (!dataObject.subscribers) dataObject.subscribers = [];\n\n dataObject.subscribers.push(subscriberURL);\n _this.dataObjectList[dataObjectURL] = dataObject;\n }\n }\n\n /**\n * get the subscribers registered within a dataObject\n * @param {String} dataObjectURL dataObject URL\n * @param {Array} Substribers List\n */\n\n }, {\n key: 'getDataObjectSubscribers',\n value: function getDataObjectSubscribers(dataObjectURL) {\n var _this = this;\n var dataObject = _this.dataObjectList[dataObjectURL];\n\n if (dataObject) {\n return dataObject.subscribers;\n } else {\n throw 'No dataObject was found';\n }\n }\n\n /**\n * To register a new Data Object in the runtime which returns the dataObjectURL allocated to the new Data Object.\n * @param {String} identifier identifier\n * @param {String} dataObjectschema dataObjectschema\n * @param {String} dataObjectUrl dataObjectUrl\n * @param {String} dataObjectReporter dataObjectReporter\n * @param {Array} resources dataObject resources\n * @param {Array} authorise list of pre authorised authorised IDs\n */\n //registerDataObject(identifier, dataObjectschema, dataObjectUrl, dataObjectReporter, resources, addressURL, authorise) {\n\n }, {\n key: 'registerDataObject',\n value: function registerDataObject(objectRegistration) {\n var _this = this;\n\n var registration = (0, _utils.deepClone)(objectRegistration);\n\n return new _promise2.default(function (resolve, reject) {\n\n var dataScheme = [];\n var filteredDataScheme = registration.url.split(':');\n dataScheme.push(filteredDataScheme[0]);\n\n _this.storageManager.get('registry:DataObjectURLs').then(function (urlsList) {\n\n if (!urlsList) {\n urlsList = {};\n }\n\n //update the list with the new elements\n urlsList[objectRegistration.name + objectRegistration.schema + objectRegistration.resources + objectRegistration.reporter] = objectRegistration.url;\n\n var p2pHandler = void 0;\n var p2pRequester = void 0;\n\n if ((0, _keys2.default)(_this.p2pHandlerStub).length !== 0) {\n p2pHandler = _this.p2pHandlerStub[_this.runtimeURL].url;\n p2pRequester = _runtimeUtils.runtimeUtils.runtimeDescriptor.p2pRequesterStub;\n }\n\n registration.startingTime = registration.created;\n\n delete registration.authorise;\n delete registration.created;\n delete registration.mutual;\n delete registration.resume;\n\n if (!registration.expires) registration.expires = _this.expiresTime;\n\n registration.dataSchemes = dataScheme;\n\n if (p2pHandler) {\n registration.p2pHandler = p2pHandler;\n registration.p2pRequester = p2pRequester;\n }\n\n if (_this.isInterworkingProtoStub(registration.reporter)) {\n registration.interworking = true;\n }\n\n registration.status = 'live';\n\n var message = void 0;\n\n if (!objectRegistration.resume) {\n\n log.log('[Registry.registerDataObject] registering new data object URL', registration);\n\n message = { type: 'create', from: _this.registryURL, to: 'domain://registry.' + _this.registryDomain, body: { value: registration, policy: 'policy' } };\n } else {\n\n log.log('[Registry.registerDataObject] registering previously registered data object URL', registration);\n\n message = {\n type: 'update',\n to: 'domain://registry.' + _this.registryDomain,\n from: _this.registryURL,\n body: { resource: registration.url, value: { status: 'live' } }\n };\n }\n\n _this.dataObjectList[registration.url] = objectRegistration;\n\n // step to obtain the list of all URL registered to updated with the new one.\n _this.storageManager.set('registry:DataObjectURLs', 0, urlsList).then(function () {\n\n try {\n _this._messageBus.postMessageWithRetries(message, _this._registrationRetries, function (reply) {\n // log.log('[Registry.registerDataObject] ===> registerDataObject Reply: ', reply);\n if (reply.body.code === 200) {\n resolve(registration);\n } else {\n reject('error on register DataObject');\n }\n });\n } catch (e) {\n log.error(e);\n reject(e);\n }\n\n //timer to keep the registration alive\n // the time is defined by a little less than half of the expires time defined\n var keepAliveTimer = setInterval(function () {\n\n var message = {\n type: 'update',\n from: _this.registryURL,\n to: 'domain://registry.' + _this.registryDomain,\n body: { resource: registration.url, value: { status: 'live' }, method: 'refresh' }\n };\n\n _this._messageBus.postMessage(message, function (reply) {\n // log.log('[Registry.registerDataObject] KeepAlive Reply: ', reply);\n });\n }, registration.expires / 1.1 / 2 * 1000);\n }).catch(function (reason) {\n log.error('[Registry registerHyperty] Error: ', reason);\n reject(reason);\n });\n });\n });\n }\n }, {\n key: '_getResourcesAndSchemes',\n value: function _getResourcesAndSchemes(descriptor) {\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n\n var resources = void 0;\n\n // check if the hyperty resources is a vector or a string\n // TODO delete later when catalogue is fixed\n if (typeof descriptor.hypertyType === 'string') {\n resources = [];\n resources.push(descriptor.hypertyType);\n } else {\n resources = descriptor.hypertyType;\n }\n\n var objName = descriptor.objectName;\n\n var descriptorDataSchema = descriptor.dataObjects;\n var dataSchemasArray = [];\n\n //this will create a array with a Promise in each position\n for (var index in descriptorDataSchema) {\n dataSchemasArray.push(_this.runtimeCatalogue.getDataSchemaDescriptor(descriptorDataSchema[index]));\n }\n\n // as soon as the previous array is completed, this will wait for the resolve of all promises in the array\n _promise2.default.all(dataSchemasArray).then(function (dataSchemas) {\n\n var filteredDataSchemas = [];\n for (var _index in dataSchemas) {\n var dataSchema = dataSchemas[_index];\n filteredDataSchemas.push(dataSchema.sourcePackage.sourceCode.properties.scheme.constant);\n }\n\n // log.log('[Registry] Hyperty Schemas', filteredDataSchemas);\n // log.log('[Registry] Hyperty resources', resources);\n\n resolve({ resources: resources, dataSchema: filteredDataSchemas, name: objName });\n });\n });\n }\n\n /**\n * method that returns previously registered Hyperty or DataObjects URLS, for given characteristics\n * @param {JSON} info object or hyperty charateristics info\n * @return {addressURL} addressURL return the URL if there is any previousy registered URL, return undefined otherwise\n */\n\n }, {\n key: 'checkRegisteredURLs',\n value: function checkRegisteredURLs(info, reuseURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n\n var objectType = info.reporter ? 'registry:DataObjectURLs' : 'registry:HypertyURLs';\n\n if (typeof reuseURL === 'string') {\n objectType = reuseURL && (0, _utils.divideURL)(reuseURL).type !== 'hyperty' ? 'registry:DataObjectURLs' : 'registry:HypertyURLs';\n }\n\n _this.storageManager.get(objectType).then(function (urlsList) {\n\n if (!urlsList) {\n urlsList = {};\n }\n\n if (typeof reuseURL === 'string') {\n log.info('[Registry - checkRegisteredURLs] - look for ' + reuseURL + ' on ', urlsList);\n\n var searchResult = (0, _keys2.default)(urlsList).map(function (key) {\n var indexOf = urlsList[key].indexOf(reuseURL);\n return urlsList[key][indexOf];\n });\n\n log.info('[Registry - checkRegisteredURLs] - found ' + searchResult.length + ' results on ', searchResult);\n if (searchResult.length === 1) {\n return resolve(searchResult);\n } else {\n return resolve(undefined);\n }\n }\n\n if (objectType === 'registry:HypertyURLs') {\n _this._getResourcesAndSchemes(info).then(function (value) {\n if (urlsList[value.resources + value.dataSchema + value.name]) {\n // log.log('[Registry] reusage of hyperty URL');\n return resolve(urlsList[value.resources + value.dataSchema + value.name]);\n } else {\n // log.log('[Registry] no hyperty URL was previously registered ');\n return resolve(undefined);\n }\n });\n } else {\n\n var characteristics = info.name + info.schema + info.resources + info.reporter;\n\n if (urlsList[characteristics]) {\n // log.log('[Registry] reusage of dataObject URL');\n return resolve(urlsList[characteristics]);\n } else {\n // log.log('[Registry] no dataObject URL was previously registered');\n return resolve(undefined);\n }\n }\n });\n });\n }\n\n /**\n * To register a new Hyperty in the runtime which returns the HypertyURL allocated to the new Hyperty.\n * @param {Sandbox} sandbox sandbox\n * @param {HypertyCatalogueURL} HypertyCatalogueURL descriptor\n * @param {object} IdpConstraint - constraints to be used when selecting the identity to be associated with the Hyperty including origin, idp, and idHint.\n * @return {HypertyURL} HypertyURL\n */\n\n }, {\n key: 'registerHyperty',\n value: function registerHyperty(sandbox, descriptorURL, descriptor, addressURL, IdpConstraint) {\n var _this = this;\n\n var hypertyCapabilities = void 0;\n\n return new _promise2.default(function (resolve, reject) {\n\n //assuming descriptor come in this format, the service-provider-domain url is retrieved by a split instruction\n //hyperty-catalogue:///\n var domainUrl = (0, _utils.divideURL)(descriptorURL).domain;\n\n if (domainUrl.includes('catalogue')) {\n domainUrl = domainUrl.replace('catalogue.', '');\n }\n\n _this.idModule.getIdentityAssertion(IdpConstraint).then(function (result) {\n\n var userProfile = result.userProfile;\n\n // log.log('[Registry registerHyperty] userProfile', userProfile);\n var emailURL = userProfile.userURL;\n\n if (_this._messageBus === undefined) {\n reject('[Registry registerHyperty] MessageBus is undefined');\n } else {\n //call check if the protostub exist: to be removed\n /* _this.resolve(domainUrl).then(function(a) {\n // log.log('[Registry registerHyperty] stub to domain registry- ', a);*/\n\n _this.storageManager.get('registry:HypertyURLs').then(function (urlsList) {\n\n // log.log('[Registry registerHyperty] storageManager] - ', urlsList);\n\n _this._getResourcesAndSchemes(descriptor).then(function (value) {\n\n hypertyCapabilities = value;\n\n if (!urlsList) {\n urlsList = {};\n }\n\n urlsList[hypertyCapabilities.resources + hypertyCapabilities.dataSchema + hypertyCapabilities.name] = addressURL.address;\n _this.storageManager.set('registry:HypertyURLs', 0, urlsList).then(function () {\n\n _this.registryDomain = domainUrl;\n\n //check whether the received sanbox e ApplicationSandbox or a normal sandbox\n if (sandbox.type === 'app') {\n _this.sandboxesList.appSandbox[addressURL.address[0]] = sandbox;\n } else if (sandbox.type === 'normal') {\n _this.sandboxesList.sandbox[addressURL.address[0]] = sandbox;\n } else {\n reject('Wrong SandboxType');\n }\n\n var p2pHandler = void 0;\n var p2pRequester = void 0;\n\n if ((0, _keys2.default)(_this.p2pHandlerStub).length !== 0) {\n p2pHandler = _this.p2pHandlerStub[_this.runtimeURL].url;\n p2pRequester = _runtimeUtils.runtimeUtils.runtimeDescriptor.p2pRequesterStub;\n }\n\n var runtime = _this.runtimeURL;\n var status = 'live';\n\n var hyperty = new _HypertyInstance2.default(_this.identifier, _this.registryURL, descriptorURL, descriptor, addressURL.address[0], userProfile, 'guid', _this.runtimeURL, 'ctx', p2pHandler, p2pRequester, hypertyCapabilities.dataSchema, hypertyCapabilities.resources);\n\n _this.hypertiesList.push(hyperty);\n\n //message to register the new hyperty, within the domain registry\n var messageValue = void 0;\n var message = void 0;\n var registrationExpires = _this.expiresTime;\n\n // set a different expires value if configured in the Hyperty descriptor\n\n if (descriptor.configuration && descriptor.configuration.expires) registrationExpires = descriptor.configuration.expires;\n\n if (addressURL.newAddress) {\n // log.log('[Registry registerHyperty] registering new Hyperty URL', addressURL.address[0]);\n\n messageValue = {\n user: emailURL,\n descriptor: descriptorURL,\n url: addressURL.address[0],\n expires: registrationExpires,\n resources: hypertyCapabilities.resources,\n dataSchemes: hypertyCapabilities.dataSchema,\n runtime: runtime,\n status: status\n };\n\n // set a different expires if defined in the hyperty configuration\n\n if (p2pHandler) {\n messageValue.p2pHandler = p2pHandler;\n messageValue.p2pRequester = p2pRequester;\n }\n\n // log.log('[Registry registerHyperty] registering new Hyperty at domain registry ', messageValue);\n\n message = { type: 'create', from: _this.registryURL, to: 'domain://registry.' + _this.registryDomain, body: { value: messageValue, policy: 'policy' } };\n } else {\n // log.log('[Registry registerHyperty] registering previously registered Hyperty URL', addressURL.address[0]);\n\n message = {\n type: 'update',\n to: 'domain://registry.' + _this.registryDomain,\n from: _this.registryURL,\n body: { resource: addressURL.address[0], value: { status: 'live', user: emailURL } }\n };\n\n if (p2pHandler) {\n message.body.value.p2pHandler = p2pHandler;\n message.body.value.p2pRequester = p2pRequester;\n }\n }\n\n // log.log('[Registry registerHyperty] Hyperty registration at domain registry - ', message);\n\n try {\n _this._messageBus.postMessageWithRetries(message, _this.registrationRetries, function (reply) {\n // log.log('[Registry registerHyperty] Hyperty registration response: ', reply);\n\n if (reply.body.code === 200) {\n var _result = { url: addressURL.address[0] };\n if (p2pHandler) {\n _result.p2pHandler = p2pHandler;\n _result.p2pRequester = p2pRequester;\n }\n\n resolve(_result);\n } else if (reply.body.code === 404) {\n // log.log('[Registry registerHyperty] The update was not possible. Registering new Hyperty at domain registry');\n\n messageValue = {\n user: emailURL,\n descriptor: descriptorURL,\n url: addressURL.address[0],\n expires: registrationExpires,\n resources: hypertyCapabilities.resources,\n dataSchemes: hypertyCapabilities.dataSchema,\n runtime: runtime,\n status: status\n };\n\n if (p2pHandler) {\n messageValue.p2pHandler = p2pHandler;\n messageValue.p2pRequester = p2pRequester;\n }\n\n message = { type: 'create', from: _this.registryURL, to: 'domain://registry.' + _this.registryDomain, body: { value: messageValue, policy: 'policy' } };\n\n try {\n _this._messageBus.postMessageWithRetries(message, _this.registrationRetries, function (reply) {\n // log.log('[Registry registerHyperty] Hyperty registration update response: ', reply);\n\n if (reply.body.code === 200) {\n var _result2 = { url: addressURL.address[0] };\n if (p2pHandler) {\n _result2.p2pHandler = p2pHandler;\n _result2.p2pRequester = p2pRequester;\n }\n\n resolve(_result2);\n } else {\n throw new Error('Failed to register an Hyperty: ' + reply);\n }\n });\n } catch (e) {\n log.error(e);\n reject(e);\n }\n } else throw new Error('Failed to register an Hyperty: ', reply);\n });\n } catch (e) {\n log.error(e);\n reject(e);\n }\n\n //timer to keep the registration alive\n // the time is defined by a little less than half of the expires time defined\n var keepAliveTimer = setInterval(function () {\n\n var message = {\n type: 'update',\n from: _this.registryURL,\n to: 'domain://registry.' + _this.registryDomain,\n body: { resource: addressURL.address[0], value: { status: 'live' }, method: 'refresh' } };\n\n _this._messageBus.postMessage(message, function (reply) {\n // log.log('[Registry registerHyperty] KeepAlive Reply: ', reply);\n });\n }, registrationExpires / 1.1 / 2 * 1000);\n }).catch(function (reason) {\n // log.log('[Registry registerHyperty] Error: ', reason);\n reject(reason);\n });\n });\n });\n }\n }, function (err) {\n reject('[Registry registerHyperty] ', err);\n });\n });\n }\n\n /**\n * To unregister a previously registered Hyperty\n * @param {HypertyURL} HypertyURL url url\n */\n\n }, {\n key: 'unregisterHyperty',\n value: function unregisterHyperty(url) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var found = false;\n var index = 0;\n\n for (index = 0; index < _this.hypertiesList.length; index++) {\n var hyperty = _this.hypertiesList[index];\n if (hyperty !== undefined) {\n if (hyperty.hypertyURL === url) {\n found = true;\n break;\n }\n }\n }\n\n if (found === false) {\n reject('Hyperty not found');\n } else {\n delete _this.hypertiesList[index];\n resolve('Hyperty successfully deleted');\n }\n });\n }\n\n /**\n * To discover protocol stubs available in the runtime for a certain domain. If available, it returns the runtime url for the protocol stub that connects to the requested domain. Required by the runtime BUS to route messages to remote servers or peers (do we need something similar for Hyperties?).\n * @param {DomainURL} DomainURL url\n * @return {RuntimeURL} RuntimeURL\n */\n\n }, {\n key: 'discoverProtostub',\n value: function discoverProtostub(url) {\n if (!url) throw new Error('Parameter url needed');\n var _this = this;\n\n var dividedURL = (0, _utils.divideURL)(url);\n var domainURL = dividedURL.domain;\n\n if (_this.protostubsList.hasOwnProperty(domainURL) && _this.protostubsList[domainURL].status === STATUS.LIVE) {\n return _this.protostubsList[domainURL];\n } else {\n\n _this.protostubsList[domainURL] = {\n status: STATUS.DEPLOYING\n };\n\n throw new Error('[Registry - discoverProtoStub ] Message Node Protostub Not Found. Creating one');\n }\n }\n\n /**\n * To discover protocol stubs available in the runtime for a certain remote runtime URL. If available, it returns the runtime url for the protocol stub that connects to the requested domain.\n * Required by the runtime BUS to route messages to remote servers or peers (do we need something similar for Hyperties?).\n * @param {RuntimeURL} RuntimeURL url\n * @return {p2pRequester} RuntimeURL\n */\n\n }, {\n key: 'discoverP2PStub',\n value: function discoverP2PStub(runtimeURL) {\n var _this = this;\n\n if (runtimeURL) {\n\n if (_this.p2pRequesterStub.hasOwnProperty(runtimeURL) && _this.p2pRequesterStub[runtimeURL].status === STATUS.LIVE) {\n return _this.p2pRequesterStub[runtimeURL];\n } else {\n _this.p2pRequesterStub[runtimeURL] = {\n status: STATUS.CREATED\n };\n\n throw new Error('[Registry - discoverP2PStub ] P2P Requester Stub Not Found. Creating one');\n }\n } else {\n\n if (_this.p2pHandlerStub.hasOwnProperty(_this.runtimeURL)) {\n return _this.p2pHandlerStub[_this.runtimeURL];\n } else {\n _this.p2pHandlerStub[_this.runtimeURL] = {\n status: STATUS.CREATED\n };\n\n throw new Error('[Registry - discoverP2PStub ] P2P Handler Stub Not Found.');\n }\n }\n }\n\n /**\n * To register a new Protocol Stub in the runtime including as input parameters the function to postMessage, the DomainURL that is connected with the stub, which returns the RuntimeURL allocated to the new ProtocolStub.\n * @param {Sandbox} Sandbox\n * @param {stubID} Domain or hyperty runtime to register the stub\n * @param {descriptorURL} Catalogue URL of the Protostub descriptor\n * @param {descriptor} Protostub descriptor\n * @return {RuntimeProtoStubURL}\n */\n\n }, {\n key: 'registerStub',\n value: function registerStub(sandbox, stubID, p2pConfig, descriptorURL, descriptor) {\n var _this = this;\n\n var _stubDescriptor = descriptor;\n\n return new _promise2.default(function (resolve, reject) {\n\n var runtimeProtoStubURL = void 0;\n\n //check if messageBus is registered in registry or not\n if (_this._messageBus === undefined) {\n reject('MessageBus not found on registerStub');\n }\n\n log.info('[Registry - registerStub] - stubID ', stubID);\n\n /* if (!stubID.indexOf('msg-node.')) {\n stubID = stubID.substring(stubID.indexOf('.') + 1);\n }*/\n\n var P2PRequesterStub = void 0;\n\n if (p2pConfig) {\n\n if (p2pConfig.hasOwnProperty('isHandlerStub') && p2pConfig.isHandlerStub) {\n runtimeProtoStubURL = _this.p2pHandlerURL;\n\n _this.p2pHandlerStub[stubID] = {\n url: runtimeProtoStubURL,\n status: STATUS.CREATED\n };\n\n _this.p2pHandlerAssociation[_this.runtimeURL] = [];\n\n _this.sandboxesList.sandbox[runtimeProtoStubURL] = sandbox;\n log.info('[Registry - registerStub - P2PHandlerStub] - ', stubID, ' - ', runtimeProtoStubURL);\n resolve(_this.p2pHandlerStub[stubID]);\n } else {\n P2PRequesterStub = p2pConfig.p2pRequesterStub;\n runtimeProtoStubURL = 'runtime://' + (0, _utils.divideURL)(p2pConfig.remoteRuntimeURL).domain + '/p2prequester/' + (0, _utils.generateGUID)();\n log.info('[Registry - registerStub - P2PRequesterStub] - ', P2PRequesterStub, ' - ', runtimeProtoStubURL);\n\n // to be clarified what is this p2pHandlerAssociation\n _this.p2pHandlerAssociation[_this.runtimeURL].push(runtimeProtoStubURL);\n _this.p2pRequesterStub[stubID] = {\n url: runtimeProtoStubURL,\n status: STATUS.CREATED\n };\n\n _this.sandboxesList.sandbox[runtimeProtoStubURL] = sandbox;\n\n //Setup P2P Requester path into MN\n\n var msg = {\n type: 'subscribe',\n from: _this.registryURL,\n to: 'domain://msg-node.' + _this._domain + '/sm',\n body: {\n subscribe: [runtimeProtoStubURL],\n source: _this.registryURL\n }\n };\n\n _this._messageBus.postMessage(msg, function (reply) {\n // log.log('[Registry - register Stub] p2pRequester path setup: ', reply);\n });\n\n resolve(_this.p2pRequesterStub[stubID]);\n }\n } else {\n runtimeProtoStubURL = 'runtime://' + stubID + '/protostub/' + (0, _utils.generateGUID)();\n\n log.info('[Registry - registerStub - Normal Stub] - ', stubID);\n\n // TODO: Optimize this\n _this.protostubsList[stubID] = {\n url: runtimeProtoStubURL,\n status: STATUS.DEPLOYING\n };\n\n if (descriptorURL) {\n _this.protostubsList[stubID].descriptorURL = descriptorURL;\n }\n\n if (_stubDescriptor && _stubDescriptor.interworking) {\n _this.protostubsList[stubID].interworking = _stubDescriptor.interworking;\n }\n\n _this.sandboxesList.sandbox[runtimeProtoStubURL] = sandbox;\n\n resolve(_this.protostubsList[stubID]);\n }\n\n // resolve(runtimeProtoStubURL);\n\n _this._messageBus.addListener(runtimeProtoStubURL + '/status', function (msg) {\n _this._onProtostubStatusEvent(msg);\n });\n });\n }\n\n /**\n * To Process status events fired by protostubs\n * @param {Message} message Event Message\n */\n\n }, {\n key: '_onProtostubStatusEvent',\n value: function _onProtostubStatusEvent(msg) {\n\n var _this = this;\n\n // log.log('[Registry onProtostubStatusEvent]: ', msg);\n\n var runtimeProtoStubURL = msg.from;\n\n if (!msg.to.includes('/status')) {\n log.error('[Registry onProtostubStatusEvent] Not Status Event: ', msg);\n return;\n }\n\n // process status events from message node protostubs\n\n if (runtimeProtoStubURL.includes('/protostub/')) {\n\n // TODO: uncomment below when protostubs are updated with new status value \"live\"\n (0, _keys2.default)(_this.protostubsList).filter(function (key) {\n return _this.protostubsList[key].url === runtimeProtoStubURL;\n }).map(function (key) {\n _this.protostubsList[key].status = msg.body.value;\n\n // log.log('[Registry - onProtostubStatusEvent] - Protostub status: ', _this.protostubsList[key]);\n });\n } else {\n // process status events from p2p connections\n\n if (msg.body.resource) {\n var remoteRuntimeURL = msg.body.resource;\n\n if (_this.p2pConnectionList[remoteRuntimeURL]) {\n _this.p2pConnectionList[remoteRuntimeURL].status = msg.body.value;\n _this.p2pConnectionList[remoteRuntimeURL].url = runtimeProtoStubURL;\n } else {\n\n var p2pConnection = {\n status: msg.body.value,\n url: runtimeProtoStubURL\n };\n\n _this.p2pConnectionList[remoteRuntimeURL] = p2pConnection;\n }\n\n // log.log('[Registry - onProtostubStatusEvent] - P2PConnection status: ', _this.p2pConnectionList[remoteRuntimeURL]);\n\n // Update P2P Requester protostub if it is coming from there\n if (runtimeProtoStubURL.includes('/p2prequester/')) {\n _this.p2pRequesterStub[remoteRuntimeURL].status = msg.body.value;\n\n // log.log('[Registry - onProtostubStatusEvent] - P2P Requester status: ', _this.p2pRequesterStub[remoteRuntimeURL]);\n } else {\n // if from P2PHandler with status disconencted, lets remove from p2pConnectionList\n if (msg.body.value === 'disconnected') delete _this.p2pConnectionList[remoteRuntimeURL];\n }\n } else {\n if (runtimeProtoStubURL.includes('/p2prequester/')) {\n // It is an event from P2P Requester without mandatory \"resource\" field\n log.error('[Registry onProtostubStatusEvent] resource missing: ', msg);\n return;\n } else {\n // It is an event from P2P Handler\n _this.p2pHandlerStub[_this.runtimeURL].status = msg.body.value;\n\n // log.log('[Registry - onProtostubStatusEvent] - P2PHandler Stub status: ', _this.p2pHandlerStub[_this.runtimeURL]);\n }\n }\n }\n }\n\n /**\n * To unregister a previously registered protocol stub\n * @param {HypertyRuntimeURL} HypertyRuntimeURL hypertyRuntimeURL\n */\n\n }, {\n key: 'unregisterStub',\n value: function unregisterStub(hypertyRuntimeURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n if (_this.protostubsList.hasOwnProperty(hypertyRuntimeURL)) {\n delete _this.protostubsList[hypertyRuntimeURL];\n resolve('ProtostubURL removed');\n } else {\n reject('Error on unregisterStub: Hyperty not found');\n }\n });\n }\n\n /**\n * To register a new Identity Provider proxy in the runtime including as input parameters the function to postMessage, the DomainURL that is connected with the stub, which returns the RuntimeURL allocated to the new ProtocolStub.\n * @param {Sandbox} Sandbox\n * @param {DomainURL} DomainURL service provider domain\n * @return {RuntimeIdpProxyURL}\n */\n\n }, {\n key: 'registerIdpProxy',\n value: function registerIdpProxy(sandbox, domainURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var idpProxyStubURL = void 0;\n\n //check if messageBus is registered in registry or not\n if (_this._messageBus === undefined) {\n reject('MessageBus not found on registerStub');\n }\n\n idpProxyStubURL = 'domain-idp://' + domainURL + '/stub/' + (0, _utils.generateGUID)();\n\n // TODO: Optimize this\n _this.idpProxyList[domainURL] = {\n url: idpProxyStubURL,\n status: STATUS.DEPLOYING\n };\n\n _this.sandboxesList.sandbox[idpProxyStubURL] = sandbox;\n\n // sandbox.addListener('*', function(msg) {\n // _this._messageBus.postMessage(msg);\n // });\n\n resolve(idpProxyStubURL);\n\n _this._messageBus.addListener(idpProxyStubURL + '/status', function (msg) {\n _this._onIdpProxyStatusEvent(msg);\n });\n });\n }\n\n /**\n * To Process status events fired by Idp Proxies\n * @param {Message} message Event Message\n */\n\n }, {\n key: '_onIdpProxyStatusEvent',\n value: function _onIdpProxyStatusEvent(msg) {\n\n var _this = this;\n\n // log.log('[Registry onIdpProxyStatusEvent]: ', msg);\n\n var idpProxyURL = msg.from;\n\n if (!msg.to.includes('/status')) {\n log.error('[Registry onIdpProxyStatusEvent] Not Status Event: ', msg);\n return;\n }\n\n (0, _keys2.default)(_this.idpProxyList).filter(function (key) {\n return _this.idpProxyList[key].url === idpProxyURL;\n }).map(function (key) {\n _this.idpProxyList[key].status = msg.body.value;\n\n // log.log('[Registry - onIdpProxyStatusEvent] - Idp Proxy status: ', _this.idpProxyList[key]);\n });\n }\n\n /**\n * To discover idpProxy stubs available in the runtime for a certain domain. If available, it returns the runtime url for the idpProxy stub that connects to the requested domain. Required by the runtime BUS to route messages to remote servers or peers\n * @param {DomainURL} DomainURL url\n * @return {RuntimeURL} RuntimeURL idpProxyUrl\n */\n\n }, {\n key: 'discoverIdpProxy',\n value: function discoverIdpProxy(url) {\n if (!url) throw new Error('Parameter url needed');\n var _this = this;\n\n var dividedURL = (0, _utils.divideURL)(url);\n var domainURL = dividedURL.domain;\n\n if (_this.idpProxyList.hasOwnProperty(domainURL) && _this.idpProxyList[domainURL].status === STATUS.LIVE) {\n return _this.idpProxyList[domainURL];\n } else {\n\n _this.idpProxyList[domainURL] = {\n status: STATUS.PROGRESS\n };\n\n throw new Error('[Registry - discoverIdpProxy ] Idp Proxy Not Found. Creating one');\n }\n }\n\n /**\n * To register a new Policy Enforcer in the runtime including as input parameters the function to postMessage, the HypertyURL associated with the PEP, which returns the RuntimeURL allocated to the new Policy Enforcer component.\n * @param {Message.Message} postMessage postMessage\n * @param {HypertyURL} HypertyURL hyperty\n * @return {HypertyRuntimeURL} HypertyRuntimeURL\n */\n\n }, {\n key: 'registerPEP',\n value: function registerPEP(postMessage, hyperty) {\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n //TODO check what parameter in the postMessage the pep is.\n _this.pepList[hyperty] = postMessage;\n resolve('PEP registered with success');\n });\n }\n\n /**\n * To unregister a previously registered protocol stub\n * @param {HypertyRuntimeURL} HypertyRuntimeURL HypertyRuntimeURL\n */\n\n }, {\n key: 'unregisterPEP',\n value: function unregisterPEP(HypertyRuntimeURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var result = _this.pepList[HypertyRuntimeURL];\n\n if (result === undefined) {\n reject('Pep Not found.');\n } else {\n resolve('PEP successfully removed.');\n }\n });\n }\n\n /**\n * To discover sandboxes available in the runtime for a certain domain and a certain set of capabilities. Required by the runtime UA to avoid more than one sandbox for the same domain.\n * @param {DomainURL} DomainURL url\n * @return {RuntimeSandbox} RuntimeSandbox\n */\n\n }, {\n key: 'getSandbox',\n value: function getSandbox(url, constraints) {\n if (!url) throw new Error('Parameter url needed');\n\n // log.log('[Registry getSandbox] getSandbox for: ', url, ' and capabilities: ', constraints);\n\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n\n var request = void 0;\n\n //first try to find the url in the appSandbox list\n request = _this.sandboxesList.appSandbox[url];\n\n //if no appSandbox was found, try to search in the normal sandboxes list\n if (!request) {\n request = _this.sandboxesList.sandbox[url];\n\n if (!request) {\n\n var domain = void 0;\n\n if (url.includes('://')) {\n domain = (0, _utils.divideURL)(url).domain;\n } else {\n domain = url;\n }\n\n // search in the sandboxes list for a entry containing the domain given\n for (var sandbox in _this.sandboxesList.sandbox) {\n //todo: uncomment sandbox constraints match condition with runtime sharing\n if (sandbox.includes(domain) && _this.sandboxesList.sandbox[sandbox].matches(constraints)) {\n var _ret = function () {\n var current = _this.sandboxesList.sandbox[sandbox];\n var match = (0, _keys2.default)(constraints).filter(function (constraint) {\n return constraint === 'browser' && current.type === _Sandbox.SandboxType.NORMAL || constraint === 'windowSanbox' && current.type === _Sandbox.SandboxType.WINDOW;\n }).length > 0 ? true : false;\n\n if (match) {\n request = current;\n }\n return 'break';\n }();\n\n if (_ret === 'break') break;\n }\n }\n }\n }\n\n if (!request) {\n reject('no sandbox found for: ' + url);\n } else {\n resolve(request);\n }\n });\n }\n }, {\n key: 'resolveNormalStub',\n value: function resolveNormalStub(url) {\n // log.log('resolveNormalStub ' + url);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //split the url to find the domainURL. deals with the url for example as:\n //\"hyperty-runtime://sp1/protostub/123\",\n var dividedURL = (0, _utils.divideURL)(url);\n var domainUrl = dividedURL.domain;\n var type = dividedURL.type;\n\n if (url.includes(_this.runtimeURL)) {\n log.error('[Registry - resolve] URL to be resolved should have listeners ', url);\n reject('[Registry - resolve] URL to be resolved should have listeners ', url);\n }\n\n // resolve the domain protostub in case of a message to global registry\n if (url.includes('global://registry')) {\n domainUrl = _this._domain;\n } else {\n if (!domainUrl.indexOf('msg-node.') || !domainUrl.indexOf('registry.')) {\n domainUrl = domainUrl.substring(domainUrl.indexOf('.') + 1);\n }\n }\n\n _this.isLegacy(url).then(function (isLegacy) {\n\n // if legacy it should resolve for .\n if (isLegacy && type !== 'domain-idp') {\n domainUrl = type + '.' + (0, _utils.getUserIdentityDomain)(url);\n }\n\n log.info('[Registry.resolve] domainUrl:', domainUrl);\n\n var registredComponent = void 0;\n\n if (type === 'domain-idp') {\n registredComponent = _this.idpProxyList.hasOwnProperty(domainUrl) ? _this.idpProxyList[domainUrl] : false;\n } else {\n registredComponent = _this.protostubsList.hasOwnProperty(domainUrl) ? _this.protostubsList[domainUrl] : false;\n }\n\n log.info('[Registry.resolve] registred:', registredComponent);\n\n // TODO since the protostubs have other states this should be revised, because the status could change from DEPLOYED to LIVE\n // TODO and this validation will trigger a new load of IDPProxy or Protostub;\n if (registredComponent && registredComponent.hasOwnProperty('status') && (registredComponent.status === STATUS.DEPLOYED || registredComponent.status === STATUS.CREATED || registredComponent.status === STATUS.LIVE || registredComponent.status === STATUS.DISCONNECTED)) {\n log.info('[Registry.resolve] Resolved: ', registredComponent.url, registredComponent.status);\n resolve(registredComponent.url);\n } else {\n //todo: use switch-case to support other types of stubs\n if (type === 'domain-idp') {\n\n // The IdP Proxy does not exist, let's prepare its deployment by watching its status\n\n _this.watchingYou.observe('idpProxyList', function (change) {\n\n // log.log('[Registry - resolveNormalStub] idpProxyList changed ' + _this.idpProxyList);\n\n var keypath = change.keypath;\n\n if (keypath.includes('status')) keypath = keypath.replace('.status', '');\n\n if (keypath === domainUrl && change.name === 'status' && change.newValue === STATUS.CREATED) {\n // log.log('[Registry - resolveNormalStub] idpProxyList is live ' + _this.idpProxyList[domainUrl]);\n resolve(_this.idpProxyList[domainUrl].url);\n }\n });\n\n if (!registredComponent) {\n // this process will load the idp proxy, because is not yet registered;\n log.info('[Registry.resolveNormalStub] deploy new IDPProxy: ', domainUrl);\n _this.loader.loadIdpProxy(domainUrl).then(function () {\n\n log.info('[Registry.resolveNormalStub] IdP Proxy deployed: ', _this.idpProxyList[domainUrl]);\n }).catch(function (reason) {\n log.error('[Registry.resolve] Error resolving Load IDPProxy: ', reason);\n _this.idpProxyList[domainUrl].status = 'deployment-failed';\n reject(reason);\n });\n }\n } else {\n\n // The protoStub does not exist, let's prepare its deployment by watching its status\n\n _this.watchingYou.observe('protostubsList', function (change) {\n\n // log.log('[Registry - resolveNormalStub] protostubsList changed ' + _this.protostubsList);\n\n var keypath = change.keypath;\n\n if (keypath.includes('status')) keypath = keypath.replace('.status', '');\n\n if (keypath === domainUrl && change.name === 'status' && change.newValue === STATUS.CREATED) {\n // log.log('[Registry - resolve] protostub is live ' + _this.protostubsList[domainUrl]);\n resolve(_this.protostubsList[domainUrl].url);\n }\n });\n\n if (!registredComponent) {\n // lets deploy the protostub\n log.info('[Registry.resolve] trigger new ProtocolStub: ', domainUrl);\n _this.loader.loadStub(domainUrl).then(function () {\n\n // log.log('[Registry - resolveNormalStub] Stub deployed: ', _this.protostubsList[domainUrl]);\n }).catch(function (reason) {\n log.error('[Registry.resolveNormalStub] Error resolving Load ProtocolStub: ', reason);\n reject(reason);\n });\n }\n }\n }\n }).catch(function (reason) {\n log.error('[Registry.resolve] Error resolving islegacy: ', reason);\n reject(reason);\n });\n });\n }\n\n /**\n * To verify if source is valid and to resolve target runtime url address if needed (eg protostub runtime url in case the message is to be dispatched to a remote endpoint).\n * @param {URL.URL} url url\n * @return {Promise} Promise \n */\n\n }, {\n key: 'resolve',\n value: function resolve(msg) {\n log.info('[Registry - Resolve] - ', msg);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var url = msg.to ? msg.to : msg;\n\n var p2p = msg.body && msg.body.p2p ? msg.body.p2p : false;\n\n // log.log('P2P: ', p2p, url);\n // log.log('P2P - p2pHandlerStub: ', !_this.p2pHandlerStub[_this.runtimeURL], _this.p2pHandlerStub, _this.runtimeURL);\n // log.log('P2P - isBackendServiceURL: ', isBackendServiceURL(url), isBackendServiceURL, url);\n // log.log('P2P - includes runtimeURL: ', url.includes(_this.runtimeURL));\n // log.log('P2P - includes p2phandler: ', url.includes('/p2phandler/'));\n // log.log('P2P - includes p2prequester: ', url.includes('/p2prequester/'));\n\n // Skip p2p procedure when not supported by the Runtime or for backend services\n\n if (!_this.p2pHandlerStub[_this.runtimeURL] || (0, _utils.isBackendServiceURL)(url) || url.includes(_this.runtimeURL) || url.includes('/p2phandler/') || url.includes('/p2prequester/')) {\n\n log.info('[Registry - resolve] - Resolve normal stub: ', _this.p2pHandlerStub, _this.runtimeURL, (0, _utils.isBackendServiceURL)(url), p2p, url);\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n } else {\n\n log.info('[Registry - resolve] - checkP2P: ', p2p, url, _this._p2pConnectionResolve);\n _this._p2pConnectionResolve.checkP2P(msg).then(function (registeredP2P) {\n\n // log.log('[Registry - resolve] found registered P2P: ', registeredP2P);\n\n var p2pConnection = _this.p2pConnectionList[registeredP2P.runtime];\n\n if (!p2pConnection) {\n p2pConnection = registeredP2P;\n _this.p2pConnectionList[registeredP2P.runtime] = p2pConnection;\n }\n\n switch (p2pConnection.status) {\n case STATUS.LIVE:\n msg.body.peer = registeredP2P.runtime;\n resolve(p2pConnection.url, msg);\n break;\n case STATUS.CREATED: // p2p connection setup is ongoing, use MN Stub\n case STATUS.PROGRESS:\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n break;\n case STATUS.DISCONNECTED:\n // p2p connection stub was disconnected, let's ask to connect again\n log.info('[Registry - Resolve] - p2pConnection is disconnected lets try to reconnect');\n _this._p2pConnectionResolve.reconnectP2PRequester(p2pConnection).then(function (returnURL) {\n // log.log('[Registry - Resolve] - was reconnected with p2pRequesterStubt: ', returnURL);\n resolve(returnURL);\n }, function (reason) {\n log.info('[Registry - Resolve] - Reason: ', reason);\n\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n });\n break;\n default:\n\n log.info('[Registry - resolve] - P2P: ', p2p);\n if (!p2p) {\n // no p2p connection exists and the message sender does not ask one. Lets use the MN Stub\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n } else {\n _this._setupP2PRequester(registeredP2P).then(function (returnURL) {\n // no p2p connection exists but the message sender is asking one. Lets try to setup one\n resolve(returnURL);\n }, function (reason) {\n log.info('[Registry - Resolve] - Reason: ', reason);\n\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n });\n }\n break;\n }\n }, function (reason) {\n log.info('[Registry - Resolve] - Reason: ', reason);\n\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n });\n }\n });\n }\n }, {\n key: '_setupP2PRequester',\n value: function _setupP2PRequester(input) {\n var _this = this;\n\n log.log('[Registry._setupP2PConnection] loadStub with p2pRequester: ', input);\n\n return new _promise2.default(function (resolve, reject) {\n\n var remoteRuntime = input.runtime;\n\n var p2pConfig = { remoteRuntimeURL: remoteRuntime, p2pHandler: input.p2pHandler, p2pRequesterStub: true };\n\n // lets prepare the p2pRequesterSTub deployment by setting an observer to its status changes\n\n _this.watchingYou.observe('p2pRequesterStub', function (change) {\n\n log.log('[Registry._setupP2PConnection] p2pRequesterStubs changed ' + _this.p2pRequesterStub);\n\n if (change.keypath.split('.')[0] === remoteRuntime && change.name === 'status' && change.newValue === STATUS.LIVE) {\n log.log('[Registry._setupP2PConnection] p2pRequester is live ' + _this.p2pRequesterStub[remoteRuntime]);\n resolve(_this.p2pRequesterStub[remoteRuntime].url);\n }\n });\n\n // stub load\n _this.loader.loadStub(input.p2pRequester, p2pConfig).then(function () {\n\n log.log('[Registry._setupP2PConnection] p2pRequester deployed: ', _this.p2pRequesterStub[remoteRuntime]);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n\n /**\n * To verify if url is for a legacy service.\n * @param {URL.URL} url url\n * @return {boolean}\n */\n\n }, {\n key: 'isLegacy',\n value: function isLegacy(url) {\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n if (url === _this._domain) {\n return resolve(false);\n }\n\n log.log('[Registry] [Registry.Registry.isLegacy] ', url);\n\n // TODO: to be defined in the runtime configuration\n var nonLegacy = ['hyperty-runtime', 'domain', 'global', 'hyperty'];\n\n var urlDivided = (0, _utils.divideURL)(url);\n\n if (nonLegacy.indexOf(urlDivided.type) !== -1 || urlDivided.domain === _this._domain) {\n return resolve(false);\n }\n\n // process User URLs\n if (url.split('@').length > 1) {\n var domain = urlDivided.domain;\n\n // log.log('[Registry] [Registry.Registry.isLegacy] domain: ', domain);\n if (_this.idpLegacyProxyList.hasOwnProperty(domain)) {\n\n var result = _this.idpLegacyProxyList[domain];\n\n if (result.interworking) {\n return resolve(result.interworking);\n } else {\n return resolve(false);\n }\n }\n\n _this._loader.descriptors.getIdpProxyDescriptor(domain).then(function (result) {\n\n // log.log('[Registry] [Registry.Registry.isLegacy] Legacy stub descriptor: ', result);\n\n if (result.interworking) {\n _this.idpLegacyProxyList[domain] = result;\n resolve(result.interworking);\n } else {\n resolve(false);\n }\n }).catch(function (reason) {\n log.warn('problem loading idp proxy descriptor for domain:', domain, ' because ', reason);\n reject(reason);\n });\n } else {\n // process protostub URLs\n resolve(_this.isInterworkingProtoStub(url));\n }\n });\n }\n\n /**\n * To verify if URL is locally registered or not.\n * @param {URL.URL} url url\n * @return {boolean}\n */\n\n }, {\n key: 'isLocal',\n value: function isLocal(url) {\n\n var runtimeScheme = ['hyperty-runtime', 'runtime'];\n var hypertyScheme = ['hyperty'];\n var urlScheme = url.split('://')[0];\n\n // Process Runtime Core URLs.\n // Messages originated from protostubs should also not include the runtimeURL in its URL.\n\n if (runtimeScheme.indexOf(urlScheme) !== -1) {\n return url.includes(this.runtimeURL);\n }\n\n // Process Hyperty URLs\n // Todo: hypertiesList should be an object not an array\n\n if (hypertyScheme.indexOf(urlScheme) !== -1) {\n\n for (var index in this.hypertiesList) {\n var hyperty = this.hypertiesList[index];\n if (hyperty.hypertyURL === url) {\n return true;\n }\n }\n\n return false;\n }\n\n // Process Data Object URLs\n\n if (url.includes('/subscription')) {\n url = url.substring(0, url.indexOf('/subscription'));\n }\n\n var dataObject = this.dataObjectList[url];\n\n if (dataObject) {\n if (dataObject.interworking) {\n return !dataObject.interworking;\n }\n return true;\n }\n\n return false;\n }\n\n /**\n * To verify if protostub is to interwork with a legacy domain.\n * @param {URL.URL} runtimeProtostubURL The runtime URL of the Protostub\n * @return {boolean}\n */\n\n }, {\n key: 'isInterworkingProtoStub',\n value: function isInterworkingProtoStub(runtimeProtostubURL) {\n\n var _this = this;\n\n if (!runtimeProtostubURL.includes('/protostub/')) {\n return false;\n }\n\n var filtered = (0, _keys2.default)(_this.protostubsList).filter(function (key) {\n return _this.protostubsList[key].url === runtimeProtostubURL;\n }).map(function (key) {\n\n if (_this.protostubsList[key].hasOwnProperty('interworking')) {\n return _this.protostubsList[key].interworking;\n } else {\n return false;\n }\n })[0];\n\n return filtered;\n }\n }, {\n key: 'loader',\n set: function set(loader) {\n var _this = this;\n _this._loader = loader;\n },\n get: function get() {\n var _this = this;\n return _this._loader;\n }\n\n /**\n * return the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n\n }, {\n key: 'messageBus',\n get: function get() {\n var _this = this;\n return _this._messageBus;\n }\n\n /**\n * Set the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n ,\n set: function set(messageBus) {\n var _this = this;\n _this._messageBus = messageBus;\n\n _this._messageBus.addListener(_this.registryURL, function (msg) {\n\n // log.log('[Registry listener] ', msg);\n\n var isHyperty = (0, _utils.isHypertyURL)(msg.from);\n var hasCriteria = msg.body.hasOwnProperty('criteria');\n var isURLResource = void 0;\n var isUserResource = void 0;\n var isHypertyResource = void 0;\n\n if (msg.body.hasOwnProperty('resource') && msg.body.resource !== '.') {\n isURLResource = (0, _utils.isURL)(msg.body.resource);\n isUserResource = (0, _utils.isUserURL)(msg.body.resource);\n isHypertyResource = (0, _utils.isHypertyURL)(msg.body.resource);\n }\n var isDelete = msg.type === 'delete';\n var hasName = void 0;\n var hasUser = void 0;\n\n if (msg.body.hasOwnProperty('value')) {\n hasName = msg.body.value.hasOwnProperty('name');\n hasUser = msg.body.value.hasOwnProperty('user');\n }\n\n if (msg.type === 'response') {\n log.error('[Register listener] skipping ', msg);\n return;\n }\n\n // msg sent by identity manager library\n var userUrl = _this._getIdentityAssociated(msg.body.resource, msg.body.criteria);\n\n var reply = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: { resource: userUrl } };\n reply.body.code = userUrl ? 200 : 404;\n\n _this._messageBus.postMessage(reply);\n });\n\n // Install AddressAllocation\n var addressAllocation = _AddressAllocation2.default.instance;\n _this.addressAllocation = addressAllocation;\n\n // log.log('[Registry - AddressAllocation] - ', addressAllocation);\n }\n }]);\n return Registry;\n}();\n\nexports.default = Registry;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDM5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9yZWdpc3RyeS9SZWdpc3RyeS5qcz82MTZlIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1JTQ0hVTkcgRS5WXG4qIENvcHlyaWdodCAyMDE2IE9SQU5HRSBTQVxuKiBDb3B5cmlnaHQgMjAxNiBEZXV0c2NoZSBUZWxla29tIEFHXG4qIENvcHlyaWdodCAyMDE2IEFwaXplZVxuKiBDb3B5cmlnaHQgMjAxNiBURUNITklTQ0hFIFVOSVZFUlNJVEFUIEJFUkxJTlxuKlxuKiBMaWNlbnNlZCB1bmRlciB0aG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gPSBhZGRyZXNzVVJMLmFkZHJlc3M7XG4gICAgICAgICAgICAgIF90aGlzLnN0b3JhZ2VNYW5hZ2VyLnNldCgncmVnaXN0cnk6SHlwZXJ0eVVSTHMnLCAwLCB1cmxzTGlzdCkudGhlbigoKSA9PiB7XG5cbiAgICAgICAgICAgICAgICBfdGhpcy5yZWdpc3RyeURvbWFpbiA9IGRvbWFpblVybDtcblxuICAgICAgICAgICAgICAgIC8vY2hlY2sgd2hldGhlciB0aGUgcmVjZWl2ZWQgc2FuYm94IGUgQXBwbGljYXRpb25TYW5kYm94IG9yIGEgbm9ybWFsIHNhbmRib3hcbiAgICAgICAgICAgICAgICBpZiAoc2FuZGJveC50eXBlID09PSAnYXBwJykge1xuICAgICAgICAgICAgICAgICAgX3RoaXMuc2FuZGJveGVzTGlzdC5hcHBTYW5kYm94W2FkZHJlc3NVUkwuYWRkcmVzc1swXV0gPSBzYW5kYm94O1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc2FuZGJveC50eXBlID09PSAnbm9ybWFsJykge1xuICAgICAgICAgICAgICAgICAgX3RoaXMuc2FuZGJveGVzTGlzdC5zYW5kYm94W2FkZHJlc3NVUkwuYWRkcmVzc1swXV0gPSBzYW5kYm94O1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICByZWplY3QoJ1dyb25nIFNhbmRib3hUeXBlJyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGV0IHAycEhhbmRsZXI7XG4gICAgICAgICAgICAgICAgbGV0IHAycFJlcXVlc3RlcjtcblxuICAgICAgICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhfdGhpcy5wMnBIYW5kbGVyU3R1YikubGVuZ3RoICE9PSAwKSB7XG4gICAgICAgICAgICAgICAgICBwMnBIYW5kbGVyID0gX3RoaXMucDJwSGFuZGxlclN0dWJbX3RoaXMucnVudGltZVVSTF0udXJsO1xuICAgICAgICAgICAgICAgICAgcDJ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GRyZXNzWzBdLCB2YWx1ZTogeyBzdGF0dXM6ICdsaXZlJywgdXNlcjogZW1haWxVUkwgfX1cbiAgICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICAgIGlmIChwMnBIYW5kbGVyKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYm9keS52YWx1ZS5wMnBIYW5kbGVyID0gcDJwSGFuZGxlcjtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ib2R5LnZhbHVlLnAycFJlcXVlc3RlciA9IHAycFJlcXVlc3RlcjtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBsb2cubG9nKCdbUmVnaXN0cnkgcmVnaXN0ZXJIeXBlcnR5XSBIeXBlcnR5IHJlZ2lzdHJhdGlvbiBhdCBkb21haW4gcmVnaXN0cnkgIC0gJywgbWVzc2FnZSk7XG5cbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgX3RoaXMuX21lc3NhZ2VCdXMucG9zdE1lc3NhZ2VXaXRoUmV0cmllcyhtZXNzYWdlLCBfdGhpcy5yZWdpc3RyYXRpb25SZXRyaWVzLCAocmVwbHkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgLy8gbG9nLmxvZygnW1JlZ2lzdHJ5IHJlZ2lzdGVySHlwZXJ0eV0gSHlwZXJ0eSByZWdpc3RyYXRpb24gcmVzcG9uc2U6ICcsIHJlcGx5KTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAocmVwbHkuYm9keS5jb2RlID09PSAyMDApIHtcbiAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0geyB1cmw6IGFkZHJlc3NVUkwuYWRkcmVzc1swXX07XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKHAycEhhbmRsZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wMnBIYW5kbGVyID0gcDJwSGFuZGxlcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wMnBSZXF1ZXN0ZXIgPSBwMnBSZXF1ZXN0ZXI7XG4gICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXN1bHQpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcGx5LmJvZHkuY29kZSA9PT0gNDA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgLy8gbG9nLmxvZygnW1JlZ2lzdHJ5IHJlZ2lzdGVySHlwZXJ0eV0gVGhlIHVwZGF0ZSB3YXMgbm90IHBvc3NpYmxlLiBSZWdpc3RlcmluZyBuZXcgSHlwZXJ0eSBhdCBkb21haW4gcmVnaXN0cnknKTtcblxuICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VWYWx1ZSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVzZXI6IGVtYWlsVVJMLFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvcjogZGVzY3JpcHRvclVSTCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogYWRkcmVzc1VSTC5hZGRyZXNzWzBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXhwaXJlczogcmVnaXN0cmF0aW9uRXhwaXJlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlczogaHlwZXJ0eUNhcGFiaWxpdGllcy5yZXNvdXJjZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhU2NoZW1lczogaHlwZXJ0eUNhcGFiaWxpdGllcy5kYXRhU2NoZW1hLFxuICAgICAgICAgICAgICAgICAgICAgICAgcnVudGltZTogcnVudGltZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1czogc3RhdHVzXG4gICAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAgIGlmIChwMnBIYW5kbGVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlVmFsdWUucDJwSGFuZGxlciA9IHAycEhhbmRsZXI7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlVmFsdWUucDJwUmVxdWVzdGVyID0gcDJwUmVxdWVzdGVyO1xuICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSB7dHlwZTogJ2NyZWF0ZScsIGZyb206IF90aGlzLnJlZ2lzdHJ5VVJMLCB0bzogJ2RvbWFpbjovL3JlZ2lzdHJ5LicgKyBfdGhpcy5yZWdpc3RyeURvbWFpbiwgYm9keToge3ZhbHVlOiBtZXNzYWdlVmFsdWUsIHBvbGljeTogJ3BvbGljeSd9fTtcblxuICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5fbWVzc2FnZUJ1cy5wb3N0TWVzc2FnZVdpdGhSZXRyaWVzKG1lc3NhZ2UsIF90aGlzLnJlZ2lzdHJhdGlvblJldHJpZXMsIChyZXBseSkgPT57XG4gICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZy5sb2coJ1tSZWdpc3RyeSByZWdpc3Rlckh5cGVydHldIEh5cGVydHkgcmVnaXN0cmF0aW9uIHVwZGF0ZSByZXNwb25zZTogJywgcmVwbHkpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXBseS5ib2R5LmNvZGUgPT09IDIwMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXN1bHQgPSB7IHVybDogYWRkcmVzc1VSTC5hZGRyZXNzWzBdfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocDJwSGFuZGxlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnAycEhhbmRsZXIgPSBwMnBIYW5kbGVyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnAycFJlcXVlc3RlciA9IHAycFJlcXVlc3RlcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZhaWxlZCB0byByZWdpc3RlciBhbiBIeXBlcnR5OiAnICsgcmVwbHkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZy5lcnJvcihlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlKTtcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB0aHJvdyBuZXcgRXJyb3IoJ0ZhaWxlZCB0byByZWdpc3RlciBhbiBIeXBlcnR5OiAnLCByZXBseSk7XG5cbiAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgbG9nLmVycm9yKGUpO1xuICAgICAgICAgICAgICAgICAgcmVqZWN0KGUpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vdGltZXIgdG8ga2VlcCB0aGUgcmVnaXN0cmF0aW9uIGFsaXZlXG4gICAgICAgICAgICAgICAgLy8gdGhlIHRpbWUgaXMgZGVmaW5lZCBieSBhIGxpdHRsZSBsZXNzIHRoYW4gaGFsZiBvZiB0aGUgZXhwaXJlcyB0aW1lIGRlZmluZWRcbiAgICAgICAgICAgICAgICBsZXQga2VlcEFsaXZlVGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpIHtcblxuICAgICAgICAgICAgICAgICAgbGV0IG1lc3NhZ2UgPSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICd1cGRhdGUnLFxuICAgICAgICAgICAgICAgICAgICBmcm9tOiBfdGhpcy5yZWdpc3RyeVVSTCxcbiAgICAgICAgICAgICAgICAgICAgdG86ICdkb21haW46Ly9yZWdpc3RyeS4nICsgX3RoaXMucmVnaXN0cnlEb21haW4sXG4gICAgICAgICAgICAgICAgICAgIGJvZHk6IHsgcmVzb3VyY2U6IGFkZHJlc3NVUkwuYWRkcmVzc1swXSwgdmFsdWU6IHtzdGF0dXM6ICdsaXZlJ30sIG1ldGhvZDogJ3JlZnJlc2gnIH19O1xuXG4gICAgICAgICAgICAgICAgICBfdGhpcy5fbWVzc2FnZUJ1cy5wb3N0TWVzc2FnZShtZXNzYWdlLCAocmVwbHkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgLy8gbG9nLmxvZygnW1JlZ2lzdHJ5IHJlZ2lzdGVySHlwZXJ0eV0gS2VlcEFsaXZlIFJlcGx5OiAnLCByZXBseSk7XG4gICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9LCAoKChyZWdpc3RyYXRpb25FeHBpcmVzIC8gMS4xKSAvIDIpICogMTAwMCkpO1xuXG4gICAgICAgICAgICAgIH0pLmNhdGNoKGZ1bmN0aW9uKHJlYXNvbikge1xuICAgICAgICAgICAgICAgIC8vIGxvZy5sb2coJ1tSZWdpc3RyeSByZWdpc3Rlckh5cGVydHldIEVycm9yOiAnLCByZWFzb24pO1xuICAgICAgICAgICAgICAgIHJlamVjdChyZWFzb24pO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9LCBmdW5jdGlvbihlcnIpIHtcbiAgICAgICAgcmVqZWN0KCdbUmVnaXN0cnkgcmVnaXN0ZXJIeXBlcnR5XSAnLCBlcnIpO1xuICAgICAgfSk7XG4gICAgfS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R1YklEID0gc3R1YklELnN1YnN0cmluZyhzdHViSUQuaW5kZXhPZignLicpICsgMSk7XG4gICAgICB9Ki9cblxuICAgICAgbGV0IFAyUFJlcXVlc3RlclN0dWI7XG5cbiAgICAgIGlmIChwMnBDb25maWcpIHtcblxuICAgICAgICBpZiAocDJwQ29uZmlnLmhhc093blByb3BlcnR5KCdpc0hhbmRsZXJTdHViJykgJiYgcDJwQ29uZmlnLmlzSGFuZGxlclN0dWIpIHtcbiAgICAgICAgICBydW50aW1lUHJvdG9TdHViVVJMID0gX3RoaXMucDJwSGFuZGxlclVSTDtcblxuICAgICAgICAgIF90aGlzLnAycEhhbmRsZXJTdHViW3N0dWJJRF0gPSB7XG4gICAgICAgICAgICB1cmw6IHJ1bnRpbWVQcm90b1N0dWJVUkwsXG4gICAgICAgICAgICBzdGF0dXM6IFNUQVRVUy5DUkVBVEVEXG4gICAgICAgICAgfTtcblxuICAgICAgICAgIF90aGlzLnAycEhhbmRsZXJBc3NvY2lhdGlvbltfdGhpcy5ydW50aW1lVVJMXSA9IFtdO1xuXG4gICAgICAgICAgX3RoaXMuc2FuZGJveGVzTGlzdC5zYW5kYm94W3J1bnRpbWVQcm90b1N0dWJVUkxdID0gc2FuZGJveDtcbiAgICAgICAgICBsb2cuaW5mbygnW1JlZ2lzdHJ5IC0gcmVnaXN0ZXJTdHViIC0gUDJQSGFuZGxlclN0dWJdIC0gJywgc3R1YklELCAnIC0gJywgcnVudGltZVByb3RvU3R1YlVSTCk7XG4gICAgICAgICAgcmVzb2x2ZShfdGhpcy5wMnBIYW5kbGVyU3R1YltzdHViSURdKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBQMlBSZXF1ZXN0ZXJTdHViID0gcDJwQ29uZmlnLnAycFJlcXVlc3RlclN0dWI7XG4gICAgICAgICAgcnVudGltZVByb3RvU3R1YlVSTCA9ICdydW50aW1lOi8vJyArIGRpdmlkZVVSTChwMnBDb25maWcucmVtb3RlUnVudGltZVVSTCkuZG9tYWluICsgJy9wMnByZXF1ZXN0ZXIvJyArIGdlbmVyYXRlR1VJRCgpO1xuICAgICAgICAgIGxvZy5pbmZvKCdbUmVnaXN0cnkgLSByZWdpc3RlclN0dWIgLSBQMlBSZXF1ZXN0ZXJTdHViXSAtICcsIFAyUFJlcXVlc3RlclN0dWIsICcgLSAnLCBydW50aW1lUHJvdG9TdHViVVJMKTtcblxuICAgICAgICAgIC8vIHRvIGJlIGNsYXJpZmllZCB3aGF0IGlzIHRoaXMgcDJwSGFuZGxlckFzc29jaWF0aW9uXG4gICAgICAgICAgX3RoaXMucDJwSGFuZGxlckFzc29jaWF0aW9uW190aGlzLnJ1bnRpbWVVUkxdLnB1c2gocnVudGltZVByb3RvU3R1YlVSTCk7XG4gICAgICAgICAgX3RoaXMucDJwUmVxdWVzdGVyU3R1YltzdHViSURdID0ge1xuICAgICAgICAgICAgdXJsOiBydW50aW1lUHJvdG9TdHViVVJMLFxuICAgICAgICAgICAgc3RhdHVzOiBTVEFUVVMuQ1JFQVRFRFxuICAgICAgICAgIH07XG5cbiAgICAgICAgICBfdGhpcy5zYW5kYm94ZXNMaXN0LnNhbmRib3hbcnVudGltZVByb3RvU3R1YlVSTF0gPSBzYW5kYm94O1xuXG4gICAgICAgICAgLy9TZXR1cCBQMlAgUmVxdWVzdGVyIHBhdGggaW50byBNTlxuXG4gICAgICAgICAgbGV0IG1zZyA9IHtcbiAgICAgICAgICAgIHR5cGU6ICdzdWJzY3JpYmUnLFxuICAgICAgICAgICAgZnJvbTogX3RoaXMucmVnaXN0cnlVUkwsXG4gICAgICAgICAgICB0bzogJ2RvbWFpbjovL21zZy1ub2RlLicgKyBfdGhpcy5fZG9tYWluICsgJy9zbScsXG4gICAgICAgICAgICBib2R5OiB7XG4gICAgICAgICAgICAgIHN1YnNjcmliZTogW3J1bnRpbWVQcm90b1N0dWJVUkxdLFxuICAgICAgICAgICAgICBzb3VyY2U6IF90aGlzLnJlZ2lzdHJ5VVJMXG4gICAgICAgICAgIC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mb3IgKGxldCBzYW5kYm94IGluIF90aGlzLnNhbmRib3hlc0xpc3Quc2FuZGJveCkge1xuICAgICAgICAgICAgLy90b2RvOiB1bmNvbW1lbnQgc2FuZGJveCBjb25zdHJhaW50cyBtYXRjaCBjb25kaXRpb24gd2l0aCBydW50aW1lIHNoYXJpbmdcbiAgICAgICAgICAgIGlmIChzYW5kYm94LmluY2x1ZGVzKGRvbWFpbikgJiYgX3RoaXMuc2FuZGJveGVzTGlzdC5zYW5kYm94W3NhbmRib3hdLm1hdGNoZXMoY29uc3RyYWludHMpKSB7XG4gICAgICAgICAgICAgIGNvbnN0IGN1cnJlbnQgPSBfdGhpcy5zYW5kYm94ZXNMaXN0LnNhbmRib3hbc2FuZGJveF07XG4gICAgICAgICAgICAgIGNvbnN0IG1hdGNoID0gT2JqZWN0LmtleXMoY29uc3RyYWludHMpLmZpbHRlcihjb25zdHJhaW50ID0+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gKGNvbnN0cmFpbnQgPT09ICdicm93c2VyJyAmJiBjdXJyZW50LnR5cGUgPT09IFNhbmRib3hUeXBlLk5PUk1BTCkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAoY29uc3RyYWludCA9PT0gJ3dpbmRvd1NhbmJveCcgJiYgY3VycmVudC50eXBlID09PSBTYW5kYm94VHlwZS5XSU5ET1cpO1xuXG4gICAgICAgICAgICAgIH0pLmxlbmd0aCA+IDAgPyB0cnVlIDogZmFsc2U7XG5cbiAgICAgICAgICAgICAgaWYgKG1hdGNoKSB7IHJlcXVlc3QgPSBjdXJyZW50OyB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoIXJlcXVlc3QpIHtcbiAgICAgICAgcmVqZWN0KCdubyBzYW5kYm94IGZvdW5kIGZvcjogJyArIHVybCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXNvbHZlKHJlc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G9tYWluO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKCFkb21haW5VcmwuaW5kZXhPZignbXNnLW5vZGUuJykgfHwgIWRvbWFpblVybC5pbmRleE9mKCdyZWdpc3RyeS4nKSkge1xuICAgICAgICAgIGRvbWFpblVybCA9IGRvbWFpblVybC5zdWJzdHJpbmcoZG9tYWluVXJsLmluZGV4T2YoJy4nKSArIDEpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIF90aGlzLmlzTGVnYWN5KHVybCkudGhlbigoaXNMZWdhY3kpID0+IHtcblxuICAgICAgICAvLyBpZiBsZWdhY3kgaXQgc2hvdWxkIHJlc29sdmUgZm9yIDxwcm90b2NvbD4uPGRvbWFpbj5cbiAgICAgICAgaWYgKGlzTGVnYWN5ICYmIHR5cGUgIT09ICdkb21haW4taWRwJykge1xuICAgICAgICAgIGRvbWFpblVybCA9IHR5cGUgKyAnLicgKyBnZXRVc2VySWRlbnRpdHlEb21haW4odXJsKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGxvZy5pbmZvKCdbUmVnaXN0cnkucmVzb2x2ZV0gZG9tYWluVXJsOicsIGRvbWFpblVybCk7XG5cbiAgICAgICAgbGV0IHJlZ2lzdHJlZENvbXBvbmVudDtcblxuICAgICAgICBpZiAodHlwZSA9PT0gJ2RvbWFpbi1pZHAnKSB7XG4gICAgICAgICAgcmVnaXN0cmVkQ29tcG9uZW50ICA9IF90aGlzLmlkcFByb3h5TGlzdC5oYXNPd25Qcm9wZXJ0eShkb21haW5VcmwpID8gX3RoaXMuaWRwUHJveHlMaXN0W2RvbWFpblVybF0gOiBmYWxzZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZWdpc3RyZWRDb21wb25lbnQgID0gX3RoaXMucHJvdG9zdHVic0xpc3QuaGFzT3duUHJvcGVydHkoZG9tYWluVXJsKSA/IF90aGlzLnByb3Rvc3R1YnNMaXN0W2RvbWFpblVybF0gOiBmYWxzZTtcbiAgICAgIC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lLnJlY29ubmVjdFAyUFJlcXVlc3RlcihwMnBDb25uZWN0aW9uKS50aGVuKChyZXR1cm5VUkwpID0+IHtcbiAgICAgICAgICAgICAgICAvLyBsb2cubG9nKCdbUmVnaXN0cnkgLSBSZXNvbHZlXSAtIHdhcyByZWNvbm5lY3RlZCB3aXRoIHAycFJlcXVlc3RlclN0dWJ0OiAnLCByZXR1cm5VUkwpO1xuICAgICAgICAgICAgICAgIHJlc29sdmUocmV0dXJuVVJMKTtcbiAgICAgICAgICAgICAgfSwgKHJlYXNvbikgPT4ge1xuICAgICAgICAgICAgICAgIGxvZy5pbmZvKCdbUmVnaXN0cnkgLSBSZXNvbHZlXSAtIFJlYXNvbjogJywgcmVhc29uKTtcblxuICAgICAgICAgICAgICAgIF90aGlzLnJlc29sdmVOb3JtYWxTdHViKHVybCkudGhlbigocmV0dXJuVVJMKSA9PiB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKHJldHVyblVSTCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG5cbiAgICAgICAgICAgICAgbG9nLmluZm8oJ1tSZWdpc3RyeSAtIHJlc29sdmVdIC0gUDJQOiAnLCBwMnApO1xuICAgICAgICAgICAgICBpZiAoIXAycCkgeyAvLyBubyBwMnAgY29ubmVjdGlvbiBleGlzdHMgYW5kIHRoZSBtZXNzYWdlIHNlbmRlciBkb2VzIG5vdCBhc2sgb25lLiBMZXRzIHVzZSB0aGUgTU4gU3R1YlxuICAgICAgICAgICAgICAgIF90aGlzLnJlc29sdmVOb3JtYWxTdHViKHVybCkudGhlbigocmV0dXJuVVJMKSA9PiB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKHJldHVyblVSTCk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5fc2V0dXBQMlBSZXF1ZXN0ZXIocmVnaXN0ZXJlZFAyUCkudGhlbigocmV0dXJuVVJMKSA9PiB7IC8vIG5vIHAycCBjb25uZWN0aW9uIGV4aXN0cyBidXQgdGhlIG1lc3NhZ2Ugc2VuZGVyIGlzIGFza2luZyBvbmUuIExldHMgdHJ5IHRvIHNldHVwIG9uZVxuICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXR1cm5VUkwpO1xuICAgICAgICAgICAgICAgIH0sIChyZWFzb24pID0+IHtcbiAgICAgICAgICAgICAgICAgIGxvZy5pbmZvKCdbUmVnaXN0cnkgLSBSZXNvbHZlXSAtIFJlYXNvbjogJywgcmVhc29uKTtcblxuICAgICAgICAgICAgICAgICAgX3RoaXMucmVzb2x2ZU5vcm1hbFN0dWIodXJsKS50aGVuKChyZXR1cm5VUkwpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXR1cm5VUkwpO1xuICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9LCAocmVhc29uKSA9PiB7XG4gICAgICAgICAgbG9nLmluZm8oJ1tSZWdpc3RyeSAtIFJlc29sdmVdIC0gUmVhc29uOiAnLCByZWFzb24pO1xuXG4gICAgICAgICAgX3RoaXMucmVzb2x2ZU5vcm1hbFN0dWIodXJsKS50aGVuKChyZXR1cm5VUkwpID0+IHtcbiAgICAgICAgICAgIHJlc29sdmUocmV0dXJuVVJMKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICB9KTtcbiAgfVxuXG4gIF9zZXR1cFAyUFJlcXVlc3RlcihpbnB1dCkge1xuICAgIGxldCBfdGhpcyA9IHRoaXM7XG5cbiAgICBsb2cubG9nKCdbUmVnaXN0cnkuX3NldHVwUDJQQ29ubmVjdGlvbl0gbG9hZFN0dWIgd2l0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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7Ozs7QUFNQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQTVyREE7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQXduREE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///439\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(441);\nmodule.exports = __webpack_require__(13).Object.keys;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3Qva2V5cy5qcz84YzU2Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2Lm9iamVjdC5rZXlzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5PYmplY3Qua2V5cztcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3Qva2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gNDQwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///440\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.14 Object.keys(O)\nvar toObject = __webpack_require__(76);\nvar $keys = __webpack_require__(67);\n\n__webpack_require__(97)('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3Qua2V5cy5qcz8wOWRjIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi4xNCBPYmplY3Qua2V5cyhPKVxudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgJGtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cycpO1xuXG5yZXF1aXJlKCcuL19vYmplY3Qtc2FwJykoJ2tleXMnLCBmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBmdW5jdGlvbiBrZXlzKGl0KSB7XG4gICAgcmV0dXJuICRrZXlzKHRvT2JqZWN0KGl0KSk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3Qua2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gNDQxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///441\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SandboxType = undefined;\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _SandboxRegistry = __webpack_require__(462);\n\nvar _SandboxRegistry2 = _interopRequireDefault(_SandboxRegistry);\n\nvar _MiniBus2 = __webpack_require__(463);\n\nvar _MiniBus3 = _interopRequireDefault(_MiniBus2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\nvar SandboxType = exports.SandboxType = { APP: 'app', NORMAL: 'normal', WINDOW: 'window' };\n\n/**\n * @author micaelpedrosa@gmail.com\n * Base class to implement external sandbox component\n */\n\nvar Sandbox = function (_MiniBus) {\n (0, _inherits3.default)(Sandbox, _MiniBus);\n\n function Sandbox(capabilities) {\n (0, _classCallCheck3.default)(this, Sandbox);\n\n var _this2 = (0, _possibleConstructorReturn3.default)(this, (Sandbox.__proto__ || (0, _getPrototypeOf2.default)(Sandbox)).call(this));\n\n var _this = _this2;\n\n if (capabilities) {\n _this.capabilities = capabilities;\n }\n\n return _this2;\n }\n\n /**\n * Deploy an instance of the component into the sandbox.\n * @param {string} componentSourceCode Component source code (Hyperty, ProtoStub, etc)\n * @param {URL} componentURL Hyperty, ProtoStub, or any other component address.\n * @param {Config} configuration Config parameters of the component\n * @return {Promise} return deployed if successful, or any other string with an error\n */\n\n\n (0, _createClass3.default)(Sandbox, [{\n key: 'deployComponent',\n value: function deployComponent(componentSourceCode, componentURL, configuration) {\n\n var _this = this;\n\n // let messageFactory = _this.messageFactory;\n\n return new _promise2.default(function (resolve, reject) {\n //FLOW-OUT: deploy message for the internal SandboxRegistry -> _onDeploy\n var deployMessage = {\n type: 'create', from: _SandboxRegistry2.default.ExternalDeployAddress, to: _SandboxRegistry2.default.InternalDeployAddress,\n body: { url: componentURL, sourceCode: componentSourceCode, config: configuration }\n };\n\n //send message into the sandbox internals and wait for reply\n _this.postMessage(deployMessage, function (reply) {\n if (reply.body.code === 200) {\n //is this response complaint with the spec?\n resolve('deployed');\n } else {\n reject(reply.body.desc);\n }\n });\n });\n }\n\n /**\n * Remove the instance of a previously deployed component.\n * @param {URL} componentURL Hyperty, ProtoStub, or any other component address.\n * @return {Promise} return undeployed if successful, or any other string with an error\n */\n\n }, {\n key: 'removeComponent',\n value: function removeComponent(componentURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n //FLOW-OUT: un-deploy message for the internal SandboxRegistry -> _onRemove\n var removeMessage = {\n type: 'delete', from: _SandboxRegistry2.default.ExternalDeployAddress, to: _SandboxRegistry2.default.InternalDeployAddress,\n body: { url: componentURL }\n };\n\n //send message into the sandbox internals and wait for reply\n _this.postMessage(removeMessage, function (reply) {\n if (reply.body.code === 200) {\n //is this response complaint with the spec?\n resolve('undeployed');\n } else {\n reject(reply.body.desc);\n }\n });\n });\n }\n\n /**\n * Matches Sandbox capabilities against provided capabilities. Used to check if sandbox provides all required capabilities\n * @param {RuntimeCapabilities} constraints set of RuntimeCapabilities to match with.\n * @return {boolean} return true if constraints are matched false otherwise\n */\n\n }, {\n key: 'matches',\n value: function matches(constraints) {\n var _this = this;\n\n var filtered = (0, _keys2.default)(constraints).filter(function (key) {\n return !(_this.capabilities[key] && _this.capabilities[key] === constraints[key]);\n });\n\n if (filtered.length === 0) {\n return true;\n } else {\n return !constraints[filtered];\n }\n }\n }]);\n return Sandbox;\n}(_MiniBus3.default);\n\nexports.default = Sandbox;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zYW5kYm94L1NhbmRib3guanM/MGEzMyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiog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QTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7Ozs7O0FBSUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///442\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(444);\nmodule.exports = __webpack_require__(13).Object.getPrototypeOf;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvZ2V0LXByb3RvdHlwZS1vZi5qcz83ZDJlIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2Lm9iamVjdC5nZXQtcHJvdG90eXBlLW9mJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5PYmplY3QuZ2V0UHJvdG90eXBlT2Y7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L2dldC1wcm90b3R5cGUtb2YuanNcbi8vIG1vZHVsZSBpZCA9IDQ0M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///443\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = __webpack_require__(76);\nvar $getPrototypeOf = __webpack_require__(189);\n\n__webpack_require__(97)('getPrototypeOf', function () {\n return function getPrototypeOf(it) {\n return $getPrototypeOf(toObject(it));\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuZ2V0LXByb3RvdHlwZS1vZi5qcz8yYTFlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi45IE9iamVjdC5nZXRQcm90b3R5cGVPZihPKVxudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgJGdldFByb3RvdHlwZU9mID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdwbycpO1xuXG5yZXF1aXJlKCcuL19vYmplY3Qtc2FwJykoJ2dldFByb3RvdHlwZU9mJywgZnVuY3Rpb24gKCkge1xuICByZXR1cm4gZnVuY3Rpb24gZ2V0UHJvdG90eXBlT2YoaXQpIHtcbiAgICByZXR1cm4gJGdldFByb3RvdHlwZU9mKHRvT2JqZWN0KGl0KSk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuZ2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gNDQ0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///444\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(446), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9zeW1ib2wvaXRlcmF0b3IuanM/NjczOCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHsgXCJkZWZhdWx0XCI6IHJlcXVpcmUoXCJjb3JlLWpzL2xpYnJhcnkvZm4vc3ltYm9sL2l0ZXJhdG9yXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL3N5bWJvbC9pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gNDQ1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///445\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(128);\n__webpack_require__(190);\nmodule.exports = __webpack_require__(141).f('iterator');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9zeW1ib2wvaXRlcmF0b3IuanM/ZmU3ZSJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNi5zdHJpbmcuaXRlcmF0b3InKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvd2ViLmRvbS5pdGVyYWJsZScpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL193a3MtZXh0JykuZignaXRlcmF0b3InKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9zeW1ib2wvaXRlcmF0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDQ0NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///446\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(448), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9zeW1ib2wuanM/ZTUwNSJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHsgXCJkZWZhdWx0XCI6IHJlcXVpcmUoXCJjb3JlLWpzL2xpYnJhcnkvZm4vc3ltYm9sXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL3N5bWJvbC5qc1xuLy8gbW9kdWxlIGlkID0gNDQ3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///447\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(449);\n__webpack_require__(182);\n__webpack_require__(454);\n__webpack_require__(455);\nmodule.exports = __webpack_require__(13).Symbol;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9zeW1ib2wvaW5kZXguanM/MDcwNyJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNi5zeW1ib2wnKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2Lm9iamVjdC50by1zdHJpbmcnKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM3LnN5bWJvbC5hc3luYy1pdGVyYXRvcicpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczcuc3ltYm9sLm9ic2VydmFibGUnKTtcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9fY29yZScpLlN5bWJvbDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9zeW1ib2wvaW5kZXguanNcbi8vIG1vZHVsZSBpZCA9IDQ0OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///448\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// ECMAScript 6 symbols shim\nvar global = __webpack_require__(22);\nvar has = __webpack_require__(59);\nvar DESCRIPTORS = __webpack_require__(44);\nvar $export = __webpack_require__(21);\nvar redefine = __webpack_require__(185);\nvar META = __webpack_require__(450).KEY;\nvar $fails = __webpack_require__(66);\nvar shared = __webpack_require__(136);\nvar setToStringTag = __webpack_require__(95);\nvar uid = __webpack_require__(94);\nvar wks = __webpack_require__(23);\nvar wksExt = __webpack_require__(141);\nvar wksDefine = __webpack_require__(142);\nvar enumKeys = __webpack_require__(451);\nvar isArray = __webpack_require__(452);\nvar anObject = __webpack_require__(41);\nvar isObject = __webpack_require__(36);\nvar toIObject = __webpack_require__(45);\nvar toPrimitive = __webpack_require__(132);\nvar createDesc = __webpack_require__(73);\nvar _create = __webpack_require__(133);\nvar gOPNExt = __webpack_require__(453);\nvar $GOPD = __webpack_require__(143);\nvar $DP = __webpack_require__(40);\nvar $keys = __webpack_require__(67);\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(202).f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(77).f = $propertyIsEnumerable;\n __webpack_require__(139).f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !__webpack_require__(92)) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(58)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5zeW1ib2wuanM/N2Q2NyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBFQ01BU2NyaXB0IDYgc3ltYm9scyBzaGltXG52YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgaGFzID0gcmVxdWlyZSgnLi9faGFzJyk7XG52YXIgREVTQ1JJUFRPUlMgPSByZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciByZWRlZmluZSA9IHJlcXVpcmUoJy4vX3JlZGVmaW5lJyk7XG52YXIgTUVUQSA9IHJlcXVpcmUoJy4vX21ldGEnKS5LRVk7XG52YXIgJGZhaWxzID0gcmVxdWlyZSgnLi9fZmFpbHMnKTtcbnZhciBzaGFyZWQgPSByZXF1aXJlKCcuL19zaGFyZWQnKTtcbnZhciBzZXRUb1N0cmluZ1RhZyA9IHJlcXVpcmUoJy4vX3NldC10by1zdHJpbmctdGFnJyk7XG52YXIgdWlkID0gcmVxdWlyZSgnLi9fdWlkJyk7XG52YXIgd2tzID0gcmVxdWlyZSgnLi9fd2tzJyk7XG52YXIgd2tzRXh0ID0gcmVxdWlyZSgnLi9fd2tzLWV4dCcpO1xudmFyIHdrc0RlZmluZSA9IHJlcX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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///449\n")},function(module,exports,__webpack_require__){eval("var META = __webpack_require__(94)('meta');\nvar isObject = __webpack_require__(36);\nvar has = __webpack_require__(59);\nvar setDesc = __webpack_require__(40).f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !__webpack_require__(66)(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19tZXRhLmpzP2QzYTMiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIE1FVEEgPSByZXF1aXJlKCcuL191aWQnKSgnbWV0YScpO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgaGFzID0gcmVxdWlyZSgnLi9faGFzJyk7XG52YXIgc2V0RGVzYyA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmY7XG52YXIgaWQgPSAwO1xudmFyIGlzRXh0ZW5zaWJsZSA9IE9iamVjdC5pc0V4dGVuc2libGUgfHwgZnVuY3Rpb24gKCkge1xuICByZXR1cm4gdHJ1ZTtcbn07XG52YXIgRlJFRVpFID0gIXJlcXVpcmUoJy4vX2ZhaWxzJykoZnVuY3Rpb24gKCkge1xuICByZXR1cm4gaXNFeHRlbnNpYmxlKE9iamVjdC5wcmV2ZW50RXh0ZW5zaW9ucyh7fSkpO1xufSk7XG52YXIgc2V0TWV0YSA9IGZ1bmN0aW9uIChpdCkge1xuICBzZXREZXNjKGl0LCBNRVRBLCB7IHZhbHVlOiB7XG4gICAgaTogJ08nICsgKytpZCwgLy8gb2JqZWN0IElEXG4gICAgdzoge30gICAgICAgICAgLy8gd2VhayBjb2xsZWN0aW9ucyBJRHNcbiAgfSB9KTtcbn07XG52YXIgZmFzdEtleSA9IGZ1bmN0aW9uIChpdCwgY3JlYXRlKSB7XG4gIC8vIHJldHVybiBwcmltaXRpdmUgd2l0aCBwcmVmaXhcbiAgaWYgKCFpc09iamVjdCh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iYgbWV0YS5ORUVEICYmIGlzRXh0ZW5zaWJsZShpdCkgJiYgIWhhcyhpdCwgTUVUQSkpIHNldE1ldGEoaXQpO1xuICByZXR1cm4gaXQ7XG59O1xudmFyIG1ldGEgPSBtb2R1bGUuZXhwb3J0cyA9IHtcbiAgS0VZOiBNRVRBLFxuICBORUVEOiBmYWxzZSxcbiAgZmFzdEtleTogZmFzdEtleSxcbiAgZ2V0V2VhazogZ2V0V2VhayxcbiAgb25GcmVlemU6IG9uRnJlZXplXG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX21ldGEuanNcbi8vIG1vZHVsZSBpZCA9IDQ1MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///450\n")},function(module,exports,__webpack_require__){eval("// all enumerable object keys, includes symbols\nvar getKeys = __webpack_require__(67);\nvar gOPS = __webpack_require__(139);\nvar pIE = __webpack_require__(77);\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19lbnVtLWtleXMuanM/NWRjZSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBhbGwgZW51bWVyYWJsZSBvYmplY3Qga2V5cywgaW5jbHVkZXMgc3ltYm9sc1xudmFyIGdldEtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cycpO1xudmFyIGdPUFMgPSByZXF1aXJlKCcuL19vYmplY3QtZ29wcycpO1xudmFyIHBJRSA9IHJlcXVpcmUoJy4vX29iamVjdC1waWUnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHZhciByZXN1bHQgPSBnZXRLZXlzKGl0KTtcbiAgdmFyIGdldFN5bWJvbHMgPSBnT1BTLmY7XG4gIGlmIChnZXRTeW1ib2xzKSB7XG4gICAgdmFyIHN5bWJvbHMgPSBnZXRTeW1ib2xzKGl0KTtcbiAgICB2YXIgaXNFbnVtID0gcElFLmY7XG4gICAgdmFyIGkgPSAwO1xuICAgIHZhciBrZXk7XG4gICAgd2hpbGUgKHN5bWJvbHMubGVuZ3RoID4gaSkgaWYgKGlzRW51bS5jYWxsKGl0LCBrZXkgPSBzeW1ib2xzW2krK10pKSByZXN1bHQucHVzaChrZXkpO1xuICB9IHJldHVybiByZXN1bHQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2VudW0ta2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gNDUxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///451\n")},function(module,exports,__webpack_require__){eval("// 7.2.2 IsArray(argument)\nvar cof = __webpack_require__(75);\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pcy1hcnJheS5qcz9lZDQzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMi4yIElzQXJyYXkoYXJndW1lbnQpXG52YXIgY29mID0gcmVxdWlyZSgnLi9fY29mJyk7XG5tb2R1bGUuZXhwb3J0cyA9IEFycmF5LmlzQXJyYXkgfHwgZnVuY3Rpb24gaXNBcnJheShhcmcpIHtcbiAgcmV0dXJuIGNvZihhcmcpID09ICdBcnJheSc7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lzLWFycmF5LmpzXG4vLyBtb2R1bGUgaWQgPSA0NTJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///452\n")},function(module,exports,__webpack_require__){eval("// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(45);\nvar gOPN = __webpack_require__(202).f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wbi1leHQuanM/NDZiNyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBmYWxsYmFjayBmb3IgSUUxMSBidWdneSBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyB3aXRoIGlmcmFtZSBhbmQgd2luZG93XG52YXIgdG9JT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8taW9iamVjdCcpO1xudmFyIGdPUE4gPSByZXF1aXJlKCcuL19vYmplY3QtZ29wbicpLmY7XG52YXIgdG9TdHJpbmcgPSB7fS50b1N0cmluZztcblxudmFyIHdpbmRvd05hbWVzID0gdHlwZW9mIHdpbmRvdyA9PSAnb2JqZWN0JyAmJiB3aW5kb3cgJiYgT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXNcbiAgPyBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyh3aW5kb3cpIDogW107XG5cbnZhciBnZXRXaW5kb3dOYW1lcyA9IGZ1bmN0aW9uIChpdCkge1xuICB0cnkge1xuICAgIHJldHVybiBnT1BOKGl0KTtcbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiB3aW5kb3dOYW1lcy5zbGljZSgpO1xuICB9XG59O1xuXG5tb2R1bGUuZXhwb3J0cy5mID0gZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlOYW1lcyhpdCkge1xuICByZXR1cm4gd2luZG93TmFtZXMgJiYgdG9TdHJpbmcuY2FsbChpdCkgPT0gJ1tvYmplY3QgV2luZG93XScgPyBnZXRXaW5kb3dOYW1lcyhpdCkgOiBnT1BOKHRvSU9iamVjdChpdCkpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wbi1leHQuanNcbi8vIG1vZHVsZSBpZCA9IDQ1M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///453\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(142)('asyncIterator');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5zeW1ib2wuYXN5bmMtaXRlcmF0b3IuanM/Mzk4OSJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuL193a3MtZGVmaW5lJykoJ2FzeW5jSXRlcmF0b3InKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5zeW1ib2wuYXN5bmMtaXRlcmF0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDQ1NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///454\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(142)('observable');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5zeW1ib2wub2JzZXJ2YWJsZS5qcz80MTY3Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3drcy1kZWZpbmUnKSgnb2JzZXJ2YWJsZScpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM3LnN5bWJvbC5vYnNlcnZhYmxlLmpzXG4vLyBtb2R1bGUgaWQgPSA0NTVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///455\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(457), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZi5qcz85MjIwIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0geyBcImRlZmF1bHRcIjogcmVxdWlyZShcImNvcmUtanMvbGlicmFyeS9mbi9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZlwiKSwgX19lc01vZHVsZTogdHJ1ZSB9O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gNDU2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///456\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(458);\nmodule.exports = __webpack_require__(13).Object.setPrototypeOf;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZi5qcz84YmYwIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2Lm9iamVjdC5zZXQtcHJvdG90eXBlLW9mJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5PYmplY3Quc2V0UHJvdG90eXBlT2Y7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L3NldC1wcm90b3R5cGUtb2YuanNcbi8vIG1vZHVsZSBpZCA9IDQ1N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///457\n")},function(module,exports,__webpack_require__){eval("// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = __webpack_require__(21);\n$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(459).set });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3Quc2V0LXByb3RvdHlwZS1vZi5qcz83YjE4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMy4xOSBPYmplY3Quc2V0UHJvdG90eXBlT2YoTywgcHJvdG8pXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuJGV4cG9ydCgkZXhwb3J0LlMsICdPYmplY3QnLCB7IHNldFByb3RvdHlwZU9mOiByZXF1aXJlKCcuL19zZXQtcHJvdG8nKS5zZXQgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczYub2JqZWN0LnNldC1wcm90b3R5cGUtb2YuanNcbi8vIG1vZHVsZSBpZCA9IDQ1OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///458\n")},function(module,exports,__webpack_require__){eval("// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = __webpack_require__(36);\nvar anObject = __webpack_require__(41);\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = __webpack_require__(65)(Function.call, __webpack_require__(143).f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zZXQtcHJvdG8uanM/NjVhNCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBXb3JrcyB3aXRoIF9fcHJvdG9fXyBvbmx5LiBPbGQgdjggY2FuJ3Qgd29yayB3aXRoIG51bGwgcHJvdG8gb2JqZWN0cy5cbi8qIGVzbGludC1kaXNhYmxlIG5vLXByb3RvICovXG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIGNoZWNrID0gZnVuY3Rpb24gKE8sIHByb3RvKSB7XG4gIGFuT2JqZWN0KE8pO1xuICBpZiAoIWlzT2JqZWN0KHByb3RvKSAmJiBwcm90byAhPT0gbnVsbCkgdGhyb3cgVHlwZUVycm9yKHByb3RvICsgXCI6IGNhbid0IHNldCBhcyBwcm90b3R5cGUhXCIpO1xufTtcbm1vZHVsZS5leHBvcnRzID0ge1xuICBzZXQ6IE9iamVjdC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BQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///459\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(461);\nvar $Object = __webpack_require__(13).Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvY3JlYXRlLmpzP2EwY2UiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmNyZWF0ZScpO1xudmFyICRPYmplY3QgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0O1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBjcmVhdGUoUCwgRCkge1xuICByZXR1cm4gJE9iamVjdC5jcmVhdGUoUCwgRCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9jcmVhdGUuanNcbi8vIG1vZHVsZSBpZCA9IDQ2MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///460\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(21);\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: __webpack_require__(133) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuY3JlYXRlLmpzP2IwNWYiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbi8vIDE5LjEuMi4yIC8gMTUuMi4zLjUgT2JqZWN0LmNyZWF0ZShPIFssIFByb3BlcnRpZXNdKVxuJGV4cG9ydCgkZXhwb3J0LlMsICdPYmplY3QnLCB7IGNyZWF0ZTogcmVxdWlyZSgnLi9fb2JqZWN0LWNyZWF0ZScpIH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5jcmVhdGUuanNcbi8vIG1vZHVsZSBpZCA9IDQ2MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///461\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n/**\n * @author micaelpedrosa@gmail.com\n * Base class to implement internal deploy manager of components.\n */\n\n/**\n * @author micaelpedrosa@gmail.com\n * Internal component registry of all sandboxes.\n * Process internal request's for component deploy.\n */\nvar SandboxRegistry = function () {\n /* private\n _components: \n */\n\n function SandboxRegistry(bus) {\n (0, _classCallCheck3.default)(this, SandboxRegistry);\n\n var _this = this;\n\n _this._bus = bus;\n _this._components = {};\n\n bus.addListener(SandboxRegistry.InternalDeployAddress, function (msg) {\n //console.log('SandboxRegistry-RCV: ', msg);\n // let responseMsg = {\n // id: msg.id, type: 'response', from: SandboxRegistry.InternalDeployAddress, to: SandboxRegistry.ExternalDeployAddress\n // };\n\n switch (msg.type) {\n case 'create':\n _this._onDeploy(msg);break;\n case 'delete':\n _this._onRemove(msg);break;\n }\n });\n }\n\n (0, _createClass3.default)(SandboxRegistry, [{\n key: '_responseMsg',\n value: function _responseMsg(msg, code, value) {\n\n var _this = this;\n\n // let messageFactory = _this.messageFactory;\n\n //FLOW-OUT: generic response message to external Sandbox (deploy and un-deploy responses)\n var responseMsg = {\n id: msg.id, type: 'response', from: SandboxRegistry.InternalDeployAddress, to: SandboxRegistry.ExternalDeployAddress\n };\n\n // Chanege the origin message, because the response;\n // msg.from = SandboxRegistry.InternalDeployAddress;\n // msg.to = SandboxRegistry.ExternalDeployAddress;\n\n var body = {};\n if (code) body.code = code;\n if (value) body.desc = value;\n\n responseMsg.body = body;\n\n // return messageFactory.createResponse(msg, code, value);\n return responseMsg;\n }\n\n //FLOW-IN: message from the runtime core Sandbox -> deployComponent\n\n }, {\n key: '_onDeploy',\n value: function _onDeploy(msg) {\n var _this = this;\n var config = msg.body.config;\n var componentURL = msg.body.url;\n var sourceCode = msg.body.sourceCode;\n var responseCode = void 0;\n var responseDesc = void 0;\n\n if (!_this._components.hasOwnProperty(componentURL)) {\n try {\n _this._components[componentURL] = _this._create(componentURL, sourceCode, config);\n responseCode = 200;\n } catch (error) {\n responseCode = 500;\n responseDesc = error;\n }\n } else {\n responseCode = 500;\n responseDesc = 'Instance ' + componentURL + ' already exist!';\n }\n\n var responseMsg = _this._responseMsg(msg, responseCode, responseDesc);\n _this._bus.postMessage(responseMsg);\n }\n\n //FLOW-IN: message from the runtime core Sandbox -> removeComponent\n\n }, {\n key: '_onRemove',\n value: function _onRemove(msg) {\n var _this = this;\n var componentURL = msg.body.url;\n var responseCode = void 0;\n var responseDesc = void 0;\n\n if (_this._components.hasOwnProperty(componentURL)) {\n //remove component from the pool and all listeners\n delete _this._components[componentURL];\n _this._bus.removeAllListenersOf(componentURL);\n responseCode = 200;\n } else {\n responseCode = 500;\n responseDesc = 'Instance ' + componentURL + ' doesn\\'t exist!';\n }\n\n var responseMsg = _this._responseMsg(msg, responseCode, responseDesc);\n\n _this._bus.postMessage(responseMsg);\n }\n\n /**\n * This method should be implemented by the internal sandbox code.\n * @param {ComponentURL} url URL used for the instance\n * @param {string} sourceCode Code of the component\n * @param {Config} config Configuration parameters\n * @return {Object} Returns instance of the component or throw an error \"throw 'error message'\"\n */\n\n }, {\n key: '_create',\n value: function _create(url, sourceCode, config) {\n //implementation specific\n /* example code:\n eval(sourceCode);\n return activate(url, _this._bus, config);\n */\n }\n }, {\n key: 'components',\n get: function get() {\n return this._components;\n }\n }]);\n return SandboxRegistry;\n}();\n\nSandboxRegistry.ExternalDeployAddress = 'hyperty-runtime://sandbox/external';\nSandboxRegistry.InternalDeployAddress = 'hyperty-runtime://sandbox/internal';\n\nexports.default = SandboxRegistry;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zYW5kYm94L1NhbmRib3hSZWdpc3RyeS5qcz9lZTFjIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1JTQ0hVTkcgRS5WXG4qIENvcHlyaWdodCAyMDE2IE9SQU5HRSBTQVxuKiBDb3B5cmlnaHQgMjAxNiBEZXV0c2NoZSBUZWxla29tIEFHXG4qIENvcHlyaWdodCAyMDE2IEFwaXplZVxuKiBDb3B5cmlnaHQgMjAxNiBURUNITklTQ0hFIFVOSVZFUlNJVEFUIEJFUkxJTlxuKlxuKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgXCJMaWNlbnNlXCIpO1xuKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuXG4qIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdFxuKlxuKiAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMFxuKlxuKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJ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BQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7Ozs7O0FBT0E7QUFDQTtBQUNBOzs7O0FBSUE7OztBQXhGQTtBQUFBO0FBQUE7Ozs7O0FBMkZBO0FBQ0E7QUFDQTtBQUNBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///462\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _Bus2 = __webpack_require__(204);\n\nvar _Bus3 = _interopRequireDefault(_Bus2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* @author micaelpedrosa@gmail.com\n* Message BUS Interface is an extension of the Bus\n* It is used mainly in the internal sandbox routing.\n*/\nvar MiniBus = function (_Bus) {\n (0, _inherits3.default)(MiniBus, _Bus);\n\n function MiniBus() {\n (0, _classCallCheck3.default)(this, MiniBus);\n return (0, _possibleConstructorReturn3.default)(this, (MiniBus.__proto__ || (0, _getPrototypeOf2.default)(MiniBus)).call(this));\n }\n\n /**\n * Post a message for routing. Message is routed directly to the external routing _onPostMessage.\n * @param {Message} inMsg JSON with mandatory Message structure {id, type, from, to}\n * @param {Callback} responseCallback Optional callback if a response is expected from the request. A response will be always sent, even if it is a \"Timeout\".\n * @return {number} the Message id\n */\n\n\n (0, _createClass3.default)(MiniBus, [{\n key: 'postMessage',\n value: function postMessage(inMsg, responseCallback, timeout) {\n var _this = this;\n\n _this._genId(inMsg);\n _this._responseCallback(inMsg, responseCallback, timeout);\n\n //always send to external (to core MessageBus)\n _this._onPostMessage(inMsg);\n\n return inMsg.id;\n }\n\n //internal method used when a message is received by an external routing system\n\n }, {\n key: '_onMessage',\n value: function _onMessage(msg) {\n var _this = this;\n\n if (!_this._onResponse(msg)) {\n var itemList = _this._subscriptions[msg.to];\n if (itemList) {\n _this._publishOn(itemList, msg);\n if (!msg.to.startsWith('hyperty')) {\n _this._publishOnDefault(msg);\n }\n } else {\n _this._publishOnDefault(msg);\n }\n }\n }\n }]);\n return MiniBus;\n}(_Bus3.default); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n\nexports.default = MiniBus;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9idXMvTWluaUJ1cy5qcz9lNTIwIl0sInNvdXJjZXNDb250ZW50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LCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFzQkE7QUFDQTs7Ozs7QUFDQTs7Ozs7QUFLQTs7O0FBRUE7QUFBQTtBQUFBO0FBRUE7QUFDQTtBQUNBOzs7Ozs7Ozs7O0FBTUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFwRUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQXdFQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///463\n")},function(module,exports,__webpack_require__){eval("var core = __webpack_require__(13);\nvar $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });\nmodule.exports = function stringify(it) { // eslint-disable-line no-unused-vars\n return $JSON.stringify.apply($JSON, arguments);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9qc29uL3N0cmluZ2lmeS5qcz9hYTQyIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBjb3JlID0gcmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9fY29yZScpO1xudmFyICRKU09OID0gY29yZS5KU09OIHx8IChjb3JlLkpTT04gPSB7IHN0cmluZ2lmeTogSlNPTi5zdHJpbmdpZnkgfSk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIHN0cmluZ2lmeShpdCkgeyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXVudXNlZC12YXJzXG4gIHJldHVybiAkSlNPTi5zdHJpbmdpZnkuYXBwbHkoJEpTT04sIGFyZ3VtZW50cyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL2pzb24vc3RyaW5naWZ5LmpzXG4vLyBtb2R1bGUgaWQgPSA0NjRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///464\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _RegistryDataModel2 = __webpack_require__(466);\n\nvar _RegistryDataModel3 = _interopRequireDefault(_RegistryDataModel2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* @author: Gil Dias (gil.dias@tecnico.ulisboa.pt)\n* HypertyInstance Data Model used to model instances of Hyperties running in devices and servers.\n*/\nvar HypertyInstance = function (_RegistryDataModel) {\n (0, _inherits3.default)(HypertyInstance, _RegistryDataModel);\n\n function HypertyInstance(id, url, descriptorURL, descriptor, hypertyURL, user, guid, runtime, context, p2pHandler, p2pRequester, dataSchemes, resources, startingTime, lastModified) {\n (0, _classCallCheck3.default)(this, HypertyInstance);\n\n var _this2 = (0, _possibleConstructorReturn3.default)(this, (HypertyInstance.__proto__ || (0, _getPrototypeOf2.default)(HypertyInstance)).call(this, id, url, descriptorURL, p2pRequester, startingTime, lastModified));\n\n var _this = _this2;\n _this._descriptor = descriptor;\n _this._hypertyURL = hypertyURL;\n _this._user = user;\n _this._guid = guid;\n _this._runtime = runtime;\n _this._context = context;\n _this._p2pHandler = p2pHandler;\n _this._dataSchemes = dataSchemes;\n _this._resources = resources;\n return _this2;\n }\n\n (0, _createClass3.default)(HypertyInstance, [{\n key: 'user',\n set: function set(identity) {\n var _this = this;\n _this.user = identity;\n },\n get: function get() {\n var _this = this;\n return _this._user;\n }\n }, {\n key: 'hypertyURL',\n get: function get() {\n var _this = this;\n return _this._hypertyURL;\n }\n }, {\n key: 'descriptor',\n get: function get() {\n var _this = this;\n return _this._descriptor;\n }\n }, {\n key: 'objectName',\n get: function get() {\n var _this = this;\n return _this._descriptor._objectName;\n }\n }, {\n key: 'p2pHandler',\n get: function get() {\n var _this = this;\n return _this._p2pHandler;\n }\n }, {\n key: 'dataSchemes',\n get: function get() {\n var _this = this;\n return _this._dataSchemes;\n }\n }, {\n key: 'resources',\n get: function get() {\n var _this = this;\n return _this._resources;\n }\n }, {\n key: 'runtimeURL',\n get: function get() {\n var _this = this;\n return _this._runtime;\n }\n }]);\n return HypertyInstance;\n}(_RegistryDataModel3.default); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n\nexports.default = HypertyInstance;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9yZWdpc3RyeS9IeXBlcnR5SW5zdGFuY2UuanM/Zjg1OSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE2IFFVT0JJUyBORVRXT1JLUyBTTFxuKiBDb3B5cmlnaHQgMjAxNiBGUkFVTkhPRkVSLUdFU0VMTFNDSEFGVCBaVVIgRk9FUkRFUlVORyBERVIgQU5HRVdBTkRURU4gRk9SU0NIVU5HIEUuVlxuKiBDb3B5cmlnaHQgMjAxNiBPUkFOR0UgU0FcbiogQ29weXJpZ2h0IDIwMTYgRGV1dHNjaGUgVGVsZWtvbSBBR1xuKiBDb3B5cmlnaHQgMjAxNiBBcGl6ZWVcbiogQ29weXJpZ2h0IDIwMTYgVEVDSE5JU0NIRSBVTklWRVJTSVRBVCBCRVJMSU5cbipcbiogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlIFwiTGljZW5zZVwiKTtcbiogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLlx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BQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBOzs7QUF2RkE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQTBGQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///465\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the "License");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an "AS IS" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n/**\n* @author: Gil Dias (gil.dias@tecnico.ulisboa.pt)\n* Registry Data Model includes all Objects to be handled by the Registry functionality including\n*/\nvar RegistryDataModel = function () {\n function RegistryDataModel(id, url, descriptorURL, p2pRequester, startingTime, lastModified, status, stubs, stubsConfiguration) {\n (0, _classCallCheck3.default)(this, RegistryDataModel);\n\n var _this = this;\n\n _this._id = id;\n _this._url = url;\n _this._descriptorURL = descriptorURL;\n _this._startingTime = startingTime;\n _this._lastModified = lastModified;\n _this._status = status;\n _this._stubs = stubs;\n _this._stubsConfiguration = stubsConfiguration;\n _this._p2pRequester = p2pRequester;\n }\n\n (0, _createClass3.default)(RegistryDataModel, [{\n key: "id",\n get: function get() {\n var _this = this;\n return _this._id;\n }\n }, {\n key: "url",\n get: function get() {\n var _this = this;\n return _this._url;\n }\n }, {\n key: "descriptor",\n get: function get() {\n var _this = this;\n return _this._descriptorURL;\n }\n }, {\n key: "p2pRequester",\n get: function get() {\n var _this = this;\n return _this._p2pRequester;\n }\n }, {\n key: "lastModified",\n get: function get() {\n var _this = this;\n return _this._lastModified;\n }\n }]);\n return RegistryDataModel;\n}();\n\nexports.default = RegistryDataModel;\nmodule.exports = exports["default"];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9yZWdpc3RyeS9SZWdpc3RyeURhdGFNb2RlbC5qcz83YTJmIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1JTQ0hVTkcgRS5WXG4qIENvcHlyaWdodCAyMDE2IE9SQU5HRSBTQVxuKiBDb3B5cmlnaHQgMjAxNiBEZXV0c2NoZSBUZWxla29tIEFHXG4qIENvcHlyaWdodCAyMDE2IEFwaXplZVxuKiBDb3B5cmlnaHQgM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HtcbiAgICBsZXQgX3RoaXMgPSB0aGlzO1xuICAgIHJldHVybiBfdGhpcy5fbGFzdE1vZGlmaWVkO1xuICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgUmVnaXN0cnlEYXRhTW9kZWw7XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gc3JjL3JlZ2lzdHJ5L1JlZ2lzdHJ5RGF0YU1vZGVsLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFzQkE7Ozs7QUFJQTtBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///466\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('P2PConnectionResolve');\n\n/**\n* To process address resolution for p2p connections\n*/\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n// Log System\n\nvar P2PConnectionResolve = function () {\n function P2PConnectionResolve(registry) {\n (0, _classCallCheck3.default)(this, P2PConnectionResolve);\n\n var _this = this;\n _this._registry = registry;\n _this._remoteP2PEntities = {}; // All remote entities and associated runtime url that are reachable with existing p2p connections\n }\n\n /**\n * Verifies if remote Entity can be reached with a P2P Connection.\n * @param {URL.URL} info object URL\n * @return {HypertyDataObjectInstance} addressURL return the Data Object instance registered URL, return undefined otherwise\n */\n\n (0, _createClass3.default)(P2PConnectionResolve, [{\n key: 'checkP2P',\n value: function checkP2P(msg) {\n\n if (!msg.hasOwnProperty('to')) {\n // throw Error('The p2p verification was failed');\n return _promise2.default.reject('The p2p verification was failed');\n }\n\n var scheme = msg.to.split('://')[0];\n\n var comp = msg.to.split('://')[1].split('/')[2];\n\n var url = void 0;\n\n if (comp) url = msg.to.substring(0, msg.to.indexOf('/' + comp));else url = msg.to;\n\n var p2p = {};\n\n if (msg.body && msg.body.p2p) p2p.p2p = msg.body.p2p;\n\n if (msg.body && msg.body.p2pHandler && msg.body.p2pRequester) {\n p2p.p2pHandler = msg.body.p2pHandler;\n p2p.p2pRequester = msg.body.p2pRequester;\n p2p.runtime = msg.body.p2pHandler.split('/p2phandler/')[0];\n }\n\n switch (scheme) {\n case 'runtime':\n return this.checkP2PRuntime(url, p2p);\n break;\n default:\n return this.checkP2PEntity(url, p2p);\n break;\n\n }\n }\n\n /**\n * Verifies if remote Entity (Hyperty or Data Object) can be reached with a P2P Connection.\n * @param {string} url Remote Entity URL to be checked\n * @param {object} p2p p2p information to be used including ´runtime´ with remote Runtime URL, 'p2pHandler' remote P2P Handler Stub URL and p2pRequester with Catalogue URL of P2P Requester to be used\n * @return {promise} registeredEntity if p2p connection is possible it returns p2p information to be used in the connection, otherwise the promise is rejected\n */\n\n }, {\n key: 'checkP2PEntity',\n value: function checkP2PEntity(url, p2p) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var remoteEntity = _this._remoteP2PEntities[url];\n\n if (remoteEntity) resolve(remoteEntity);else if (p2p.runtime) resolve(p2p); // use provided p2p if available in the message body\n else if (p2p.p2p) {\n // otherwise look on Domain Registry\n\n log.log('[Registry - checkP2PEntity] - search in Domain Registry: ', url);\n\n var message = {\n type: 'read',\n from: _this._registry.registryURL,\n to: 'domain://registry.' + _this._registry._domain,\n body: {\n resource: url\n }\n };\n\n _this._registry._messageBus.postMessage(message, function (reply) {\n log.log('[Registry - checkP2PEntity] Domain Registry reply', reply);\n if ('value' in reply.body) {\n\n //todo: store retrieved entity\n var resolvedEntity = reply.body.value;\n\n if (resolvedEntity.hasOwnProperty('p2pHandler')) {\n resolve(resolvedEntity);\n } else {\n reject('[Registry checkP2PEntity] Hyperty found does not support P2P', reply.body.value);\n }\n } else {\n reject('[Registry checkP2PEntity] Hyperty with P2PHandler not found', reply.body.code);\n }\n });\n } else reject('[Registry checkP2PEntity] No P2P Connection available for ', url);\n });\n }\n\n /**\n * Verifies if remote Runtime can be reached with a P2P Connection.\n * @param {URL.URL} runtimeURL Runtime URL\n * @return {Object} p2pConnection return the P2PConnection instance registered URL, return undefined otherwise\n */\n\n }, {\n key: 'checkP2PRuntime',\n value: function checkP2PRuntime(runtimeURL, p2p) {\n var _this = this;\n\n var registeredRuntime = {};\n\n // look on locally stored p2p connections\n return new _promise2.default(function (resolve, reject) {\n if (_this._registry.p2pConnectionList[runtimeURL]) {\n resolve({ runtime: runtimeURL });\n } else if (p2p.runtime) {\n registeredRuntime = p2p;\n resolve(registeredRuntime);\n } else reject('[Registry.P2PConnectionResolve.checkP2PRuntime] No P2P Connection found to ', runtimeURL);\n });\n }\n\n /**\n * Verifies if remote Hyperty can be reached with a P2P Connection.\n * @param {JSON} info object or entity charateristics info\n * @return {addressURL} addressURL return the URL if there is any previousy registered URL, return undefined otherwise\n */\n\n }, {\n key: 'checkP2PHyperty',\n value: function checkP2PHyperty(hypertyURL, p2p) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var hyperty = void 0;\n\n // look on locally stored hyperties\n\n for (var i in _this._registry.remoteHypertyList) {\n hyperty = _this._registry.remoteHypertyList[i];\n\n log.log('[Registry - checkP2PHyperty] - for each Hyperty: ', hyperty);\n\n // todo: change to \"hyperty.url\" to be aligned with hyperty instance data model spec\n\n if (hyperty.hypertyID === hypertyURL) {\n\n if (hyperty.hasOwnProperty('p2pHandler')) {\n resolve(hyperty);\n } else {\n reject('[Registry checkP2PHyperty] Hyperty found does not support P2P', hyperty);\n }\n return;\n }\n }\n\n if (!hyperty && p2p.runtime) resolve(p2p); // use provided p2p if available in the message body\n else if (!hyperty && p2p.p2p) {\n // otherwise look on Domain Registry\n\n log.log('[Registry - checkP2PHyperty] - search in Domain Registry: ', hyperty);\n\n var message = {\n type: 'read',\n from: _this._registry.registryURL,\n to: 'domain://registry.' + _this._registry._domain,\n body: {\n resource: hypertyURL\n }\n };\n\n _this._registry._messageBus.postMessage(message, function (reply) {\n log.log('[Registry - checkP2PHyperty] Domain Registry reply', reply);\n if ('value' in reply.body) {\n\n //todo: store retrieved hyperty\n var resolvedHyperty = reply.body.value;\n\n _this._registry.remoteHypertyList.push(resolvedHyperty);\n\n if (resolvedHyperty.hasOwnProperty('p2pHandler')) {\n resolve(resolvedHyperty);\n } else {\n reject('[Registry checkP2PHyperty] Hyperty found does not support P2P', reply.body.value);\n }\n } else {\n reject('[Registry checkP2PHyperty] Hyperty with P2PHandler not found', reply.body.code);\n }\n });\n } else reject('[Registry checkP2PHyperty] No P2P Connection available for ', hypertyURL);\n });\n }\n\n /**\n * Verifies if remote Data Object can be reached with a P2P Connection.\n * @param {URL.URL} DataObjectURL object URL\n * @return {HypertyDataObjectInstance} addressURL return the Data Object instance registered URL, return undefined otherwise\n */\n\n }, {\n key: 'checkP2PDataObject',\n value: function checkP2PDataObject(url, p2p) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n // look on locally stored Remote Data Objects\n\n var dataobject = _this._registry.remoteDataObjectList.filter(function (i) {\n return _this._registry.remoteDataObjectList[i].url === url;\n });\n\n if (dataobject.length !== 0 && dataobject[0].p2pRequester) {\n resolve(dataobject[0]);\n } else if (dataobject.length !== 0) {\n reject('[Registry checkP2PDataObject] Data Object found does not support P2P', dataobject[0]);\n } else if (dataobject.length === 0 && p2p.runtime) resolve(p2p); // use provided p2p info if available in the message body\n else if (dataobject.length && p2p.p2p) {\n // otherwise look on Domain Registry\n\n // look on Domain Registry\n\n var message = {\n type: 'read',\n from: _this._registry.registryURL,\n to: 'domain://registry.' + _this._registry._domain,\n body: {\n resource: url\n }\n };\n\n _this._registry._messageBus.postMessage(message, function (reply) {\n log.log('discover data object per url reply', reply);\n if ('value' in reply.body) {\n\n //todo: store retrieved hyperty\n var resolvedDataObject = reply.body.value;\n\n _this._registry.remoteDataObjectList.push(resolvedDataObject);\n\n if (resolvedDataObject.p2pRequester) {\n resolve(resolvedDataObject);\n } else {\n reject('[Registry checkP2PDataObject] Data Object found does not support P2P', reply.body.value);\n }\n } else {\n reject('[Registry checkP2PDataObject] not found', reply.body.code);\n }\n });\n } else reject('[Registry checkP2PDataObject] no P2P Connection found');\n });\n }\n }, {\n key: 'addRemoteP2PEntity',\n value: function addRemoteP2PEntity(url, runtime) {\n this._remoteP2PEntities[url] = runtime;\n }\n }, {\n key: 'removeRemoteP2PEntity',\n value: function removeRemoteP2PEntity(url) {\n delete this._remoteP2PEntities[url];\n }\n }, {\n key: 'reconnectP2PRequester',\n value: function reconnectP2PRequester(p2pRequester) {\n var _this = this;\n\n log.log('[P2PConenctionResolve.reconnectP2PRequester] lets try to reconnect P2P Requester Stub: ', p2pRequester);\n\n return new _promise2.default(function (resolve, reject) {\n\n var remoteRuntime = p2pRequester.runtime;\n\n var message = {\n type: 'execute',\n from: _this._registry.registryURL,\n to: p2pRequester.url,\n body: {\n method: 'connect',\n params: [p2pRequester.p2pHandler]\n }\n };\n\n // lets prepare the p2pRequesterSTub reconnect by setting an observer to its status changes\n\n _this._registry.watchingYou.observe('p2pRequesterStub', function (change) {\n\n log.log('[P2PConenctionResolve.reconnectP2PRequester] p2pRequesterStubs changed ' + _this._registry.p2pRequesterStub);\n\n if (change.keypath.split('.')[0] === remoteRuntime && change.name === 'status') {\n switch (change.newValue) {\n case 'live':\n log.log('[P2PConenctionResolve.reconnectP2PRequester] p2pRequester is live ' + _this._registry.p2pRequesterStub[remoteRuntime]);\n resolve(_this._registry.p2pRequesterStub[remoteRuntime].url);\n break;\n case 'failed':\n log.log('[P2PConenctionResolve.reconnectP2PRequester] p2pRequester reconnect failed ' + _this._registry.p2pRequesterStub[remoteRuntime]);\n reject('P2P Requester reconnect failed');\n break;\n default:\n }\n }\n });\n\n // stub load\n _this._registry._messageBus.postMessage(message, function (reply) {\n log.log('[P2PConenctionResolve.reconnectP2PRequester] reconnect request reply', reply);\n });\n });\n }\n }]);\n return P2PConnectionResolve;\n}();\n\nexports.default = P2PConnectionResolve;\nmodule.exports = exports['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VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///467\n")},function(module,exports){eval('// proxy-observe v0.0.18\r\n// Copyright (c) 2015, 2016 Simon Y. Blackwell, AnyWhichWay\r\n// MIT License - http://opensource.org/licenses/mit-license.php\r\n(function() {\r\n\t"use strict";\r\n\t// Creates and returns a Proxy wrapping a target so that all changes can be trapped and forwarded to\r\n\t// a callback. The callback takes an array of changes just like the traditional original Chrome Object.observe\r\n\t// {object:,name:,type:add|update|delete|reconfigure|preventExtensions|setPrototype,oldValue:}\r\n\t// The acceptlist can be add|update|delete|reconfigure|preventExtensions|setPrototype.\r\n\t// v 0.0.10 to support pausing and restarting observation two additional constructor arguments are available to Object.observe:\r\n\t// pausable - create the Observer so it can be paused\r\n\t// pause - create observer in paused state\r\n\t// if pausable is true then an additional method deliver(ignorePrevious) is available to start delivery\r\n\t// to pause delivery set a property called pause on the function deliver to true\r\n\t// pausable is optional to reduce the chance of shadowing a property or method on any existing code called deliver\r\n\tif(!Object.observe && typeof(Proxy)==="function") {\r\n\t\tfunction Observer(target,callback,acceptlist,pausable,pause,delay) {\r\n\t \tvar me = this, proxy;\r\n\t \tfunction deliver(ignorePrevious,delay) {\r\n\t \t\tdeliver.delay = delay;\r\n\t \t\tif(!deliver.pause) {\r\n\t \t\tif(me.changeset.length>0) {\r\n\t \t\t\tif(!ignorePrevious) {\r\n\t\t \t \t\tvar changes = me.changeset.filter(function(change) { return !acceptlist || acceptlist.indexOf(change.type)>=0; });\r\n\t\t \t\t\tif(changes.length>0) {\r\n\t\t \t\t\t\tcallback(changes);\r\n\t\t \t\t\t}\r\n\t \t\t\t}\r\n\t \t\t\tme.changeset = [];\r\n\t \t\t}\r\n\t \t\t}\r\n\t \t}\r\n\t \tdeliver.pause = pause;\r\n\t \tdeliver.delay = delay;\r\n\t\t me.get = function(target, property) {\r\n\t\t \tif(property==="__observer__") {\r\n\t\t \t\treturn me;\r\n\t\t \t}\r\n\t\t \tif(property==="unobserve") {\r\n\t\t \t\treturn function() {\r\n\t\t \t\t\tObject.unobserve(target);\r\n\t\t \t\t\treturn target;\r\n\t\t \t\t};\r\n\t\t \t}\r\n\t\t \tif(property==="deliver") {\r\n\t\t \t\treturn deliver;\r\n\t\t \t}\r\n\t\t \treturn target[property];\r\n\t\t }\r\n\t \tme.target = target;\r\n\t \tme.changeset = [];\r\n\t \tif(!me.target.__observerCallbacks__) {\r\n\t \t\t// __observerCallbacks__ is used as an index to get at the proxy which is the observer, so we can unobserve\r\n\t \t\tObject.defineProperty(target,"__observerCallbacks__",{enumerable:false,configurable:true,writable:false,value:[]});\r\n\t \t\tObject.defineProperty(target,"__observers__",{enumerable:false,configurable:true,writable:false,value:[]});\r\n\t \t}\r\n\t \tme.target.__observerCallbacks__.push(callback);\r\n\t \tme.target.__observers__.push(this);\r\n\t \tproxy = new Proxy(target,me);\r\n\t \tdeliver(false,delay);\r\n\t \treturn proxy;\r\n\t }\r\n\t\tObserver.prototype.deliver = function() {\r\n\t\t\treturn this.get(null,"deliver");\r\n\t\t}\r\n\t Observer.prototype.set = function(target, property, value) { // , receiver\r\n\t \tvar oldvalue = target[property];\r\n\t \tvar type = (oldvalue===undefined ? "add" : "update");\r\n\t \ttarget[property] = value;\r\n\t \tif(target.__observers__.indexOf(this)>=0 && (!this.acceptlist || this.acceptlist.indexOf(type)>=0)) {\r\n\t \tvar change = {object:target,name:property,type:type},\r\n\t \t\tstart = this.changeset.length === 0,\r\n\t \t\tdeliver = this.deliver();\r\n\t \tif(type==="update") {\r\n\t \t\tchange.oldValue = oldvalue;\r\n\t \t}\r\n\t \tthis.changeset.push(change);\r\n\t \tif(start) {\r\n\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t \t}\r\n\t \t}\r\n\t \treturn true;\r\n\t };\r\n\t Observer.prototype.deleteProperty = function(target, property) {\r\n\t \tvar oldvalue = target[property];\r\n\t \t//if(typeof(oldvalue)!=="undefined") {\r\n\t\t \tdelete target[property];\r\n\t\t \tif(target.__observers__.indexOf(this)>=0 && !this.acceptlist || this.acceptlist.indexOf("delete")>=0) {\r\n\t\t \tvar change = {object:target,name:property,type:"delete",oldValue:oldvalue},\r\n\t\t \t\tstart = this.changeset.length === 0,\r\n\t\t \t\tdeliver = this.deliver();\r\n\t\t \tthis.changeset.push(change);\r\n\t\t \tif(start) {\r\n\t\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t\t \t}\r\n\t\t \t}\r\n\t \t//}\r\n\t \treturn true;\r\n\t };\r\n\t Observer.prototype.defineProperty = function(target, property, descriptor) {\r\n\t \tObject.defineProperty(target, property, descriptor);\r\n\t \tif(target.__observers__.indexOf(this)>=0 && !this.acceptlist || this.acceptlist.indexOf("reconfigure")>=0) {\r\n\t \tvar change = {object:target,name:property,type:"reconfigure"},\r\n \t\t\tstart = this.changeset.length === 0,\r\n \t\t\tdeliver = this.deliver();\r\n\t \tthis.changeset.push(change);\r\n\t \tif(start) {\r\n\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t \t}\r\n\t \t}\r\n\t \treturn true;\r\n\t };\r\n\t Observer.prototype.setPrototypeOf = function(target, prototype) {\r\n\t \tvar oldvalue = Object.getPrototypeOf(target);\r\n\t \tObject.setPrototypeOf(target, prototype);\r\n\t \tif(target.__observers__.indexOf(this)>=0 && !this.acceptlist || this.acceptlist.indexOf("setPrototype")>=0) {\r\n\t \tvar change = {object:target,name:"__proto__",type:"setPrototype",oldValue:oldvalue},\r\n \t\t\t\tstart = this.changeset.length === 0,\r\n \t\t\t\tdeliver = this.deliver();\r\n\t \tthis.changeset.push(change);\r\n\t \tif(start) {\r\n\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t \t}\r\n\t \t}\r\n\t \treturn true;\r\n\t };\r\n\t Observer.prototype.preventExtensions = function(target) {\r\n\t Object.preventExtensions(target);\r\n\t \tif(target.__observers__.indexOf(this)>=0 && !this.acceptlist || this.acceptlist.indexOf("preventExtensions")>=0) {\r\n\t \tvar change = {object:target,type:"preventExtensions"},\r\n\t\t\t\t\tstart = this.changeset.length === 0,\r\n\t\t\t\t\tdeliver = this.deliver();\r\n\t \tthis.changeset.push(change);\r\n\t \tif(start) {\r\n\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t \t}\r\n\t \t}\r\n\t \treturn true;\r\n\t };\r\n\t Object.observe = function(object,callback,acceptlist,pausable,pause,delay) {\r\n\t \treturn new Observer(object,callback,acceptlist,pausable,pause,delay);\r\n\t };\r\n\t Object.unobserve = function(object,callback) {\r\n\t \tif(object.__observerCallbacks__) {\r\n\t \t\tif(!callback) {\r\n\t \t\t\tobject.__observerCallbacks__.splice(0,object.__observerCallbacks__.length);\r\n\t \t\t\tobject.__observers__.splice(0,object.__observers__.length);\r\n\t \t\t\treturn;\r\n\t \t\t}\r\n\t \t\tobject.__observerCallbacks__.forEach(function(observercallback,i) {\r\n\t \t\t\tif(callback===observercallback) {\r\n\t \t\t\t\tobject.__observerCallbacks__.splice(i,1);\r\n\t \t\t\t\tdelete object.__observers__[i].callback;\r\n\t \t\t\t\tobject.__observers__.splice(i,1);\r\n\t \t\t\t}\r\n\t \t\t});\r\n\t \t}\r\n\t };\r\n\t Array.observe = function(object,callback,acceptlist,pausable,pause,delay) {\r\n\t \tif(!(object instanceof Array) && !Array.isArray(object)) {\r\n\t \t\tthrow new TypeError("First argument to Array.observer is not an Array");\r\n\t \t}\r\n \tacceptlist = acceptlist || ["add", "update", "delete", "splice"];\r\n\t \tvar arrayproxy = new Proxy(object,{get: function(target,property) {\r\n\t \t\tif(property==="unobserve") {\r\n\t\t \t\treturn function(callback) {\r\n\t\t \t\t\tif(callback) {\r\n\t\t \t\t\t\treturn Object.unobserve(target,callback);\r\n\t\t \t\t\t}\r\n\t\t \t\t\treturn target.unobserve();\r\n\t\t \t\t};\r\n\t\t \t}\r\n\t \t\tif(property==="splice") {\r\n\t \t\t\treturn function(start,end) {\r\n\t \t\t\t\tif(typeof(start)!=="number" || typeof(end)!=="number") {\r\n\t \t\t\t\t\tthrow new TypeError("First two arguments to Array splice are not number, number");\r\n\t \t\t\t\t}\r\n\t \t \t\tvar removed = this.slice(start,start+end),\r\n\t \t \t\t\taddedCount = (arguments.length > 1 ? arguments.length-2 : 0),\r\n\t \t \t\t\tchange = {object:object,type:"splice",index:start,removed:removed,addedCount:addedCount};\r\n\t \t \t\ttarget.splice.apply(target,arguments);\r\n\t \t \t\tif(acceptlist.indexOf("splice")>=0) {\r\n\t \t \t\t\tvar start = proxy.__observer__.changeset.length === 0,\r\n\t \t \t\t\tdeliver = proxy.__observer__.deliver();\r\n\t \t \t\t\tproxy.__observer__.changeset.push(change);\r\n\t \t \t\t\tif(start) {\r\n\t \t\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t \t\t \t}\r\n\t \t \t\t}\r\n\t \t \t}\r\n\t \t\t}\r\n\t \t\tif(property==="push") {\r\n\t \t\t\t return function(item) {\r\n\t \t\t \treturn this.splice(this.length,0,item);\r\n\t \t\t }\r\n\t \t\t}\r\n\t \t\tif(property==="pop") {\r\n\t \t\t\t return function() {\r\n\t \t\t \treturn this.splice(this.length-1,1);\r\n\t \t\t }\r\n\t \t\t}\r\n\t \t\tif(property==="unshift") {\r\n\t \t\t\t return function(item) {\r\n \t\t \t\treturn this.splice(0,0,item);\r\n \t\t \t}\r\n\t \t\t}\r\n\t \t\tif(property==="shift") {\r\n\t \t\t\treturn function() {\r\n\t \t \t\treturn this.splice(0,1);\r\n\t \t \t}\r\n\t \t\t}\r\n\t \t\treturn target[property];\r\n\t \t}});\r\n\t \tvar proxy = Object.observe(arrayproxy,function(changeset) { \r\n\t \t\tvar changes = changeset.filter(function(change) { return change.name!=="length" && change.name!=="add" && (!acceptlist || acceptlist.indexOf(change.type)>=0); });\r\n\t \t\tif(changes.length>0) {\r\n\t \t\t\tcallback(changes);\r\n\t \t\t}\r\n\t \t},acceptlist,pausable,pause,delay);\r\n\t \treturn proxy;\r\n\t };\r\n\t Array.unobserve = function(object,callback) {\r\n\t\t return object.unobserve(callback);\r\n\t }\r\n\t}\r\n\tObject.deepObserve = function(object,callback,parts) {\r\n\r\n\t\tparts = (parts ? parts : []);\r\n\r\n\t\tvar toTypeName = function(obj) {\r\n\t\t\treturn ({}).toString.call(obj).match(/\\s([a-zA-Z]+)/)[1].toLowerCase()\r\n\t\t}\r\n\r\n\t\tfunction reobserve(value, parts) {\r\n\t\t\tvar keys = Object.keys(value);\r\n\t\t\tkeys.forEach(function(key) {\r\n\t\t\t\tif((toTypeName(value[key]) === \'object\' || toTypeName(value[key]) === \'array\') && !value[key].hasOwnProperty(\'__observers__\')) {\r\n\t\t\t\t\tvar newparts = parts.slice(0);\r\n\t\t\t\t\tnewparts.push(key);\r\n\t\t\t\t\tvalue[key] = Object.deepObserve(value[key],callback,newparts);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treobserve(object, parts);\r\n\r\n\t\tvar observed = Object.observe(object,function(changeset) {\r\n\t\t\tvar changes = [];\r\n\t\t\tfunction recurse(name,rootObject,oldObject,newObject,path) {\r\n\t\t\t\tif(newObject instanceof Object) {\r\n\t\t\t\t\tvar newkeys = Object.keys(newObject);\r\n\t\t\t\t\tnewkeys.forEach(function(key) {\r\n\t\t\t\t\t\tif(!oldObject || (oldObject[key]!==newObject[key])) {\r\n\t\t\t\t\t\t\tvar oldvalue = (oldObject && oldObject[key]!==undefined ? oldObject[key] : undefined),\r\n\t\t\t\t\t\t\t\tchange = (oldvalue===undefined ? "add" : "update"),\r\n\t\t\t\t\t\t\t\tkeypath = path + "." + key;\r\n\r\n\t\t\t\t\t\t\tchanges.push({name:name,object:rootObject,type:change,oldValue:oldvalue,newValue:newObject[key],keypath:keypath});\r\n\t\t\t\t\t\t\trecurse(name,rootObject,oldvalue,newObject[key],keypath);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else if(oldObject instanceof Object) {\r\n\t\t\t\t\tvar oldkeys = Object.keys(oldObject);\r\n\t\t\t\t\toldkeys.forEach(function(key) {\r\n\t\t\t\t\t\tvar change = (newObject===null ? "update" : "delete"),\r\n\t\t\t\t\t\t\tkeypath = path + "." + key;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tchanges.push({name:name,object:rootObject,type:change,oldValue:oldObject[key],newValue:newObject,keypath:keypath});\r\n\t\t\t\t\t\trecurse(name,rootObject,oldObject[key],undefined,keypath);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tchangeset.forEach(function(change) {\r\n\t\t\t\tvar keypath = (parts.length>0 ? parts.join(".") + "." : "") + change.name;\r\n\r\n\t\t\t\tif (change.type === "update" || change.type === "add") { \r\n\t\t\t\t\treobserve(change.object, parts);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tchanges.push({name:change.name,object:change.object,type:change.type,oldValue:change.oldValue,newValue:change.object[change.name],keypath:keypath});\r\n\t\t\t\trecurse(change.name,change.object,change.oldValue,change.object[change.name],keypath);\r\n\t\t\t});\r\n\t\t\tcallback(changes);\r\n\t\t});\r\n\t\treturn observed;\r\n\t};\r\n})();\r\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL3Byb3h5LW9ic2VydmUvaW5kZXguanM/MTIwYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAgICAgcHJveHktb2JzZXJ2ZSB2MC4wLjE4XHJcbi8vICAgICBDb3B5cmlnaHQgKGMpIDIwMTUsIDIwMTYgU2ltb24gWS4gQmxhY2t3ZWxsLCBBbnlXaGljaFdheVxyXG4vLyAgICAgTUlUIExpY2Vuc2UgLSBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvbWl0L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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///468\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _runtimeConfiguration = __webpack_require__(144);\n\nvar _Identities = __webpack_require__(470);\n\nvar _Identities2 = _interopRequireDefault(_Identities);\n\nvar _GuiFake = __webpack_require__(475);\n\nvar _GuiFake2 = _interopRequireDefault(_GuiFake);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('IdentityModule'); // Log System\n\n/**\n*\n* The Identity Module (Id Module) is the component responsible for handling the\n* user identity and the association of this identity with the Hyperty instances,\n* in order to make Hyperty instances identifiable. The identity in the reTHINK project\n* is not fixed to a unique Identity Service Provider, but obtained through several\n* different Identity sources. With this approach, the Id Module provides to the user the\n* option to choose the preferred method for authentication.\n* This module will thus able to support multiple Identity acquisition methods,\n* such as OpenID connect 1.0, Kerberos System, or authentication through smart cards.\n* For example, a user with a Google account can use the Google as an Identity Provider to provide Identity Tokens,\n* which can be used by the Identity Module to associate it with a Hyperty instance.\n*\n* The Identity Module uses a node package, the HelloJS, which is a client-side JavaScript API for authentication\n* that facilitates the requests for the OpenID connect protocol. This method allows for some abstraction\n* when making requests for different Identity Providers, such as OpenID connect used by Google, Facebook, Microsoft, for example.\n*\n* When a request for a user identity is made using the method loginWithRP(identifier, scope),\n* this method will analyse the Identity Provider chosen to obtain an identity and will use the HelloJS node package\n* with the selected Identity Provider and identity scope. After the HelloJS request for an Access Token\n* to the Identity Providers, the user will be prompted to authenticate towards the Identity Provider.\n* Upon receiving the Access Token, this token is validated with a RESTful web service request to an endpoint\n* on the Identity Provider Authorization Server, and after the validation is done,\n* an ID token is obtained with the information according to the scope required.\n* This ID token is then preserved in this module that can obtained through the getIdentities()\n* and is passed as return value of the loginWithRP function. The methods generateAssertion and validateAssertion have not yet been developed.\n*\n*/\nvar IdentityModule = function () {\n\n /**\n * This is the constructor to initialise the Identity Module it does not require any input.\n */\n function IdentityModule(runtimeURL, runtimeCapabilities, storageManager, dataObjectsStorage, cryptoManager, runtimeCatalogue) {\n (0, _classCallCheck3.default)(this, IdentityModule);\n\n var _this = this;\n\n if (!runtimeURL) throw new Error('runtimeURL is missing.');\n if (!storageManager) throw new Error('storageManager is missing');\n if (!cryptoManager) throw new Error('cryptoManager is missing');\n if (!runtimeCatalogue) throw new Error('runtimeCatalogue is missing');\n\n _this._runtimeURL = runtimeURL;\n\n _this._runtimeCatalogue = runtimeCatalogue;\n\n _this.dataObjectsStorage = dataObjectsStorage;\n _this._idmURL = _this._runtimeURL + '/idm';\n _this._guiURL = _this._runtimeURL + '/identity-gui';\n _this.runtimeCapabilities = runtimeCapabilities;\n\n _this._domain = (0, _utils.divideURL)(_this._runtimeURL).domain;\n\n //to store items with this format: {identity: identityURL, token: tokenID}\n _this._identities = new _Identities2.default('human', storageManager);\n\n // to be reviewed: watchingYou identitiesList or identities?\n // _this.identitiesList = _this.watchingYou.watch('identitiesList', {}, true);\n _this._crypto = cryptoManager;\n\n /* _this.emailsList = [];\n let newIdentity = new Identity('guid', 'HUMAN');\n _this.identity = newIdentity;\n _this.currentIdentity;\n _this.identities.defaultIdentity;*/\n\n //stores the association of the dataObject and the Hyperty registered within\n _this.dataObjectsIdentity = {}; // is this needed?\n\n _this._listOfIdps = [];\n\n // variable to know if the GUI is deployed to choose the identity. if the real GUI is not deployed, a fake gui is deployed instead.\n _this.guiDeployed = false;\n }\n\n //******************* GET AND SET METHODS *******************\n\n /**\n * return the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n\n\n (0, _createClass3.default)(IdentityModule, [{\n key: 'getIdentity',\n\n\n //******************* IDENTITY RELEATED METHODS *******************\n /**\n * gets all the information from a given userURL\n * @param {String} userURL user url\n * @return {JSON} identity identity bundle from the userURL\n */\n value: function getIdentity(userURL) {\n return this.identities.getIdentity(userURL);\n }\n\n /**\n * Function to set the current Identity with a given Identity\n * @param {Identity} identity identity\n */\n\n /* setCurrentIdentity(identity) {\n let _this = this;\n _this.currentIdentity = identity;\n }*/\n\n /**\n * Function to return all the identities registered within a session by a user.\n * These identities are returned in an array containing a JSON package for each user identity.\n * @return {Array} Identities\n */\n\n }, {\n key: 'getIdentitiesToChoose',\n value: function getIdentitiesToChoose() {\n var _this2 = this;\n\n // let identities = _this.identities.identifiers;\n\n // let idps = [\n // { domain: 'google.com', type: 'idToken'},\n // { domain: 'microsoft.com', type: 'idToken'},\n // { domain: 'orange.fr', type: 'idToken'},\n // { domain: 'slack.com', type: 'Legacy'}\n // ];\n\n // todo: retrieve available idps from runtime catalogue\n // todo: enable oauth idps\n // let idps = [\n // { domain: 'google.com', type: 'idToken' },\n // { domain: 'microsoft.com', type: 'idToken' },\n // { domain: 'facebook.com', type: 'idToken' },\n // { domain: 'slack.com', type: 'idToken' }\n // ];\n\n return new _promise2.default(function (resolve) {\n\n var url = _runtimeConfiguration.runtimeConfiguration.catalogueURLs.idpProxy.prefix + _this2._domain + _runtimeConfiguration.runtimeConfiguration.catalogueURLs.idpProxy.suffix;\n\n _promise2.default.all([_this2.runtimeCapabilities.isAvailable('browser'), _this2.runtimeCapabilities.isAvailable('node')]).then(function (result) {\n\n var isBrowser = result[0];\n var isNode = result[1];\n\n var constraints = { constraints: {} };\n constraints.constraints.node = isNode;\n constraints.constraints.browser = isBrowser;\n\n _this2._runtimeCatalogue.getTypeList(url, constraints).then(function (idps) {\n var listOfIdps = idps.map(function (key) {\n return { domain: key, type: 'idToken' };\n });\n log.info('[IdentityModule.getIdentityAssertion:getIdentitiesToChoose]', idps, listOfIdps);\n _this2._listOfIdps = listOfIdps;\n return resolve({ defaultIdentity: _this2.identities.defaultIdentity, identities: _this2.identities.identities, idps: listOfIdps });\n });\n });\n });\n }\n\n /**\n * Function to return the selected Identity within a session\n * @return {Identity} identity identity\n */\n /* getCurrentIdentity() {\n let _this = this;\n return _this.currentIdentity;\n }*/\n\n }, {\n key: 'init',\n value: function init() {\n var _this = this;\n return new _promise2.default(function (resolve) {\n _this._identities.loadIdentities().then(function () {\n _this._crypto.getMyPublicKey().then(function (key) {\n var guid = 'user-guid://' + (0, _utils.stringify)(key);\n _this.identities.guid = guid;\n _this._identities.loadAccessTokens().then(function () {\n\n resolve();\n });\n });\n });\n });\n }\n\n /**\n * Function that fetch an identityAssertion from a user.\n *\n * @return {IdAssertion} IdAssertion\n */\n\n }, {\n key: 'getIdentityAssertion',\n value: function getIdentityAssertion(identityBundle) {\n log.log('[IdentityModule.getIdentityAssertion:identityBundle]', identityBundle);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //CHECK whether is browser environment or nodejs\n //if it is browser, then create a fake identity\n\n _this.runtimeCapabilities.isAvailable('browser').then(function (result) {\n log.log('runtime browser identity acquisition', result);\n\n if (!result) return;\n\n //todo: only idp should be mandatory when identityBundle exists\n\n if (identityBundle && identityBundle.hasOwnProperty('idp')) {\n\n var idp = identityBundle.idp;\n var origin = identityBundle.hasOwnProperty('origin') ? identityBundle.origin : 'origin';\n var idHint = identityBundle.hasOwnProperty('idHint') ? identityBundle.idHint : '';\n\n _this.selectIdentityForHyperty(origin, idp, idHint).then(function (assertion) {\n log.log('[IdentityModule] Identity selected by hyperty.');\n return resolve(assertion);\n }, function (err) {\n // if it got an error then just select identity from GUI\n // log.error('[IdentityModule] Could not select identity from hyperty.');\n _this.selectIdentityFromGUI().then(function (newAssertion) {\n log.log('[IdentityModule] Identity selected by hyperty.');\n return resolve(newAssertion);\n }, function (err) {\n return reject(err);\n });\n });\n } else {\n\n if (_this.identities.defaultIdentity && _this.identities.defaultIdentity.expires > (0, _utils.secondsSinceEpoch)()) {\n return resolve(_this.identities.defaultIdentity);\n } else {\n _this.selectIdentityFromGUI().then(function (assertion) {\n\n log.log('[IdentityModule] Identity selected from GUI.');\n\n /*\n _this.identities.defaultIdentity = assertion.userProfile.userURL;\n return resolve(assertion);\n }*/\n\n _this.identities.defaultIdentity = assertion.userProfile.userURL;\n return resolve(assertion);\n }, function (err) {\n return reject(err);\n });\n }\n }\n }).catch(function (error) {\n log.error('Error on identity acquisition ', error);\n return reject(error);\n });\n\n _this.runtimeCapabilities.isAvailable('node').then(function (result) {\n log.log('node identity acquisition', result);\n\n if (!result) return;\n\n if (_this.identities.currentIdentity) {\n //TODO verify whether the token is still valid or not.\n // should be needed to make further requests, to obtain a valid token\n return resolve(_this.identities.currentIdentity);\n } else {\n log.log('getIdentityAssertion for nodejs');\n\n var idp = { type: 'idp', value: 'nodejs-idp', code: 200, auth: false };\n _this.callNodeJsGenerateMethods(idp.value, 'origin').then(function (value) {\n resolve(value);\n }, function (err) {\n reject(err);\n });\n }\n }).catch(function (error) {\n log.error('Error on identity acquisition ', error);\n reject(error);\n });\n });\n }\n\n /**\n * Function to return all the users URLs registered within a session\n * These users URLs are returned in an array of strings.\n * @return {Array} users\n */\n\n }, {\n key: 'getUsersIDs',\n value: function getUsersIDs() {\n /* log.log('[getUsersIDs:emailFormat]', emailFormat);\n log.log('getUsersIDs:emailFormat', emailFormat);\n let _this = this;\n let users = [];*/\n\n //if request comes with the emailFormat option, then convert url to email format\n /* let converter = (emailFormat) ? getUserEmailFromURL : (value) => { return value; };\n for (let index in _this.identities) {\n let identity = _this.identities[index];\n users.push(converter(identity.identity));\n }*/\n\n return this.identities.identifiers;\n }\n\n /**\n * Function to remove an identity\n * @param {String} userURL userURL\n * @return {Promise}\n */\n\n }, {\n key: 'deleteIdentity',\n value: function deleteIdentity(userURL) {\n\n return this.identities.removeIdentity(userURL);\n }\n\n /**\n * Function to unregister an identity from the emailsList array and not show in to the GUI\n * @param {String} email email\n */\n /* unregisterIdentity(email) {\n let _this = this;\n for (let e in _this.emailsList) {\n if (_this.emailsList[e] === email) {\n _this.emailsList.splice(e, 1);\n }\n }\n }*/\n\n /**\n * Function that sends a request to the GUI using messages. Sends all identities registered and\n * the Idps supported, and return the identity/idp received by the GUI\n * @param {Array} identities list of identitiies\n * @param {Array} idps list of idps to authenticate\n * @return {Promise} returns a chosen identity or idp\n */\n\n }, {\n key: 'requestIdentityToGUI',\n value: function requestIdentityToGUI(identities, idps) {\n log.log('[IdentityModule.requestIdentityToGUI:identities]', identities);\n log.log('[IdentityModule.requestIdentityToGUI:idps]', idps);\n\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n\n //condition to check if the real GUI is deployed. If not, deploys a fake gui\n if (_this.guiDeployed === false) {\n var guiFakeURL = _this._guiURL;\n var guiFake = new _GuiFake2.default(guiFakeURL, _this._messageBus);\n _this.guiFake = guiFake;\n _this.guiDeployed = true;\n }\n\n var message = {\n type: 'create', to: _this._guiURL, from: _this._idmURL,\n body: { value: { identities: identities, idps: idps } }\n };\n\n var callback = function callback(msg) {\n _this._messageBus.removeResponseListener(_this._idmURL, msg.id);\n\n // todo: to return the user URL and not the email or identifier\n\n if (msg.body.code === 200) {\n var selectedIdentity = msg.body;\n\n log.log('selectedIdentity: ', selectedIdentity.value);\n resolve(selectedIdentity);\n } else {\n reject('error on requesting an identity to the GUI');\n }\n };\n\n //postMessage with callback but without timeout\n try {\n _this._messageBus.postMessage(message, callback, false);\n } catch (err) {\n reject('In method callIdentityModuleFunc error: ' + err);\n }\n });\n }\n }, {\n key: 'callNodeJsGenerateMethods',\n value: function callNodeJsGenerateMethods(idp, origin) {\n log.log('[callNodeJsGenerateMethods:idp]', idp);\n log.log('[callNodeJsGenerateMethods:origin]', origin);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n //debugger;\n var publicKey = void 0;\n\n //let keyPair = nodeJSKeyPairPopulate;\n\n //generates the RSA key pair\n _this._crypto.getMyPublicKey().then(function (key) {\n\n log.log('[callNodeJsGenerateMethods:key]', key);\n\n publicKey = (0, _utils.stringify)(key);\n\n log.log('[callNodeJsGenerateMethods] NO_URL');\n\n return _this.generateAssertion(publicKey, origin, 'url', idp);\n }).then(function (value) {\n if (value) {\n resolve(value);\n } else {\n reject('Error on obtaining Identity');\n }\n }).catch(function (err) {\n log.log(err);\n reject(err);\n });\n });\n }\n }, {\n key: 'callGenerateMethods',\n value: function callGenerateMethods(idp, origin) {\n log.log('[callGenerateMethods:idp]', idp);\n log.log('[callGenerateMethods:origin]', origin);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var publicKey = void 0;\n\n //generates the RSA key pair\n _this._crypto.getMyPublicKey().then(function (key) {\n\n log.log('[callNodeJsGenerateMethods:key]', key);\n\n publicKey = (0, _utils.stringify)(key);\n\n // userkeyPair = keyPair;\n log.log('generateAssertion:no_hint');\n return _this.generateAssertion(publicKey, origin, '', idp);\n }).then(function (url) {\n _this.myHint = url;\n log.log('generateAssertion:hint');\n return _this.generateAssertion(publicKey, origin, url, idp);\n }).then(function (value) {\n if (value) {\n resolve(value);\n } else {\n reject('Error on obtaining Identity');\n }\n }).catch(function (err) {\n log.error(err);\n reject(err);\n });\n });\n }\n }, {\n key: 'loginSelectedIdentity',\n value: function loginSelectedIdentity(publicKey, origin, idp, loginUrl) {\n log.log('[loginSelectedIdentity:publicKey]', publicKey);\n log.log('[loginSelectedIdentity:origin]', origin);\n log.log('[loginSelectedIdentity:idp]', idp);\n\n // log.log('[loginSelectedIdentity:keyPair]', keyPair);\n log.log('[loginSelectedIdentity:loginUrl]', loginUrl);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n log.log('[IdentityModule] openPopup');\n _this.callIdentityModuleFunc('openPopup', { urlreceived: loginUrl }).then(function (idCode) {\n return idCode;\n }, function (err) {\n log.error('Error while logging in for the selected identity.');\n return reject(err);\n }).then(function (idCode) {\n _this.sendGenerateMessage(publicKey, origin, idCode, idp).then(function (newResponse) {\n if (newResponse.hasOwnProperty('assertion')) {\n _this.identities.addAssertion(newResponse).then(function (result) {\n resolve('Login was successfull');\n }).catch(function (err) {\n reject('Login has failed:' + err);\n });\n } else {\n log.error('Error while logging in for the selected identity.');\n return reject('Could not generate a valid assertion for selected identity.');\n }\n }).catch(function (err) {\n reject('On loginSelectedIdentity from method sendGenerateMessage error: ' + err);\n });\n });\n });\n }\n }, {\n key: 'selectIdentityForHyperty',\n value: function selectIdentityForHyperty(origin, idp, idHint) {\n log.log('[selectIdentityForHyperty:origin]', origin);\n log.log('[selectIdentityForHyperty:idp]', idp);\n log.log('[selectIdentityForHyperty:idHint]', idHint);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //generates the RSA key pair\n _this._crypto.getMyPublicKey().then(function (key) {\n var publicKey = (0, _utils.stringify)(key);\n\n _this.sendGenerateMessage(publicKey, origin, idHint, idp).then(function (response) {\n if (response.hasOwnProperty('assertion')) {\n // identity was logged in, just save it\n _this.identities.addAssertion(response).then(function (value) {\n return resolve(response);\n }, function (err) {\n return reject(err);\n });\n } else if (response.hasOwnProperty('loginUrl')) {\n // identity was not logged in\n _this.loginSelectedIdentity(publicKey, origin, idp, response.loginUrl).then(function (value) {\n return resolve(value);\n }, function (err) {\n return reject(err);\n });\n } else {\n // you should never get here, if you do then the IdP Proxy is not well implemented\n // log.error('GenerateAssertion returned invalid response.');\n log.log('Proceeding by logging in.');\n _this.callGenerateMethods(idp, origin).then(function (value) {\n return resolve(value);\n }, function (err) {\n return reject(err);\n });\n }\n }).catch(function (err) {\n reject('On selectIdentityForHyperty from method sendGenerateMessage error: ' + err);\n });\n }).catch(function (err) {\n reject('On selectIdentityForHyperty from method generateRSAKeyPair error: ' + err);\n });\n });\n }\n }, {\n key: 'selectIdentityFromGUI',\n value: function selectIdentityFromGUI(origin) {\n var _this3 = this;\n\n log.log('[IdentityModule.selectIdentityFromGUI:origin]', origin);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this3.getIdentitiesToChoose().then(function (identitiesInfo) {\n return _this.requestIdentityToGUI(identitiesInfo.identities, identitiesInfo.idps);\n }).then(function (value) {\n\n if (value.type === 'identity') {\n\n // let chosenID = getUserURLFromEmail(value.value);\n // hack while the user url is not returned from requestIdentityToGUI;\n\n /* let chosenID = 'user://' + _this.identities.currentIdentity.idp.domain + '/' + value.value;\n _this.identities.defaultIdentity = _this.identities.currentIdentity;*/\n\n // returns the identity info from the chosen id\n // if (_this.identities.currentIdentity) resolve(_this.identities.currentIdentity.assertion);\n if (_this.identities.identities[value.value]) resolve(_this.identities.identities[value.value]);else reject('[IdentityModule.selectIdentityFromGUI] identity not found: ', value.value);\n } else if (value.type === 'idp') {\n\n _this.callGenerateMethods(value.value, origin).then(function (value) {\n return resolve(value);\n }, function (err) {\n return reject(err);\n });\n } else {\n return reject('error on GUI received message.');\n }\n }).catch(function (err) {\n reject('On selectIdentityFromGUI from method requestIdentityToGUI error: ' + err);\n });\n });\n }\n }, {\n key: 'callIdentityModuleFunc',\n value: function callIdentityModuleFunc(methodName, parameters) {\n log.log('[callIdentityModuleFunc:methodName]', methodName);\n log.log('[callIdentityModuleFunc:parameters]', parameters);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var message = {\n type: 'execute', to: _this._guiURL, from: _this._idmURL,\n body: { resource: 'identity', method: methodName, params: parameters }\n };\n\n //post msg with callback but without timout\n var callback = function callback(msg) {\n _this._messageBus.removeResponseListener(_this._idmURL, msg.id);\n var result = msg.body.value;\n resolve(result);\n };\n try {\n\n _this._messageBus.postMessage(message, callback, false);\n } catch (err) {\n reject('In method callIdentityModuleFunc error: ' + err);\n }\n });\n }\n\n //******************* TOKEN METHODS *******************\n /**\n * get a Token to be added to a message\n * @param {String} fromURL origin of the message\n * @param {String} toURL target of the messageok\n * @return {JSON} token token to be added to the message\n */\n\n }, {\n key: 'getToken',\n value: function getToken(msg) {\n var _this = this;\n var fromURL = msg.from;\n var toUrl = msg.to;\n if (msg.hasOwnProperty('body') && msg.body.hasOwnProperty('source')) {\n fromURL = msg.body.source;\n }\n\n if (msg.type === 'forward') {\n fromURL = msg.body.from;\n }\n\n if (msg.hasOwnProperty('body') && msg.body.hasOwnProperty('subscriber')) {\n fromURL = msg.body.subscriber;\n }\n\n return new _promise2.default(function (resolve, reject) {\n log.log('[IdentityModule.getToken] for msg ', msg);\n\n //log.log('toUrl', toUrl);\n _this.registry.isLegacy(toUrl).then(function (result) {\n // log.log('[Identity.IdentityModule.getToken] isLEGACY: ', result);\n if (result) {\n\n _this._getAccessToken(msg).then(function (token) {\n log.log('[IdentityModule.getToken] access token ', token);\n resolve((0, _utils.deepClone)(token));\n }).catch(function (err) {\n reject('[IdentityModule.getToken] Access Token error ' + err);\n });\n } else {\n _this._getValidToken(fromURL).then(function (token) {\n resolve(token);\n }).catch(function (err) {\n reject('On getToken from method _getValidToken error: ' + err);\n });\n }\n }).catch(function (err) {\n reject('On getToken from method isLegacy error: ' + err);\n });\n });\n }\n\n /**\n * get an Id Token for a HypertyURL\n * @param {String} hypertyURL the Hyperty address\n * @return {JSON} token Id token to be added to the message\n */\n\n }, {\n key: 'getIdToken',\n value: function getIdToken(hypertyURL) {\n log.info('getIdToken:hypertyURL ', hypertyURL);\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n var splitURL = hypertyURL.split('://');\n var userURL = void 0;\n if (splitURL[0] !== 'hyperty') {\n // it is a Data Object URL\n\n _this._getHypertyFromDataObject(hypertyURL).then(function (returnedHypertyURL) {\n\n userURL = _this.registry.getHypertyOwner(returnedHypertyURL);\n\n if (userURL) {\n var identity = _this.identities.getIdentity(userURL);\n if (identity) return resolve(identity);else return reject('[IdentityModule.getIdToken] Identity not found for: ', userURL);\n } else {\n return reject('[IdentityModule.getIdToken] User not found for hyperty: ', returnedHypertyURL);\n }\n }).catch(function (reason) {\n log.error('[IdentityModule.getIdToken] Error: ', reason);\n reject(reason);\n });\n } else {\n userURL = _this.registry.getHypertyOwner(hypertyURL);\n if (userURL) {\n\n var identity = _this.identities.getIdentity(userURL);\n if (identity) return resolve(identity);else return reject('[IdentityModule.getIdToken] Identity not found for: ', userURL);\n } else {\n return reject('[IdentityModule.getIdToken] User not found for hyperty: ', userURL);\n }\n }\n });\n }\n\n /**\n * get an Access Token for an external API\n * @param {String} url the external url\n * @return {JSON} token Access token to be added to the message\n */\n\n }, {\n key: '_getAccessToken',\n value: function _getAccessToken(msg) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var url = msg.to;\n var token = void 0;\n\n if (!msg.hasOwnProperty('body')) {\n return reject('[IdentityModule._getAccessToken] missing mandatory msg body: ', msg);\n }\n if (!msg.body.hasOwnProperty('value')) {\n return reject('[IdentityModule._getAccessToken] missing mandatory msg body value: ', msg);\n }\n if (!msg.body.value.hasOwnProperty('resources')) {\n return reject('[IdentityModule._getAccessToken] missing mandatory msg body value resources: ', msg);\n }\n var domainToCheck = (0, _utils.divideURL)(url).domain;\n\n if (url.includes('protostub')) {\n domainToCheck = domainToCheck.replace(domainToCheck.split('.')[0] + '.', '');\n }\n\n var resources = msg.body.value.resources;\n\n try {\n token = _this.identities.getAccessToken(domainToCheck, resources);\n } catch (e) {\n return reject('[IdentityModule._getAccessToken] Access Token error ' + err);\n }\n\n if (!token) {\n _this._getNewAccessToken(domainToCheck, resources).then(function (token) {\n log.log('[Identity.IdentityModule.getAccessToken] new Access Token ', token);\n return resolve(token);\n }).catch(function (err) {\n reject('[IdentityModule._getAccessToken] on getNewAccessToken ' + err);\n });\n } else if (token.status === 'in-progress') {\n return resolve(_this._inProgressAccessToken(domainToCheck, resources));\n } else {\n var timeNow = (0, _utils.secondsSinceEpoch)();\n\n log.log('[Identity.IdentityModule.getAccessToken] found Access Token ', token);\n\n if (timeNow >= token.expires) return resolve(_this._getNewAccessToken(domainToCheck, resources));else return resolve(token);\n }\n });\n }\n }, {\n key: '_inProgressAccessToken',\n value: function _inProgressAccessToken(domain, resources) {\n var _this4 = this;\n\n this.identities.watchingYou.observe('accessTokens', function (change) {\n\n log.log('[IdentityModule._inProgressAccessToken] accessTokens changed ' + _this4.identities.accessTokens);\n\n var keypath = change.keypath;\n\n if (keypath.includes('status')) {\n keypath = keypath.replace('.status', '');\n }\n\n if (keypath === domain && change.name === 'status' && change.newValue === 'created') {\n // log.log('[Identity.IdentityModule.getToken] token is created ' + _this.identitiesList[domain]);\n return _this4.identities.getAccessToken(domain, resources);\n }\n });\n }\n }, {\n key: '_getNewAccessToken',\n value: function _getNewAccessToken(domain, resources) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.identities.setAccessTokenInProgress(domain);\n\n var message = {\n type: 'execute',\n to: _this._resolveDomain(domain),\n from: _this._idmURL,\n body: {\n method: 'getAccessTokenAuthorisationEndpoint',\n params: resources\n }\n };\n\n //let's first get the authorisation URL from the Idp Proxy\n _this._messageBus.postMessage(message, function (res) {\n if (res.body.code > 299) {\n return reject('[IdentityModule._getNewAccessToken] Error on getAccessTokenAuthorisationEndpoint from IdP Proxy: ', res.body.desc);\n }\n\n // let's ask the user for authorisation\n _this.callIdentityModuleFunc('openPopup', { urlreceived: res.body.value }).then(function (authorisation) {\n log.log('[IdentityModule:callIdentityModuleFunc:openPopup] auhtorisation result: ', authorisation);\n\n message.body.method = 'getAccessToken';\n message.body.params = {\n resources: resources,\n login: authorisation\n };\n\n //wihtout callback to avoid timeout errors?\n\n // let's ask Access Token from the Idp Proxy\n _this._messageBus.postMessage(message, function (res) {\n if (res.body.code > 299) return reject('[IdentityModule._getNewAccessToken] Error on getAccessToken from IdP Proxy: ', res.body.desc);\n\n _this.identities.addAccessToken(res.body.value).then(function (token) {\n log.info('[IdentityModule._getNewAccessToken] resolving token: ', token);\n return resolve(res.body.value);\n }, function (err) {\n reject(err);\n });\n });\n }, function (err) {\n reject(err);\n });\n });\n });\n }\n }, {\n key: 'sendRefreshMessage',\n value: function sendRefreshMessage(oldIdentity) {\n var _this = this;\n\n // let domain = _this._resolveDomain(oldIdentity.idp);\n // let message;\n // let assertion = _this.getIdentity(oldIdentity.userProfile.userURL);\n\n log.log('sendRefreshMessage:oldIdentity', oldIdentity);\n\n return new _promise2.default(function (resolve, reject) {\n var domain = _this._resolveDomain(oldIdentity.idp);\n var message = void 0;\n var assertion = _this.getIdentity(oldIdentity.userProfile.userURL);\n\n log.info('sendRefreshMessage:oldIdentity', oldIdentity);\n\n message = { type: 'execute', to: domain, from: _this._idmURL, body: { resource: 'identity', method: 'refreshAssertion', params: { identity: assertion } } };\n try {\n _this._messageBus.postMessage(message, function (res) {\n var result = res.body.value;\n resolve(result);\n });\n } catch (err) {\n reject('In sendRefreshMessage on postMessage error: ' + err);\n }\n });\n }\n }, {\n key: 'sendGenerateMessage',\n value: function sendGenerateMessage(contents, origin, usernameHint, idpDomain) {\n log.log('[sendGenerateMessage:contents]', contents);\n log.log('[sendGenerateMessage:origin]', origin);\n log.log('[sendGenerateMessage:usernameHint]', usernameHint);\n log.log('[sendGenerateMessage:idpDomain]', idpDomain);\n log.log('sendGenerateMessage_hint');\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var domain = _this._resolveDomain(idpDomain);\n var message = void 0;\n\n message = {\n type: 'execute', to: domain, from: _this._idmURL, body: { resource: 'identity', method: 'generateAssertion', params: { contents: contents, origin: origin, usernameHint: usernameHint } }\n };\n try {\n _this._messageBus.postMessage(message, function (res) {\n var result = res.body.value;\n resolve(result);\n });\n } catch (err) {\n reject('In sendRefreshMessage on postMessage error: ' + err);\n }\n });\n }\n\n /**\n * Requests the IdpProxy from a given Domain for an identityAssertion\n *\n * @param {DOMString} contents contents\n * @param {DOMString} origin origin\n * @param {DOMString} usernameHint usernameHint\n * @param {JSON} keyPair user keyPair\n * @return {IdAssertion} IdAssertion\n */\n\n }, {\n key: 'generateAssertion',\n value: function generateAssertion(contents, origin, usernameHint, idpDomain) {\n log.log('[generateAssertion:contents]', contents);\n log.log('[generateAssertion:origin]', origin);\n log.log('[generateAssertion:usernameHint]', usernameHint);\n\n // log.log('[generateAssertion:keyPair]', keyPair);\n log.log('[generateAssertion:idpDomain]', idpDomain);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n log.log('[IdentityModule:sendGenerateMessage:sendGenerateMessage]', usernameHint);\n _this.sendGenerateMessage(contents, origin, usernameHint, idpDomain).then(function (result) {\n\n if (result.loginUrl) {\n\n _this.callIdentityModuleFunc('openPopup', { urlreceived: result.loginUrl }).then(function (value) {\n log.log('[IdentityModule:callIdentityModuleFunc:openPopup]', usernameHint);\n\n resolve(value);\n }, function (err) {\n reject(err);\n });\n } else if (result) {\n\n _this.identities.addAssertion(result).then(function (value) {\n resolve(result);\n }, function (err) {\n reject(err);\n });\n } else {\n reject('error on obtaining identity information');\n }\n }).catch(function (err) {\n reject('On generateAssertion from method sendGenerateMessage error: ' + err);\n });\n });\n }\n\n /**\n * Requests the IdpProxy from a given Domain to validate an IdentityAssertion\n * Returns a promise with the result from the validation.\n * @param {DOMString} assertion\n * @param {DOMString} origin origin\n * @return {Promise} Promise promise with the result from the validation\n */\n\n }, {\n key: 'validateAssertion',\n value: function validateAssertion(assertion, origin, idpDomain) {\n log.log('[validateAssertion:assertion]', assertion);\n log.log('[validateAssertion:origin]', origin);\n log.log('[validateAssertion:idpDomain]', idpDomain);\n var _this = this;\n\n var domain = _this._resolveDomain(idpDomain);\n\n var message = {\n type: 'execute', to: domain, from: _this._idmURL, body: {\n resource: 'identity', method: 'validateAssertion',\n params: { assertion: assertion, origin: origin }\n }\n };\n\n return new _promise2.default(function (resolve, reject) {\n try {\n _this._messageBus.postMessage(message, function (result) {\n if (result.body.code === 200) {\n resolve(result.body.value);\n } else {\n reject('error', result.body.code);\n }\n });\n } catch (err) {\n reject('On validateAssertion from method postMessage error: ' + err);\n }\n });\n }\n }, {\n key: 'addGUIListeners',\n value: function addGUIListeners() {\n var _this = this;\n\n _this._messageBus.addListener(_this._idmURL, function (msg) {\n var funcName = msg.body.method;\n\n log.log('[IdentityModule:addGUIListeners]', msg, msg.body, funcName);\n\n var returnedValue = void 0;\n\n if (funcName === 'deployGUI') {\n returnedValue = _this.deployGUI();\n } else if (funcName === 'getIdentitiesToChoose') {\n _this.getIdentitiesToChoose().then(function (result) {\n // if the function requested is not a promise\n var value = { type: 'execute', value: result, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if storeIdentity method postMessage error: ' + err);\n }\n });\n return;\n } else if (funcName === 'unregisterIdentity') {\n var email = msg.body.params.email;\n returnedValue = _this.unregisterIdentity(email);\n } else if (funcName === 'getMyPublicKey') {\n // because generateRSAKeyPair is a promise\n // we have to send the message only after getting the key pair\n _this._crypto.getMyPublicKey().then(function (pubKey) {\n pubKey = (0, _utils.stringify)(pubKey);\n var value = { type: 'execute', value: pubKey, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if generateRSAKeyPair method postMessage error: ' + err);\n }\n });\n return;\n } else if (funcName === 'sendGenerateMessage') {\n var contents = msg.body.params.contents;\n var origin = msg.body.params.origin;\n var usernameHint = msg.body.params.usernameHint;\n var idpDomain = msg.body.params.idpDomain;\n _this.sendGenerateMessage(contents, origin, usernameHint, idpDomain).then(function (returnedValue) {\n var value = { type: 'execute', value: returnedValue, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if sendGenerateMessage method postMessage error: ' + err);\n }\n });\n return;\n } else if (funcName === 'addAssertion') {\n var result = msg.body.params;\n\n // let keyPair = msg.body.params.keyPair;\n _this.identities.addAssertion(result).then(function (returnedValue) {\n var value = { type: 'execute', value: returnedValue, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if storeIdentity method postMessage error: ' + err);\n }\n });\n return;\n } /*else if (funcName === 'selectIdentityForHyperty') {\n let origin = msg.body.params.origin;\n let idp = msg.body.params.idp;\n let idHint = msg.body.params.idHint;\n _this.selectIdentityForHyperty(origin, idp, idHint);\n return;\n }*/\n\n // if the function requested is not a promise\n var value = { type: 'execute', value: returnedValue, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if storeIdentity method postMessage error: ' + err);\n }\n });\n }\n }, {\n key: 'deployGUI',\n value: function deployGUI() {\n var _this = this;\n _this.guiDeployed = true;\n }\n\n //******************* PRIVATE METHODS *******************\n /**\n * GetValidToken is for non legacy hyperties and verifies if the Token is still valid\n * if the token is invalid it requests a new token\n * @param {String} hypertyURL hypertyURL\n * @return {Promise}\n */\n\n }, {\n key: '_getValidToken',\n value: function _getValidToken(hypertyURL) {\n log.log('[IdentityModule._getValidToken]:hypertyURL', hypertyURL);\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n _this.getIdToken(hypertyURL).then(function (assertion) {\n log.log('[IdentityModule._getValidToken] retrieved IdAssertion', assertion);\n var timeNow = (0, _utils.secondsSinceEpoch)();\n\n if (!assertion.hasOwnProperty('expires')) return resolve(assertion);\n\n var expirationDate = assertion.expires;\n\n /* if (completeId.hasOwnProperty('info')) {\n if (completeId.info.hasOwnProperty('expires')) {\n expirationDate = completeId.info.expires;\n } else if (completeId.info.hasOwnProperty('tokenIDJSON')) {\n expirationDate = completeId.info.tokenIDJSON.exp;\n } else {\n // throw 'The ID Token does not have an expiration time';\n log.info('The ID Token does not have an expiration time');\n resolve(assertion);\n }\n } else if (completeId.hasOwnProperty('infoToken') && completeId.infoToken.hasOwnProperty('exp')) {\n expirationDate = completeId.infoToken.exp;\n } else {\n // throw 'The ID Token does not have an expiration time';\n log.info('The ID Token does not have an expiration time');\n resolve(assertion);\n }*/\n\n log.log('[Identity.IdentityModule.getValidToken] Token expires in', expirationDate);\n log.log('[Identity.IdentityModule.getValidToken] time now:', timeNow);\n\n if (timeNow >= expirationDate) {\n if (assertion.hasOwnProperty('refresh')) {\n _this.sendRefreshMessage(assertion).then(function (newAssertion) {\n _this.identities.updateAssertion(newAssertion).then(function () {\n resolve(newAssertion);\n }, function (err) {\n log.error('[IdentityModule.getValidToken] error updating the assertion ', err);\n reject(err);\n });\n }, function (err) {\n log.error('[IdentityModule.getValidToken] error refreshing the assertion ', err);\n reject(err);\n });\n } else {\n // no refresh token available, user has to authenticate again to get a new assertion\n // generate new idToken\n _this.callGenerateMethods(assertion.idp.domain).then(function (value) {\n resolve(value);\n }).catch(function (err) {\n reject('[IdentityModule.getValidToken] error when generating a new assertion ' + err);\n });\n }\n } else {\n resolve(assertion);\n }\n }).catch(function (error) {\n log.error('[IdentityModule.getValidToken] error on getIdToken', error);\n reject(error);\n });\n });\n }\n\n /**\n * returns the reporter associated to the dataObject URL\n * @param {String} dataObjectURL dataObject url\n * @return {String} reporter dataObject url reporter\n */\n\n }, {\n key: '_getHypertyFromDataObject',\n value: function _getHypertyFromDataObject(dataObjectURL) {\n log.info('_getHypertyFromDataObject:dataObjectURL', dataObjectURL);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var splitedURL = (0, _utils.divideURL)(dataObjectURL);\n var domain = splitedURL.domain;\n var finalURL = (0, _utils.parseMessageURL)(dataObjectURL);\n\n // check if is the creator of the hyperty\n var reporterURL = _this.registry.getReporterURLSynchonous(finalURL);\n log.info('_getHypertyFromDataObject:reporterURL', reporterURL);\n\n if (reporterURL) {\n resolve(reporterURL);\n } else {\n // check if there is already an association from an hypertyURL to the dataObject\n var storedReporterURL = _this.dataObjectsIdentity[finalURL];\n log.info('_getHypertyFromDataObject:storedReporterURL', storedReporterURL);\n\n if (storedReporterURL) {\n resolve(storedReporterURL);\n } else {\n // check if there is any hyperty that subscribed the dataObjectURL\n var subscriberHyperty = _this.registry.getDataObjectSubscriberHyperty(dataObjectURL);\n log.info('_getHypertyFromDataObject:subscriberHyperty', subscriberHyperty);\n\n if (subscriberHyperty) {\n resolve(subscriberHyperty);\n } else {\n // search in domain registry for the hyperty associated to the dataObject\n // search in case is a subscriber who wants to know the reporter\n // To be reviewed in order to avoid the discovery transaction\n _this._coreDiscovery.discoverDataObjectPerURL(finalURL, domain).then(function (dataObject) {\n log.info('_getHypertyFromDataObject:dataObject', dataObject);\n _this.dataObjectsIdentity[finalURL] = dataObject.reporter;\n log.info('_getHypertyFromDataObject:dataObject.reporter', dataObject.reporter);\n resolve(dataObject.reporter);\n }, function (err) {\n reject(err);\n });\n }\n }\n }\n });\n }\n\n /**\n * Function that resolve and create the domainURL in case it is provided one. If not, resolve the default domainURL\n * @param {String} idpDomain idpDomain (Optional)\n */\n\n }, {\n key: '_resolveDomain',\n value: function _resolveDomain(idpDomain) {\n if (!idpDomain) {\n return 'domain-idp://google.com';\n } else {\n return 'domain-idp://' + idpDomain;\n }\n }\n\n /*\n _secondsSinceEpoch() {\n return Math.floor(Date.now() / 1000);\n }*/\n\n }, {\n key: 'messageBus',\n get: function get() {\n var _this = this;\n return _this._messageBus;\n }\n\n /**\n * Set the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n ,\n set: function set(messageBus) {\n var _this = this;\n _this._messageBus = messageBus;\n _this.addGUIListeners();\n }\n\n /**\n * return the coreDiscovery component\n * do we need this??\n */\n\n }, {\n key: 'coreDiscovery',\n get: function get() {\n var _this = this;\n return _this._coreDiscovery;\n }\n\n /**\n * Set the coreDiscovery component\n * @param {coreDiscovery} coreDiscovery\n */\n ,\n set: function set(coreDiscovery) {\n var _this = this;\n _this._coreDiscovery = coreDiscovery;\n }\n\n /**\n * return the registry in this idModule\n * @param {registry} registry\n */\n\n }, {\n key: 'registry',\n get: function get() {\n var _this = this;\n return _this._registry;\n }\n\n /**\n * Set the registry in this idModule\n * @param {registry} reg\n */\n ,\n set: function set(registry) {\n var _this = this;\n _this._registry = registry;\n }\n }, {\n key: 'identities',\n get: function get() {\n var _this = this;\n return _this._identities;\n }\n }, {\n key: 'idps',\n get: function get() {\n return this._listOfIdps;\n }\n }]);\n return IdentityModule;\n}();\n\nexports.default = IdentityModule;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9pZGVudGl0eS9JZGVudGl0eU1vZHVsZS5qcz81MTE1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIExvZyBTeXN0ZW1cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignSWRlbnRpdHlNb2R1bGUnKTtcblxuaW1wb3J0IHsgc2Vjb25kc1NpbmNlRXBvY2gsIGRpdmlkZVVSTCwgcGFyc2VNZXNzYWdlVVJMLCBzdHJpbmdpZnksIGRlZXBDbG9uZSB9IGZyb20gJy4uL3V0aWxzL3V0aWxzLmpzJztcbmltcG9ydCB7IHJ1bnRpbWVDb25maWd1cmF0aW9uIH0gZnJvbSAnLi4vcnVudGltZS9ydW50aW1lQ29uZmlndXJhdGlvbic7XG5cbmltcG9ydCBJZGVudGl0aWVzIGZyb20gJy4vSWRlbnRpdGllcyc7XG5pbXBvcnQgR3VpRmFrZSBmcm9tICcuL0d1aUZha2UnO1xuXG4vKipcbipcbiogVGhlIElkZW50aXR5IE1vZHVsZSAoSWQgTW9kdWxlKSBpcyB0aGUgY29tcG9uZW50IHJlc3BvbnNpYmxlIGZvciBoYW5kbGluZyB0aGVcbiogdXNlciBpZGVudGl0eSBhbmQgdGhlIGFzc29jaWF0aW9uIG9mIHRoaXMgaWRlbnRpdHkgd2l0aCB0aGUgSHlwZXJ0eSBpbnN0YW5jZXMsXG4qIGluIG9yZGVyIHRvIG1ha2UgSHlwZX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gICAgICAgICAgICAgbG9nLmxvZygnW0lkZW50aXR5TW9kdWxlXSBJZGVudGl0eSBzZWxlY3RlZCBieSBoeXBlcnR5LicpO1xuICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZShuZXdBc3NlcnRpb24pO1xuICAgICAgICAgICAgfSwgKGVycikgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gcmVqZWN0KGVycik7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcblxuICAgICAgICAgIGlmIChfdGhpcy5pZGVudGl0aWVzLmRlZmF1bHRJZGVudGl0eSAmJiBfdGhpcy5pZGVudGl0aWVzLmRlZmF1bHRJZGVudGl0eS5leHBpcmVzID4gc2Vjb25kc1NpbmNlRXBvY2goKSkge1xuICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUoX3RoaXMuaWRlbnRpdGllcy5kZWZhdWx0SWRlbnRpdHkpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBfdGhpcy5zZWxlY3RJZGVudGl0eUZyb21HVUkoKS50aGVuKChhc3NlcnRpb24pID0+IHtcblxuICAgICAgICAgICAgICBsb2cubG9nKCdbSWRlbnRpdHlNb2R1bGVdIElkZW50aXR5IHNlbGVjdGVkIGZyb20gR1VJLicpO1xuXG4gICAgICAgICAgICAgIC8qXG4gICAgICAgICAgICAgICAgX3RoaXMuaWRlbnRpdGllcy5kZWZhdWx0SWRlbnRpdHkgPSBhc3NlcnRpb24udXNlclByb2ZpbGUudXNlclVSTDtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZShhc3NlcnRpb24pO1xuICAgICAgICAgICAgICB9Ki9cblxuICAgICAgICAgICAgICBfdGhpcy5pZGVudGl0aWVzLmRlZmF1bHRJZGVudGl0eSA9IGFzc2VydGlvbi51c2VyUHJvZmlsZS51c2VyVVJMO1xuICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZShhc3NlcnRpb24pO1xuIC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b3cpO1xuXG4gICAgICAgIGlmICh0aW1lTm93ID49IGV4cGlyYXRpb25EYXRlKSB7XG4gICAgICAgICAgaWYgKGFzc2VydGlvbi5oYXNPd25Qcm9wZXJ0eSgncmVmcmVzaCcpKSB7XG4gICAgICAgICAgICBfdGhpcy5zZW5kUmVmcmVzaE1lc3NhZ2UoYXNzZXJ0aW9uKS50aGVuKChuZXdBc3NlcnRpb24pID0+IHtcbiAgICAgICAgICAgICAgX3RoaXMuaWRlbnRpdGllcy51cGRhdGVBc3NlcnRpb24obmV3QXNzZXJ0aW9uKS50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICByZXNvbHZlKG5ld0Fzc2VydGlvbik7XG4gICAgICAgICAgICAgIH0sIChlcnIpID0+IHtcbiAgICAgICAgICAgICAgICBsb2cuZXJyb3IoJ1tJZGVudGl0eU1vZHVsZS5nZXRWYWxpZFRva2VuXSBlcnJvciB1cGRhdGluZyB0aGUgYXNzZXJ0aW9uICcsIGVycik7XG4gICAgICAgICAgICAgICAgcmVqZWN0KGVycik7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSwgKGVycikgPT4ge1xuICAgICAgICAgICAgICBsb2cuZXJyb3IoJ1tJZGVudGl0eU1vZHVsZS5nZXRWYWxpZFRva2VuXSBlcnJvciByZWZyZXNoaW5nIHRoZSBhc3NlcnRpb24gJywgZXJyKTtcbiAgICAgICAgICAgICAgcmVqZWN0KGVycik7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2UgeyAvLyBubyByZWZyZXNoIHRva2VuIGF2YWlsYWJsZSwgdXNlciBoYXMgdG8gYXV0aGVudGljYXRlIGFnYWluIHRvIGdldCBhIG5ldyBhc3NlcnRpb25cbiAgICAgICAgICAgIC8vIGdlbmVyYXRlIG5ldyBpZFRva2VuXG4gICAgICAgICAgICBfdGhpcy5jYWxsR2VuZXJhdGVNZXRob2RzKGFzc2VydGlvbi5pZHAuZG9tYWluKS50aGVuKCh2YWx1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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQXJvQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBQUNBO0FBQ0E7QUFDQTs7O0FBNEJBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7Ozs7O0FBd2pDQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///469\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _isInteger = __webpack_require__(471);\n\nvar _isInteger2 = _interopRequireDefault(_isInteger);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _assign = __webpack_require__(96);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _Utils = __webpack_require__(205);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('IdentityModule'); // Log System\n\n/**\n* The Identity Data Model is used to model the reTHINK User entity. The Identity data model is handled by Identity Management functionality.\n*\n*/\nvar Identities = function () {\n function Identities(type, storageManager) {\n (0, _classCallCheck3.default)(this, Identities);\n\n var _this = this;\n\n _this._watchingYou = new _Utils.WatchingYou();\n\n _this._storageManager = storageManager;\n _this._guid;\n _this._type = type;\n _this._identities = {};\n _this._accessTokens = _this.watchingYou.watch('accessTokens', {}, true);\n }\n\n (0, _createClass3.default)(Identities, [{\n key: 'getIdentity',\n value: function getIdentity(identifier) {\n return (0, _assign2.default)({}, this._identities[identifier]);\n }\n }, {\n key: 'loadIdentities',\n value: function loadIdentities() {\n var _this = this;\n return new _promise2.default(function (resolve) {\n\n _this._storageManager.get(null, null, 'identities').then(function (identities) {\n\n log.info('[Identities.Load Identities] identities: ', identities);\n\n if (identities) {\n _this._identities = identities;\n\n // let's set as default identity the one that expires later\n\n _this.identifiers.forEach(function (id) {\n var timeNow = (0, _utils.secondsSinceEpoch)();\n var identity = _this._identities[id];\n var expires = identity.expires;\n\n // if (!identity.hasOwnProperty('interworking')\n // || !identity.interworking) {\n _this.defaultIdentity = id;\n\n if (parseInt(expires) > timeNow) {\n _this.defaultIdentity.expires = parseInt(expires);\n _this.currentIdentity = id;\n }\n });\n }\n\n resolve();\n });\n });\n }\n }, {\n key: 'loadAccessTokens',\n value: function loadAccessTokens() {\n var _this = this;\n return new _promise2.default(function (resolve) {\n\n _this._storageManager.get('accessTokens').then(function (accessTokens) {\n\n if (accessTokens) _this._accessTokens = accessTokens;\n resolve();\n });\n });\n }\n\n // to confirm if this function is required when the App constraints the identity selection\n\n }, {\n key: 'addIdentity',\n value: function addIdentity(identity) {\n var _this2 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n if (_this._isValid(identity)) {\n var id = identity.identifiers[0];\n (0, _assign2.default)(_this2._identities[id], identity);\n _this2._storeIdentity(identity).then(function () {\n _this2._identities[id].status = 'created';\n resolve();\n });\n } else reject('[Identities.addIdentity] invalid IdAssertion');\n });\n }\n }, {\n key: 'addAssertion',\n value: function addAssertion(assertion) {\n var _this3 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n if (_this._isValid(assertion)) {\n\n var userUrl = assertion.userProfile.userURL;\n\n if (!_this.identities[userUrl]) _this._identities[userUrl] = assertion;else _this.identities[userUrl] = assertion;\n\n _this._store().then(function () {\n _this3._identities[userUrl].status = 'created';\n resolve(assertion);\n });\n } else reject('[Identities.addAssertion] invalid IdAssertion: ', assertion);\n });\n }\n }, {\n key: 'removeIdentity',\n value: function removeIdentity(userUrl) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n delete _this.identities[userUrl];\n\n _this._store().then(function () {\n resolve();\n });\n });\n }\n }, {\n key: 'addAccessToken',\n value: function addAccessToken(accessToken) {\n var _this = this;\n log.info('[Identities.addAccessToken] ', accessToken);\n\n return new _promise2.default(function (resolve, reject) {\n\n if (_this._isValidAccessToken(accessToken)) {\n\n // let newAccessToken = deepClone(accessToken);\n\n _this._accessTokens[accessToken.domain] = accessToken;\n\n _this._storeAccessTokens().then(function () {\n _this._accessTokens[accessToken.domain].status = 'created';\n resolve(accessToken);\n });\n } else reject('[Identities.addIdentity] invalid AccessToken: ', accessToken);\n });\n }\n }, {\n key: 'setAccessTokenInProgress',\n value: function setAccessTokenInProgress(domain) {\n\n if (this._accessTokens[domain]) this._accessTokens[domain].status = 'in-progress';else this._accessTokens[domain] = { status: 'in-progress' };\n }\n }, {\n key: 'getAccessToken',\n value: function getAccessToken(domain, resources) {\n var accessToken = this._accessTokens[domain];\n\n if (!accessToken) return undefined;else if (resources.every(function (i) {\n return accessToken.resources.indexOf(i) != -1;\n })) return this._accessTokens[domain];else return new Error('[Identities.getAccessToken] Not found for ', domain);\n }\n }, {\n key: 'updateAssertion',\n value: function updateAssertion(assertion) {\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n var userUrl = assertion.userProfile.userUrl;\n\n if (!_this.identities[userUrl]) return reject('[Identities.updateAssertion] Identity not found for ', userUrl);else {\n _this.identities[userUrl] = assertion;\n _this._store().then(function () {\n resolve();\n });\n }\n });\n }\n }, {\n key: 'addIdAssertion',\n value: function addIdAssertion(identifier, assertion, idp, scope) {\n var _this = this;\n\n var newIdAssertion = new IdAssertion(assertion, idp, scope);\n\n _this.idAssertionList.push(newIdAssertion);\n }\n\n //TODO: complete with more verifications. To be moved to Identity?\n\n }, {\n key: '_isValid',\n value: function _isValid(identity) {\n if (!identity.hasOwnProperty('assertion')) {\n return false;\n }\n\n var splitedAssertion = identity.assertion.split('.');\n var assertionParsed = void 0;\n\n //verify if the token contains the 3 components, or just the assertion\n try {\n if (splitedAssertion[1]) {\n assertionParsed = (0, _utils.decode)(splitedAssertion[1]);\n } else {\n assertionParsed = (0, _utils.decode)(identity.assertion);\n }\n } catch (err) {\n return false;\n }\n\n return true;\n }\n }, {\n key: '_isValidAccessToken',\n value: function _isValidAccessToken(accessToken) {\n\n if (!accessToken.hasOwnProperty('accessToken')) {\n return false;\n }\n\n if (!accessToken.hasOwnProperty('domain')) {\n return false;\n }\n\n if (!(accessToken.hasOwnProperty('resources') && Array.isArray(accessToken.resources))) {\n return false;\n }\n\n if (!(accessToken.hasOwnProperty('expires') && (0, _isInteger2.default)(accessToken.expires))) {\n return false;\n }\n\n if (!accessToken.hasOwnProperty('input')) {\n return false;\n }\n\n return true;\n }\n\n //TODO: add function to only set one new identity using the new indexed storage manager\n\n }, {\n key: '_store',\n value: function _store() {\n var _this4 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var store = (0, _keys2.default)(_this4._identities).map(function (userURL) {\n return _this._storageManager.set(userURL, 0, _this4._identities[userURL], 'identities');\n });\n\n _promise2.default.all(store).then(function () {\n resolve();\n }).catch(function (err) {\n reject('On _sendReporterSessionKey from method storeIdentity error: ' + err);\n });\n });\n }\n }, {\n key: '_storeAccessTokens',\n value: function _storeAccessTokens() {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var accessTokens = (0, _utils.deepClone)(_this._accessTokens);\n\n _this._storageManager.set('accessTokens', 0, accessTokens).then(function () {\n resolve();\n }).catch(function (err) {\n reject('On _sendReporterSessionKey from method storeIdentity error: ' + err);\n });\n });\n }\n }, {\n key: 'identities',\n get: function get() {\n return this._identities;\n }\n }, {\n key: 'accessTokens',\n get: function get() {\n return this._accessTokens;\n }\n }, {\n key: 'watchingYou',\n get: function get() {\n return this._watchingYou;\n }\n }, {\n key: 'guid',\n set: function set(guid) {\n this._guid = guid;\n },\n get: function get() {\n return this._guid;\n }\n }, {\n key: 'defaultIdentity',\n set: function set(identifier) {\n if (this.identities[identifier]) this._defaultIdentity = identifier;else throw new Error('[Identities.set defaultIdentity ] Error: identity does not exist here: ', identifier);\n },\n get: function get() {\n if (this._defaultIdentity) return (0, _assign2.default)({}, this.identities[this._defaultIdentity]);else return false;\n }\n }, {\n key: 'currentIdentity',\n set: function set(identifier) {\n if (this.identities[identifier]) this._currentIdentity = identifier;else throw '[Identities.set currentIdentity ] Error: identity does not exist here: ', identifier;\n },\n get: function get() {\n return (0, _assign2.default)({}, this.identities[this._currentIdentity]);\n }\n }, {\n key: 'identifiers',\n get: function get() {\n return (0, _keys2.default)(this._identities);\n }\n }]);\n return Identities;\n}();\n\n// move to Identity service framework?\n\nvar IdAssertion = function () {\n function IdAssertion(assertion, idp, userProfile) {\n (0, _classCallCheck3.default)(this, IdAssertion);\n\n var _this = this;\n\n _this._assertion = assertion;\n _this._idp = idp;\n _this._userProfile = userProfile;\n }\n\n (0, _createClass3.default)(IdAssertion, [{\n key: 'assertion',\n get: function get() {\n return this._assertion;\n }\n }, {\n key: 'idp',\n get: function get() {\n return this._idp;\n }\n }, {\n key: 'userProfile',\n get: function get() {\n return this._userProfile;\n }\n }]);\n return IdAssertion;\n}();\n\nvar IdValidation = function () {\n function IdValidation(identity, contents) {\n (0, _classCallCheck3.default)(this, IdValidation);\n\n var _this = this;\n _this.identity = identity;\n _this.contents = contents;\n }\n\n (0, _createClass3.default)(IdValidation, [{\n key: 'validates',\n value: function validates(identity, contents) {\n //TODO implement the logic\n\n }\n }]);\n return IdValidation;\n}();\n\nexports.default = Identities;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDcwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9pZGVudGl0eS9JZGVudGl0aWVzLmpzPzM1NjQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ2VyIGZyb20gJ2xvZ2xldmVsJztcbmxldCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdJZGVudGl0eU1vZHVsZScpO1xuXG5pbXBvcnQgeyBkZWNvZGUsIHNlY29uZHNTaW5jZUVwb2NoLCBkZWVwQ2xvbmUgfSBmcm9tICcuLi91dGlscy91dGlscy5qcyc7XG5pbXBvcnQgeyBXYXRjaGluZ1lvdSB9IGZyb20gJ3NlcnZpY2UtZnJhbWV3b3JrL2Rpc3QvVXRpbHMnO1xuXG5cbi8qKlxuKiBUaGUgSWRlbnRpdHkgRGF0YSBNb2RlbCBpcyB1c2VkIHRvIG1vZGVsIHRoZSByZVRISU5LIFVzZXIgZW50aXR5LiBUaGUgSWRlbnRpdHkgZGF0YSBtb2RlbCBpcyBoYW5kbGVkIGJ5IElkZW50aXR5IE1hbmFnZW1lbnQgZnVuY3Rpb25hbGl0eS5cbipcbiovXG5jbGFzcyBJZGVudGl0aWVzIHtcblxuICBjb25zdHJ1Y3Rvcih0eXBlLCBzdG9yYWdlTWFuYWdlcikge1xuICAgIGxldCBfdGhpc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VzXSBpZGVudGl0aWVzOiAnLCBpZGVudGl0aWVzKTtcblxuICAgICAgICBpZiAoaWRlbnRpdGllcykge1xuICAgICAgICAgIF90aGlzLl9pZGVudGl0aWVzID0gaWRlbnRpdGllcztcblxuICAgICAgICAgIC8vIGxldCdzIHNldCBhcyBkZWZhdWx0IGlkZW50aXR5IHRoZSBvbmUgdGhhdCBleHBpcmVzIGxhdGVyXG5cbiAgICAgICAgICBfdGhpcy5pZGVudGlmaWVycy5mb3JFYWNoKChpZCkgPT4ge1xuICAgICAgICAgICAgbGV0IHRpbWVOb3cgPSBzZWNvbmRzU2luY2VFcG9jaCgpO1xuICAgICAgICAgICAgbGV0IGlkZW50aXR5ID0gX3RoaXMuX2lkZW50aXRpZXNbaWRdO1xuICAgICAgICAgICAgbGV0IGV4cGlyZXMgPSBpZGVudGl0eS5leHBpcmVzO1xuXG4gICAgICAgICAgICAvLyAgICAgICAgICAgIGlmICghaWRlbnRpdHkuaGFzT3duUHJvcGVydHkoJ2ludGVyd29ya2luZycpXG4gICAgICAgICAgICAvLyAgICAgICAgICAgIHx8ICFpZGVudGl0eS5pbnRlcndvcmtpbmcpIHtcbiAgICAgICAgICAgIF90aGlzLmRlZmF1bHRJZGVudGl0eSA9IGlkO1xuXG4gICAgICAgICAgICBpZiAocGFyc2VJbnQoZXhwaXJlcykgPiB0aW1lTm93KSB7XG4gICAgICAgICAgICAgIF90aGlzLmRlZmF1bHRJZGVudGl0eS5leHBpcmVzID0gcGFyc2VJbnQoZXhwaXJlcyk7XG4gICAgICAgICAgICAgIF90aGlzLmN1cnJlbnRJZGVudGl0eSA9IGlkO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXNvbHZlKCk7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxuXG4gIGxvYWRBY2Nlc3NUb2tlbnMoKSB7XG4gICAgbGV0IF90aGlzID0gdGhpcztcbiAgICByZXR1cm4gbmV3IFByb21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pack-internal:///470\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(472), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDcxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9udW1iZXIvaXMtaW50ZWdlci5qcz80NTFhIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0geyBcImRlZmF1bHRcIjogcmVxdWlyZShcImNvcmUtanMvbGlicmFyeS9mbi9udW1iZXIvaXMtaW50ZWdlclwiKSwgX19lc01vZHVsZTogdHJ1ZSB9O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9udW1iZXIvaXMtaW50ZWdlci5qc1xuLy8gbW9kdWxlIGlkID0gNDcxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///471\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(473);\nmodule.exports = __webpack_require__(13).Number.isInteger;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDcyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9udW1iZXIvaXMtaW50ZWdlci5qcz83MzhlIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2Lm51bWJlci5pcy1pbnRlZ2VyJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5OdW1iZXIuaXNJbnRlZ2VyO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL251bWJlci9pcy1pbnRlZ2VyLmpzXG4vLyBtb2R1bGUgaWQgPSA0NzJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///472\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.3 Number.isInteger(number)\nvar $export = __webpack_require__(21);\n\n$export($export.S, 'Number', { isInteger: __webpack_require__(474) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDczLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5udW1iZXIuaXMtaW50ZWdlci5qcz9kNWE5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjEuMi4zIE51bWJlci5pc0ludGVnZXIobnVtYmVyKVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdOdW1iZXInLCB7IGlzSW50ZWdlcjogcmVxdWlyZSgnLi9faXMtaW50ZWdlcicpIH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm51bWJlci5pcy1pbnRlZ2VyLmpzXG4vLyBtb2R1bGUgaWQgPSA0NzNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///473\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.3 Number.isInteger(number)\nvar isObject = __webpack_require__(36);\nvar floor = Math.floor;\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pcy1pbnRlZ2VyLmpzPzAwYTgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMS4yLjMgTnVtYmVyLmlzSW50ZWdlcihudW1iZXIpXG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBmbG9vciA9IE1hdGguZmxvb3I7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGlzSW50ZWdlcihpdCkge1xuICByZXR1cm4gIWlzT2JqZWN0KGl0KSAmJiBpc0Zpbml0ZShpdCkgJiYgZmxvb3IoaXQpID09PSBpdDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXMtaW50ZWdlci5qc1xuLy8gbW9kdWxlIGlkID0gNDc0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///474\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('IdentityModule');\n\n/**\n* fake class for the gui to select the identity,\n* TODO replace with the proper identity GUI\n*\n*/\n// Log System\n\nvar GuiFake = function GuiFake(url, messageBus) {\n (0, _classCallCheck3.default)(this, GuiFake);\n\n log.log('FakeGUI_deployed');\n var _this = this;\n\n _this._url = url;\n _this._waitTime = 10000;\n _this._messageBus = messageBus;\n\n _this._messageBus.addListener(_this._url, function (msg) {\n\n if (msg.hasOwnProperty('type') && msg.type === 'create' && msg.body.hasOwnProperty('value') && msg.body.value.hasOwnProperty('identities') && msg.body.value.hasOwnProperty('idps')) {\n\n var identities = msg.body.value.identities;\n var idps = msg.body.value.idps;\n\n var value = void 0;\n\n if (identities[0] !== undefined) {\n value = { type: 'identity', value: identities[0], code: 200 };\n } else {\n value = { type: 'idp', value: idps[1].domain, code: 200 };\n }\n\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n\n // to test on the identity side the listener without the timeout\n // can represent the time the user takes to choose and identity\n if (msg.body.value === 'wait') {\n\n setTimeout(function () {\n _this._messageBus.postMessage(replyMsg);\n }, _this._waitTime);\n } else {\n _this._messageBus.postMessage(replyMsg);\n }\n } else {\n log.log('Ignoring messages not intended to FakeGUI.', msg);\n }\n });\n};\n\nexports.default = GuiFake;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uI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uICAgICAgICBsb2cubG9nKCdJZ25vcmluZyBtZXNzYWdlcyBub3QgaW50ZW5kZWQgdG8gRmFrZUdVSS4nLCBtc2cpO1xuICAgICAgfVxuICAgIH0pO1xuICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgR3VpRmFrZTtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvaWRlbnRpdHkvR3VpRmFrZS5qcyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUNBO0FBQ0E7QUFEQTtBQUNBOzs7OztBQUFBO0FBQ0E7QUFDQTs7Ozs7QUFKQTtBQUNBO0FBUUE7QUFFQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFHQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///475\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('IdentityManager'); /**\n * Provides an API to manage identities from msg bus pipeline\n *\n */\n\nvar IdentityManager = function () {\n function IdentityManager(idm) {\n (0, _classCallCheck3.default)(this, IdentityManager);\n\n var _this = this;\n\n _this._idm = idm;\n }\n\n (0, _createClass3.default)(IdentityManager, [{\n key: '_isToSetID',\n value: function _isToSetID(message) {\n var schemasToIgnore = ['domain-idp', 'runtime', 'domain'];\n\n var _from = message.from;\n\n if (message.body && message.body.hasOwnProperty('source')) {\n _from = message.body.source;\n }\n\n if (message.body && message.body.hasOwnProperty('subscriber')) {\n _from = message.body.subscriber;\n }\n\n // Signalling Messages between P2P Stubs don't have Identities. FFS\n if (_from.includes('/p2prequester/') || _from.includes('/p2phandler/')) {\n return false;\n }\n\n var splitFrom = _from.split('://');\n var fromSchema = splitFrom[0];\n var isToIgnore = schemasToIgnore.indexOf(fromSchema) === -1;\n\n return isToIgnore;\n }\n }, {\n key: 'processMessage',\n value: function processMessage(message) {\n var _this2 = this;\n\n log.log('[IdentityManager.processMessage] ', message);\n\n return new _promise2.default(function (resolve, reject) {\n\n // skip messages that don't need identity tokens in the body\n\n if (!_this2._isToSetID(message)) return resolve(message);\n\n /* let from = message.from;\n let sourceURL = undefined;\n if ( message.hasOwnProperty('body') && message.body.hasOwnProperty('source')) {\n from = message.body.source;\n }\n \n if (message.type === 'forward') {\n from = message.body.from;\n }\n \n if (message.hasOwnProperty('body') && message.body.hasOwnProperty('subscriber')) {\n from = message.body.subscriber;\n }*/\n\n _this2._idm.getToken(message).then(function (identity) {\n\n if (!message.hasOwnProperty('body')) message.body = {};\n\n message.body.identity = identity;\n resolve(message);\n }).catch(function (reason) {\n log.error(reason);\n reject(reason);\n });\n });\n }\n }]);\n return IdentityManager;\n}();\n\nexports.default = IdentityManager;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9pZGVudGl0eS9JZGVudGl0eU1hbmFnZXIuanM/ZjI3ZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogUHJvdmlkZXMgYW4gQVBJIHRvIG1hbmFnZSBpZGVudGl0aWVzIGZyb20gbXNnIGJ1cyBwaXBlbGluZVxuKlxuKi9cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignSWRlbnRpdHlNYW5hZ2VyJyk7XG5cbmNsYXNzIElkZW50aXR5TWFuYWdlciB7XG5cbiAgY29uc3RydWN0b3IoaWRtKSB7XG4gICAgbGV0IF90aGlzID0gdGhpcztcblxuICAgIF90aGlzLl9pZG0gPSBpZG07XG5cbiAgfVxuXG4gIF9pc1RvU2V0SUQobWVzc2FnZSkge1xuICAgIGxldCBzY2hlbWFzVG9JZ25vcmUgPSBbJ2RvbWFpbi1pZHAnLCAncnVudGltZScsICdkb21haW4nXTtcblxuICAgIGxldCBfZnJvbSA9IG1lc3NhZ2UuZnJvbTtcblxuICAgIGlmIChtZXNzYWdlLmJvZHkgJiYgbWVzc2FnZS5ib2R5Lmhhc093blByb3BlcnR5KCdzb3VyY2UnKSkge1xuICAgICAgX2Zyb20gPSBtZXNzYWdlLmJvZHkuc291cmNlO1xuICAgIH1cblxuICAgIGlmIChtZXNzYWdlLmJvZHkgJiYgbWVzc2FnZS5ib2R5Lmhhc093blByb3BlcnR5KCdzdWJzY3JpYmVyJykpIHtcbiAgICAgIF9mcm9tID0gbWVzc2FnZS5ib2R5LnN1YnNjcmliZXI7XG4gICAgfVxuXG4gICAgLy8gU2lnbmFsbGluZyBNZXNzYWdlcyBiZXR3ZWVuIFAyUCBTdHVicy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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7Ozs7Ozs7Ozs7QUFjQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBR0E7Ozs7O0FBS0E7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///476\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _ActionsService = __webpack_require__(478);\n\nvar _ActionsService2 = _interopRequireDefault(_ActionsService);\n\nvar _PDP = __webpack_require__(479);\n\nvar _PDP2 = _interopRequireDefault(_PDP);\n\nvar _Policy = __webpack_require__(480);\n\nvar _Policy2 = _interopRequireDefault(_Policy);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('PEP'); // Log System\n\nvar PEP = function () {\n\n /**\n * Creates a Policy Enforcement Point (PEP) instance\n * @param {Object} context\n */\n function PEP(context) {\n (0, _classCallCheck3.default)(this, PEP);\n\n var _this = this;\n\n _this.pdp = new _PDP2.default(context);\n _this.actionsService = new _ActionsService2.default(context);\n _this.context = context;\n context.pep = _this;\n\n //TODO should be added a trigger to verify when the loadConfigurations is successfully completed\n context.loadConfigurations();\n }\n\n /**\n * return the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n\n\n (0, _createClass3.default)(PEP, [{\n key: 'addGUIListeners',\n value: function addGUIListeners() {\n var _this = this;\n\n _this.context.messageBus.addListener(_this.context.pepURL, function (msg) {\n var funcName = msg.body.method;\n\n var returnedValue = void 0;\n if (funcName === 'addToGroup') {\n var groupName = msg.body.params.groupName;\n var userEmail = msg.body.params.userEmail;\n returnedValue = _this.context.addToGroup(groupName, userEmail);\n } else if (funcName === 'createGroup') {\n var _groupName = msg.body.params.groupName;\n returnedValue = _this.context.createGroup(_groupName);\n } else if (funcName === 'addPolicy') {\n var source = msg.body.params.source;\n var key = msg.body.params.key;\n var policy = msg.body.params.policy;\n var combiningAlgorithm = msg.body.params.combiningAlgorithm;\n returnedValue = _this.addPolicy(source, key, policy, combiningAlgorithm);\n } else if (funcName === 'deleteGroup') {\n var _groupName2 = msg.body.params.groupName;\n returnedValue = _this.context.deleteGroup(_groupName2);\n } else if (funcName === 'removePolicy') {\n var _source = msg.body.params.source;\n var _key = msg.body.params.key;\n returnedValue = _this.removePolicy(_source, _key);\n } else if (funcName === 'savePolicies') {\n var _source2 = msg.body.params.source;\n returnedValue = _this.context.savePolicies(_source2);\n } else if (funcName === 'userPolicies') {\n returnedValue = _this.context.userPolicies;\n } else if (funcName === 'activeUserPolicy') {\n var userPolicy = msg.body.params.userPolicy;\n if (userPolicy) {\n _this.context.activeUserPolicy = userPolicy;\n }\n returnedValue = _this.context.activeUserPolicy;\n } else if (funcName === 'userPolicy') {\n var _key2 = msg.body.params.key;\n returnedValue = _this.context.userPolicies[_key2];\n } else if (funcName === 'saveActivePolicy') {\n returnedValue = _this.context.saveActivePolicy();\n } else if (funcName === 'getMyEmails') {\n returnedValue = _this.context.getMyEmails();\n } else if (funcName === 'getMyHyperties') {\n returnedValue = _this.context.getMyHyperties();\n } else if (funcName === 'groups') {\n returnedValue = _this.context.groups;\n } else if (funcName === 'getGroupsNames') {\n returnedValue = _this.context.getGroupsNames();\n }if (funcName === 'removeFromGroup') {\n var _groupName3 = msg.body.params.groupName;\n var _userEmail = msg.body.params.userEmail;\n returnedValue = _this.context.removeFromGroup(_groupName3, _userEmail);\n }\n\n var value = { type: 'execute', value: returnedValue, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n _this.context.messageBus.postMessage(replyMsg);\n });\n }\n\n /**\n * Adds a policy to the Policy Enforcement Point (PEP). The policy can be created by the service\n * provider or by the user.\n * @param {String} source\n * @param {String} key\n * @param {Object} policy\n */\n\n }, {\n key: 'addPolicy',\n value: function addPolicy(source, key, policy, combiningAlgorithm) {\n if (!source) throw new Error('source is not defined');\n if (!key) throw new Error('key is not defined');\n\n if (policy === undefined) {\n policy = new _Policy2.default(key, [], [], combiningAlgorithm);\n } else {\n if (!(policy instanceof _Policy2.default)) {\n policy = new _Policy2.default(policy.key, policy.rules, policy.actions, policy.combiningAlgorithm);\n }\n }\n\n switch (source) {\n case 'SERVICE_PROVIDER':\n this.context.savePolicies(source, policy, key);\n break;\n case 'USER':\n this.context.userPolicies[key] = policy;\n this.context.savePolicies(source);\n break;\n default:\n throw Error('Unknown policy source: ' + source);\n }\n }\n }, {\n key: 'authorise',\n value: function authorise(message, isIncoming) {\n var _this2 = this;\n\n // log.log('[Policy.PEP Authorise] ', message);\n // log.log(message);\n if (!message) throw new Error('message is not defined');\n if (!message.from) throw new Error('message.from is not defined');\n if (!message.to) throw new Error('message.to is not defined');\n if (!message.type) throw new Error('message.type is not defined');\n message.body = message.body || {};\n\n return new _promise2.default(function (resolve, reject) {\n\n message.body = message.body || {};\n var _this = _this2;\n\n var result = _this.pdp.evaluatePolicies(message, isIncoming);\n if (result === 'Not Applicable') {\n result = _this.context.defaultBehaviour;\n message.body.auth = false;\n }\n _this.actionsService.enforcePolicies(message, isIncoming).then(function (messages) {\n for (var i in messages) {\n message = messages[i];\n if (result) {\n message.body.auth = message.body.auth === undefined ? true : message.body.auth;\n resolve(message);\n } else {\n var errorMessage = { body: { code: 403, description: 'Blocked by policy' }, from: message.to, to: message.from, type: 'response' };\n reject(errorMessage);\n }\n }\n }, function (error) {\n reject(error);\n });\n });\n }\n }, {\n key: 'removePolicy',\n value: function removePolicy(source, key) {\n if (!source) throw new Error('source is not defined');\n if (source !== '*' && !key) throw new Error('key is not defined');\n\n switch (source) {\n case '*':\n this.context.serviceProviderPolicy = {};\n this.context.userPolicies = {};\n this.context.activeUserPolicy = undefined;\n this.context.savePolicies('USER');\n this.context.savePolicies('SERVICE_PROVIDER');\n this.context.saveActivePolicy();\n break;\n case 'SERVICE_PROVIDER':\n delete this.context.serviceProviderPolicy[key];\n this.context.savePolicies();\n break;\n case 'USER':\n delete this.context.userPolicies[key];\n if (key === this.context.activeUserPolicy) {\n this.context.activeUserPolicy = undefined;\n this.context.saveActivePolicy();\n }\n this.context.savePolicies('USER');\n break;\n default:\n throw Error('Unknown policy source: ' + source);\n }\n }\n }, {\n key: 'messageBus',\n get: function get() {\n var _this = this;\n return _this.context.messageBus;\n }\n\n /**\n * Set the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n ,\n set: function set(messageBus) {\n var _this = this;\n _this.context.messageBus = messageBus;\n _this.addGUIListeners();\n }\n }]);\n return PEP;\n}();\n\nexports.default = PEP;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvUEVQLmpzPzQ3ZjIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ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ZmFsc2U7XG4gICAgICAgICAgfVxuICAgICAgICAgIF90aGlzLmFjdGlvbnNTZXJ2aWNlLmVuZm9yY2VQb2xpY2llcyhtZXNzYWdlLCBpc0luY29taW5nKS50aGVuKG1lc3NhZ2VzID0+IHtcbiAgICAgICAgICAgIGZvciAobGV0IGkgaW4gbWVzc2FnZXMpIHtcbiAgICAgICAgICAgICAgbWVzc2FnZSA9IG1lc3NhZ2VzW2ldO1xuICAgICAgICAgICAgICAgIGlmIChyZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYm9keS5hdXRoID0gKG1lc3NhZ2UuYm9keS5hdXRoID09PSB1bmRlZmluZWQpID8gdHJ1ZSA6IG1lc3NhZ2UuYm9keS5hdXRoO1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZShtZXNzYWdlKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgbGV0IGVycm9yTWVzc2FnZSA9IHsgYm9keTogeyBjb2RlOiA0MDMsIGRlc2NyaXB0aW9uOiAnQmxvY2tlZCBieSBwb2xpY3knIH0sIGZyb206IG1lc3NhZ2UudG8sIHRvOiBtZXNzYWdlLmZyb20sIHR5cGU6ICdyZXNwb25zZScgfTtcbiAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvck1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9LCAoZXJyb3IpID0+IHtcbiAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgfSk7XG5cbiAgICB9KTtcbiAgfVxuXG5cbiAgcmVtb3ZlUG9saWN5KHNvdXJjZSwga2V5KSB7XG4gICAgaWYgKCFzb3VyY2UpIHRocm93IG5ldyBFcnJvcignc291cmNlIGlzIG5vdCBkZWZpbmVkJyk7XG4gICAgaWYgKHNvdXJjZSAhPT0gJyonICYmICFrZXkpIHRocm93IG5ldyBFcnJvcigna2V5IGlzIG5vd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0FBQ0E7QUFDQTtBQUNBO0FBVEE7QUFXQTs7O0FBRUE7QUFBQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7OztBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQXRCQTtBQXdCQTs7O0FBOUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQXFLQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///477\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ActionsService = function () {\n function ActionsService(context) {\n (0, _classCallCheck3.default)(this, ActionsService);\n\n this.context = context;\n }\n\n (0, _createClass3.default)(ActionsService, [{\n key: 'enforcePolicies',\n value: function enforcePolicies(message, isIncomingMessage) {\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n\n var policies = _this.context.getPolicies(message, isIncomingMessage);\n\n if (policies !== undefined) {\n if (policies.serviceProviderPolicy !== undefined) {\n policies.serviceProviderPolicy.enforceActions(_this.context, message).then(function (messages) {\n resolve(messages);\n }, function (error) {\n reject(error);\n });\n } else {\n if (policies.userPolicy !== undefined) {\n policies.userPolicy.enforceActions(_this.context, message).then(function (messages) {\n resolve(messages);\n }, function (error) {\n reject(error);\n });\n } else {\n resolve([message]);\n }\n }\n } else {\n resolve([message]);\n }\n });\n }\n }, {\n key: 'forwardToID',\n value: function forwardToID(message, email) {\n var _this = this;\n if (!_this.context.runtimeRegistry) throw new Error('forward message to given ID is unsupported in this environment');\n\n return new _promise2.default(function (resolve, reject) {\n if (_this.context.runtimeRegistry.hypertiesList[0].hypertyURL === message.to) {\n var splitTo = message.to.split('://');\n if (splitTo[0] !== 'runtime') {\n _this.context.runtimeRegistry.discoverHypertyPerUser(email).then(function (result) {\n message.to = result.hypertyURL;\n message.body.via = undefined;\n resolve(message);\n _this.context.runtimeRegistry._messageBus.postMessage(message);\n }, function (error) {\n reject(error);\n });\n } else {\n resolve(message);\n }\n } else {\n resolve(message);\n }\n });\n }\n }, {\n key: 'forwardToHyperty',\n value: function forwardToHyperty(message, hypertyURL) {\n var _this = this;\n if (!_this.context.runtimeRegistry) throw new Error('forward message to given ID is unsupported in this environment');\n\n return new _promise2.default(function (resolve) {\n if (_this.context.runtimeRegistry.hypertiesList[0].hypertyURL === message.to) {\n var splitTo = message.to.split('://');\n if (splitTo[0] !== 'runtime') {\n message.to = hypertyURL;\n message.body.via = undefined;\n resolve(message);\n _this.context.runtimeRegistry._messageBus.postMessage(message);\n } else {\n resolve(message);\n }\n } else {\n resolve(message);\n }\n });\n }\n }, {\n key: 'sendAutomaticMessage',\n value: function sendAutomaticMessage(message, text) {\n var _this = this;\n return new _promise2.default(function (resolve) {\n var automaticMessage = {\n from: message.to,\n to: message.from,\n body: {\n value: text\n },\n type: message.type\n };\n resolve(message);\n _this.context.runtimeRegistry._messageBus.postMessage(automaticMessage);\n });\n }\n }]);\n return ActionsService;\n}();\n\nexports.default = ActionsService;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvQWN0aW9uc1NlcnZpY2UuanM/MjliZCJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBBY3Rpb25zU2VydmljZSB7XG5cbiAgY29uc3RydWN0b3IoY29udGV4dCkge1xuICAgIHRoaXMuY29udGV4dCA9IGNvbnRleHQ7XG4gIH1cblxuICBlbmZvcmNlUG9saWNpZXMobWVzc2FnZSwgaXNJbmNvbWluZ01lc3NhZ2UpIHtcbiAgICBsZXQgX3RoaXMgPSB0aGlzO1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG5cbiAgICAgIGxldCBwb2xpY2llcyA9IF90aGlzLmNvbnRleHQuZ2V0UG9saWNpZXMobWVzc2FnZSwgaXNJbmNvbWluZ01lc3NhZ2UpO1xuXG4gICAgICBpZiAocG9saWNpZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAocG9saWNpZXMuc2VydmljZVByb3ZpZGVyUG9saWN5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBwb2xpY2llcy5zZXJ2aWNlUHJvdmlkZXJQb2xpY3kuZW5mb3JjZUFjdGlvbnMoX3RoaXMuY29udGV4dCwgbWVzc2FnZSkudGhlbihtZXNzYWdlcyA9PiB7XG4gICAgICAgICAgICByZXNvbHZlKG1lc3NhZ2VzKTtcbiAgICAgICAgICB9LCAoZXJyb3IpID0+IHtcbiAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgfSk7XG4gICAgICA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cbi8vIHNyYy9wb2xpY3kvQWN0aW9uc1NlcnZpY2UuanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7QUFFQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQURBO0FBR0E7QUFOQTtBQVFBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///478\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _Operators = __webpack_require__(145);\n\nvar _Operators2 = _interopRequireDefault(_Operators);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* The Policy Decision Point (PDP) decides if a message is to be authorised by checking a set of\n* policies. The resource to be verified is specified in the first word of the 'condition' field of\n* a Policy object. The implementation that verifies if the message is compliant with a policy is\n* specified in a hashtable to allow dynamic definition of the implementation, providing\n* extensibility to the Policy Engine functionalities.\n*/\nvar PDP = function () {\n function PDP(context) {\n (0, _classCallCheck3.default)(this, PDP);\n\n this.context = context;\n this.operators = new _Operators2.default();\n }\n\n (0, _createClass3.default)(PDP, [{\n key: 'evaluatePolicies',\n value: function evaluatePolicies(message, isIncomingMessage) {\n var policies = this.context.getPolicies(message, isIncomingMessage);\n var result = 'Not Applicable';\n if (policies !== undefined) {\n result = this.evaluatePolicy(message, policies.serviceProviderPolicy, isIncomingMessage);\n if (result || result === 'Not Applicable') {\n var userResult = this.evaluatePolicy(message, policies.userPolicy, isIncomingMessage);\n if (userResult !== 'Not Applicable') {\n result = userResult;\n }\n }\n }\n\n return result;\n }\n }, {\n key: 'evaluatePolicy',\n value: function evaluatePolicy(message, policy, isIncoming) {\n var result = 'Not Applicable';\n if (policy) {\n result = policy.evaluateRules(this.context, message, isIncoming);\n }\n\n return result;\n }\n }]);\n return PDP;\n}();\n\nexports.default = PDP;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvUERQLmpzP2U5YmEiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IE9wZXJhdG9ycyBmcm9tICcuL09wZXJhdG9ycyc7XG5cbi8qKlxuKiBUaGUgUG9saWN5IERlY2lzaW9uIFBvaW50IChQRFApIGRlY2lkZXMgaWYgYSBtZXNzYWdlIGlzIHRvIGJlIGF1dGhvcmlzZWQgYnkgY2hlY2t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eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _AllowOverrides = __webpack_require__(206);\n\nvar _AllowOverrides2 = _interopRequireDefault(_AllowOverrides);\n\nvar _BlockOverrides = __webpack_require__(207);\n\nvar _BlockOverrides2 = _interopRequireDefault(_BlockOverrides);\n\nvar _FirstApplicable = __webpack_require__(208);\n\nvar _FirstApplicable2 = _interopRequireDefault(_FirstApplicable);\n\nvar _Rule = __webpack_require__(481);\n\nvar _Rule2 = _interopRequireDefault(_Rule);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Policy = function () {\n function Policy(key, rules, actions, combiningAlgorithm) {\n (0, _classCallCheck3.default)(this, Policy);\n\n if (!key) throw new Error('key is not defined');\n if (!actions) throw new Error('actions are not defined');\n\n this.actions = actions;\n this.key = key;\n this._setRules(rules);\n this._setCombiningAlgorithm(combiningAlgorithm);\n }\n\n (0, _createClass3.default)(Policy, [{\n key: 'addAction',\n value: function addAction(method, param) {\n this.actions.push({ method: method, param: param });\n }\n }, {\n key: 'createRule',\n value: function createRule(decision, condition, scope, target, priority) {\n if (priority === undefined) {\n priority = this.getLastPriority() + 1;\n }\n var rule = new _Rule2.default(decision, condition, scope, target, priority);\n this.rules.push(rule);\n }\n }, {\n key: 'deleteRule',\n value: function deleteRule(rule) {\n var indexToRemove = this.rules.indexOf(rule);\n this.rules.splice(indexToRemove, 1);\n }\n }, {\n key: 'enforceActions',\n value: function enforceActions(context, message) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var results = [];\n if (_this.actions.length !== 0) {\n for (var i in _this.actions) {\n var result = context.pep.actionsService[_this.actions[i].method](message, _this.actions[i].param);\n results.push(result);\n }\n _promise2.default.all(results).then(function (messages) {\n resolve(messages);\n }, function (error) {\n reject(error);\n });\n } else {\n resolve([message]);\n }\n });\n }\n }, {\n key: 'evaluateRules',\n value: function evaluateRules(context, message, isIncoming) {\n var results = [];\n for (var i in this.rules) {\n results.push(this.rules[i].evaluate(context, message, isIncoming));\n }\n\n return this.combiningAlgorithm.combine(results);\n }\n }, {\n key: 'getLastPriority',\n value: function getLastPriority() {\n var priorities = [];\n\n if (this.rules.length !== 0) {\n for (var i in this.rules) {\n priorities.push(this.rules[i].priority);\n }\n return Math.max.apply(Math, priorities);\n } else {\n return -1;\n }\n }\n }, {\n key: 'getRuleByPriority',\n value: function getRuleByPriority(priority) {\n for (var i in this.rules) {\n if (String(this.rules[i].priority) === String(priority)) {\n return this.rules[i];\n }\n }\n throw Error('Rule with priority ' + priority + ' does not exist!');\n }\n }, {\n key: '_setCombiningAlgorithm',\n value: function _setCombiningAlgorithm(combiningAlgorithm) {\n if (!combiningAlgorithm) {\n combiningAlgorithm = 'blockOverrides';\n }\n switch (combiningAlgorithm) {\n case 'blockOverrides':\n this.combiningAlgorithm = new _BlockOverrides2.default();\n break;\n case 'allowOverrides':\n this.combiningAlgorithm = new _AllowOverrides2.default();\n break;\n case 'firstApplicable':\n this.combiningAlgorithm = new _FirstApplicable2.default();\n break;\n default:\n throw Error('Unknown algorithm: ' + combiningAlgorithm);\n }\n }\n }, {\n key: '_setRules',\n value: function _setRules(rules) {\n this.rules = [];\n\n for (var i in rules) {\n var rule = rules[i];\n if (rule.priority === undefined) {\n rule.priority = this.getLastPriority() + 1;\n }\n if (!(rule instanceof _Rule2.default)) {\n rule = new _Rule2.default(rule.decision, rule.condition, rule.scope, rule.target, rule.priority);\n }\n this.rules.push(rule);\n }\n }\n }, {\n key: 'sortRules',\n value: function sortRules() {\n return this.rules.sort(function (a, b) {\n var x = a.priority;var y = b.priority;\n return x < y ? -1 : x > y ? 1 : 0;\n });\n }\n }]);\n return Policy;\n}();\n\nexports.default = Policy;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDgwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvUG9saWN5LmpzPzk4NDMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEFsbG93T3ZlcnJpZGVzIGZyb20gJy4vY29tYmluaW5nQWxnb3JpdGhtcy9BbGxvd092ZXJyaWRlcyc7XG5pbXBvcnQgQmxvY2tPdmVycmlkZXMgZnJvbSAnLi9jb21iaW5pbmdBbGdvcml0aG1zL0Jsb2NrT3ZlcnJpZGVzJztcbmltcG9ydCBGaXJzdEFwcGxpY2FibGUgZnJvbSAnLi9jb21iaW5pbmdBbGdvcml0aG1zL0ZpcnN0QXBwbGljYWJsZSc7XG5pbXBvcnQgUnVsZSBmcm9tICcuL1J1bGUnO1xuXG5jbGFzcyBQb2xpY3kge1xuXG4gIGNvbnN0cnVjdG9yKGtleSwgcnVsZXMsIGFjdGlvbnMsIGNvbWJpbmluZ0FsZ29yaXRobSkge1xuICAgIGlmICgha2V5KSB0aHJvdyBuZXcgRXJyb3IoJ2tleSBpcyBub3QgZGVmaW5lZCcpO1xuICAgIGlmICghYWN0aW9ucykgdGhyb3cgbmV3IEVycm9yKCdhY3Rpb25zIGFyZSBub3QgZGVmaW5lZCcpO1xuXG4gICAgdGhpcy5hY3Rpb25zID0gYWN0aW9ucztcbiAgICB0aGlzLmtleSA9IGtleTtcbiAgICB0aGlzLl9zZXRSdWxlcyhydWxlcyk7XG4gICAgdGhpcy5fc2V0Q29tYmluaW5nQWxnb3JpdGhtKGNvbWJpbmluZ0FsZ29yaXRobSk7XG4gIH1cblxuICBhZGRBY3Rpb24obWV0aG9kLCBwYXJhbSkge1xuICAgIHRoaXMuYWN0aW9ucy5wdXNoKHsgbWV0aG9kOiBtZXRob2QsIHBhcmFtO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FDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQVhBO0FBYUE7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///480\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _AdvancedCondition = __webpack_require__(482);\n\nvar _AdvancedCondition2 = _interopRequireDefault(_AdvancedCondition);\n\nvar _Condition = __webpack_require__(146);\n\nvar _Condition2 = _interopRequireDefault(_Condition);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Rule = function () {\n function Rule(decision, condition, scope, target, priority) {\n (0, _classCallCheck3.default)(this, Rule);\n\n this.decision = decision;\n this.setCondition(condition);\n this.priority = priority;\n this.scope = scope;\n this.target = target;\n }\n\n (0, _createClass3.default)(Rule, [{\n key: 'setCondition',\n value: function setCondition(condition) {\n if (!(condition instanceof _Condition2.default || condition instanceof _AdvancedCondition2.default || condition instanceof _AdvancedCondition2.default)) {\n var attribute = condition.attribute;\n switch (attribute) {\n case 'subscription':\n this.condition = new _AdvancedCondition2.default(condition.attribute, condition.operator, condition.params);\n break;\n case undefined:\n this.condition = new _AdvancedCondition2.default(condition);\n break;\n default:\n this.condition = new _Condition2.default(condition.attribute, condition.operator, condition.params);\n }\n } else {\n this.condition = condition;\n }\n }\n }, {\n key: 'evaluate',\n value: function evaluate(context, message, isIncoming) {\n var field = isIncoming ? message.to : message.from;\n var hypertyName = void 0;\n switch (this.scope) {\n case 'global':\n break;\n\n case 'hyperty':\n if ((0, _utils.isDataObjectURL)(field)) {\n var reporter = context.runtimeRegistry.getReporterURLSynchonous((0, _utils.removePathFromURL)(field));\n if (reporter !== undefined) {\n hypertyName = context.runtimeRegistry.getHypertyName(reporter);\n }\n } else {\n if (field.split('://')[0] === 'hyperty') {\n hypertyName = context.runtimeRegistry.getHypertyName((0, _utils.removePathFromURL)(field));\n }\n }\n if (hypertyName === this.target) {\n break;\n }\n\n return 'Not Applicable';\n\n case 'identity':\n var owner = void 0;\n\n if ((0, _utils.isDataObjectURL)(field)) {\n var _reporter = context.runtimeRegistry.getReporterURLSynchonous((0, _utils.removePathFromURL)(field));\n owner = context.runtimeRegistry.getHypertyOwner(_reporter);\n } else {\n if (field.split('://')[0] === 'hyperty') {\n owner = context.runtimeRegistry.getHypertyOwner((0, _utils.removePathFromURL)(field));\n }\n }\n if (owner !== undefined) {\n owner = (0, _utils.getUserEmailFromURL)(owner);\n }\n if (owner === this.target) {\n break;\n }\n\n return 'Not Applicable';\n }\n\n if (this.condition.isApplicable(context, message, this.scope, this.target)) {\n return this.decision;\n } else {\n return 'Not Applicable';\n }\n }\n }]);\n return Rule;\n}();\n\nexports.default = Rule;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJ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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQXZDQTtBQUNBO0FBeUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFHQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///481\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _Condition = __webpack_require__(146);\n\nvar _Condition2 = _interopRequireDefault(_Condition);\n\nvar _Operators = __webpack_require__(145);\n\nvar _Operators2 = _interopRequireDefault(_Operators);\n\nvar _SubscriptionCondition = __webpack_require__(483);\n\nvar _SubscriptionCondition2 = _interopRequireDefault(_SubscriptionCondition);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AdvancedCondition = function () {\n function AdvancedCondition(condition) {\n (0, _classCallCheck3.default)(this, AdvancedCondition);\n\n this.operators = new _Operators2.default();\n if (condition.operators !== undefined) {\n condition = condition.condition;\n }\n condition = this.buildCondition(condition);\n this.condition = condition;\n }\n\n (0, _createClass3.default)(AdvancedCondition, [{\n key: 'buildCondition',\n value: function buildCondition(condition) {\n if (Array.isArray(condition[1])) {\n condition[1] = this.buildCondition(condition[1]);\n } else {\n if (condition[1].attribute === 'subscription') {\n condition[1] = new _SubscriptionCondition2.default(condition[1].attribute, condition[1].operator, condition[1].params);\n } else {\n condition[1] = new _Condition2.default(condition[1].attribute, condition[1].operator, condition[1].params);\n }\n }\n\n if (condition[2] !== undefined) {\n if (Array.isArray(condition[2])) {\n condition[2] = this.buildCondition(condition[2]);\n } else {\n if (condition[2].attribute === 'subscription') {\n condition[2] = new _SubscriptionCondition2.default(condition[2].attribute, condition[2].operator, condition[2].params);\n } else {\n condition[2] = new _Condition2.default(condition[2].attribute, condition[2].operator, condition[2].params);\n }\n }\n }\n return condition;\n }\n }, {\n key: 'isApplicable',\n value: function isApplicable(context, message, scope, target, operator, left, right) {\n if (!operator) {\n operator = this.condition[0];\n left = this.condition[1];\n right = this.condition[2];\n }\n\n while (!(left instanceof _Condition2.default) & !(left instanceof _SubscriptionCondition2.default) & typeof left !== 'boolean') {\n left = this.isApplicable(context, message, scope, target, left[0], left[1], left[2]);\n }\n if (right !== undefined) {\n while (!(right instanceof _Condition2.default) & !(right instanceof _SubscriptionCondition2.default) & typeof right !== 'boolean') {\n right = this.isApplicable(context, message, scope, target, right[0], right[1], right[2]);\n }\n }\n\n var resultLeft = typeof left === 'boolean' ? left : left.isApplicable(context, message, scope, target);\n var resultRight = void 0;\n if (right !== undefined) {\n resultRight = typeof right === 'boolean' ? right : right.isApplicable(context, message, scope, target);\n }\n return this.operators[operator]([resultLeft, resultRight]);\n }\n }]);\n return AdvancedCondition;\n}();\n\nexports.default = AdvancedCondition;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDgyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29uZGl0aW9ucy9BZHZhbmNlZENvbmRpdGlvbi5qcz9iZDBmIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBDb25kaXRpb24gZnJvbSAnLi9Db25kaXRpb24nO1xuaW1wb3J0IE9wZXJhdG9ycyBmcm9tICcuLi9PcGVyYXRvcnMnO1xuaW1wb3J0IFN1YnNjcmlwdGlvbkNvbmRpdGlvbiBmcm9tICcuL1N1YnNjcmlwdGlvbkNvbmRpd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7Ozs7O0FBQUE7QUFDQTs7O0FBQUE7QUFDQTs7O0FBQUE7QUFDQTs7Ozs7QUFDQTtBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///482\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _get2 = __webpack_require__(484);\n\nvar _get3 = _interopRequireDefault(_get2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _Condition2 = __webpack_require__(146);\n\nvar _Condition3 = _interopRequireDefault(_Condition2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* @author Ana Caldeira \n* @classdesc Class to represent a subscription condition and evaluate its applicability.\n*/\nvar SubscriptionCondition = function (_Condition) {\n (0, _inherits3.default)(SubscriptionCondition, _Condition);\n\n /**\n * Creates a new SubscriptionCondition.\n * @class\n * @param {string} attribute\n * @param {string} operator\n * @param {*} params\n */\n function SubscriptionCondition(attribute, operator, params) {\n (0, _classCallCheck3.default)(this, SubscriptionCondition);\n return (0, _possibleConstructorReturn3.default)(this, (SubscriptionCondition.__proto__ || (0, _getPrototypeOf2.default)(SubscriptionCondition)).call(this, attribute, operator, params));\n }\n\n /**\n * Verifies if the subscription condition is applicable to the message. First, verifies if the message is of the subscription type; second, verifies if the message is from a remote runtime to guarantee that the subscription is being validated in the destination runtime; third, verifies if the subscription preference is met.\n * @param {Object} context environment where the Policy Engine is being used\n * @param {Object} message\n */\n\n\n (0, _createClass3.default)(SubscriptionCondition, [{\n key: 'isApplicable',\n value: function isApplicable(context, message) {\n var isSubscription = message.type === 'subscribe';\n var isFromRemoteSM = context.isFromRemoteSM(message.from);\n if (isSubscription & isFromRemoteSM) {\n return (0, _get3.default)(SubscriptionCondition.prototype.__proto__ || (0, _getPrototypeOf2.default)(SubscriptionCondition.prototype), 'isApplicable', this).call(this, context, message);\n } else {\n return false;\n }\n }\n }]);\n return SubscriptionCondition;\n}(_Condition3.default); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nexports.default = SubscriptionCondition;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDgzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29uZGl0aW9ucy9TdWJzY3JpcHRpb25Db25kaXRpb24uanM/YTkwMyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE2IFFVT0JJUyBORVRXT1JLUyBTTFxuKiBDb3B5cmlnaHQgMjAxNiBGUkFVTkhPRkVSLUdFU0VMTFNDSEFGVCBaVVIgRk9FUkRFUlVORyBERVIgQU5HRVdBTkRURU4gRk9SU0NIVU5HIEUuVlxuKiBDb3B5cmlnaHQgMjAxNiBPUkFOR0UgU0FcbiogQ29weXJpZ2h0IDIwMTYgRGV1dHNjaGUgVGVsZWtvbSBBR1xuKiBDb3B5cmlnaHQgMjAxNiBBcGl6ZWVcbiogQ29weXJpZ2h0IDIwMTYgVEVDSE5JU0NIRSBVTklWRVJTSVRBVCBCRVJMSU5cbipcbiogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlIFwiTGljZW5zZVwiKTtcbiogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLlxuKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXRcb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CBtZXNzYWdlKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG59XG5cbmV4cG9ydCBkZWZhdWx0IFN1YnNjcmlwdGlvbkNvbmRpdGlvbjtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvcG9saWN5L2NvbmRpdGlvbnMvU3Vic2NyaXB0aW9uQ29uZGl0aW9uLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUF1QkE7QUFDQTs7Ozs7QUFDQTs7OztBQUlBOzs7QUFFQTs7Ozs7OztBQU9BO0FBQUE7QUFBQTtBQUVBO0FBQ0E7QUFDQTs7Ozs7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUF2REE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBMkRBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///483\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _getOwnPropertyDescriptor = __webpack_require__(485);\n\nvar _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n var desc = (0, _getOwnPropertyDescriptor2.default)(object, property);\n\n if (desc === undefined) {\n var parent = (0, _getPrototypeOf2.default)(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call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cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///484\n')},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(486), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDg1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvZ2V0LW93bi1wcm9wZXJ0eS1kZXNjcmlwdG9yLmpzPzJiYTEiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9nZXQtb3duLXByb3BlcnR5LWRlc2NyaXB0b3JcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvb2JqZWN0L2dldC1vd24tcHJvcGVydHktZGVzY3JpcHRvci5qc1xuLy8gbW9kdWxlIGlkID0gNDg1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///485\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(487);\nvar $Object = __webpack_require__(13).Object;\nmodule.exports = function getOwnPropertyDescriptor(it, key) {\n return $Object.getOwnPropertyDescriptor(it, key);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDg2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvZ2V0LW93bi1wcm9wZXJ0eS1kZXNjcmlwdG9yLmpzPzcyNzkiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvcicpO1xudmFyICRPYmplY3QgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0O1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoaXQsIGtleSkge1xuICByZXR1cm4gJE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoaXQsIGtleSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9nZXQtb3duLXByb3BlcnR5LWRlc2NyaXB0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDQ4NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///486\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\nvar toIObject = __webpack_require__(45);\nvar $getOwnPropertyDescriptor = __webpack_require__(143).f;\n\n__webpack_require__(97)('getOwnPropertyDescriptor', function () {\n return function getOwnPropertyDescriptor(it, key) {\n return $getOwnPropertyDescriptor(toIObject(it), key);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDg3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuZ2V0LW93bi1wcm9wZXJ0eS1kZXNjcmlwdG9yLmpzPzg4ODkiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjYgT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihPLCBQKVxudmFyIHRvSU9iamVjdCA9IHJlcXVpcmUoJy4vX3RvLWlvYmplY3QnKTtcbnZhciAkZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcGQnKS5mO1xuXG5yZXF1aXJlKCcuL19vYmplY3Qtc2FwJykoJ2dldE93blByb3BlcnR5RGVzY3JpcHRvcicsIGZ1bmN0aW9uICgpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGdldE93blByb3BlcnR5RGVzY3JpcHRvcihpdCwga2V5KSB7XG4gICAgcmV0dXJuICRnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IodG9JT2JqZWN0KGl0KSwga2V5KTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5nZXQtb3duLXByb3BlcnR5LWRlc2NyaXB0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDQ4N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///487\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _Bus2 = __webpack_require__(204);\n\nvar _Bus3 = _interopRequireDefault(_Bus2);\n\nvar _Pipeline = __webpack_require__(489);\n\nvar _Pipeline2 = _interopRequireDefault(_Pipeline);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('MessageBus'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log system\n\n/**\n* @author micaelpedrosa@gmail.com\n* Message BUS Interface is an extension of the Bus\n* It doesn't support the default '*' listener, instead it uses the registry.resolve(..)\n*/\nvar MessageBus = function (_Bus) {\n (0, _inherits3.default)(MessageBus, _Bus);\n\n /* private\n _registry: Registry\n _forwards: { : { fl: MsgListener, sandboxToUrls: Map(Sandbox, [to-url]), urlToSandbox: { to-url: Sandbox } } }\n _pipeline: Pipeline\n */\n\n //TODO: future optimization\n //1. message batch processing with setInterval\n //2. resolve default gateway/protostub with register.resolve\n\n function MessageBus(registry) {\n (0, _classCallCheck3.default)(this, MessageBus);\n\n var _this2 = (0, _possibleConstructorReturn3.default)(this, (MessageBus.__proto__ || (0, _getPrototypeOf2.default)(MessageBus)).call(this));\n\n _this2._registry = registry;\n _this2._forwards = {};\n\n _this2._pipelineIn = new _Pipeline2.default(function (error) {\n log.error('PIPELINE-ERROR: ', (0, _stringify2.default)(error));\n });\n\n _this2._pipelineOut = new _Pipeline2.default(function (error) {\n log.error('PIPELINE-ERROR: ', (0, _stringify2.default)(error));\n });\n return _this2;\n }\n\n (0, _createClass3.default)(MessageBus, [{\n key: 'postMessage',\n\n\n /**\n * Post a message for routing. It will first search for a listener, if there is no one, it sends to a external routing using the _onPostMessage.\n * External routing use the registry.resolve(..) method to decide the destination sandbox.\n * @param {Message} inMsg JSON with mandatory Message structure {id, type, from, to}\n * @param {Callback} responseCallback Optional callback if a response is expected from the request. A response will be always sent, even if it is a \"Timeout\".\n * @return {number} the Message id\n */\n value: function postMessage(inMsg, responseCallback, timeout) {\n log.info('onPOSTMessage: ', inMsg);\n var _this = this;\n\n var deliver = function deliver(msg) {\n\n _this._responseCallback(inMsg, responseCallback, timeout);\n\n if (!_this._onResponse(msg)) {\n var itemList = _this._subscriptions[msg.to];\n if (itemList) {\n //do not publish on default address, because of loopback cycle\n _this._publishOn(itemList, msg);\n } else {\n //if there is no listener, send to external interface\n _this._onPostMessage(msg);\n }\n }\n };\n\n _this._genId(inMsg);\n\n if (_this._isToProcess(inMsg)) {\n var isIncoming = _this._isIncomingMessage(inMsg);\n\n if (isIncoming) _this._pipelineIn.process(inMsg, deliver);else _this._pipelineOut.process(inMsg, deliver);\n } else deliver(inMsg);\n\n return inMsg.id;\n }\n }, {\n key: '_isToProcess',\n value: function _isToProcess(message) {\n var schemasToIgnore = ['domain', 'domain-idp', 'global', 'hyperty-runtime', 'runtime'];\n var splitFrom = message.from.split('://');\n var fromSchema = splitFrom[0];\n var splitTo = message.to.split('://');\n var toSchema = splitTo[0];\n var from = message.from;\n var to = message.to;\n\n // Signalling messages between P2P Stubs don't have to be verified. FFS\n\n if (message.body && message.body.source) {\n from = message.body.source;\n }\n\n if (message.body && message.body.subscriber) {\n from = message.body.subscriber;\n }\n\n if (from.indexOf('/p2phandler/') !== -1 || from.indexOf('/p2prequester/') !== -1 || to.indexOf('/p2phandler/') !== -1 || to.indexOf('/p2prequester/') !== -1) {\n return false;\n }\n\n if (this._registry.isLocal(from) && this._registry.isLocal(message.to)) return false;\n\n if (message.from === fromSchema || message.to === toSchema || message.type === 'read' || message.type === 'response' || message.from.includes('hyperty://') && message.type === 'delete') {\n return false;\n } else {\n return schemasToIgnore.indexOf(fromSchema) === -1 || schemasToIgnore.indexOf(toSchema) === -1;\n }\n }\n }, {\n key: '_isIncomingMessage',\n value: function _isIncomingMessage(message) {\n var from = void 0;\n\n if (message.type === 'forward') {\n log.info('[MessageBus - isIncomingMessage] - message.type: ', message.type);\n from = message.body.from;\n } else if (message.hasOwnProperty('body') && message.body.hasOwnProperty('source') && message.body.source) {\n log.info('[MessageBus - isIncomingMessage] - message.body.source: ', message.body.source);\n from = message.body.source;\n } else if (message.hasOwnProperty('body') && message.body.hasOwnProperty('subscriber') && message.body.subscriber) {\n //TODO: this subscriber validation should not exist, because is outdated\n //TODO: the syncher and syncher manager not following the correct spec;\n log.info('[MessageBus - isIncomingMessage] - message.body.subscriber: ', message.body.subscriber);\n from = message.body.subscriber;\n } else if (message.hasOwnProperty('body') && message.body.hasOwnProperty('reporter') && message.body.reporter) {\n //TODO: this subscriber validation should not exist, because is outdated\n //TODO: the syncher and syncher manager not following the correct spec;\n log.info('[MessageBus - isIncomingMessage] - message.body.reporter: ', message.body.reporter);\n from = message.body.reporter;\n } else {\n log.info('[MessageBus - isIncomingMessage] - message.from ', message.from);\n from = message.from;\n }\n\n log.info('[MessageBus - isIncomingMessage] - check if isLocal: ', from);\n return !this._registry.isLocal(from);\n }\n\n /**\n * Adds an external publish address listener. Every message for the address will be forwarded to the external routing by _onPostMessage.\n * This means, even if there is a listener for the address, it will also send the message to the external routing.\n * @param {URL} from Publish address.\n */\n\n }, {\n key: 'addPublish',\n value: function addPublish(from) {\n var _this3 = this;\n\n var _this = this;\n\n //verify if forward exist\n var refCount = _this._forwards[from];\n if (!refCount) {\n var forwardListener = _this.addListener(from, function (msg) {\n log.info('MB-PUBLISH: ( ' + from + ' )');\n _this._onPostMessage(msg);\n });\n\n refCount = {\n counter: 0,\n fl: forwardListener,\n remove: function remove() {\n _this3.counter--;\n if (_this3.counter === 0) {\n _this3.fl.remove();\n delete _this._forwards[from];\n }\n }\n };\n\n _this._forwards[from] = refCount;\n }\n\n refCount.counter++;\n return refCount;\n }\n\n /**\n * Adds a forward listener for a message destination. Every message reaching an address will be also sent to the forward address.\n * @param {URL} from Message destination, it's actually the field \"to\" of the message.\n * @param {URL} to Forward address.\n */\n\n }, {\n key: 'addForward',\n value: function addForward(from, to) {\n var _this = this;\n\n return _this.addListener(from, function (msg) {\n log.info('MB-FORWARD: ( ' + from + ' to ' + to + ' )');\n _this.forward(to, msg);\n });\n }\n\n /**\n * Just forward's a message to the forward address. Listeners should be available for the forward address.\n * @param {URL} url Forward address.\n * @param {Message} msg Message to forward\n */\n\n }, {\n key: 'forward',\n value: function forward(url, msg) {\n var _this = this;\n\n var itemList = _this._subscriptions[url];\n if (itemList) {\n _this._publishOn(itemList, msg);\n }\n }\n\n //default route, if there are no listeners available for a message destination.\n\n }, {\n key: '_onPostMessage',\n value: function _onPostMessage(msg) {\n var _this = this;\n\n //resolve external protostub...\n _this._registry.resolve(msg).then(function (route, msg2route) {\n if (msg2route) _this.forward(route, msg2route);else _this.forward(route, msg);\n }).catch(function (e) {\n log.error('RESOLVE-ERROR: ', e);\n });\n }\n }, {\n key: 'pipelineIn',\n get: function get() {\n return this._pipelineIn;\n }\n }, {\n key: 'pipelineOut',\n get: function get() {\n return this._pipelineOut;\n }\n }]);\n return MessageBus;\n}(_Bus3.default);\n\nexports.default = MessageBus;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDg4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9idXMvTWVzc2FnZUJ1cy5qcz8zYTNhIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1JTQ0hVTkcgRS5WXG4qIENvcHlyaWdodCAyMDE2IE9SQU5HRSBTQVxuKiBDb3B5cmlnaHQgMjAxNiBEZXV0c2NoZSBUZWxla29tIEFHXG4qIENvcHlyaWdodCAyMDE2IEFwaXplZVxuKiBDb3B5cmlnaHQgMjAxNiBURUNITklTQ0hFIFVOSVZFUlNJVEFUIEJFUkxJTlxuKlxuKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgXCJMaWNlbnNlXCIpO1xuKiB5b3Ugb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classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('Pipeline');\n\n/**\n* @author micaelpedrosa@gmail.com\n* Sequencial processor of methods. Similar to how Sequential Promise's work, but better fit for message processing.\n* Normal use for this, is to intercept all messages with configured handlers, and act accordingly.\n*/\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\nvar Pipeline = function () {\n /* public\n handlers: ((PipeContext) => void)[]\n onFail: (error) => void\n */\n\n function Pipeline(_onFail) {\n (0, _classCallCheck3.default)(this, Pipeline);\n\n var _this = this;\n\n _this.handlers = [];\n _this.onFail = _onFail;\n }\n\n /**\n * Insert a message in the pipeline queue. All messages are wrapped with a PipeContext.\n * @param {Message} msg Message for the queue\n * @param {Callback} onDeliver When message is finished processing from all handlers, it will be delivered in this callback.\n */\n\n\n (0, _createClass3.default)(Pipeline, [{\n key: 'process',\n value: function process(msg, onDeliver) {\n var _this = this;\n\n if (_this.handlers.length > 0) {\n var iter = new Iterator(_this.handlers);\n iter.next(new PipeContext(_this, iter, msg, onDeliver));\n } else {\n onDeliver(msg);\n }\n }\n }]);\n return Pipeline;\n}();\n\n/**\n* @author micaelpedrosa@gmail.com\n* Wrapper around a message that adds actions that can be fired by any interceptor handler.\n* The Pipeline is asynchronous, so an handler should always call an action, the default one is \"next()\"\n*/\n\n\nvar PipeContext = function () {\n /* private\n _inStop: boolean\n _pipeline: Pipeline\n _iter: Iterator\n _msg: Message\n */\n\n function PipeContext(pipeline, iter, msg, onDeliver) {\n (0, _classCallCheck3.default)(this, PipeContext);\n\n var _this = this;\n\n _this._inStop = false;\n\n _this._pipeline = pipeline;\n _this._iter = iter;\n _this._msg = msg;\n _this._onDeliver = onDeliver;\n }\n\n (0, _createClass3.default)(PipeContext, [{\n key: 'next',\n\n\n /**\n * Proceed to the next interceptor handler, unless there was an error. If it's the last one, proceed to onDeliver handler.\n */\n value: function next() {\n var _this = this;\n\n if (!_this._inStop) {\n if (_this._iter.hasNext) {\n _this._iter.next(_this);\n } else {\n _this._onDeliver(_this._msg);\n }\n }\n }\n\n /**\n * Proceed directly to the onDeliver handler, unless there was an error.\n */\n\n }, {\n key: 'deliver',\n value: function deliver() {\n var _this = this;\n if (!_this._inStop) {\n _this._inStop = true;\n _this._onDeliver(_this._msg);\n }\n }\n\n /**\n * Mark the context with an error and proceed to the onFail handler.\n * @param {[type]} error [description]\n */\n\n }, {\n key: 'fail',\n value: function fail(error) {\n var _this = this;\n\n if (!_this._inStop) {\n _this._inStop = true;\n if (_this._pipeline.onFail) {\n _this._pipeline.onFail(error);\n }\n }\n }\n }, {\n key: 'pipeline',\n get: function get() {\n return this._pipeline;\n }\n }, {\n key: 'msg',\n get: function get() {\n return this._msg;\n },\n set: function set(inMsg) {\n this._msg = inMsg;\n }\n }]);\n return PipeContext;\n}();\n\nvar Iterator = function () {\n /* private\n _index: number\n _array: []\n */\n\n function Iterator(array) {\n (0, _classCallCheck3.default)(this, Iterator);\n\n this._index = -1;\n this._array = array;\n }\n\n (0, _createClass3.default)(Iterator, [{\n key: 'hasNext',\n get: function get() {\n return this._index < this._array.length - 1;\n }\n }, {\n key: 'next',\n get: function get() {\n this._index++;\n return this._array[this._index];\n }\n }]);\n return Iterator;\n}();\n\nexports.default = Pipeline;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDg5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9idXMvUGlwZWxpbmUuanM/YTAzZSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE2IFFVT0JJUyBORVRXT1JLUyBTTFxuKiBDb3B5cmlnaHQgMjAxNiBGUkFVTkhPRkVSLUdFU0VMTFNDSEFGVCBaVVIgRk9FUkRFUlVORyBERVIgQU5HRVdBTkRURU4gRk9SU0NIVU5HIEUuVlxuKiBDb3B5cmlnaHQgMjAxNiBPUkFOR0UgU0FcbiogQ29weXJpZ2h0IDIwMTYgRGV1dHNjaGUgVGVsZWtvbSBBR1xuKiBDb3B5cmlnaHQgMjAxNiBBcGl6ZWVcbiogQ29weXJpZ2h0IDIwMTYgVEVDSE5JU0NIRSBVTklWRVJTSVRBVCBCRVJMSU5cbipcbiogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlIFwiTGljZW5zZV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s7Ozs7QUFNQTs7O0FBR0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7OztBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUE1Q0E7QUFBQTtBQUFBOzs7QUFFQTtBQUFBO0FBQUE7QUFDQTtBQUFBO0FBQUE7Ozs7O0FBZ0RBO0FBQ0E7Ozs7O0FBS0E7QUFBQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBR0E7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///489\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _utf = __webpack_require__(491);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('CryptoManager');\n\n/**\n* Class with the cryptographic functions for the authentication protocol\n*\n*/\n\nvar Crypto = function () {\n\n /**\n * Runtimefactory is passed in the costructor, because the nodeJS has a different crypto module\n * from the browser. RuntimeFactory provides a wrapper for the fuctions of nodeJS, so they can be\n * invoked browser like.\n */\n function Crypto(runtimeFactory) {\n (0, _classCallCheck3.default)(this, Crypto);\n\n var _this = this;\n typeof runtimeFactory.createWebcrypto === 'function' ? _this._crypto = runtimeFactory.createWebcrypto() : _this._crypto = crypto;\n }\n\n /**\n * Performs a RSA encryption\n * @param {ArrayBuffer} value the public key\n * @param {BufferSource} value data to be encryped\n * @return {Uint8Array} encrypted data\n */\n\n\n (0, _createClass3.default)(Crypto, [{\n key: 'encryptRSA',\n value: function encryptRSA(pubKey, data) {\n log.log('encryptRSA:pubKey', pubKey);\n log.log('encryptRSA:data', data);\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importRSAencryptKey(new Uint8Array(pubKey)).then(function (publicKey) {\n\n _this._crypto.subtle.encrypt({\n name: 'RSA-OAEP'\n }, publicKey, //from generateKey or importKey above\n data //ArrayBuffer of data you want to encrypt\n ).then(function (encrypted) {\n //returns an ArrayBuffer containing the encrypted data\n // log.log('crypto-encryptRSA', new Uint8Array(encrypted));\n resolve(new Uint8Array(encrypted));\n }).catch(function (err) {\n // log.log('crypto-encryptRSA', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * Performs a RSA decryption\n * @param {ArrayBuffer} value the private key\n * @param {BufferSource} value data to be decrypted\n * @return {Uint8Array} decrypted data\n */\n\n }, {\n key: 'decryptRSA',\n value: function decryptRSA(privKey, data) {\n log.log('decryptRSA:privKey', privKey);\n log.log('decryptRSA:data', data);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importRSAdecryptKey(privKey).then(function (privateKey) {\n\n _this._crypto.subtle.decrypt({\n name: 'RSA-OAEP'\n }, privateKey, //from generateKey or importKey above\n data //ArrayBuffer of the data\n ).then(function (decrypted) {\n\n var decryptedData = new Uint8Array(decrypted);\n\n // log.log('crypto-decryptRSA', decryptedData);\n resolve(decryptedData);\n }).catch(function (err) {\n // log.log('crypto-decryptRSA', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * Performs a RSA sign\n * @param {ArrayBuffer} value the private key\n * @param {BufferSource} value data to be signed\n * @return {Uint8Array} data signature\n */\n\n }, {\n key: 'signRSA',\n value: function signRSA(privKey, data) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importRSAsignKey(privKey).then(function (privateKey) {\n\n _this._crypto.subtle.sign({\n name: 'RSASSA-PKCS1-v1_5'\n }, privateKey, //from generateKey or importKey above\n (0, _utf.encodeUTF8)(data) //ArrayBuffer of data you want to sign\n ).then(function (signature) {\n //returns an ArrayBuffer containing the signature\n // log.log('crypto-signRSA', new Uint8Array(signature));\n resolve(new Uint8Array(signature));\n }).catch(function (err) {\n // log.log('crypto-signRSA', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * Performs a RSA signature verification\n * @param {ArrayBuffer} value the public key\n * @param {BufferSource} value data to be verified\n * @return {Boolean} result of the signature verification\n */\n\n }, {\n key: 'verifyRSA',\n value: function verifyRSA(pubKey, data, signature) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importRSAverifyKey(pubKey).then(function (publicKey) {\n\n _this._crypto.subtle.verify({\n name: 'RSASSA-PKCS1-v1_5'\n }, publicKey, //from generateKey or importKey above\n signature, //ArrayBuffer of the signature\n (0, _utf.encodeUTF8)(data) //ArrayBuffer of the data\n ).then(function (isvalid) {\n //returns a boolean on whether the signature is true or not\n // log.log('crypto-verifyRSA', isvalid);\n resolve(isvalid);\n }).catch(function (err) {\n // log.log('crypto-verifyRSA', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * Performs a RSA signature verification\n * @param {ArrayBuffer} value the public key\n * @param {BufferSource} value data to be verified\n * @return {Boolean} result of the signature verification\n */\n\n }, {\n key: 'encryptAES',\n value: function encryptAES(key, data, iv) {\n log.log('encryptAES:key', key);\n log.log('encryptAES:data', data);\n log.log('encryptAES:iv', iv);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importAESkey(key).then(function (aesKey) {\n\n _this._crypto.subtle.encrypt({\n name: 'AES-CBC',\n\n //Don't re-use initialization vectors!\n //Always generate a new iv every time your encrypt!\n iv: iv\n }, aesKey, //from generateKey or importKey above\n (0, _utf.encodeUTF8)(data) //ArrayBuffer of data you want to encrypt\n ).then(function (encrypted) {\n //returns an ArrayBuffer containing the encrypted data\n // log.log('crypto-encryptAES', new Uint8Array(encrypted));\n resolve(new Uint8Array(encrypted));\n }).catch(function (err) {\n // log.log('crypto-encryptAES', err);\n reject(err);\n });\n });\n });\n }\n }, {\n key: 'decryptAES',\n value: function decryptAES(key, data, iv) {\n log.log('decryptAES:key', key);\n log.log('decryptAES:data', data);\n log.log('decryptAES:iv', iv);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importAESkey(key).then(function (aesKey) {\n\n _this._crypto.subtle.decrypt({\n name: 'AES-CBC',\n iv: iv\n }, aesKey, //from generateKey or importKey above\n data //ArrayBuffer of the data\n ).then(function (decrypted) {\n\n var decodedData = (0, _utf.decodeUTF8)(new Uint8Array(decrypted));\n log.log('crypto-decryptAES', decodedData);\n resolve(decodedData);\n }).catch(function (err) {\n // log.log('crypto-decryptAES', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * creates a hash using the HMAC algorithm\n * @param {byteArray} key key to be used in the hmac\n * @param {string} data information to be hashed\n * @return {byteArray} signature resulting hash\n */\n\n }, {\n key: 'hashHMAC',\n value: function hashHMAC(key, data) {\n log.log('hashHMAC:key', key);\n log.log('hashHMAC:data', data);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n if (typeof data != 'string') {\n data = (0, _stringify2.default)(data);\n log.log('Converting hashHMAC inpured DATA');\n log.log('HHashHMAC:', data);\n }\n\n _this._importHMACkey(key).then(function (hmacKey) {\n\n _this._crypto.subtle.sign({\n name: 'HMAC'\n }, hmacKey, //from generateKey or importKey above\n (0, _utf.encodeUTF8)(data) //ArrayBuffer of data you want to sign\n ).then(function (signature) {\n log.log('HashHMAC signature:', new Uint8Array(signature));\n\n // log.log('crypto-hashHMAC', signature);\n //returns an ArrayBuffer containing the signature\n resolve(new Uint8Array(signature));\n }).catch(function (err) {\n // log.log('crypto-hashHMAC', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * verifies an hash using the HMAC algorithm\n * @param {byteArray} key key to be used in the hmac\n * @param {string} data information to be hashed to compare\n * @param {byteArray} signature hash to compare with the received data\n * @return {boolean} isvalid boolean saying if the data corresponds to the hash received\n */\n\n }, {\n key: 'verifyHMAC',\n value: function verifyHMAC(key, data, signature) {\n log.log('verifyHMAC:key', key);\n log.log('verifyHMAC:data', data);\n log.log('verifyHMAC:signature', signature);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this._importHMACkey(key).then(function (hmacKey) {\n\n if (typeof data != 'string') {\n data = (0, _stringify2.default)(data);\n log.log('Converting verifyHMAC inputed DATA:', data);\n }\n\n _this._crypto.subtle.verify({\n name: 'HMAC'\n }, hmacKey, //from generateKey or importKey above\n signature, //ArrayBuffer of the signature\n (0, _utf.encodeUTF8)(data) //ArrayBuffer of the data\n ).then(function (isvalid) {\n //returns a boolean on whether the signature is true or not\n // log.log('crypto-verifyHMAC', isvalid);\n log.log('verifyHMAC result', isvalid);\n isvalid ? resolve(isvalid) : reject(isvalid);\n }).catch(function (err) {\n log.error('crypto-verifyHMAC', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * generates a RSA public/private key pair with a modulus length of 2048 bits\n * @return {JSON} keyPair json containing the public and private keys\n */\n\n }, {\n key: 'generateRSAKeyPair',\n value: function generateRSAKeyPair() {\n var _this = this;\n var keyPair = {};\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.generateKey({\n name: 'RSA-PSS',\n modulusLength: 2048, //can be 1024, 2048, or 4096\n publicExponent: new Uint8Array([0x01, 0x00, 0x01]),\n hash: { name: 'SHA-256' //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n } }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['sign', 'verify'] //can be any combination of 'sign' and 'verify'\n\n ).then(function (key) {\n //returns a keypair object\n // log.log(key);\n\n _this._crypto.subtle.exportKey('spki', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n key.publicKey //can be a publicKey or privateKey, as long as extractable was true\n ).then(function (publicKey) {\n //returns the exported key data\n keyPair.public = new Uint8Array(publicKey);\n return _this._crypto.subtle.exportKey('pkcs8', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n key.privateKey //can be a publicKey or privateKey, as long as extractable was true\n );\n }).then(function (privateKey) {\n keyPair.private = new Uint8Array(privateKey);\n\n // log.log('crypto-generateRSAKeyPair', keyPair);\n resolve(keyPair);\n }).catch(function (err) {\n log.error(err);\n reject(err);\n });\n }).catch(function (err) {\n log.error(err);\n reject(err);\n });\n });\n }\n\n /**\n * Generates a 128 bit random value.\n * @return {byteArray} array random value\n */\n\n }, {\n key: 'generateIV',\n value: function generateIV() {\n var _this = this;\n\n var array = new Uint8Array(16);\n _this._crypto.getRandomValues(array);\n\n return array;\n }\n\n /**\n * Generates a 256 bit random value. 32 bits are extrated from the machine time,\n * the remaining are generated randomly\n * @return {byteArray} array random value\n */\n\n }, {\n key: 'generateRandom',\n value: function generateRandom() {\n var _this = this;\n\n var array = new Uint8Array(32);\n _this._crypto.getRandomValues(array);\n\n var date = Date.now();\n\n var dateEncoded = (0, _utf.encodeUTF8)(date.toString());\n\n //extract the least significant 4 bytes in the date\n var finalDate = dateEncoded.slice(dateEncoded.length - 4, dateEncoded.length);\n\n // add in the first 4 bytes of the array the bytes extracted previously;\n for (var i = 0; i < 4; i++) {\n array[i] = finalDate[i];\n }\n return array;\n }\n\n /**\n * generates a premaster secret (PMS) of 48 bytes (384 bits) randomly\n * @return {byteArray} array premaster secret key\n */\n\n }, {\n key: 'generatePMS',\n value: function generatePMS() {\n var _this = this;\n\n var array = new Uint8Array(48);\n _this._crypto.getRandomValues(array);\n return array;\n }\n\n /**\n * generates a masterKey secret (PMS) of 48 bytes (384 bits) using the premaster secret and\n * two randoms\n * @return {byteArray} array master secret key with 48 bytes\n */\n\n }, {\n key: 'generateMasterSecret',\n value: function generateMasterSecret(hmacKey, data) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var key = new Uint8Array(48);\n var seed = data;\n\n _this._digest(hmacKey).then(function (digestedKey) {\n\n _this.hashHMAC(digestedKey, seed).then(function (keypart0) {\n\n //copy the first 32 bytes into the key\n for (var i = 0; i < 32; i++) {\n key[i] = keypart0[i];\n }\n return _this.hashHMAC(digestedKey, seed + keypart0);\n }).then(function (keypart1) {\n\n //copy the first 16 bytes to the key remaining 16 bytes\n for (var i = 0; i < 16; i++) {\n key[i + 32] = keypart1[i];\n }\n\n // log.log('crypto-generateMasterSecret', key);\n resolve(key);\n }).catch(function (err) {\n // log.log('crypto-generateMasterSecret', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * generates both users MAC and encryption keys. generate as output an array\n * with 4 byteArray each with 32 bytes\n * @param {byteArray} secret secret to be used in the HMAC function\n * @param {String} data information to be used as seed\n * @return {Array} key array with the information to generate keys\n */\n\n }, {\n key: 'generateKeys',\n value: function generateKeys(hmacKey, data) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var key = [];\n var seed = data;\n\n // iterate 4 times to obtain a 1024 key size\n _this.hashHMAC(hmacKey, seed).then(function (keypart0) {\n key.push(keypart0);\n return _this.hashHMAC(hmacKey, seed + keypart0);\n }).then(function (keypart1) {\n key.push(keypart1);\n return _this.hashHMAC(hmacKey, seed + keypart1);\n }).then(function (keypart2) {\n key.push(keypart2);\n return _this.hashHMAC(hmacKey, seed + keypart2);\n }).then(function (keypart3) {\n key.push(keypart3);\n\n // log.log('crypto-generateKeys', key);\n resolve(key);\n }).catch(function (err) {\n // log.log('crypto-generateKeys', err);\n reject(err);\n });\n\n // log.log(hmacKey, data);\n });\n }\n }, {\n key: '_importRSAsignKey',\n value: function _importRSAsignKey(privKey) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.importKey('pkcs8', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n privKey, { //these are the algorithm options\n name: 'RSASSA-PKCS1-v1_5',\n hash: { name: 'SHA-256' //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n } }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['sign'] //'verify' for public key import, 'sign' for private key imports\n ).then(function (privateKey) {\n //returns a publicKey (or privateKey if you are importing a private key)\n // log.log('crypto-_importRSAsignKey', privateKey);\n resolve(privateKey);\n }).catch(function (err) {\n log.error('crypto-_importRSAsignKey', err);\n reject(err);\n });\n });\n }\n }, {\n key: '_importRSAverifyKey',\n value: function _importRSAverifyKey(pubKey) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.importKey('spki', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n pubKey, { //these are the algorithm options\n name: 'RSASSA-PKCS1-v1_5',\n hash: { name: 'SHA-256' //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n } }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['verify'] //'verify' for public key import, 'sign' for private key imports\n ).then(function (publicKey) {\n //returns a publicKey (or privateKey if you are importing a private key)\n // log.log('crypto-_importRSAverifyKey', publicKey);\n resolve(publicKey);\n }).catch(function (err) {\n log.error('crypto-_importRSAverifyKey', err);\n reject(err);\n });\n });\n }\n }, {\n key: '_importRSAencryptKey',\n value: function _importRSAencryptKey(pubKey) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.importKey('spki', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n pubKey, { //these are the algorithm options\n name: 'RSA-OAEP',\n hash: { name: 'SHA-256' //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n } }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['encrypt'] //'encrypt' or 'wrapKey' for public key import or\n //'decrypt' or 'unwrapKey' for private key imports\n ).then(function (publicKey) {\n //returns a publicKey (or privateKey if you are importing a private key)\n // log.log('crypto-_importRSAencryptKey', publicKey);\n resolve(publicKey);\n }).catch(function (err) {\n log.error('crypto-_importRSAencryptKey', err.name);\n reject(err);\n });\n });\n }\n }, {\n key: '_importRSAdecryptKey',\n value: function _importRSAdecryptKey(privKey) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.importKey('pkcs8', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n privKey, { //these are the algorithm options\n name: 'RSA-OAEP',\n hash: { name: 'SHA-256' //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n } }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['decrypt'] //'encrypt' or 'wrapKey' for public key import or\n //'decrypt' or 'unwrapKey' for private key imports\n ).then(function (privateKey) {\n //returns a publicKey (or privateKey if you are importing a private key)\n // log.log('crypto-_importRSAdecryptKey', privateKey);\n resolve(privateKey);\n }).catch(function (err) {\n log.error('crypto-_importRSAdecryptKey', err);\n reject(err);\n });\n });\n }\n }, {\n key: 'concatPMSwithRandoms',\n value: function concatPMSwithRandoms(pms, toRandom, fromRandom) {\n\n var finalKey = new Uint8Array(pms.length + toRandom.length + fromRandom.length);\n\n // add PremasterKey\n for (var i = 0; i < pms.length; i++) {\n finalKey[i] = pms[i];\n }\n\n //add to random\n for (var _i = 0; _i < toRandom.length; _i++) {\n finalKey[_i + pms.length] = pms[_i];\n }\n\n //add from random\n for (var _i2 = 0; _i2 < fromRandom.length; _i2++) {\n finalKey[_i2 + pms.length + toRandom.length] = pms[_i2];\n }\n\n return finalKey;\n }\n }, {\n key: '_generate256bitKey',\n value: function _generate256bitKey() {\n var _this = this;\n var array = new Uint8Array(32);\n _this._crypto.getRandomValues(array);\n\n return array;\n }\n\n /**\n * imports the secret to the HMAC function\n * @param {byteArray} arrayBuffer bytes to import as key\n * @return {JSON} key key ready to be used in the HMAC cryptographic function\n */\n\n }, {\n key: '_importHMACkey',\n value: function _importHMACkey(arrayBuffer) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this._digest(arrayBuffer).then(function (key) {\n\n _this._crypto.subtle.importKey('raw', //can be 'jwk' or 'raw'\n key, { //this is the algorithm options\n name: 'HMAC',\n hash: { name: 'SHA-256' }, //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n length: 256 //optional, if you want your key length to differ from the hash function's block length\n }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['sign', 'verify'] //can be any combination of 'sign' and 'verify'\n ).then(function (key) {\n //returns the symmetric key\n // log.log('crypto-_importHMACkey', key);\n resolve(key);\n }).catch(function (err) {\n reject(err);\n });\n });\n });\n }\n }, {\n key: '_digest',\n value: function _digest(value) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.digest({\n name: 'SHA-256'\n }, value //The data you want to hash as an ArrayBuffer\n ).then(function (hash) {\n //returns the hash as an ArrayBuffer\n // log.log('crypto-digest', new Uint8Array(hash));\n resolve(new Uint8Array(hash));\n }).catch(function (err) {\n log.error(err);\n reject(err);\n });\n });\n }\n }, {\n key: '_importAESkey',\n value: function _importAESkey(arrayBuffer) {\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.importKey('raw', //can be 'jwk' or 'raw'\n arrayBuffer, { //this is the algorithm options\n name: 'AES-CBC'\n }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['encrypt', 'decrypt'] //can be 'encrypt', 'decrypt', 'wrapKey', or 'unwrapKey'\n ).then(function (key) {\n //returns the symmetric key\n // log.log('crypto-importAESkey', key);\n resolve(key);\n }).catch(function (err) {\n log.error('crypto-importAESkey', err);\n reject(err);\n });\n });\n }\n }]);\n return Crypto;\n}();\n\nexports.default = Crypto;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9jcnlwdG9NYW5hZ2VyL0NyeXB0by5qcz9hZTY2Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7ZW5jb2RlVVRGOCwgZGVjb2RlVVRGOH0gZnJvbSAnLi91dGY4LmpzJztcbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignQ3J5cHRvTWFuYWdlcicpO1xuXG4vKipcbiogQ2xhc3Mgd2l0aCB0aGUgY3J5cHRvZ3JhcGhpYyBmdW5jdGlvbnMgZm9yIHRoZSBhdXRoZW50aWNhdGlvbiBwcm90b2NvbFxuKlxuKi9cbmNsYXNzIENyeXB0byB7XG5cbi8qKlxuKiBSdW50aW1lZmFjdG9yeSBpcyBwYXNzZWQgaW4gdGhlIGNvc3RydWN0b3IsIGJlY2F1c2UgdGhlIG5vZGVKUyBoYXMgYSBkaWZmZXJlbnQgY3J5cHRvIG1vZHVsZVxuKiBmcm9tIHRoZSBicm93c2VyLiBSdW50aW1lRmFjdG9yeSBwcm92aWRlcyBhIHdyYXBwZXIgZm9yIHRoZSBmdWN0aW9ucyBvZiBub2RlSlMsIHNvIHRoZXkgY2FuIGJlXG4qIGludm9rZWQgYnJvd3NlciBsaWtlLlxuKi9cbiAgY29uc3RydWN0b3IocnVudGltZUZhY3RvcnkpIHtcbiAgICBsZXQgX3RoaXMgPSB0aGlzO1xuICAgIHR5cGVvZiBydW50aW1lRmFjdG9yeS5jcmVhdGVXZWJjcnlwdG8gPT09ICdmdW5jdGlvbicgPyBfdGhpcy5fY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vLnN1YnRsZS5kZWNyeXB0KFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6ICdBRVMtQ0JDJyxcbiAgICAgICAgICAgIGl2OiBpdlxuICAgICAgICAgIH0sXG4gICAgICAgICAgYWVzS2V5LCAvL2Zyb20gZ2VuZXJhdGVLZXkgb3IgaW1wb3J0S2V5IGFib3ZlXG4gICAgICAgICAgZGF0YSAvL0FycmF5QnVmZmVyIG9mIHRoZSBkYXRhXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihmdW5jdGlvbihkZWNyeXB0ZWQpIHtcblxuICAgICAgICAgICAgbGV0IGRlY29kZWREYXRhID0gZGVjb2RlVVRGOChuZXcgVWludDhBcnJheShkZWNyeXB0ZWQpKTtcbiAgICAgICAgICAgIGxvZy5sb2coJ2NyeXB0by1kZWNyeXB0QUVTJywgZGVjb2RlZERhdGEpO1xuICAgICAgICAgICAgcmVzb2x2ZShkZWNvZGVkRGF0YSk7XG5cbiAgICAgICAgICB9KS5jYXRjaChmdW5jdGlvbihlcnIpIHtcbiAgICAgICAgICAvLyBsb2cubG9nKCdjcnlwdG8tZGVjcnlwdEFFUycsIGVycik7XG4gICAgICAgICAgICByZWplY3QoZXJyKTtcbiAgICAgICAgICB9KTtcblxuICAgICAgfSk7XG5cbiAgICB9KTtcbiAgfVxuXG4gIC8qKlxuICAqIGNyZWF0ZXMgYSBoYXNoIHVzaW5nIHRoZSBITUFDIGFsZ29yaXRobVxuICAqIEBwYXJhbSAge2J5dGVBcnJheX0gICAga2V5ICAgICAgIGtleSB0byBiZSB1c2VkIGluIHRoZSBobWFjXG4gICogQHBhcmFtICB7c3RyaW5nfSAgICAgIGRhdGEgICAgICAgaW5mb3JtYXRpb24gdG8gYmUgaGFzaGVkXG4gICogQHJldHVybiAge2J5dGVBcnJheX0gICBzaWduYXR1cmUgIHJlc3VsdGluZyBoYXNoXG4gICovXG4gIGhhc2hITUFDKGtleSwgZGF0YSkge1xuICAgIGxvZy5sb2coJ2hhc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7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBSEE7QUFNQTtBQVRBO0FBV0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFEQTtBQURBO0FBT0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFFQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFEQTtBQUlBO0FBUEE7QUFVQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBR0E7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///490\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.encodeUTF8 = encodeUTF8;\nexports.decodeUTF8 = decodeUTF8;\n// Marshals a string to Uint8Array.\nfunction encodeUTF8(s) {\n\tvar i = 0;\n\tvar bytes = new Uint8Array(s.length * 4);\n\tfor (var ci = 0; ci != s.length; ci++) {\n\t\ttry {\n\t\t\tvar xxx = s.charCodeAt(ci);\n\t\t} catch (err) {\n\t\t\tconsole.log(err.message);\n\t\t\treturn;\n\t\t}\n\t\tvar c = s.charCodeAt(ci);\n\t\tif (c < 128) {\n\t\t\tbytes[i++] = c;\n\t\t\tcontinue;\n\t\t}\n\t\tif (c < 2048) {\n\t\t\tbytes[i++] = c >> 6 | 192;\n\t\t} else {\n\t\t\tif (c > 0xd7ff && c < 0xdc00) {\n\t\t\t\tif (++ci == s.length) throw 'UTF-8 encode: incomplete surrogate pair';\n\t\t\t\tvar c2 = s.charCodeAt(ci);\n\t\t\t\tif (c2 < 0xdc00 || c2 > 0xdfff) throw 'UTF-8 encode: second char code 0x' + c2.toString(16) + ' at index ' + ci + ' in surrogate pair out of range';\n\t\t\t\tc = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n\t\t\t\tbytes[i++] = c >> 18 | 240;\n\t\t\t\tbytes[i++] = c >> 12 & 63 | 128;\n\t\t\t} else {\n\t\t\t\t// c <= 0xffff\n\t\t\t\tbytes[i++] = c >> 12 | 224;\n\t\t\t}\n\t\t\tbytes[i++] = c >> 6 & 63 | 128;\n\t\t}\n\t\tbytes[i++] = c & 63 | 128;\n\t}\n\treturn bytes.subarray(0, i);\n}\n\n// Unmarshals an Uint8Array to string.\nfunction decodeUTF8(bytes) {\n\tvar s = '';\n\tvar i = 0;\n\twhile (i < bytes.length) {\n\t\tvar c = bytes[i++];\n\t\tif (c > 127) {\n\t\t\tif (c > 191 && c < 224) {\n\t\t\t\tif (i >= bytes.length) throw 'UTF-8 decode: incomplete 2-byte sequence';\n\t\t\t\tc = (c & 31) << 6 | bytes[i] & 63;\n\t\t\t} else if (c > 223 && c < 240) {\n\t\t\t\tif (i + 1 >= bytes.length) throw 'UTF-8 decode: incomplete 3-byte sequence';\n\t\t\t\tc = (c & 15) << 12 | (bytes[i] & 63) << 6 | bytes[++i] & 63;\n\t\t\t} else if (c > 239 && c < 248) {\n\t\t\t\tif (i + 2 >= bytes.length) throw 'UTF-8 decode: incomplete 4-byte sequence';\n\t\t\t\tc = (c & 7) << 18 | (bytes[i] & 63) << 12 | (bytes[++i] & 63) << 6 | bytes[++i] & 63;\n\t\t\t} else throw 'UTF-8 decode: unknown multibyte start 0x' + c.toString(16) + ' at index ' + (i - 1);\n\t\t\t++i;\n\t\t}\n\n\t\tif (c <= 0xffff) s += String.fromCharCode(c);else if (c <= 0x10ffff) {\n\t\t\tc -= 0x10000;\n\t\t\ts += String.fromCharCode(c >> 10 | 0xd800);\n\t\t\ts += String.fromCharCode(c & 0x3FF | 0xdc00);\n\t\t} else throw 'UTF-8 decode: code point 0x' + c.toString(16) + ' exceeds UTF-16 reach';\n\t}\n\treturn s;\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9jcnlwdG9NYW5hZ2VyL3V0ZjguanM/M2IxOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBNYXJzaGFscyBhIHN0cmluZyB0byBVaW50OEFycmF5LlxuZXhwb3J0IGZ1bmN0aW9uIGVuY29kZVVURjgocykge1xuXHR2YXIgaSA9IDA7XG5cdHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KHMubGVuZ3RoICogNCk7XG5cdGZvciAodmFyIGNpID0gMDsgY2kgIT0gcy5sZW5ndGg7IGNpKyspIHtcbiAgICB0cnl7XG4gICAgICB2YXIgeHh4ID0gcy5jaGFyQ29kZUF0KGNpKTtcbiAgICB9IGNhdGNoIChlcnIpe1xuICAgICAgY29uc29sZS5sb2coZXJyLm1lc3NhZ2UpO1xuICAgICAgcmV0dXJuO1xuXG4gICAgfVxuXHRcdHZhciBjID0gcy5jaGFyQ29kZUF0KGNpKTtcblx0XHRpZiAoYyA8IDEyOCkge1xuXHRcdFx0Ynl0ZXNbaSsrXSA9IGM7XG5cdFx0XHRjb250aW51ZTtcblx0XHR9XG5cdFx0aWYgKGMgPCAyMDQ4KSB7XG5cdFx0XHRieXRlc1tpKytdID0gYyA+PiA2IHwgMTkyO1xuXHRcdH0gZWxzZSB7XG5cdFx0XHRpZiAoY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HRcdGMgLT0gMHgxMDAwMDtcblx0XHRcdHMgKz0gU3RyaW5nLmZyb21DaGFyQ29kZShjID4+IDEwIHwgMHhkODAwKVxuXHRcdFx0cyArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGMgJiAweDNGRiB8IDB4ZGMwMClcblx0XHR9IGVsc2UgdGhyb3cgJ1VURi04IGRlY29kZTogY29kZSBwb2ludCAweCcgKyBjLnRvU3RyaW5nKDE2KSArICcgZXhjZWVkcyBVVEYtMTYgcmVhY2gnO1xuXHR9XG5cdHJldHVybiBzO1xufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9jcnlwdG9NYW5hZ2VyL3V0ZjguanMiXSwibWFwcGluZ3MiOiI7Ozs7O0FBQ0E7QUFxQ0E7QUF0Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///491\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _assign = __webpack_require__(96);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _AddressAllocation = __webpack_require__(99);\n\nvar _AddressAllocation2 = _interopRequireDefault(_AddressAllocation);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('loader'); // Log System\n\nvar Loader = function () {\n function Loader(runtimeURL, runtimeConfiguration, runtimeDescriptorsInstance) {\n (0, _classCallCheck3.default)(this, Loader);\n\n if (!runtimeConfiguration) throw Error('[Runtime.Loader] The descriptor need to know the runtime configuration');\n if (!runtimeDescriptorsInstance) throw Error('[Runtime.Loader] The descriptor need to know the runtime Descriptor instance');\n\n this.log = log;\n\n this.runtimeConfiguration = runtimeConfiguration;\n this.descriptors = runtimeDescriptorsInstance;\n }\n\n /**\n * Set runtime url\n * @param {string} value runtimeURL\n */\n\n\n (0, _createClass3.default)(Loader, [{\n key: 'loadHyperty',\n\n\n /**\n * Deploy Hyperty from Catalogue URL\n *\n * @see https://github.com/reTHINK-project/specs/tree/master/datamodel/core/address\n *\n * @param {URL.HypertyCatalogueURL} hypertyCatalogueURL - The Catalogue URL used to identify descriptors in the Catalogue.\n * @param {boolean|URL.HypertyURL} [reuseURL=false] reuseURL - reuseURL is used to reuse the hypertyURL previously registred, by default the reuse is disabled;\n * @param {URL} appURL - the app url origin address;\n * @param {object} IdpConstraint - constraints to be used when selecting the identity to be associated with the Hyperty including origin, idp, and idHint.\n * @returns {Promise} this is Promise and returns true if all components are loaded with success or an error if someone fails.\n *\n * @memberOf Loader\n */\n value: function loadHyperty(hypertyCatalogueURL) {\n var reuseURL = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var _this = this;\n\n var IdpConstraint = arguments[2];\n var appURL = arguments[3];\n\n\n if (!this._readyToUse()) return false;\n if (!hypertyCatalogueURL) throw new Error('[Runtime.Loader] Hyperty descriptor url parameter is needed');\n\n return new _promise2.default(function (resolve, reject) {\n\n var _hypertyURL = void 0;\n var _hypertySandbox = void 0;\n var _hypertyDescriptor = void 0;\n var _hypertySourcePackage = void 0;\n var haveError = false;\n\n var errorReason = function errorReason(reason) {\n log.info('[Runtime.Loader] Something failed on the deploy hyperty: ', reason);\n reject(reason);\n };\n\n var handleError = function handleError(reason) {\n haveError = true;\n reject(reason);\n };\n\n // Get Hyperty descriptor\n // TODO: the request Module should be changed,\n // because at this moment it is incompatible with nodejs;\n // Probably we need to pass a factory like we do for sandboxes;\n log.info('[Runtime.Loader] ------------------ Hyperty ------------------------');\n log.info('[Runtime.Loader] Get hyperty descriptor for :', hypertyCatalogueURL);\n return _this.descriptors.getHypertyDescriptor(hypertyCatalogueURL).then(function (hypertyDescriptor) {\n // at this point, we have completed \"step 2 and 3\" as shown in https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md\n log.info('[Runtime.Loader] 1: return hyperty descriptor');\n\n // hyperty contains the full path of the catalogue URL, e.g.\n // catalogue.rethink.eu/.well-known/..........\n _hypertyDescriptor = hypertyDescriptor;\n\n var sourcePackageURL = hypertyDescriptor.sourcePackageURL;\n\n if (sourcePackageURL === '/sourcePackage') {\n return hypertyDescriptor.sourcePackage;\n }\n\n // Get the hyperty source code\n return _this.runtimeCatalogue.getSourcePackageFromURL(sourcePackageURL);\n }, handleError).then(function (sourcePackage) {\n if (haveError) return false;\n\n log.info('[Runtime.Loader] 2: return hyperty source code');\n\n // at this point, we have completed \"step 4 and 5\" as shown in https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md\n\n _hypertySourcePackage = sourcePackage;\n\n //\n // steps 6 -- 9 are skipped.\n // TODO: on release of core 0.2;\n // TODO: Promise to check the policy engine\n\n // mock-up code;\n // temporary code, only\n var policy = true;\n\n return policy;\n }, handleError).then(function (policyResult) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 3: return policy engine result' + policyResult);\n\n // we have completed step 6 to 9 of https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n //\n // Steps 6 -- 9\n // As a result of the sipped steps, we know at this point if we execute\n // inSameSandbox or not.\n //\n\n // For testing, just assume we execute in same Sandbox.\n var inSameSandbox = true;\n var sandbox = void 0;\n\n if (inSameSandbox) {\n\n // this don't need be a Promise;\n sandbox = _this.registry.getAppSandbox();\n\n // we have completed step 11 here.\n } else {\n\n var domain = (0, _utils.divideURL)(hypertyCatalogueURL).domain;\n\n // getSandbox, this will return a promise;\n sandbox = _this.registry.getSandbox(domain);\n }\n\n // this will return the sandbox or one promise to getSandbox;\n return sandbox;\n }, handleError).then(function (sandbox) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 4: return the sandbox', sandbox);\n\n // Return the sandbox indepentely if it running in the same sandbox or not\n // we have completed step 14 here.\n return sandbox;\n }, function (reason) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 4.1: Try to register a new sandbox');\n\n // check if the sandbox is registed for this hyperty descriptor url;\n // Make Steps xxx --- xxx\n // Instantiate the Sandbox\n\n var hypertyCapabilities = {};\n if (_hypertyDescriptor && _hypertyDescriptor.hasOwnProperty('capabilities')) {\n hypertyCapabilities = _hypertyDescriptor.stubCapabilities;\n }\n\n return _this._runtimeFactory.createSandbox(hypertyCapabilities).then(function (sandbox) {\n\n sandbox.addListener('*', function (msg) {\n _this.messageBus.postMessage(msg);\n });\n\n return sandbox;\n });\n }, handleError).then(function (sandbox) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 5: return sandbox and register');\n\n _hypertySandbox = sandbox;\n\n var numberOfAddresses = 1;\n return _this._addressAllocation.create(_this._registry._domain, numberOfAddresses, _hypertyDescriptor, 'hyperty', reuseURL);\n }, handleError).then(function (addresses) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 6: return the addresses for the hyperty', addresses);\n\n // Register hyperty\n return _this.registry.registerHyperty(_hypertySandbox, hypertyCatalogueURL, _hypertyDescriptor, addresses, IdpConstraint);\n }, handleError).then(function (registrationResult) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 7: registration result', registrationResult);\n\n // we have completed step 16 of https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n _hypertyURL = registrationResult.url;\n\n // Extend original hyperty configuration;\n var configuration = {};\n if (!(0, _utils.emptyObject)(_hypertyDescriptor.configuration)) {\n try {\n configuration = (0, _assign2.default)({}, JSON.parse(_hypertyDescriptor.configuration));\n } catch (e) {\n configuration = _hypertyDescriptor.configuration;\n }\n }\n configuration.runtimeURL = _this._runtimeURL;\n\n if (registrationResult.p2pHandler) {\n configuration.p2pHandler = registrationResult.p2pHandler;\n configuration.p2pRequester = registrationResult.p2pRequester;\n }\n\n // We will deploy the component - step 17 of https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n\n try {\n return _hypertySandbox.deployComponent(_hypertySourcePackage.sourceCode, _hypertyURL, configuration);\n } catch (e) {\n log.info('[Runtime.Loader] Error on deploy component:', e);\n reject(e);\n }\n }, handleError).then(function (deployComponentStatus) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 8: Deploy component status for hyperty: ', deployComponentStatus);\n\n // we have completed step 19 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n\n // Add the message bus listener to the appSandbox or hypertSandbox;\n _this.messageBus.addListener(_hypertyURL, function (msg) {\n _hypertySandbox.postMessage(msg);\n });\n\n // we have completed step 20 of https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n var hyperty = {\n runtimeHypertyURL: _hypertyURL,\n status: deployComponentStatus\n };\n\n log.info('[Runtime.Loader] Hyperty: ', hyperty);\n resolve(hyperty);\n\n // we have completed step 21 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n log.info('[Runtime.Loader] ------------------ END ------------------------');\n }, handleError).catch(errorReason);\n });\n }\n\n /**\n * Deploy Stub from Catalogue URL or domain url\n * @param {URL.URL} protostubURL Catalogue URL for the ProtoStub to be loaded or the domain to be target by the protostub\n * @param {Object} p2pConfig configuration of p2p\n */\n\n }, {\n key: 'loadStub',\n value: function loadStub(protostubURL, p2pConfig) {\n var _this2 = this;\n\n if (!this._readyToUse()) return false;\n if (!protostubURL) throw new Error('[Runtime.Loader.loadStub]ProtoStub descriptor url parameter is needed');\n\n return new _promise2.default(function (resolve, reject) {\n\n // to analyse if domain for p2pHandlers should be something else and not the default domain itself\n\n var domain = (0, _utils.divideURL)(protostubURL).domain;\n\n if (!domain) {\n domain = protostubURL;\n }\n\n var _stubSandbox = void 0;\n var _stubDescriptor = void 0;\n var _runtimeProtoStubURL = void 0;\n var _stubSourcePackage = void 0;\n var haveError = false;\n var stubId = void 0;\n\n var errorReason = function errorReason(reason) {\n log.info('[Runtime.Loader.loadStub]Something failed on the deploy of protocolstub: ', reason);\n reject(reason);\n };\n\n var handleError = function handleError(reason) {\n haveError = true;\n reject(reason);\n };\n\n // Discover Protocol Stub\n var discoverStub = void 0;\n var isP2PHandler = false;\n var isP2PRequester = false;\n var stubCapabilities = {};\n\n log.info('[Runtime.Loader.loadStub] starting loading for ', protostubURL, ' with p2pconfig ', p2pConfig);\n log.info('[Runtime.Loader.loadStub]Discover or Create a new ProtoStub for domain: ', domain);\n\n // step 2 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n try {\n if (p2pConfig) {\n\n if (p2pConfig.hasOwnProperty('isHandlerStub') && p2pConfig.isHandlerStub) {\n // step 6 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n isP2PHandler = true;\n stubId = _this2.runtimeURL;\n discoverStub = _this2.registry.discoverP2PStub();\n } else {\n isP2PRequester = true;\n var p2pHandlerRuntimeURL = p2pConfig.remoteRuntimeURL;\n stubId = p2pHandlerRuntimeURL;\n\n // step 4 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n // step 5 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n discoverStub = _this2.registry.discoverP2PStub(p2pHandlerRuntimeURL);\n }\n } else {\n // step 3 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n stubId = domain;\n discoverStub = _this2.registry.discoverProtostub(domain);\n }\n\n // Is registed?\n log.info('[Runtime.Loader.loadStub]1. Proto Stub Discovered for ', protostubURL, ': ', discoverStub);\n\n // step 23 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n resolve(discoverStub);\n log.info(' [Runtime.Loader]------------------- END ---------------------------\\n');\n } catch (reason) {\n\n // is not registed?\n log.info('[Runtime.Loader.loadStub]1. Proto Stub not found ' + reason);\n\n // step 8 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n _this2.descriptors.getStubDescriptor(protostubURL).then(function (stubDescriptor) {\n\n if (haveError) return false;\n log.info('[Runtime.Loader.loadStub]2. return the ProtoStub descriptor');\n\n // step 9 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n _stubDescriptor = stubDescriptor;\n\n var sourcePackageURL = stubDescriptor.sourcePackageURL;\n\n if (sourcePackageURL === '/sourcePackage') {\n return stubDescriptor.sourcePackage;\n }\n\n // step 10 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this2.runtimeCatalogue.getSourcePackageFromURL(sourcePackageURL);\n }, handleError).catch(errorReason).then(function (stubSourcePackage) {\n if (haveError) return false;\n\n // According to debug, it seems RuntimeCatalogue does not support yet constraints. It appears empty!!!!\n\n if (_stubDescriptor && _stubDescriptor.constraints) {\n stubCapabilities = _stubDescriptor.constraints;\n }\n\n // step 11 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub]3. return the ProtoStub Source Code');\n _stubSourcePackage = stubSourcePackage;\n\n // this will return the sandbox or one promise to getSandbox;\n // step 12 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this2.registry.getSandbox(domain, stubCapabilities);\n }).then(function (stubSandbox) {\n if (haveError) return false;\n\n // step 15 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub]4. if the sandbox is registered then return the sandbox ', stubSandbox);\n\n _stubSandbox = stubSandbox;\n return stubSandbox;\n }).catch(function (reason) {\n if (haveError) return false;\n\n // step 13 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub]5. Sandbox was not found, creating a new one ', reason);\n\n // check if the sandbox is registed for this stub descriptor url;\n\n\n // step 14 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this2._runtimeFactory.createSandbox(stubCapabilities).then(function (sandbox) {\n\n sandbox.addListener('*', function (msg) {\n _this2.messageBus.postMessage(msg);\n });\n\n return sandbox;\n });\n }).then(function (sandbox) {\n if (haveError) return false;\n\n // step 16 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub]6. return the sandbox instance and register', sandbox, 'to domain ', domain);\n\n _stubSandbox = sandbox;\n\n // we need register stub on registry - step xxx https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this2.registry.registerStub(_stubSandbox, stubId, p2pConfig, protostubURL, _stubDescriptor);\n }, handleError).then(function (runtimeProtoStub) {\n if (haveError) return false;\n\n // step 23 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub] 7. return the runtime protostub url: ', runtimeProtoStub);\n\n _runtimeProtoStubURL = runtimeProtoStub.url;\n\n // Extend original hyperty configuration;\n var configuration = {};\n if (!(0, _utils.emptyObject)(_stubDescriptor.configuration)) {\n try {\n configuration = (0, _assign2.default)({}, JSON.parse(_stubDescriptor.configuration));\n } catch (e) {\n configuration = _stubDescriptor.configuration;\n }\n }\n\n if (p2pConfig) {\n try {\n configuration = (0, _assign2.default)(configuration, JSON.parse(p2pConfig));\n } catch (e) {\n configuration = (0, _assign2.default)(configuration, p2pConfig);\n }\n }\n\n // required for protostub session\n\n configuration.runtimeURL = _this2._runtimeURL;\n\n // step 24 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n try {\n // step 26 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub] 8: adding sandbox listener to protostubURL : ', _runtimeProtoStubURL);\n\n // step 27 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n // Add the message bus listener\n _this2.messageBus.addListener(_runtimeProtoStubURL, function (msg) {\n _stubSandbox.postMessage(msg);\n });\n\n return _stubSandbox.deployComponent(_stubSourcePackage.sourceCode, _runtimeProtoStubURL, configuration);\n } catch (e) {\n log.error('[Runtime.Loader.loadStub] Error on deploy component:', e);\n reject(e);\n }\n }, handleError).then(function () {\n if (haveError) return false;\n\n // step 28 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n var stub = void 0;\n if (p2pConfig) {\n log.log('[Runtime.Loader.loadStub] p2pConfig: ', p2pConfig);\n\n if (p2pConfig.hasOwnProperty('isHandlerStub')) stub = _this2.registry.p2pHandlerStub[_this2._runtimeURL];\n if (p2pConfig.hasOwnProperty('p2pRequesterStub')) stub = _this2.registry.p2pRequesterStub[p2pConfig.remoteRuntimeURL];\n } else {\n stub = _this2.registry.protostubsList[domain];\n }\n\n log.log('[Runtime.Loader.loadStub] Stub: ', stub);\n resolve(stub);\n log.info('[Runtime.Loader.loadStub]------------------- END ---------------------------\\n');\n }, handleError).catch(errorReason);\n }\n });\n }\n\n /**\n * Deploy idpProxy from Catalogue URL or domain url\n * @param {URL.URL} domain domain\n */\n\n }, {\n key: 'loadIdpProxy',\n value: function loadIdpProxy(idpProxyURL) {\n var _this3 = this;\n\n if (!this._readyToUse()) return false;\n if (!idpProxyURL) throw new Error('[Runtime.Loader] IdpProxy descriptor url parameter is needed');\n\n return new _promise2.default(function (resolve, reject) {\n\n var domain = (0, _utils.divideURL)(idpProxyURL).domain;\n\n if (!domain) {\n domain = idpProxyURL;\n }\n\n var _proxySandbox = void 0;\n var _proxyDescriptor = void 0;\n var _runtimeIdpProxyURL = void 0;\n var _proxySourcePackage = void 0;\n var haveError = false;\n\n var errorReason = function errorReason(reason) {\n log.info('[Runtime.Loader] Something failed on the deploy of IdpProxy: ', reason);\n reject(reason);\n };\n\n var handleError = function handleError(reason) {\n haveError = true;\n reject(reason);\n };\n\n // Discover IDPProxy\n log.info('[Runtime.Loader] ------------------- IDP Proxy Deploy ---------------------------\\n');\n log.info('[Runtime.Loader] Discover or Create a new IdpProxy for domain/URL: ', domain);\n\n try {\n var runtimeIdpProxyURL = _this3.registry.discoverIdpProxy(domain);\n\n // Is registed?\n log.info('[Runtime.Loader] 1. IDPProxy Discovered: ', runtimeIdpProxyURL);\n\n // we have completed step 2 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n var idpProxy = _this3.registry.idpProxyList[domain];\n log.log('Deployed: ', idpProxy);\n\n resolve(idpProxy);\n log.info('[Runtime.Loader] ------------------- END ---------------------------\\n');\n } catch (reason) {\n\n // is not registed?\n log.info('[Runtime.Loader] 1. IdpProxy not found:', reason);\n\n // we have completed step 3 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n // we need to get ProtoStub descriptor step 4 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n _this3.descriptors.getIdpProxyDescriptor(idpProxyURL).then(function (proxyDescriptor) {\n\n log.info('[Runtime.Loader] 2. Return the IDPProxy descriptor');\n\n // we have completed step 5 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n _proxyDescriptor = proxyDescriptor;\n\n var sourcePackageURL = proxyDescriptor.sourcePackageURL;\n\n if (sourcePackageURL === '/sourcePackage') {\n return proxyDescriptor.sourcePackage;\n }\n\n // we need to get ProtoStub Source code from descriptor - step 6 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this3.runtimeCatalogue.getSourcePackageFromURL(sourcePackageURL);\n }, handleError).then(function (sourcePackage) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 3. return the IDPProxy source package');\n\n // we have completed step 7 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n _proxySourcePackage = sourcePackage;\n\n // TODO: Check on PEP (policy Engine) if we need the sandbox and check if the Sandbox Factory have the context sandbox;\n var policy = true;\n return policy;\n }, handleError).then(function (policy) {\n if (haveError) return false;\n\n // this will return the sandbox or one promise to getSandbox;\n return _this3.registry.getSandbox(domain);\n }).then(function (proxySandbox) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 4. if the sandbox is registered then return the sandbox', proxySandbox);\n\n _proxySandbox = proxySandbox;\n return proxySandbox;\n }).catch(function (reason) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 5. Sandbox was not found, creating a new one', reason);\n\n var proxyCapabilities = {};\n if (_proxyDescriptor && _proxyDescriptor.hasOwnProperty('capabilities')) {\n _proxyDescriptor = _proxyDescriptor.stubCapabilities;\n }\n\n return _this3._runtimeFactory.createSandbox(proxyCapabilities).then(function (sandbox) {\n\n sandbox.addListener('*', function (msg) {\n _this3.messageBus.postMessage(msg);\n });\n\n return sandbox;\n });\n }).then(function (sandbox) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 6. return the sandbox instance and register', sandbox, 'to domain ', domain);\n\n _proxySandbox = sandbox;\n\n // we need register stub on registry - step xxx https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this3.registry.registerIdpProxy(sandbox, domain);\n }, handleError).then(function (runtimeIdpProxyURL) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 7. Return the runtime Idp Proxy URL: ', runtimeIdpProxyURL);\n\n // we have completed step xxx https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n _runtimeIdpProxyURL = runtimeIdpProxyURL;\n\n // Extend original hyperty configuration;\n var configuration = {};\n if (!(0, _utils.emptyObject)(_proxyDescriptor.configuration)) {\n try {\n configuration = (0, _assign2.default)({}, JSON.parse(_proxyDescriptor.configuration));\n } catch (e) {\n configuration = _proxyDescriptor.configuration;\n }\n }\n configuration.runtimeURL = _this3._runtimeURL;\n\n // Deploy Component step xxx\n try {\n // we have completed step xxx https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n // Add the message bus listener\n _this3.messageBus.addListener(_runtimeIdpProxyURL, function (msg) {\n _proxySandbox.postMessage(msg);\n });\n\n return _proxySandbox.deployComponent(_proxySourcePackage.sourceCode, runtimeIdpProxyURL, configuration);\n } catch (e) {\n log.info('[Runtime.Loader] Error on deploy component:', e);\n reject(e);\n }\n }, handleError).then(function () {\n if (haveError) return false;\n\n // we have completed step xxx https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n // Load Stub function resolved with success;\n // let idpProxy = {\n // runtimeIdpProxyURL: _runtimeIdpProxyURL,\n // status: deployComponentStatus\n // };\n\n //this.registry.idpProxyList[domain].status = 'deployed';\n var idpProxy = _this3.registry.idpProxyList[domain];\n\n log.log('[Runtime.Loader.loadIdpProxy] 8: loaded: ', idpProxy);\n\n resolve(idpProxy);\n log.info('[Runtime.Loader.loadIdpProxy] ------------------- END ---------------------------\\n');\n }, handleError).catch(errorReason);\n }\n });\n }\n\n // Check if the loader is ready to load all components\n\n }, {\n key: '_readyToUse',\n value: function _readyToUse() {\n\n var status = false;\n\n if (!this._runtimeURL) throw new Error('[Runtime.Loader] The loader need the runtime url address');\n if (!this._messagesBus) throw new Error('[Runtime.Loader] The loader need the messageBus component');\n if (!this._registry) throw new Error('[Runtime.Loader] The loader need the registry component');\n if (!this._runtimeFactory) throw new Error('[Runtime.Loader] The loader need the runtime factory component');\n\n status = true;\n return status;\n }\n }, {\n key: 'runtimeURL',\n set: function set(value) {\n this._runtimeURL = value;\n }\n\n /**\n * Get runtime url\n * @return {string} value runtimeURL\n */\n ,\n get: function get() {\n return this._runtimeURL;\n }\n\n /**\n * Set Registry component\n * @param {Registry} value Registry Component\n */\n\n }, {\n key: 'registry',\n set: function set(value) {\n this._registry = value;\n\n // Install AddressAllocation\n var addressAllocation = _AddressAllocation2.default.instance;\n this._addressAllocation = addressAllocation;\n\n log.log('[Loader - AddressAllocation] - ', addressAllocation);\n }\n\n /**\n * Get Registry component\n * @return {Registry} Registry component\n */\n ,\n get: function get() {\n return this._registry;\n }\n\n /**\n * Set Message Bus component\n * @param {MessageBus} value Message bus component\n */\n\n }, {\n key: 'messageBus',\n set: function set(value) {\n this._messagesBus = value;\n }\n\n /**\n * Get Message Bus component\n * @return {MessageBus} Message Bus component\n */\n ,\n get: function get() {\n return this._messagesBus;\n }\n\n /**\n * Set Runtime Factory component\n * @param {runtimeFactory} value Factory includes the specific implementations for each environment\n */\n\n }, {\n key: 'runtimeFactory',\n set: function set(value) {\n this._runtimeFactory = value;\n }\n\n /**\n * Get Runtime Factory component\n * @return {runtimeFactory} Runtime Factory component\n */\n ,\n get: function get() {\n return this._runtimeFactory;\n }\n }]);\n return Loader;\n}();\n\nexports.default = Loader;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL0xvYWRlci5qcz9jYzkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIExvZyBTeXN0ZW1cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignbG9hZGVyJyk7XG5cbmltcG9ydCB7ZGl2aWRlVVJMLCBlbXB0eU9iamVjdH0gZnJvbSAnLi4vdXRpbHMvdXRpbHMnO1xuaW1wb3J0IEFkZHJlc3NBbGxvY2F0aW9uIGZyb20gJy4uL2FsbG9jYXRpb24vQWRkcmVzc0FsbG9jYXRpb24nO1xuXG5jbGFzcyBMb2FkZXIge1xuXG4gIGNvbnN0cnVjdG9yKHJ1bnRpbWVVUkwsIHJ1bnRpbWVDb25maWd1cmF0aW9uLCBydW50aW1lRGVzY3JpcHRvcnNJbnN0YW5jZSkge1x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pbWUuTG9hZGVyLmxvYWRTdHViXSA3LiByZXR1cm4gdGhlIHJ1bnRpbWUgcHJvdG9zdHViIHVybDogJywgcnVudGltZVByb3RvU3R1Yik7XG5cbiAgICAgICAgICAgIF9ydW50aW1lUHJvdG9TdHViVVJMID0gcnVudGltZVByb3RvU3R1Yi51cmw7XG5cbiAgICAgICAgICAgIC8vIEV4dGVuZCBvcmlnaW5hbCBoeXBlcnR5IGNvbmZpZ3VyYXRpb247XG4gICAgICAgICAgICBsZXQgY29uZmlndXJhdGlvbiA9IHt9O1xuICAgICAgICAgICAgaWYgKCFlbXB0eU9iamVjdChfc3R1YkRlc2NyaXB0b3IuY29uZmlndXJhdGlvbikpIHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uID0gT2JqZWN0LmFzc2lnbih7fSwgSlNPTi5wYXJzZShfc3R1YkRlc2NyaXB0b3IuY29uZmlndXJhdGlvbikpO1xuICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiA9IF9zdHViRGVzY3JpcHRvci5jb25maWd1cmF0aW9uO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChwMnBDb25maWcpIHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uID0gT2JqZWN0LmFzc2lnbihjb25maWd1cmF0aW9uLCBKU09OLnBhcnNlKHAycENvbmZpZykpO1xuICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiA9IE9iamVjdC5hc3NpZ24oY29uZmlndXJhdGlvbiwgcDJwQ29uZmlnKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyByZXF1aXJlZCBmb3IgcHJvdG9zdHViIHNlc3Npb25cblxuICAgICA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gICAgIGlmIChoYXZlRXJyb3IpIHJldHVybiBmYWxzZTtcblxuICAgICAgICAgICAgLy8gdGhpcyB3aWxsIHJldHVybiB0aGUgc2FuZGJveCBvciBvbmUgcHJvbWlzZSB0byBnZXRTYW5kYm94O1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVnaXN0cnkuZ2V0U2FuZGJveChkb21haW4pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLnRoZW4oKHByb3h5U2FuZGJveCkgPT4ge1xuICAgICAgICAgICAgaWYgKGhhdmVFcnJvcikgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgbG9nLmluZm8oJ1tSdW50aW1lLkxvYWRlcl0gNC4gaWYgdGhlIHNhbmRib3ggaXMgcmVnaXN0ZXJlZCB0aGVuIHJldHVybiB0aGUgc2FuZGJveCcsIHByb3h5U2FuZGJveCk7XG5cbiAgICAgICAgICAgIF9wcm94eVNhbmRib3ggPSBwcm94eVNhbmRib3g7XG4gICAgICAgICAgICByZXR1cm4gcHJveHlTYW5kYm94O1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChyZWFzb24pID0+IHtcbiAgICAgICAgICAgIGlmIChoYXZlRXJyb3IpIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIGxvZy5pbmZvKCdbUnVudGltZS5Mb2FkZXJdIDUuIFNhbmRib3ggd2FzIG5vdCBmb3VuZCwgY3JlYXRpbmcgYSBuZXcgb25lJywgcmVhc29uKTtcblxuICAgICAgICAgICAgbGV0IHByb3h5Q2FwYWJpbGl0aWVzID0ge307XG4gICAgICAgICAgICBpZiAoX3Byb3h5RGVzY3JpcHRvciAmJiBfcHJveHlEZXNjcmlwdG9yLmhhc093blByb3BlcnR5KCdjYXBhYmlsaXRpZXMnKSkge1xuICAgICAgICAgICAgICBfcHJveHlEZXNjcmlwdG9yID0gX3Byb3h5RGVzY3JpcHRvci5zdHViQ2FwYWJpbGl0aWVzO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fcnVudGltZUZhY3RvcnkuY3JlYXRlU2FuZGJveChwcm94eUNhcGFiaWxpdGllcykudGhlbigoc2FuZGJveCkgPT4ge1xuXG4gICAgICAgICAgICAgIHNhbmRib3guYWRkTGlzdGVuZXIoJyonLCAobXNnKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5tZXNzYWdlQnVzLnBvc3RNZXNzYWdlKG1zZyk7XG4gICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgIHJldHVybiBzYW5kYm94O1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAudGhlbigoc2FuZGJveCkgPT4ge1xuICAgICAgICAgICAgaWYgKGhhdmVFcnJvcikgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgbG9nLmluZm8oJ1tSdW50aW1lLkxvYWRlcl0gNi4gcmV0dXJuIHRoZSBzYW5kYm94IGluc3RhbmNlIGFuZCByZWdpc3RlcicsIHNhbmRib3gsICd0byBkb21haW4gJywgZG9tYWluKTtcblxuICAgICAgICAgICAgX3Byb3h5U2FuZGJveCA9IHNhbmRib3g7XG5cbiAgICAgICAgICAgIC8vIHdlIG5lZWQgcmVnaXN0ZXIgc3R1YiBvbiByZWdpc3RyeSAtIHN0ZXAgeHh4IGh0dHBzOi8vZ2l0aHViLmNvbS9yZVRISU5LLXByb2plY3QvY29yZS1mcmFtZXdvcmsvYmxvYi9tYXN0ZXIvZG9jcy9zcGVjcy9ydW50aW1lL2R5bmFtaWMtdmlldy9iYXNpY3MvZGVwbG95LXByb3Rvc3R1Yi5tZFxuICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVnaXN0cnkucmVnaXN0ZXJJZHBQcm94eShzYW5kYm94LCBkb21haW4pO1xuICAgICAgICAgIH0sIGhhbmRsZUVycm9yKVxuICAgICAgICAgIC50aGVuKChydW50aW1lSWRwUHJveHlVUkwpID0+IHtcbiAgICAgICAgICAgIGlmIChoYXZ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FBQ0E7QUFFQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFodEJBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QUFDQTtBQUNBOzs7OztBQW9wQkE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///492\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nexports.storage = storage;\n\nvar _runtimeConfiguration = __webpack_require__(144);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar storages = {};\n\nfunction storage(runtimeFactory) {\n if (!runtimeFactory) throw new Error('The runtime factory is a needed parameter');\n\n (0, _keys2.default)(_runtimeConfiguration.runtimeConfiguration.storageSchemas).forEach(function (key) {\n\n if (!storages.hasOwnProperty(key)) {\n storages[key] = runtimeFactory.storageManager(key, _runtimeConfiguration.runtimeConfiguration.storageSchemas[key]);\n }\n });\n\n return storages;\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL1N0b3JhZ2UuanM/ZTk0NyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBydW50aW1lQ29uZmlndXJhdGlvbiB9IGZyb20gJy4vcnVudGltZUNvbmZpZ3VyYXRpb24nO1xuXG5sZXQgc3RvcmFnZXMgPSB7fTtcblxuZXhwb3J0IGZ1bmN0aW9uIHN0b3JhZ2UocnVudGltZUZhY3RvcnkpIHtcbiAgaWYgKCFydW50aW1lRmFjdG9yeSkgdGhyb3cgbmV3IEVycm9yKCdUaGUgcnVudGltZSBmYWN0b3J5IGlzIGEgbmVlZGVkIHBhcmFtZXRlcicpO1xuXG4gIE9iamVjdC5rZXlzKHJ1bnRpbWVDb25maWd1cmF0aW9uLnN0b3JhZ2VTY2hlbWFzKS5mb3JFYWNoKChrZXkpID0+IHtcblxuICAgIGlmICghc3RvcmFnZXMuaGFzT3duUHJvcGVydHkoa2V5KSkge1xuICAgICAgc3RvcmFnZXNba2V5XSA9IHJ1bnRpbWVGYWN0b3J5LnN0b3JhZ2VNYW5hZ2VyKGtleSwgcnVudGltZUNvbmZpZ3VyYXRpb24uc3RvcmFnZVNjaGVtYXNba2V5XSk7XG4gICAgfVxuXG4gIH0pO1xuXG4gIHJldHVybiBzdG9yYWdlcztcbn1cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvcnVudGltZS9TdG9yYWdlLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBSUE7QUFDQTtBQUxBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///493\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _utils = __webpack_require__(14);\n\nvar _runtimeUtils = __webpack_require__(140);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('Descriptors');\n\nvar Descriptors = function () {\n function Descriptors(runtimeURL, catalogue, runtimeConfiguration) {\n (0, _classCallCheck3.default)(this, Descriptors);\n\n if (!runtimeURL) throw Error('The descriptor need to know the runtime url to be used');\n if (!catalogue) throw Error('The descriptor needs the catalogue instance');\n if (!runtimeConfiguration) throw Error('The descriptor needs the runtime configuration');\n\n this.log = log;\n\n this.runtimeConfiguration = runtimeConfiguration;\n this.runtimeURL = runtimeURL;\n this.catalogue = catalogue;\n\n this.constraints = _runtimeUtils.runtimeUtils.runtimeCapabilities;\n }\n\n (0, _createClass3.default)(Descriptors, [{\n key: 'getHypertyDescriptor',\n value: function getHypertyDescriptor(hypertyURL) {\n return this.catalogue.getHypertyDescriptor(hypertyURL, true, this.constraints);\n }\n }, {\n key: 'getStubDescriptor',\n value: function getStubDescriptor(stubURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var domain = void 0;\n var protostub = void 0;\n var protoStubURL = void 0;\n\n var originDividedURL = (0, _utils.divideURL)(_this.runtimeURL);\n var originDomain = originDividedURL.domain;\n\n if (stubURL.includes('://')) {\n var dividedURL = (0, _utils.divideURL)(stubURL);\n domain = dividedURL.domain;\n var path = dividedURL.identity;\n\n if (path) {\n protostub = path.substring(path.lastIndexOf('/') + 1);\n } else {\n protostub = 'default';\n }\n } else {\n protostub = 'default';\n domain = stubURL;\n }\n\n protoStubURL = (0, _utils.buildURL)(_this.runtimeConfiguration, 'catalogueURLs', 'protocolstub', protostub);\n if (domain !== _this.runtimeConfiguration.domain) {\n if (!stubURL.indexOf('https') || !stubURL.indexOf('hyperty-catalogue')) {\n protoStubURL = stubURL;\n } else {\n\n // TODO: check how to load form different configuration domain\n var resource = (0, _utils.getConfigurationResources)(_this.runtimeConfiguration, 'catalogueURLs', 'protocolstub');\n protoStubURL = resource.prefix + domain + resource.suffix + protostub;\n }\n }\n\n log.log('Load ProtocolStub for domain, ' + domain + ' : ', protoStubURL);\n return _this.catalogue.getStubDescriptor(protoStubURL, true, _this.constraints).then(function (result) {\n\n resolve(result);\n }).catch(function (error) {\n\n // log.log('Error: ', error);\n\n protostub = domain;\n domain = originDomain;\n\n var resource = (0, _utils.getConfigurationResources)(_this.runtimeConfiguration, 'catalogueURLs', 'protocolstub');\n protoStubURL = resource.prefix + domain + resource.suffix + protostub;\n\n // log.log('Fallback -> Load Protocolstub for domain, ' + domain + ' : ', protostub);\n return _this.catalogue.getStubDescriptor(protoStubURL, true, _this.constraints);\n }).then(function (result) {\n resolve(result);\n }).catch(function (reason) {\n reject(reason);\n });\n });\n }\n }, {\n key: 'getIdpProxyDescriptor',\n value: function getIdpProxyDescriptor(idpProxyURL) {\n var _this2 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var domain = void 0;\n var idpproxy = void 0;\n\n var originDividedURL = (0, _utils.divideURL)(_this2.runtimeURL);\n var originDomain = originDividedURL.domain;\n var constraints = _this2.constraints;\n constraints.onlyAccessToken = true;\n constraints.onlyIdAssertionValidation = true;\n\n if (idpProxyURL.includes('://')) {\n var dividedURL = (0, _utils.divideURL)(idpProxyURL);\n domain = dividedURL.domain;\n var path = dividedURL.identity;\n if (path) {\n idpproxy = path.substring(path.lastIndexOf('/') + 1);\n } else {\n idpproxy = 'default';\n }\n } else {\n idpproxy = 'default';\n domain = idpProxyURL;\n }\n\n var resource = (0, _utils.getConfigurationResources)(_this2.runtimeConfiguration, 'catalogueURLs', 'idpProxy');\n\n idpProxyURL = resource.prefix + domain + resource.suffix + idpproxy;\n // log.log('Load Idp Proxy for domain, ' + domain + ' : ', idpProxyURL);\n return _this2.catalogue.getIdpProxyDescriptor(idpProxyURL, true, constraints).then(function (result) {\n\n resolve(result);\n }).catch(function () {\n\n idpproxy = domain;\n domain = originDomain;\n\n idpProxyURL = (0, _utils.buildURL)(_this2.runtimeConfiguration, 'catalogueURLs', 'idpProxy', idpproxy);\n\n // log.log('Load Idp Proxy for domain, ' + domain + ' : ', idpProxyURL);\n return _this2.catalogue.getIdpProxyDescriptor(idpProxyURL, true, constraints);\n }).then(function (result) {\n resolve(result);\n }).catch(function (reason) {\n reject(reason);\n });\n });\n }\n }]);\n return Descriptors;\n}();\n\nexports.default = Descriptors;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL0Rlc2NyaXB0b3JzLmpzP2ZjZDgiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtkaXZpZGVVUkwsIGdldENvbmZpZ3VyYXRpb25SZXNvdXJjZXMsIGJ1aWxkVVJMfSBmcm9tICcuLi91dGlscy91dGlscyc7XG5pbXBvcnQgeyBydW50aW1lVXRpbHMgfSBmcm9tICcuL3J1bnRpbWVVdGlscyc7XG5cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignRGVzY3JpcHRvcnMnKTtcblxuY2xhc3MgR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TtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7OztBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTs7Ozs7QUFHQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///494\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _logLevels = __webpack_require__(201);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Class where message bus handlers are built. To be used by the RuntimeUA to initialise the runtime UA.\n */\n\nvar log = logger.getLogger('RuntimeUA');\n\n// Log System\n\nvar MsgBusHandlers = function () {\n function MsgBusHandlers(pep, idm, crypto) {\n (0, _classCallCheck3.default)(this, MsgBusHandlers);\n\n if (!pep) throw Error('[MsgBusHandlers] pep input paramenter is mandatory');\n if (!idm) throw Error('[MsgBusHandlers] idm input paramente is mandatory');\n if (!crypto) throw Error('[MsgBusHandlers] crypto input paramente is mandatory');\n\n this.policyEngine = pep;\n this.identityManager = idm;\n this.cryptoManager = crypto;\n }\n\n // Policy based access control for incoming messages\n\n (0, _createClass3.default)(MsgBusHandlers, [{\n key: 'pepInHandler',\n get: function get() {\n var _this = this;\n\n return function (ctx) {\n _this.policyEngine.authorise(ctx.msg, true).then(function (changedMgs) {\n ctx.msg = changedMgs;\n ctx.next();\n }).catch(function (reason) {\n log.error(reason);\n ctx.fail(reason);\n });\n };\n }\n\n // Policy based access control for outgoing messages\n\n }, {\n key: 'pepOutHandler',\n get: function get() {\n var _this = this;\n return function (ctx) {\n _this.policyEngine.authorise(ctx.msg, false).then(function (changedMgs) {\n ctx.msg = changedMgs;\n ctx.next();\n }).catch(function (reason) {\n log.error(reason);\n ctx.fail(reason);\n });\n };\n }\n\n // Add Identity info to messages\n\n }, {\n key: 'idmHandler',\n get: function get() {\n var _this = this;\n return function (ctx) {\n _this.identityManager.processMessage(ctx.msg).then(function (changedMgs) {\n ctx.msg = changedMgs;\n ctx.next();\n }).catch(function (reason) {\n log.error(reason);\n ctx.fail(reason);\n });\n };\n }\n\n // encrypt messages\n\n }, {\n key: 'encryptHandler',\n get: function get() {\n var _this = this;\n return function (ctx) {\n _this.cryptoManager.encryptMessage(ctx.msg).then(function (changedMgs) {\n ctx.msg = changedMgs;\n ctx.next();\n }).catch(function (reason) {\n log.error(reason);\n ctx.fail(reason);\n });\n };\n }\n\n // decrypt messages\n\n }, {\n key: 'decryptHandler',\n get: function get() {\n var _this = this;\n return function (ctx) {\n _this.cryptoManager.decryptMessage(ctx.msg).then(function (changedMgs) {\n ctx.msg = changedMgs;\n ctx.next();\n }).catch(function (reason) {\n log.warn(reason);\n ctx.fail(reason);\n });\n };\n }\n }]);\n return MsgBusHandlers;\n}();\n\nexports.default = MsgBusHandlers;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL01zZ0J1c0hhbmRsZXJzLmpzPzZiYmEiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiAgQ2xhc3Mgd2hlcmUgbWVzc2FnZSBidXMgaGFuZGxlcnMgYXJlIGJ1aWx0LiBUbyBiZSB1c2VkIGJ5IHRoZSBSdW50aW1lVUEgdG8gaW5pdGlhbGlzZSB0aGUgcnVudGltZSBVQS5cbiAqL1xuXG5pbXBvcnQgeyBsb2cgYXMgbG9nTGV2ZWxzIH0gZnJvbSAnLi4vbG9nTGV2ZWxzJztcblxuLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ2VyIGZyb20gJ2xvZ2xldmVsJztcbmxldCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdSdW50aW1lVUEnKTtcblxuY2xhc3MgTXNnQnVzSGFuZGxlcnMge1xuXG4gIGNvbnN0cnVjdG9yKHBlcCwgaWRtLCBjcnlwdG8pIHtcbiAgICBpZiAoIXBlcCkgdGhyb3cgRXJyb3IoJ1tNc2dCdXNIYW5kbGVyc10gcGVwIGlucHV0IHBhcmFtZW50ZXIgaXMgbWFuZGF0b3J5Jyk7XG4gICAgaWYgKCFpZG0pIHRocm93IEVycm9yKCdbTXNnQnVzSGFuZGxlcnNdIGlkbSBpbnB1dCBwYXJhbWVudGUgaXMgbWFuZGF0b3J5Jyk7XG4gICAgaWYgKCFjcnlwdG8pIHRocm93IEVycm9yKCdbTXN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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///495\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _GraphConnectorLight = __webpack_require__(497);\n\nvar _GraphConnectorLight2 = _interopRequireDefault(_GraphConnectorLight);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _GraphConnectorLight2.default; // let GraphConnector;\n// if (process.env.MODE !== 'light') {\n// GraphConnector = require('./GraphConnectorBase');\n// if (GraphConnector && GraphConnector.hasOwnProperty('default')) GraphConnector = GraphConnector.default;\n// } else {\n// GraphConnector = require('./GraphConnectorLight');\n// if (GraphConnector && GraphConnector.hasOwnProperty('default')) GraphConnector = GraphConnector.default;\n// }\n\n/**\n * The GraphConnectorBase have some problems with the size;\n * @deprecated Due to some problems increase a lot the file size\n */\n// import GraphConnector from './GraphConnectorBase';\n\n/**\n *\n * @experimental used instead of GraphConnectorBase;\n */\n\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ncmFwaGNvbm5lY3Rvci9HcmFwaENvbm5lY3Rvci5qcz84MGM4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGxldCBHcmFwaENvbm5lY3Rvcjtcbi8vIGlmIChwcm9jZXNzLmVudi5NT0RFICE9PSAnbGlnaHQnKSB7XG4vLyAgIEdyYXBoQ29ubmVjdG9yID0gcm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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7O0FBSUE7QUFDQTtBQUNBOzs7OztBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///496\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n/**\n * The Graph Connector contains the contact list/address book.\n * @abstract\n * @experimental\n * @author beierle@tu-berlin.de\n *\n *\n */\nvar GraphConnector = function GraphConnector(hypertyRuntimeURL, messageBus, storageManager) {\n (0, _classCallCheck3.default)(this, GraphConnector);\n};\n\nexports.default = GraphConnector;\nmodule.exports = exports["default"];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ncmFwaGNv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UlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC5cbiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmRcbiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLlxuICoqL1xuXG4vKipcbiAqIFRoZSBHcmFwaCBDb25uZWN0b3IgY29udGFpbnMgdGhlIGNvbnRhY3QgbGlzdC9hZGRyZXNzIGJvb2suXG4gKiBAYWJzdHJhY3RcbiAqIEBleHBlcmltZW50YWxcbiAqIEBhdXRob3IgYmVpZXJsZUB0dS1iZXJsaW4uZGVcbiAqXG4gKlxuICovXG5jbGFzcyBHcmFwaENvbm5lY3RvciB7XG5cbiAgY29uc3RydWN0b3IoaHlwZXJ0eVJ1bnRpbWVVUkwsIG1lc3NhZ2VCdXMsIHN0b3JhZ2VNYW5hZ2VyKSB7XG5cbiAgfVxuXG59XG5cbmV4cG9ydCBkZWZhdWx0IEdyYXBoQ29ubmVjdG9yO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9ncmFwaGNvbm5lY3Rvci9HcmFwaENvbm5lY3RvckxpZ2h0LmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUF1QkE7Ozs7Ozs7O0FBUUE7QUFFQTtBQUVBO0FBQ0E7QUFHQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///497\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('CoreDiscovery'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log System\n\n/**\n* Core Discovery interface\n* Class to allow applications to search for hyperties and DataObjects using the message bus\n*/\nvar CoreDiscovery = function () {\n\n /**\n * To initialise the Discovery, which will provide the support for hyperties to\n * query users registered in outside the internal core.\n * @param {MessageBus} msgbus msgbus\n * @param {RuntimeURL} runtimeURL runtimeURL\n * @param {graphConnector} graphConnector\n */\n function CoreDiscovery(runtimeURL, msgBus, graphConnector, runtimeFactory, registry) {\n (0, _classCallCheck3.default)(this, CoreDiscovery);\n\n if (!runtimeFactory) throw Error('The catalogue needs the runtimeFactory');\n\n var _this = this;\n this._messageBus = msgBus;\n _this.graphConnector = graphConnector;\n _this.httpRequest = runtimeFactory.createHttpRequest();\n _this.domain = (0, _utils.divideURL)(runtimeURL).domain;\n _this.discoveryURL = runtimeURL + '/discovery/';\n _this.registry = registry;\n\n _this.messageBus.addListener(_this.discoveryURL, function (msg) {\n\n _this.discoveryManager(msg).then(function (result) {\n\n //FLOW-OUT: message response\n _this.messageBus.postMessage({\n id: msg.id,\n type: 'response',\n from: msg.to,\n to: msg.from,\n body: {\n code: 200,\n value: result\n }\n });\n }).catch(function (err) {\n var description = void 0;\n var code = void 0;\n\n if (err === 'GraphConnector') {\n description = 'This search is not available at the moment. Try later.';\n code = 500;\n } else {\n description = 'Not Found';\n code = 404;\n }\n\n //FLOW-OUT: error message response\n _this.messageBus.postMessage({\n id: msg.id,\n type: 'response',\n from: msg.to,\n to: msg.from,\n body: {\n code: code,\n description: description\n }\n });\n });\n });\n }\n\n /**\n * Returns the MessageBus.\n */\n\n\n (0, _createClass3.default)(CoreDiscovery, [{\n key: 'discoveryManager',\n\n\n /* function to decide what discovery method to call and later return the response msg */\n value: function discoveryManager(msg) {\n var _this = this;\n var domain = (0, _utils.divideURL)(msg.from).domain;\n var atributes = msg.body.resource.split('/').filter(Boolean);\n var resources = [];\n var dataSchemes = [];\n\n log.log('[CoreDiscovery.discoveryManager] received: ', msg);\n\n if (msg.body.criteria) {\n if (msg.body.criteria.resources) {\n resources = msg.body.criteria.resources;\n }\n if (msg.body.criteria.dataSchemes) {\n dataSchemes = msg.body.criteria.dataSchemes;\n }\n }\n\n switch (atributes[1]) {\n case 'user':\n if (atributes[0] == 'hyperty') {\n return _this.discoverHyperties(msg.body.resource.split('user/')[1], dataSchemes, resources, msg.body.criteria.domain);\n } else {\n return _this.discoverDataObjects(msg.body.resource.split('user/')[1], dataSchemes, resources, msg.body.criteria.domain);\n }\n break;\n\n case 'url':\n if (atributes[0] == 'hyperty') {\n return _this.discoverHypertyPerURL(msg.body.resource.split('url/')[1], msg.body.criteria.domain);\n } else {\n return _this.discoverDataObjectPerURL(msg.body.resource.split('url/')[1], msg.body.criteria.domain);\n }\n break;\n case 'name':\n return _this.discoverDataObjectsPerName(msg.body.resource.split('name/')[1], dataSchemes, resources, msg.body.criteria.domain);\n break;\n case 'reporter':\n return _this.discoverDataObjectsPerReporter(msg.body.resource.split('reporter/')[1], dataSchemes, resources, msg.body.criteria.domain);\n break;\n case 'guid':\n if (typeof _this.graphConnector !== 'undefined' && _this.graphConnector !== null) {\n if (atributes[0] == 'hyperty') {\n return _this.discoverHypertiesPerGUID(msg.body.resource.split('user-guid://')[1], dataSchemes, resources);\n } else {\n return _this.discoverDataObjectsPerGUID(msg.body.resource.split('user-guid://')[1], dataSchemes, resources);\n }\n break;\n } else {\n return _promise2.default.reject('GraphConnector');\n break;\n }\n case 'userprofile':\n if (typeof _this.graphConnector !== 'undefined' && _this.graphConnector !== null) {\n if (atributes[0] == 'hyperty') {\n return _this.discoverHypertiesPerUserProfileData(msg.body.resource.split('userprofile/')[1], dataSchemes, resources);\n } else {\n return _this.discoverDataObjectsPerUserProfileData(msg.body.resource.split('userprofile/')[1], dataSchemes, resources);\n }\n break;\n } else {\n return _promise2.default.reject('GraphConnector');\n break;\n }\n }\n }\n\n /**\n * Advanced Search for Hyperties registered in domain registry associated with some user identifier (eg email, name ...)\n * @param {String} userIdentifier\n * @param {Array} dataSchemes (Optional) types of hyperties schemas\n * @param {Array} resources (Optional) types of hyperties resources\n */\n\n }, {\n key: 'discoverHypertiesPerUserProfileData',\n value: function discoverHypertiesPerUserProfileData(userIdentifier, dataSchemes, resources) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //translate user identifier (e.g. email, name...) into the associated GUIDs\n _this.discoverGUIDPerUserIdentifier(userIdentifier).then(function (guids) {\n\n var hypertiesPromises = guids.map(function (guid) {\n\n return new _promise2.default(function (resolve, reject) {\n _this.discoverHypertiesPerGUID(guid, dataSchemes, resources).then(function (hyperties) {\n resolve(hyperties);\n }).catch(function (err) {\n resolve([]);\n });\n });\n });\n\n _promise2.default.all(hypertiesPromises).then(function (hypertiesResult) {\n\n var hyperties = [].concat.apply([], hypertiesResult);\n\n if (hyperties.length === 0) {\n return reject('No hyperties were found');\n }\n\n resolve(hyperties);\n });\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /**\n * Advanced Search for DataObjects registered in domain registry associated with some user identifier (eg email, name ...)\n * @param {String} userIdentifier\n * @param {Array} dataSchemes (Optional) types of hyperties schemas\n * @param {Array} resources (Optional) types of hyperties resources\n */\n\n }, {\n key: 'discoverDataObjectsPerUserProfileData',\n value: function discoverDataObjectsPerUserProfileData(userIdentifier, dataSchemes, resources) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //translate user identifier (e.g. email, name...) into the associated GUIDs\n _this.discoverGUIDPerUserIdentifier(userIdentifier).then(function (guids) {\n\n var dataObjectsPromises = guids.map(function (guid) {\n\n return new _promise2.default(function (resolve, reject) {\n _this.discoverDataObjectsPerGUID(guid, dataSchemes, resources).then(function (dataObjects) {\n resolve(dataObjects);\n }).catch(function (err) {\n resolve([]);\n });\n });\n });\n\n _promise2.default.all(dataObjectsPromises).then(function (dataObjectsResult) {\n\n var dataObjects = [].concat.apply([], dataObjectsResult);\n\n if (dataObjects.length === 0) {\n return reject('No dataObjects were found');\n }\n\n resolve(dataObjects);\n });\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /**\n * Advanced Search for Hyperties registered in domain registry associated with some GUID\n * @param {String} guid\n * @param {Array} dataSchemes (Optional) types of hyperties schemas\n * @param {Array} resources (Optional) types of hyperties resources\n */\n\n }, {\n key: 'discoverHypertiesPerGUID',\n value: function discoverHypertiesPerGUID(guid, dataSchemes, resources) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //translate GUID into the user IDs to query the domain registry\n _this.discoverUserIdsPerGUID(guid).then(function (uids) {\n\n //translate user IDs into the associated hyperties registered in some domain\n var hypertiesPromises = uids.map(function (uid) {\n return new _promise2.default(function (resolve, reject) {\n _this.discoverHyperties(uid.uID, dataSchemes, resources, uid.domain).then(function (hyperties) {\n resolve(hyperties);\n }).catch(function (err) {\n resolve([]);\n });\n });\n });\n\n _promise2.default.all(hypertiesPromises).then(function (hypertiesResult) {\n\n var hyperties = [].concat.apply([], hypertiesResult);\n\n if (hyperties.length === 0) {\n return reject('No hyperties were found');\n }\n\n // log.log('Hyperties : ', hyperties);\n resolve(hyperties);\n });\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /**\n * Advanced Search for DataObjects registered in domain registry associated with some GUID\n * @param {String} guid\n * @param {Array} dataSchemes (Optional) types of hyperties schemas\n * @param {Array} resources (Optional) types of hyperties resources\n */\n\n }, {\n key: 'discoverDataObjectsPerGUID',\n value: function discoverDataObjectsPerGUID(guid, dataSchemes, resources) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //translate GUID into the user IDs to query the domain registry\n _this.discoverUserIdsPerGUID(guid).then(function (uids) {\n\n //translate user IDs into the associated dataObjects registered in some domain\n var dataObjectPromises = uids.map(function (uid) {\n return new _promise2.default(function (resolve, reject) {\n _this.discoverDataObjects(uid.uID, dataSchemes, resources, uid.domain).then(function (dataObjects) {\n resolve(dataObjects);\n }).catch(function (err) {\n resolve([]);\n });\n });\n });\n\n _promise2.default.all(dataObjectPromises).then(function (dataObjectsResult) {\n\n var dataObjects = [].concat.apply([], dataObjectsResult);\n\n if (dataObjects.length === 0) {\n return reject('No dataObjects were found');\n }\n\n // log.log('DataObjects : ', dataObjects);\n resolve(dataObjects);\n });\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /** Advanced Search for Hyperties registered in domain registry and associated with some user ID\n * @param {String} user user identifier, either in url or email format\n * @param {Array} dataSchemes (Optional) types of hyperties schemas\n * @param {Array} resources (Optional) types of hyperties resources\n * @param {String} domain (Optional) domain of the registry to search\n */\n\n }, {\n key: 'discoverHyperties',\n value: function discoverHyperties(user, dataSchemes, resources, domain) {\n var _this = this;\n var activeDomain = void 0;\n\n activeDomain = !domain ? _this.domain : domain;\n\n var msg = {\n type: 'read',\n from: _this.discoveryURL,\n to: 'domain://registry.' + activeDomain,\n body: {}\n };\n\n if (user.indexOf('user://') > -1) {\n msg.body.resource = user;\n } else {\n msg.body.resource = '/hyperty/idp-identifier/' + user;\n }\n\n if (dataSchemes.length > 0) {\n if (!msg.body.criteria) {\n msg.body.criteria = {};\n }\n msg.body.criteria.dataSchemes = dataSchemes;\n }\n\n if (resources.length > 0) {\n if (!msg.body.criteria) {\n msg.body.criteria = {};\n }\n msg.body.criteria.resources = resources;\n }\n\n return new _promise2.default(function (resolve, reject) {\n // log.log(\"[CoreDiscovery.discoverHyperties] sending msg \", msg);\n\n _this.messageBus.postMessage(msg, function (reply) {\n\n // log.log(\"[CoreDiscovery.discoverHyperties] rcved reply \", reply);\n\n if (reply.body.code === 200 || reply.body.code === 500) {\n var hyperties = reply.body.value;\n\n var finalHyperties = [];\n for (var key in hyperties) {\n finalHyperties.push(hyperties[key]);\n }if (finalHyperties.length > 0) {\n // log.log(\"[CoreDiscovery.discoverHyperties] Hyperties Found: \", finalHyperties);\n resolve(finalHyperties);\n } else {\n return reject('No Hyperty was found');\n }\n } else {\n return reject('No Hyperty was found');\n }\n\n /*_this.registry.isLegacy(user).then((legacy) => {\n if (legacy) resolve([{hypertyID: user }])\n else return reject('No Hyperty was found');\n });*/\n });\n });\n }\n\n /** Advanced Search for DataObjects registered in domain registry and associated with some user ID\n * @param {String} user user identifier, either in url or email format\n * @param {Array} dataSchemes (Optional) types of dataObjects schemas\n * @param {Array} resources (Optional) types of dataObjects resources\n * @param {String} domain (Optional) domain of the registry to search\n */\n\n }, {\n key: 'discoverDataObjects',\n value: function discoverDataObjects(user, dataSchemes, resources, domain) {\n var _this = this;\n var activeDomain = void 0;\n var dataObjectsArray = [];\n\n activeDomain = !domain ? _this.domain : domain;\n\n return new _promise2.default(function (resolve, reject) {\n\n //translate user identifier (e.g. email, name...) into the associated hyperties\n _this.discoverHyperties(user, [], [], activeDomain).then(function (hyperties) {\n\n var finalHyperties = [];\n for (var key in hyperties) {\n finalHyperties.push(hyperties[key]);\n } //translate hyperties URLs into the associated dataObjects registered in some domain\n var dataObjectsPromises = finalHyperties.map(function (hyperty) {\n return new _promise2.default(function (resolve, reject) {\n _this.discoverDataObjectsPerReporter(hyperty.hypertyID, dataSchemes, resources, activeDomain).then(function (dataObject) {\n resolve(dataObject);\n }).catch(function (err) {\n resolve([]);\n });\n });\n });\n\n _promise2.default.all(dataObjectsPromises).then(function (dataObjectsResult) {\n\n var dataObjects = [].concat.apply([], dataObjectsResult);\n\n dataObjects.forEach(function (dataObject) {\n dataObjectsArray.push(dataObject);\n });\n\n var finalDataObjects = [];\n for (var key in dataObjectsArray) {\n finalDataObjects.push(dataObjectsArray[key]);\n }if (finalDataObjects.length === 0) {\n return reject('No dataObjects were found');\n }\n\n // log.log('DataObjects Found: ', finalDataObjects);\n resolve(finalDataObjects);\n });\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /**\n * function to request about hyperties registered in domain registry, and\n * return the hyperty information, if found.\n * @param {String} url dataObject URL\n * @param {String} domain (Optional)\n * @return {Promise} Promise\n */\n\n }, {\n key: 'discoverHypertyPerURL',\n value: function discoverHypertyPerURL(url, domain) {\n var _this = this;\n var activeDomain = void 0;\n\n activeDomain = !domain ? _this.domain : domain;\n\n var msg = {\n type: 'read',\n from: _this.discoveryURL,\n to: 'domain://registry.' + activeDomain,\n body: {\n resource: url\n }\n };\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.messageBus.postMessage(msg, function (reply) {\n\n if (reply.body.code !== 200 && reply.body.code !== 500) {\n return reject('No Hyperty was found');\n }\n\n var hyperty = reply.body.value;\n\n if (hyperty) {\n // log.log('Hyperty found: ', hyperty);\n resolve(hyperty);\n } else {\n return reject('No Hyperty was found');\n }\n });\n });\n }\n\n /**\n * function to request about dataObject registered in domain registry, and\n * return the dataObject information, if found.\n * @param {String} url dataObject URL\n * @param {String} domain (Optional)\n * @return {Promise} Promise\n */\n\n }, {\n key: 'discoverDataObjectPerURL',\n value: function discoverDataObjectPerURL(url, domain) {\n var _this = this;\n var activeDomain = void 0;\n\n activeDomain = !domain ? _this.domain : domain;\n\n var msg = {\n type: 'read',\n from: _this.discoveryURL,\n to: 'domain://registry.' + activeDomain,\n body: {\n resource: url\n }\n };\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.messageBus.postMessage(msg, function (reply) {\n\n var dataObject = reply.body.value;\n\n if (dataObject) {\n // log.log('DataObject found: ', dataObject);\n resolve(dataObject);\n } else {\n return reject('DataObject not found');\n }\n });\n });\n }\n\n /** Advanced Search for dataObjects registered in domain registry\n * @param {String} name name of the dataObject\n * @param {Array} dataSchemes (Optional) types of dataObject schemas\n * @param {Array} resources (Optional) types of dataObject resources\n * @param {String} domain (Optional) domain of the registry to search\n */\n\n }, {\n key: 'discoverDataObjectsPerName',\n value: function discoverDataObjectsPerName(name, dataSchemes, resources, domain) {\n var _this = this;\n var activeDomain = void 0;\n\n activeDomain = !domain ? _this.domain : domain;\n\n var msg = {\n type: 'read',\n from: _this.discoveryURL,\n to: 'domain://registry.' + activeDomain,\n body: {\n resource: name\n }\n };\n\n if (dataSchemes.length > 0) {\n if (!msg.body.criteria) {\n msg.body.criteria = {};\n }\n msg.body.criteria.dataSchemes = dataSchemes;\n }\n\n if (resources.length > 0) {\n if (!msg.body.criteria) {\n msg.body.criteria = {};\n }\n msg.body.criteria.resources = resources;\n }\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.messageBus.postMessage(msg, function (reply) {\n\n var dataObjects = reply.body.value;\n\n var finalDataObjects = [];\n for (var key in dataObjects) {\n finalDataObjects.push(dataObjects[key]);\n }if (finalDataObjects.length > 0) {\n // log.log(\"DataObjects Found: \", finalDataObjects);\n resolve(finalDataObjects);\n } else {\n return reject('No DataObject was found');\n }\n });\n });\n }\n\n /**\n * function to request about specific reporter dataObject registered in domain registry, and\n * return the dataObjects from that reporter.\n * @param {String} reporter dataObject reporter\n * @param {Array} scdataSchemeshema (Optional) types of dataObjects schemas\n * @param {Array} resources (Optional) types of dataObjects resources\n * @param {String} domain (Optional)\n */\n\n }, {\n key: 'discoverDataObjectsPerReporter',\n value: function discoverDataObjectsPerReporter(reporter, dataSchemes, resources, domain) {\n var _this = this;\n var activeDomain = void 0;\n\n activeDomain = !domain ? _this.domain : domain;\n\n var msg = {\n type: 'read',\n from: _this.discoveryURL,\n to: 'domain://registry.' + activeDomain,\n body: {\n resource: '/comm',\n criteria: {\n reporter: reporter\n }\n }\n };\n\n if (dataSchemes.length > 0) {\n msg.body.criteria.dataSchemes = dataSchemes;\n }\n\n if (resources.length > 0) {\n msg.body.criteria.resources = resources;\n }\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.messageBus.postMessage(msg, function (reply) {\n\n var dataObjects = reply.body.value;\n\n var finalDataObjects = [];\n for (var key in dataObjects) {\n finalDataObjects.push(dataObjects[key]);\n }if (finalDataObjects.length > 0) {\n // log.log(\"DataObjects Found: \", finalDataObjects);\n resolve(finalDataObjects);\n } else {\n return reject('No DataObject was found');\n }\n });\n });\n }\n\n /**\n * function to request global registry about the user IDs associated with some GUID\n * @param {String} guid\n * @return {Promise} Promise\n */\n\n }, {\n key: 'discoverUserIdsPerGUID',\n value: function discoverUserIdsPerGUID(guid) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n // log.log(\"GO graphConnector:\", guid);\n\n _this.graphConnector.queryGlobalRegistry(guid).then(function (graphConnectorContactData) {\n\n // log.log('Information returned from Global Registry: ', graphConnectorContactData);\n\n if (typeof graphConnectorContactData === 'string' || !graphConnectorContactData) {\n return reject('Unsuccessful discover userIDs by GUID');\n } else {\n\n var userids = graphConnectorContactData.userIDs;\n\n if (userids.length === 0) {\n return reject('UserIDs not available');\n }\n\n resolve(userids);\n }\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /**\n * function to request discovery service about the GUID associated with some user identifier (eg email, name ...)\n * @param {String} userIdentifier\n * @return {Promise} Promise\n */\n\n }, {\n key: 'discoverGUIDPerUserIdentifier',\n value: function discoverGUIDPerUserIdentifier(userIdentifier) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var lookupURLDiscoveryService = 'https://rethink.tlabscloud.com/discovery/rest/discover/lookup?searchquery=';\n _this.httpRequest.get(lookupURLDiscoveryService + userIdentifier).then(function (json) {\n // log.log('discover GUID by user identifier', json);\n\n var response = JSON.parse(json);\n var filteredGuid = response.results.filter(function (x) {\n return x.rethinkID != undefined;\n });\n\n if (filteredGuid.length === 0) {\n return reject('Unsuccessful discover GUID by user identifier');\n }\n\n var guids = filteredGuid.map(function (x) {\n return x.rethinkID;\n });\n\n return resolve(guids);\n }).catch(function (err) {\n // log.log(\"HTTP Request error: \", err);\n return reject(err);\n });\n });\n }\n }, {\n key: 'messageBus',\n get: function get() {\n return this._messageBus;\n }\n\n /**\n * Sets the MessageBus.\n * @param {MessageBus} messageBus The Message Bus.\n */\n ,\n set: function set(messageBus) {\n this._messageBus = messageBus;\n }\n }]);\n return CoreDiscovery;\n}();\n\nexports.default = CoreDiscovery;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9kaXNjb3ZlcnkvQ29yZURpc2NvdmVyeS5qcz8yMzdkIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0N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AgIGxldCBoeXBlcnRpZXNQcm9taXNlcyA9IGd1aWRzLm1hcChmdW5jdGlvbihndWlkKSB7XG5cbiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbihyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgICAgICAgX3RoaXMuZGlzY292ZXJIeXBlcnRpZXNQZXJHVUlEKGd1aWQsIGRhdGFTY2hlbWVzLCByZXNvdXJjZXMpXG4gICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oaHlwZXJ0aWVzKSB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKGh5cGVydGllcyk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKFtdKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgUHJvbWlzZS5hbGwoaHlwZXJ0aWVzUHJvbWlzZXMpXG4gICAgICAgICAgICAudGhlbihmdW5jdGlvbihoeXBlcnRpZXNSZXN1bHQpIHtcblxuICAgICAgICAgICAgICBsZXQgaHlwZXJ0aWVzID0gW10uY29uY2F0LmFwcGx5KFtdLCBoeXBlcnRpZXNSZXN1bHQpO1xuXG4gICAgICAgICAgICAgIGlmIChoeXBlcnRpZXMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdCgnTm8gaHlwZXJ0aWVzIHdlcmUgZm91bmQnKTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHJlc29sdmUoaHlwZXJ0aWVzKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHJlamVjdChlcnIpO1xuICAgICAgICB9KTtcbiAgICB9KTt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ZWN0KSB7XG4gICAgICAgICAgICAgIF90aGlzLmRpc2NvdmVyRGF0YU9iamVjdHNQZXJHVUlEKGd1aWQsIGRhdGFTY2hlbWVzLCByZXNvdXJjZXMpXG4gICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oZGF0YU9iamVjdHMpIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmUoZGF0YU9iamVjdHMpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmNhdGNoKGZ1bmN0aW9uKGVycikge1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZShbXSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIFByb21pc2UuYWxsKGRhdGFPYmplY3RzUHJvbWlzZXMpXG4gICAgICAgICAgICAudGhlbihmdW5jdGlvbihkYXRhT2JqZWN0c1Jlc3VsdCkge1xuXG4gICAgICAgICAgICAgIGxldCBkYXRhT2JqZWN0cyA9IFtdLmNvbmNhdC5hcHBseShbXSwgZGF0YU9iamVjdHNSZXN1bHQpO1xuXG4gICAgICAgICAgICAgIGlmIChkYXRhT2JqZWN0cy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVqZWN0KCdObyBkYXRhT2JqZWN0cyB3ZXJlIGZvdW5kJyk7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICByZXNvbHZlKGRhdGFPYmplY3RzKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHJlamVjdChlcnIpO1xuICAgICAgICB9KTtcbiAgICB9KTtcbiAgfVxuXG4gIC8qKlxuICAqIEFkdmFuY2VkIFNlYXJjaCBmb3IgSHlwZXJ0aWVzIHJlZ2lzdGVyZWQgaW4gZG9tYWluIHJlZ2lzdHJ5IGFzc29jaWF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RoZW4oZnVuY3Rpb24oaHlwZXJ0aWVzKSB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKGh5cGVydGllcyk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKFtdKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgUHJvbWlzZS5hbGwoaHlwZXJ0aWVzUHJvbWlzZXMpXG4gICAgICAgICAgICAudGhlbihmdW5jdGlvbihoeXBlcnRpZXNSZXN1bHQpIHtcblxuICAgICAgICAgICAgICBsZXQgaHlwZXJ0aWVzID0gW10uY29uY2F0LmFwcGx5KFtdLCBoeXBlcnRpZXNSZXN1bHQpO1xuXG4gICAgICAgICAgICAgIGlmIChoeXBlcnRpZXMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdCgnTm8gaHlwZXJ0aWVzIHdlcmUgZm91bmQnKTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIC8vIGxvZy5sb2coJ0h5cGVydGllcyA6ICcsIGh5cGVydGllcyk7XG4gICAgICAgICAgICAgIHJlc29sdmUoaHlwZXJ0aWVzKTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaChmdW5jdGlvbihlcnIpIHtcbiAgICAgICAgICByZXR1cm4gcmVqZWN0KGVycik7XG4gICAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgLyoqXG4gICogQWR2YW5jZWQgU2VhcmNoIGZvciBEYXRhT2JqZWN0cyByZWdpc3RlcmVkIGluIGRvbWFpbiByZWdpc3RyeSBhc3NvY2lhdGVkIHdpdGggc29tZSBHVUlEXG4gICogQHBhcmFtICB7U3RyaW5nfSAgICAgICAgICAgICBndWlkXG4gICogQHBhc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qZWN0cyk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKFtdKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgUHJvbWlzZS5hbGwoZGF0YU9iamVjdFByb21pc2VzKVxuICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oZGF0YU9iamVjdHNSZXN1bHQpIHtcblxuICAgICAgICAgICAgICBsZXQgZGF0YU9iamVjdHMgPSBbXS5jb25jYXQuYXBwbHkoW10sIGRhdGFPYmplY3RzUmVzdWx0KTtcblxuICAgICAgICAgICAgICBpZiAoZGF0YU9iamVjdHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdCgnTm8gZGF0YU9iamVjdHMgd2VyZSBmb3VuZCcpO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgLy8gbG9nLmxvZygnRGF0YU9iamVjdHMgOiAnLCBkYXRhT2JqZWN0cyk7XG4gICAgICAgICAgICAgIHJlc29sdmUoZGF0YU9iamVjdHMpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGZ1bmN0aW9uKGVycikge1xuICAgICAgICAgIHJldHVybiByZWplY3QoZXJyKTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICAvKiogQWR2YW5jZWQgU2VhcmNoIGZvciBIeXBlcnRpZXMgcmVnaXN0ZXJlZCBpbiBkb21haW4gcmVnaXN0cnkgYW5kIGFzc29jaWF0ZWQgd2l0aCBzb21lIHVzZXIgSURcbiAgKiBAcGFyYW0gIHtTdHJpbmd9ICAgICAgICAgICB1c2VyICAgICAgICAgICAgICAgICAgdXNlciBpZGVudGlmaWVyLCBlaXRoZXIgaW4gdXJsIG9yIGV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ICAgICAgX3RoaXMuZGlzY292ZXJEYXRhT2JqZWN0c1BlclJlcG9ydGVyKGh5cGVydHkuaHlwZXJ0eUlELCBkYXRhU2NoZW1lcywgcmVzb3VyY2VzLCBhY3RpdmVEb21haW4pXG4gICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oZGF0YU9iamVjdCkge1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZShkYXRhT2JqZWN0KTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5jYXRjaChmdW5jdGlvbihlcnIpIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmUoW10pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgICBQcm9taXNlLmFsbChkYXRhT2JqZWN0c1Byb21pc2VzKVxuICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oZGF0YU9iamVjdHNSZXN1bHQpIHtcblxuICAgICAgICAgICAgICBsZXQgZGF0YU9iamVjdHMgPSBbXS5jb25jYXQuYXBwbHkoW10sIGRhdGFPYmplY3RzUmVzdWx0KTtcblxuICAgICAgICAgICAgICBkYXRhT2JqZWN0cy5mb3JFYWNoKGZ1bmN0aW9uKGRhdGFPYmplY3QpIHtcbiAgICAgICAgICAgICAgICBkYXRhT2JqZWN0c0FycmF5LnB1c2goZGF0YU9iamVjdCk7XG4gICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgIGxldCBmaW5hbERhdGFPYmplY3RzID0gW107XG4gICAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBkYXRhT2JqZWN0c0FycmF5KSBmaW5hbERhdGFPYmplY3RzLnB1c2goZGF0YU9iamVjdHNBcnJheVtrZXldKTtcblxuICAgICAgICAgICAgICBpZiAoZmluYWxEYXRhT2JqZWN0cy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVqZWN0KCdObyBkYXRhT2Jq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0E7Ozs7O0FBSUE7QUFDQTtBQUNBOzs7OztBQWdtQkE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///498\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _from = __webpack_require__(209);\n\nvar _from2 = _interopRequireDefault(_from);\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _typeof2 = __webpack_require__(98);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nvar _assign = __webpack_require__(96);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('DataObjectsStorage'); // Log System\n\nvar DataObjectsStorage = function () {\n function DataObjectsStorage(storageManager, storedDataObjects) {\n (0, _classCallCheck3.default)(this, DataObjectsStorage);\n\n if (!storageManager) throw new Error('[Store Data Objects] - Needs the storageManager component');\n\n this._storageManager = storageManager;\n this._storeDataObject = storedDataObjects;\n\n this._cache = {};\n }\n\n /**\n * @description should set the initial state of the dataObjectURL to be resumed if necessary;\n *\n * @param {DataObjectURL} url - dataObjectURL to be saved;\n * @param {Boolean} isReporter - the object to be saved is a reporter\n * @param {SchemaURL} schema - the schema url\n * @param {String} status - the status of current dataObject\n * @param {HypertyURL} reporter - the Reporter hypertyURL\n * @param {Array} subscription - list of subscriptions\n * @param {Array} children - list of childs of dataObjectURL\n * @param {Array} childrens - list of childrens, like, 'chatmessage';\n * @param {Array object with the dataObject information;\n */\n\n }, {\n key: 'getDataObject',\n value: function getDataObject(resource) {\n var _this2 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this2._storageManager.get('syncherManager:ObjectURLs').then(function (storedDataObject) {\n\n var observers = storedDataObject.hasOwnProperty('observers') ? storedDataObject.observers : {};\n var reporters = storedDataObject.hasOwnProperty('reporters') ? storedDataObject.reporters : {};\n\n var currentReporter = (0, _keys2.default)(reporters).find(function (value) {\n return value === resource;\n });\n var currentObserver = (0, _keys2.default)(observers).find(function (value) {\n return value === resource;\n });\n var dataObject = void 0;\n\n if (currentObserver) {\n dataObject = storedDataObject.observers[currentObserver];\n }\n if (currentReporter) {\n dataObject = storedDataObject.reporters[currentReporter];\n }\n\n log.info('[StoreDataObjects - getDataObject] - for observer: ', currentObserver);\n log.info('[StoreDataObjects - getDataObject] - for reporters: ', currentReporter);\n\n log.info('[StoreDataObjects - getDataObject] - resolve: ', dataObject);\n return dataObject ? resolve(dataObject) : reject('No dataObject was found');\n });\n });\n }\n\n /**\n * @description should get the dataObject information by the message\n *\n * @param {Object} msg - message would be analised to get the current dataObject information\n * @param {Boolean} isReporter - the object to be saved is a reporter\n *\n * @returns Promise should retun an object with the dataObject or null\n */\n\n }, {\n key: 'getResourcesByCriteria',\n value: function getResourcesByCriteria(msg, isReporter) {\n var _this3 = this;\n\n return new _promise2.default(function (resolve) {\n\n var type = _this3._getTypeOfObject(isReporter);\n\n _this3.getAll().then(function (storedDataObjects) {\n\n if (!storedDataObjects) {\n log.log('[DataObjectsStorage.getResourcesByCriteria] don\\'t have stored data objects');\n return resolve(null);\n }\n\n if (msg.body && msg.body.hasOwnProperty('resume') && !msg.body.resume) {\n return resolve(null);\n }\n\n // check if the message have other criteria\n // if not search for on the 'from' of the message.\n var result = [];\n var hasSubscription = _this3._hasSubscription(storedDataObjects[type], msg.from);\n var isOwner = _this3._searchOwner(storedDataObjects[type], msg.from);\n\n log.log('[StoredDataObjects - getResourcesByCriteria]:', storedDataObjects, msg, hasSubscription, isOwner);\n if (msg.hasOwnProperty('from') && hasSubscription || isOwner) {\n var resource = void 0;\n\n if (isOwner) {\n resource = _this3._getResourcesByOwner(storedDataObjects[type], msg.from);\n } else {\n resource = _this3._getResourcesBySubscription(storedDataObjects[type], msg.from);\n }\n\n var identityFoundData = [];\n if (msg.body && msg.body.identity) identityFoundData = _this3._getResourcesByIdentity(storedDataObjects[type], msg.body.identity);\n\n //TODO: remove schema since metadata already includes the schema?\n\n var schemaFoundData = [];\n if (msg.body && msg.body.schema) schemaFoundData = _this3._getResourcesBySchema(storedDataObjects[type], msg.body.schema);\n\n var metadataFound = [];\n if (msg.body && msg.body.value) {\n var metadata = msg.body.value;\n delete metadata.data;\n metadataFound = _this3._getResourcesByMetadata(storedDataObjects[type], metadata);\n }\n\n var dataFound = [];\n if (msg.body && msg.body.value && msg.body.value.data) dataFound = _this3._getResourcesByData(storedDataObjects[type], msg.body.value.data);\n\n // you can pass as arrays as you want.. it will be merged in on place\n // removed duplicates;\n result = _this3._intersection(resource, identityFoundData, schemaFoundData, dataFound, metadataFound);\n } else {\n return resolve(null);\n }\n\n var init = {};\n result.forEach(function (key) {\n var currentIsReporter = storedDataObjects[type][key];\n init[key] = currentIsReporter;\n return init;\n });\n\n log.log('[Store Data Objects] - ', init);\n\n resolve(init);\n });\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesByIdentity',\n value: function _getResourcesByIdentity(storedData, userURL) {\n if (!storedData) return [];\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n return storedData[objectURL].subscriberUsers.filter(function (current) {\n return current === userURL;\n }).length;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesByOwner',\n value: function _getResourcesByOwner(storedData, owner) {\n if (!storedData) return [];\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n return storedData[objectURL].reporter === owner;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesBySubscription',\n value: function _getResourcesBySubscription(storedData, subscription) {\n if (!storedData) return [];\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n return storedData[objectURL].subscriptions.filter(function (current) {\n return current === subscription;\n }).length;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesBySchema',\n value: function _getResourcesBySchema(storedData, schema) {\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n var currentObject = storedData[objectURL];\n return (0, _keys2.default)(currentObject).filter(function (key) {\n return key === 'schema' && currentObject[key] === schema;\n }).length;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesByMetadata',\n value: function _getResourcesByMetadata(storedData, metadata) {\n if (!metadata) return [];\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n var currentObject = storedData[objectURL];\n return (0, _keys2.default)(currentObject).filter(function (key) {\n // search on storeDataObjects for specific key provided from data;\n return (0, _keys2.default)(metadata).filter(function (searchFor) {\n return key === searchFor && currentObject[key] === metadata[searchFor];\n }).length;\n }).length;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesByData',\n value: function _getResourcesByData(storedData, data) {\n if (!data) return [];\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n var currentObject = storedData[objectURL].hasOwnProperty('data') ? storedData[objectURL].data : {};\n return (0, _keys2.default)(currentObject).filter(function (key) {\n // search on storeDataObjects for specific key provided from data;\n return (0, _keys2.default)(data).filter(function (searchFor) {\n return key === searchFor && currentObject[key] === data[searchFor];\n }).length;\n }).length;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_hasSubscription',\n value: function _hasSubscription(storedData, subscription) {\n if (!storedData) return false;\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n return storedData[objectURL].subscriptions.filter(function (current) {\n return current === subscription;\n }).length;\n }).length > 0 ? true : false;\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_searchOwner',\n value: function _searchOwner(storedData, from) {\n if (!storedData) return false;\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n return storedData[objectURL].reporter === from;\n }).length > 0 ? true : false;\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_isOwner',\n value: function _isOwner(value, url) {\n if (!value) return false;\n return value.reporter === url ? true : false;\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_intersection',\n value: function _intersection() {\n var args = (0, _from2.default)(arguments);\n\n var result = args.reduce(function (first, second) {\n return first.concat(second);\n }).filter(function (value, index, self) {\n return self.indexOf(value) === index;\n });\n log.log('DataObjectsStorage._intersection] Result an unique array of strings: ', result);\n return result;\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_updateToArray',\n value: function _updateToArray(storeDataObject, resource, key, value) {\n log.log('[DataObjectsStorage] - _updateToArray: ', storeDataObject, resource, key, value);\n if (storeDataObject[resource][key].indexOf(value) === -1) storeDataObject[resource][key].push(value);\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_removeFromArray',\n value: function _removeFromArray(storeDataObject, resource, key, value) {\n var indexOfValue = storeDataObject[resource][key].indexOf(value);\n if (indexOfValue === -1) storeDataObject[resource][key].splice(indexOfValue, 1);\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_hasValue',\n value: function _hasValue(obj, key, value) {\n return obj.hasOwnProperty(key) && obj[key] === value;\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getTypeOfObject',\n value: function _getTypeOfObject(isReporter) {\n return isReporter ? 'reporters' : 'observers';\n }\n }]);\n return DataObjectsStorage;\n}();\n\nexports.default = DataObjectsStorage;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zdG9yZS1vYmplY3RzL0RhdGFPYmplY3RzU3RvcmFnZS5qcz9lOTU2Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIExvZyBTeXN0ZW1cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignRGF0YU9iamVjdHNTdG9yYWdlJyk7XG5cbmltcG9ydCB7IGFzc2lnbiwgZGVlcENsb25lIH0gZnJvbSAnLi4vdXRpbHMvdXRpbHMnO1xuXG5jbGFzcyBEYXRhT2JqZWN0c1N0b3JhZ2Uge1xuXG4gIGNvbnN0cnVjdG9yKHN0b3JhZ2VNYW5hZ2VyLCBzdG9yZWREYXRhT2JqZWN0cykge1xuICAgIGlmICghc3RvcmFnZU1hbmFnZXIpIHRocm93IG5ldyBFcnJvcignW1N0b3JlIERhdGEgT2JqZWN0c10gLSBOZWVkcyB0aGUgc3RvcmFnZU1hbmFnZXIgY29tcG9uZW50Jyk7XG5cbiAgICB0aGlzLl9zdG9yYWdlTWFuYWdlciA9IHN0b3JhZ2VNYW5hZ2VyO1xuICAgIHRoaXMuX3N0b3JlRGF0YU9iamVjdCA9IHN0b3JlZERhdGFPYmplY3RzO1xuXG4gICAgdGhpcy5fY2FjaGUgPSB7fTtcbiAgfVxuXG4gIC8qKlxuICAgKiBAZGVzY3JpcHRpb24gc2hvdWxkIHNldCB0aGUgaW5pdGlhbCBzdGF0ZSBvZiB0aGUgZGF0YU9iamVjdFVSTCB0byBiZSByZXN1bWVkIGlmIG5lY2Vzc2FyeTtcbiAgICpcbiAgICogQHBhcmFtIHtEYXRhT2JqZWN0VVJMfSB1cmwgLSBkYXRhT2JqZWN0VVJMIHRv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BO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///499\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(128);\n__webpack_require__(501);\nmodule.exports = __webpack_require__(13).Array.from;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9hcnJheS9mcm9tLmpzP2U3MzciXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYuc3RyaW5nLml0ZXJhdG9yJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNi5hcnJheS5mcm9tJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5BcnJheS5mcm9tO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL2FycmF5L2Zyb20uanNcbi8vIG1vZHVsZSBpZCA9IDUwMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///500\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar ctx = __webpack_require__(65);\nvar $export = __webpack_require__(21);\nvar toObject = __webpack_require__(76);\nvar call = __webpack_require__(192);\nvar isArrayIter = __webpack_require__(193);\nvar toLength = __webpack_require__(134);\nvar createProperty = __webpack_require__(502);\nvar getIterFn = __webpack_require__(194);\n\n$export($export.S + $export.F * !__webpack_require__(199)(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5hcnJheS5mcm9tLmpzP2FiMjIiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGN0eCA9IHJlcXVpcmUoJy4vX2N0eCcpO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIGNhbGwgPSByZXF1aXJlKCcuL19pdGVyLWNhbGwnKTtcbnZhciBpc0FycmF5SXRlciA9IHJlcXVpcmUoJy4vX2lzLWFycmF5LWl0ZXInKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4vX3RvLWxlbmd0aCcpO1xudmFyIGNyZWF0ZVByb3BlcnR5ID0gcmVxdWlyZSgnLi9fY3JlYXRlLXByb3BlcnR5Jyk7XG52YXIgZ2V0SXRlckZuID0gcmVxdWlyZSgnLi9jb3JlLmdldC1pdGVyYXRvci1tZXRob2QnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMgKyAkZXhwb3J0LkYgKiAhcmVxdWlyZSgnLi9faXRlci1kZXRlY3QnKShmdW5jdGlvb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3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///501\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $defineProperty = __webpack_require__(40);\nvar createDesc = __webpack_require__(73);\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19jcmVhdGUtcHJvcGVydHkuanM/N2MxNCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGRlZmluZVByb3BlcnR5ID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJyk7XG52YXIgY3JlYXRlRGVzYyA9IHJlcXVpcmUoJy4vX3Byb3BlcnR5LWRlc2MnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAob2JqZWN0LCBpbmRleCwgdmFsdWUpIHtcbiAgaWYgKGluZGV4IGluIG9iamVjdCkgJGRlZmluZVByb3BlcnR5LmYob2JqZWN0LCBpbmRleCwgY3JlYXRlRGVzYygwLCB2YWx1ZSkpO1xuICBlbHNlIG9iamVjdFtpbmRleF0gPSB2YWx1ZTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fY3JlYXRlLXByb3BlcnR5LmpzXG4vLyBtb2R1bGUgaWQgPSA1MDJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///502\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _PromiseQueue = __webpack_require__(504);\n\nvar _PromiseQueue2 = _interopRequireDefault(_PromiseQueue);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('HypertyResourcesStorage'); // Log System\n\nvar HypertyResourcesStorage = function () {\n function HypertyResourcesStorage(runtimeURL, bus, storageManager, hypertyResources) {\n (0, _classCallCheck3.default)(this, HypertyResourcesStorage);\n\n\n if (!storageManager) throw new Error('[HypertyResourcesStorage constructor] mandatory storageManager parameter missing');\n if (!runtimeURL) throw new Error('[HypertyResourcesStorage constructor] mandatory runtimeURL parameter missing');\n if (!bus) throw new Error('[HypertyResourcesStorage constructor] mandatory bus parameter missing');\n\n var _this = this;\n\n _this._bus = bus;\n\n _this._storageLimit = 0.9; // the save storageLimit;\n\n _this._url = runtimeURL + '/storage';\n\n _this._storageManager = storageManager;\n\n _this.promiseQueue = new _PromiseQueue2.default();\n\n _this._hypertyResources = hypertyResources;\n\n bus.addListener(_this._url, function (msg) {\n log.info('[HypertyResourcesStorage] Message RCV: ', msg);\n switch (msg.type) {\n case 'create':\n _this._onCreate(msg);break;\n case 'read':\n _this._onRead(msg);break;\n case 'delete':\n _this._onDelete(msg);break;\n }\n });\n }\n\n /**\n * check the available storage quota\n *\n * @memberof HypertyResourcesStorage\n */\n\n\n (0, _createClass3.default)(HypertyResourcesStorage, [{\n key: 'checkStorageQuota',\n value: function checkStorageQuota() {\n var _this2 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n if (_this2._availableQuota && _this2._usage) {\n return resolve((0, _utils.availableSpace)(_this2._usage, _this2._availableQuota));\n }\n\n if (navigator) {\n\n navigator.storage.estimate().then(function (estimate) {\n _this2._availableQuota = estimate.quota;\n _this2._usage = estimate.usage;\n resolve((0, _utils.availableSpace)(_this2._usage, _this2._availableQuota));\n }).catch(function (reason) {\n log.error('[HypertyResourcesStorage] CheckStorageQuota error: ', reason);\n reject(reason);\n });\n }\n });\n }\n\n /**\n * @description should save an HypertyResource contained in the body of a create message request;\n *\n * @param {string} message - message containing the hyperty resource to be stored\n */\n\n }, {\n key: '_onCreate',\n value: function _onCreate(message) {\n\n var _this = this;\n\n if (!message.body || !message.body.value) throw new Error('[HypertyResourcesStorage._onCreate] mandatory message body value missing: ', message);\n\n var content = message.body.value;\n var contentURL = content.contentURL;\n var resourceURL = '';\n\n if (!contentURL) {\n\n contentURL = [];\n resourceURL = _this._url + '/' + (0, _utils.generateGUID)();\n } else {\n var currentURL = contentURL[0];\n var resource = currentURL.substr(currentURL.lastIndexOf('/') + 1);\n resourceURL = _this._url + '/' + resource;\n }\n\n if (!_this._hypertyResources.hasOwnProperty(resourceURL)) {\n\n contentURL.push(resourceURL);\n content.contentURL = contentURL;\n }\n\n this._hypertyResources[resourceURL] = content;\n\n this.promiseQueue.add(this._toSave(resourceURL, message, content));\n }\n }, {\n key: '_toSave',\n value: function _toSave(resourceURL, message, content) {\n var _this3 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var error = function error(reason) {\n var response = {\n from: message.to,\n to: message.from,\n id: message.id,\n type: 'response',\n body: { value: resourceURL, code: 500, description: reason }\n };\n\n _this3._bus.postMessage(response);\n\n return reject(reason);\n };\n\n _this3.checkStorageQuota().then(function (result) {\n\n if (content.size > result.quota) {\n var msg = 'The storage do not have space to store that resource';\n error(msg);\n throw Error(msg);\n }\n\n var spaceAvailable = result.quota;\n var allocated = result.usage + content.size;\n\n if (result.percent >= _this3._storageLimit || allocated > spaceAvailable) {\n return _this3._getOlderResources(content.size);\n } else {\n return true;\n }\n }).then(function () {\n return _this3._storageManager.set(resourceURL, 1, content);\n }).then(function () {\n\n var response = {\n from: message.to,\n to: message.from,\n id: message.id,\n type: 'response',\n body: { value: resourceURL, code: 200 }\n };\n\n _this3._bus.postMessage(response);\n\n log.log('Success');\n\n return resolve();\n }).catch(error);\n });\n }\n }, {\n key: '_getOlderResources',\n value: function _getOlderResources(size) {\n var _this4 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this4._storageManager.get().then(function (result) {\n\n var resources = (0, _keys2.default)(result);\n\n var total = 0;\n var reduced = resources.sort(function (a, b) {\n return result[a].created < result[b].created;\n }).reduce(function (previousResource, currentResource) {\n var current = _this4._hypertyResources[currentResource];\n\n log.log('[HypertyResourcesStorage] _getOlderResources: ', total, size, currentResource, _this4._availableQuota);\n\n if (total <= size) {\n total += current.size;\n previousResource.push(currentResource);\n }\n\n return previousResource;\n }, []);\n\n var deleting = reduced.map(function (key) {\n return _this4._storageManager.delete(key);\n });\n\n _promise2.default.all(deleting).then(function () {\n resolve(true);\n }).catch(function (reason) {\n reject(reason);\n });\n });\n });\n }\n\n /**\n * @description should return an HypertyResource stored in the Storage Manager identified by the content url contained in the body of a read message request;\n *\n * @param {string} message - message containing the hyperty resource to be stored\n */\n\n }, {\n key: '_onRead',\n value: function _onRead(message) {\n\n var _this = this;\n\n if (!message.body || !message.body.resource) throw new Error('[HypertyResourcesStorage._onRead] mandatory message body resource missing: ', message);\n\n var contentUrl = message.body.resource;\n\n var response = {\n from: message.to,\n to: message.from,\n id: message.id,\n type: 'response',\n body: {}\n };\n\n // let content = _this._hypertyResources[contentUrl];\n\n log.info('[HypertyResourcesStorage._onRead] get resourceURL:', contentUrl);\n\n this._storageManager.get('resourceURL', contentUrl).then(function (content) {\n\n log.info('[HypertyResourcesStorage._onRead] found content:', content);\n\n if (content) {\n\n if (content.resourceType === 'file') {\n _this._onReadFile(response, content);\n } else {\n response.body.code = 200;\n response.body.p2p = true;\n response.body.value = content;\n _this._bus.postMessage(response);\n }\n } else {\n response.body.code = 404;\n response.body.desc = 'Content Not Found for ' + contentUrl;\n _this._bus.postMessage(response);\n }\n });\n\n //response.body.code = 404;\n\n //_this._hypertyResources[contentUrl] = message.body.value;\n\n }\n }, {\n key: '_onReadFile',\n value: function _onReadFile(response, resource) {\n var _this = this;\n\n var reader = new FileReader();\n\n reader.onload = function (theFile) {\n\n log.info('[FileHypertyResource.init] file loaded ', theFile);\n\n response.body.code = 200;\n response.body.p2p = true;\n response.body.value = (0, _utils.deepClone)(resource);\n response.body.value.content = theFile.target.result;\n _this._bus.postMessage(response);\n };\n\n if (resource.mimetype.includes('text/')) {\n reader.readAsText(resource.content);\n } else {\n var current = resource.content;\n\n var blob = void 0;\n if (Array.isArray(current)) {\n blob = new Blob(current, { type: resource.mimetype });\n } else {\n blob = new Blob([current], { type: resource.mimetype });\n }\n\n reader.readAsArrayBuffer(blob);\n }\n }\n\n /**\n * @description should delete an HypertyResource from the storage;\n *\n * @param {string} message - message containing the content URL of the hyperty resource to be deleted\n */\n\n }, {\n key: '_onDelete',\n value: function _onDelete(message) {\n\n var _this = this;\n\n if (!message.body) throw new Error('[HypertyResourcesStorage._onDelete] mandatory message body missing: ', message);\n\n if (message.body.resource) {\n delete _this._hypertyResources[message.body.resource];\n } else if (message.body.resources) {\n message.body.resources.forEach(function (resource) {\n delete _this._hypertyResources[resource];\n });\n } else {\n throw new Error('[HypertyResourcesStorage._onDelete] mandatory resource missing: ', message);\n }\n\n _this._storageManager.delete('resourceURL', message.body.resource).then(function () {\n var response = {\n from: message.to,\n to: message.from,\n id: message.id,\n type: 'response',\n body: { code: 200 }\n };\n\n _this._bus.postMessage(response);\n }).catch(function (reason) {\n var response = {\n from: message.to,\n to: message.from,\n id: message.id,\n type: 'response',\n body: { code: 400, description: reason }\n };\n\n _this._bus.postMessage(response);\n });\n }\n }]);\n return HypertyResourcesStorage;\n}();\n\nexports.default = HypertyResourcesStorage;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9oeXBlcnR5LXJlc291cmNlcy1zdG9yYWdlL0h5cGVydHlSZXNvdXJjZXNTdG9yYWdlLmpzP2Q0NjciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ2VyIGZyb20gJ2xvZ2xldmVsJztcbmxldCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdIeXBlcnR5UmVzb3VyY2VzU3RvcmFnZScpO1xuXG5pbXBvcnQgeyBnZW5lcmF0ZUdVSUQsIGRlZXBDbG9uZSwgYXZhaWxhYmxlU3BhY2UgfSBmcm9tICcuLi91dGlscy91dGlscyc7XG5cbmltcG9ydCBQcm9taXNlUXVldWUgZnJvbSAnLi4vdXRpbHMvUHJvbWlzZVF1ZXVlJztcblxuY2xhc3MgSHlwZXJ0eVJlc291cmNlc1N0b3JhZ2Uge1xuXG4gIGNvbnN0cnVjdG9yKHJ1bnRpbWVVUkwsIGJ1cywgc3RvcmFnZU1hbmFnZXIsIGh5cGVydHlSZXNvdXJjZXMpIHtcblxuICAgIGlmICghc3RvcmFnZU1hbmFnZXIpIHRocm93IG5ldyBFcnJvcignW0h5cGVydHlSZXNvdXJjZXNTdG9yYWdlIGNvbnN0cnVjdG9yXSBtYW5kYXRvcnkgc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9oeXBlcnR5UmVzb3VyY2VzLmhhc093blByb3BlcnR5KHJlc291cmNlVVJMKSkge1xuXG4gICAgICBjb250ZW50VVJMLnB1c2gocmVzb3VyY2VVUkwpO1xuICAgICAgY29udGVudC5jb250ZW50VVJMID0gY29udGVudFVSTDtcblxuICAgIH1cblxuICAgIHRoaXMuX2h5cGVydHlSZXNvdXJjZXNbcmVzb3VyY2VVUkxdID0gY29udGVudDtcblxuICAgIHRoaXMucHJvbWlzZVF1ZXVlLmFkZCh0aGlzLl90b1NhdmUocmVzb3VyY2VVUkwsIG1lc3NhZ2UsIGNvbnRlbnQpKTtcblxuICB9XG5cbiAgX3RvU2F2ZShyZXNvdXJjZVVSTCwgbWVzc2FnZSwgY29udGVudCkge1xuXG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcblxuICAgICAgY29uc3QgZXJyb3IgPSAocmVhc29uKSA9PiB7XG4gICAgICAgIGxldCByZXNwb25zZSA9IHtcbiAgICAgICAgICBmcm9tOiBtZXNzYWdlLnRvLFxuICAgICAgICAgIHRvOiBtZXNzYWdlLmZyb20sXG4gICAgICAgICAgaWQ6IG1lc3NhZ2UuaWQsXG4gICAgICAgICAgdHlwZTogJ3Jlc3BvbnNlJyxcbiAgICAgICAgICBib2R5OiB7IHZhbHVlOiByZXNvdXJjZVVSTCwgY29kZTogNTAwLCBkZXNjcmlwdGlvbjogcmVhc29uIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLl9idXMucG9zdE1lc3NhZ2UocmVzcG9uc2UpO1xuXG4gICAgICAgIHJldHVybiByZWplY3QocmVhc29uKTtcbiAgICAgIH07XG5cbiAgICAgIHRoaXMuY2hlY2tTdG9yYWdlUXVvdGEoKS50aGVuKChyZXN1bHQpID0+IHtcblxuICAgICAgICBpZiAoY29udGVudC5zaXplID4gcmVzdWx0LnF1b3RhKSB7XG4gICAgICAgICAgY29uc3QgbXNnID0gJ1RoZSBzdG9yYWdlIG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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBTEE7QUFDQTtBQU9BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFMQTtBQUNBO0FBT0E7QUFDQTtBQUVBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///503\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _toConsumableArray2 = __webpack_require__(505);\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PromiseQueue = function () {\n\n // TODO: Improve this Queuing\n function PromiseQueue(concurrency) {\n (0, _classCallCheck3.default)(this, PromiseQueue);\n\n this.flushing = false;\n this.Promise = _promise2.default;\n this.concurrency = typeof concurrency !== 'number' ? 1 : concurrency;\n this.promises = [];\n this.queue = [];\n this.isProcessing = false;\n }\n\n (0, _createClass3.default)(PromiseQueue, [{\n key: 'done',\n value: function done(cb) {\n this.callback = cb;\n }\n }, {\n key: 'add',\n value: function add(promise) {\n var _this = this;\n\n this.queue.push(promise);\n\n if (!this.isProcessing) {\n return this.queue.reduce(function (promiseChain, currentTask) {\n return promiseChain.then(function (chainResults) {\n return currentTask.then(function (currentResult) {\n return [].concat((0, _toConsumableArray3.default)(chainResults), [currentResult]);\n });\n });\n }, _promise2.default.resolve([])).then(function (arrayOfResults) {\n // Do something with all results\n _this.isProcessing = false;\n });\n }\n }\n }]);\n return PromiseQueue;\n}();\n\nexports.default = PromiseQueue;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy91dGlscy9Qcm9taXNlUXVldWUuanM/MDViZCJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBQcm9taXNlUXVldWUge1xuXG4gIC8vIFRPRE86IEltcHJvdmUgdGhpcyBRdWV1aW5nXG4gIGNvbnN0cnVjdG9yKGNvbmN1cnJlbmN5KSB7XG4gICAgdGhpcy5mbHVzaGluZyA9IGZhbHNlO1xuICAgIHRoaXMuUHJvbWlzZSA9IFByb21pc2U7XG4gICAgdGhpcy5jb25jdXJyZW5jeSA9ICh0eXBlb2YgY29uY3VycmVuY3kgIT09ICdudW1iZXInKSA/IDEgOiBjb25jdXJyZW5jeTtcbiAgICB0aGlzLnByb21pc2VzID0gW107XG4gICAgdGhpcy5xdWV1ZSA9IFtdO1xuICAgIHRoaXMuaXNQcm9jZXNzaW5nID0gZmFsc2U7XG4gIH1cblxuICBkb25lKGNiKSB7XG4gICAgdGhpcy5jYWxsYmFjayA9IGNiO1xuICB9XG5cbiAgYWRkKHByb21pc2UpIHtcbiAgICB0aGlzLnF1ZXVlLnB1c2gocHJvbWlzZSk7XG5cbiAgICBpZiAoIXRoaXMuaXNQcm9jZXNzaW5nKSB7XG4gICAgICByZXR1cm4gdGhpcy5xdWV1ZS5yZWR1Y2UoKHByb21pc2VDaGFpbiwgY3VycmVudFRhc2spID0+IHtcbiAgICAgICAgcmV0dXJuIHByb21pc2VDaGFpbi50aGVuKGNoYWluUmVzdWx0cyA9PiBjdXJyZW50VGFzay50aGVuKGN1cnJlbnRSZXN1bHQgPT4gWy4uLmNoYWluUmVzdWx0cywgY3VycmVudFJlc3VsdF0pKTtcbiAgICAgIH0sIFByb21pc2UucmVzb2x2ZShbXSkpLnRoZW4oYXJyYXlPZlJlc3VsdHMgPT4ge1xuICAgICAgICAvLyBEbyBzb21ldGhpbmcgd2l0aCBhbGwgcmVzdWx0c1xuICAgICAgICB0aGlzLmlzUHJvY2Vzc2luZyA9IGZhbHNlO1xuICAgICAgfSk7XG5cbiAgICB9XG4gIH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCBQcm9taXNlUXVldWU7XG5cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvdXRpbHMvUHJvbWlzZVF1ZXVlLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///504\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nexports.__esModule = true;\n\nvar _from = __webpack_require__(209);\n\nvar _from2 = _interopRequireDefault(_from);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return (0, _from2.default)(arr);\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA1LmpzIiwic291cmNlcyI6WyJ3ZWJw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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///505\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _values = __webpack_require__(210);\n\nvar _values2 = _interopRequireDefault(_values);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _schemaValidation = __webpack_require__(510);\n\nvar _AddressAllocation = __webpack_require__(99);\n\nvar _AddressAllocation2 = _interopRequireDefault(_AddressAllocation);\n\nvar _ReporterObject = __webpack_require__(515);\n\nvar _ReporterObject2 = _interopRequireDefault(_ReporterObject);\n\nvar _ObserverObject = __webpack_require__(516);\n\nvar _ObserverObject2 = _interopRequireDefault(_ObserverObject);\n\nvar _CryptoManager = __webpack_require__(100);\n\nvar cryptoManager = _interopRequireWildcard(_CryptoManager);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('SyncherManager'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log System\n\n/**\n * @author micaelpedrosa@gmail.com\n * Core Syncronization system.\n */\nvar SyncherManager = function () {\n /* private\n _url: URL\n _bus: MiniBus\n _registry: Registry\n _allocator: AddressAllocation\n _reporters: { ObjectURL: ReporterObject }\n _observers: { ObjectURL: ObserverObject }\n */\n\n function SyncherManager(runtimeURL, bus, registry, catalog, storageManager, allocator, storeDataObjects, identityModule) {\n (0, _classCallCheck3.default)(this, SyncherManager);\n\n if (!runtimeURL) throw new Error('[Syncher Manager] - needs the runtimeURL parameter');\n if (!bus) throw new Error('[Syncher Manager] - needs the MessageBus instance');\n if (!registry) throw new Error('[Syncher Manager] - needs the Registry instance');\n if (!catalog) throw new Error('[Syncher Manager] - needs the RuntimeCatalogue instance');\n if (!storageManager) throw new Error('[Syncher Manager] - need the storageManager instance');\n\n var _this = this;\n\n _this._bus = bus;\n _this._registry = registry;\n _this._catalog = catalog;\n _this._storageManager = storageManager;\n _this._identityModule = identityModule;\n\n //TODO: these should be saved in persistence engine?\n _this.runtimeURL = runtimeURL;\n _this._url = runtimeURL + '/sm';\n _this._objectURL = runtimeURL + '/object-allocation';\n\n _this._reporters = {};\n _this._observers = {};\n\n _this._dataObjectsStorage = storeDataObjects;\n\n //TODO: this should not be hardcoded!\n _this._domain = (0, _utils.divideURL)(runtimeURL).domain;\n\n if (allocator) {\n _this._allocator = allocator;\n } else {\n _this._allocator = _AddressAllocation2.default.instance;\n }\n\n log.log('[SyncherManager - AddressAllocation] - ', _this._allocator);\n\n bus.addListener(_this._url, function (msg) {\n log.info('[SyncherManager] RCV: ', msg);\n switch (msg.type) {\n case 'create':\n _this._onCreate(msg);break;\n case 'delete':\n _this._onDelete(msg);break;\n case 'subscribe':\n _this._onLocalSubscribe(msg);break;\n case 'unsubscribe':\n _this._onLocalUnSubscribe(msg);break;\n }\n });\n }\n\n (0, _createClass3.default)(SyncherManager, [{\n key: '_onCreate',\n\n\n //FLOW-IN: message received from Syncher -> create\n value: function _onCreate(msg) {\n var _this2 = this;\n\n var from = msg.from;\n var to = msg.to;\n\n // check if message is to save new childrenObjects in the local storage\n // TODO: check if message is to store new child in the local storage and call storeChild. How to distinguish from others?\n\n if (msg.body.attribute) {\n this._storeChildrens(msg);\n } else {\n\n if (!msg.body.hasOwnProperty('resume') || msg.body.hasOwnProperty('resume') && !msg.body.resume) {\n\n // check if this is an invitation message\n if (msg.body.authorise) {\n this._authorise(msg);\n log.info('[SyncherManager.onCreate - invite observers]', msg);\n } else {\n // this is to create a new data object\n log.info('[SyncherManager.onCreate - Create New Object]', msg);\n this._newCreate(msg);\n }\n } else {\n\n // If from the hyperty side, call the resumeReporter we will have resume = true'\n // so we will create an resumed object and will try to resume the object previously saved;\n this._dataObjectsStorage.getResourcesByCriteria(msg, true).then(function (result) {\n\n log.info('[SyncherManager - Create Resumed] - ResourcesByCriteria | Message: ', msg, ' result: ', result);\n\n if (result && (0, _keys2.default)(result).length > 0) {\n\n var listOfReporters = [];\n\n (0, _keys2.default)(result).forEach(function (objURL) {\n listOfReporters.push(_this2._resumeCreate(msg, result[objURL]));\n });\n\n _promise2.default.all(listOfReporters).then(function (resumedReporters) {\n log.log('[SyncherManager - Create Resumed]', resumedReporters);\n\n // TODO: shoud send the information if some object was fail;\n var successfullyResumed = (0, _values2.default)(resumedReporters).filter(function (reporter) {\n return reporter !== false;\n });\n\n log.info('[SyncherManager.onCreate] returning resumed objects : ', successfullyResumed);\n\n //FLOW-OUT: message response to Syncher -> create resume\n _this2._bus.postMessage({\n id: msg.id, type: 'response', from: to, to: from,\n body: { code: 200, value: successfullyResumed }\n });\n });\n } else {\n //forward to hyperty:\n var reply = {};\n reply.id = msg.id;\n reply.from = msg.to;\n reply.to = msg.from;\n reply.type = 'response';\n reply.body = {\n code: 404,\n desc: 'No data objects reporters to be resumed'\n };\n _this2._bus.postMessage(reply);\n }\n });\n }\n }\n }\n }, {\n key: '_storeChildrens',\n value: function _storeChildrens(msg) {\n var _this = this;\n\n var resource = msg.body.resource;\n var attribute = msg.body.attribute;\n\n if (attribute === 'childrenObjects') {\n _this._dataObjectsStorage.saveChildrens(false, resource, undefined, msg.body.value);\n } else {\n _this._dataObjectsStorage.saveChildrens(true, resource, attribute, msg.body.value);\n }\n }\n }, {\n key: '_newCreate',\n value: function _newCreate(msg) {\n var _this3 = this;\n\n var _this = this;\n\n var owner = msg.from;\n var domain = (0, _utils.divideURL)(msg.from).domain;\n\n // if reporter is in a Interworking Protostub the runtime domain backend services will be used\n if (_this._registry.isInterworkingProtoStub(msg.from)) {\n domain = (0, _utils.divideURL)(_this.runtimeURL).domain;\n }\n\n // Process invitation message to observers\n\n /*if (msg.body.authorise) {\n _this._authorise(msg);\n return;\n }*/\n\n //get schema from catalogue and parse -> (scheme, children)\n _this._catalog.getDataSchemaDescriptor(msg.body.schema).then(function (descriptor) {\n\n var properties = descriptor.sourcePackage.sourceCode.properties;\n var scheme = properties.scheme ? properties.scheme.constant : 'resource';\n var childrens = properties.children ? properties.children.constant : [];\n\n // Do schema validation\n // TODO: check if is need to handle with the result of validation\n (0, _schemaValidation.schemaValidation)(scheme, descriptor, msg.body.value);\n\n var objectInfo = {\n name: msg.body.value.name,\n schema: msg.body.value.schema,\n reporter: msg.body.value.reporter,\n resources: msg.body.value.resources\n };\n\n // should resuse data object url if it passed\n var reuseDataObject = msg.body.value.resource;\n var numOfAddress = 1;\n\n //request address allocation of a new object from the msg-node\n _this._allocator.create(domain, numOfAddress, objectInfo, scheme, reuseDataObject).then(function (allocated) {\n var objectRegistration = (0, _utils.deepClone)(msg.body.value);\n objectRegistration.url = allocated.address[0];\n objectRegistration.authorise = msg.body.authorise;\n objectRegistration.childrens = childrens;\n\n //objectRegistration.expires = 30;//TODO: get it from data object configuration description when present\n\n delete objectRegistration.data;\n\n log.log('[SyncherManager._newCreate] ALLOCATOR CREATE:', allocated);\n\n var subscriptionURL = objectRegistration.url + '/subscription';\n\n log.log('[SyncherManager._newCreate] Subscription URL', subscriptionURL);\n\n //To register the dataObject in the runtimeRegistry\n log.info('[SyncherManager._newCreate] Register Object: ', objectRegistration);\n\n //_this._registry.registerDataObject(msg.body.value.name, msg.body.value.schema, objURL, msg.body.value.reporter, msg.body.value.resources, allocated, msg.body.authorise).then((resolve) => {\n _this._registry.registerDataObject(objectRegistration).then(function (registeredObject) {\n log.log('[SyncherManager._newCreate] DataObject successfully registered', registeredObject);\n\n //all OK -> create reporter and register listeners\n var reporter = void 0;\n\n if (!_this3._reporters[objectRegistration.url]) {\n reporter = new _ReporterObject2.default(_this, owner, objectRegistration.url);\n } else {\n reporter = _this3._reporters[objectRegistration.url];\n }\n\n log.log('[SyncherManager - new Create] - ', msg);\n\n // Store for each reporter hyperty the dataObject\n var userURL = void 0;\n var interworking = false;\n\n if (msg.body.hasOwnProperty('identity') && msg.body.identity.userProfile && msg.body.identity.userProfile.userURL) {\n userURL = msg.body.identity.userProfile.userURL;\n if (!userURL.includes('user://')) {\n interworking = true;\n }\n } else {\n userURL = _this._registry.getHypertyOwner(msg.from);\n if (!userURL) interworking = true;\n }\n\n // should we use the msg.body.value instead?\n\n var metadata = (0, _utils.deepClone)(objectRegistration);\n metadata.subscriberUser = userURL;\n metadata.isReporter = true;\n\n // Store the dataObject information\n\n if (!interworking) {\n _this._dataObjectsStorage.set(metadata);\n\n if (msg.body.hasOwnProperty('store') && msg.body.store) {\n reporter.isToSaveData = true;\n _this._dataObjectsStorage.update(true, objectRegistration.url, 'isToSaveData', true);\n\n if (msg.body.value.data) {\n _this._dataObjectsStorage.saveData(true, objectRegistration.url, null, msg.body.value.data);\n }\n }\n }\n\n // adding listeners to forward to reporter\n\n reporter.forwardSubscribe([objectRegistration.url, subscriptionURL]).then(function () {\n reporter.addChildrens(childrens).then(function () {\n _this._reporters[objectRegistration.url] = reporter;\n\n var responseMsg = {\n id: msg.id, type: 'response', from: msg.to, to: owner,\n body: { code: 200, resource: objectRegistration.url, childrenResources: childrens }\n };\n\n //FLOW-OUT: message response to Syncher -> create\n _this._bus.postMessage(responseMsg);\n });\n });\n }, function (error) {\n log.error(error);\n });\n });\n }).catch(function (reason) {\n //FLOW-OUT: error message response to Syncher -> create\n var responseMsg = {\n id: msg.id, type: 'response', from: msg.to, to: owner,\n body: { code: 500, desc: reason }\n };\n\n _this._bus.postMessage(responseMsg);\n });\n }\n }, {\n key: '_resumeCreate',\n value: function _resumeCreate(msg, storedObject) {\n var _this4 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n\n var owner = msg.from;\n var schema = storedObject.schema;\n var resource = storedObject.url;\n var initialData = storedObject.data;\n\n log.log('[SyncherManager] - resume create', msg, storedObject);\n\n //get schema from catalogue and parse -> (scheme, children)\n _this._catalog.getDataSchemaDescriptor(schema).then(function (descriptor) {\n\n var properties = descriptor.sourcePackage.sourceCode.properties;\n var scheme = properties.scheme ? properties.scheme.constant : 'resource';\n var childrens = properties.children ? properties.children.constant : [];\n\n log.log('[SyncherManager] - getDataSchemaDescriptor: ', descriptor, childrens);\n\n // Do schema validation\n // TODO: check if is need to handle with the result of validation\n (0, _schemaValidation.schemaValidation)(scheme, descriptor, initialData);\n\n var objectRegistration = (0, _utils.deepClone)(msg.body.value);\n objectRegistration.url = storedObject.url;\n objectRegistration.expires = storedObject.expires;\n\n delete objectRegistration.data;\n\n //all OK -> create reporter and register listeners\n var reporter = void 0;\n\n if (!_this4._reporters[resource]) {\n reporter = new _ReporterObject2.default(_this, owner, resource);\n } else {\n reporter = _this4._reporters[resource];\n }\n\n reporter.isToSaveData = storedObject.isToSaveData;\n\n reporter.forwardSubscribe([storedObject.url]).then(function () {\n reporter.addChildrens(childrens).then(function () {\n\n reporter.resumeSubscriptions(storedObject.subscriptions);\n\n _this._reporters[resource] = reporter;\n\n log.info('[SyncherManager - resume create] - resolved resumed: ', storedObject);\n\n return _this._decryptChildrens(storedObject, childrens);\n }).then(function (decryptedObject) {\n\n // log.log('result of previous promise');\n resolve(decryptedObject);\n }).catch(function (reason) {\n log.error('[SyncherManager - resume create] - fail on addChildrens: ', reason);\n resolve(false);\n });\n });\n log.info('[SyncherManager._resumeCreate] Register Object: ', objectRegistration);\n _this._registry.registerDataObject(objectRegistration).then(function (resolve) {\n log.log('[SyncherManager._resumeCreate] DataObject registration successfully updated', resolve);\n });\n\n // resolve();\n }).catch(function (reason) {\n log.error('[SyncherManager - resume create] - fail on getDataSchemaDescriptor: ', reason);\n resolve(false);\n });\n });\n }\n\n // to decrypt DataChildObjects if they are encrypted\n\n }, {\n key: '_decryptChildrens',\n value: function _decryptChildrens(storedObject, childrens) {\n var _this = this;\n return new _promise2.default(function (resolve) {\n\n if (!childrens) {\n resolve(storedObject);\n } else {\n var childrensObj = (0, _keys2.default)(storedObject.childrenObjects);\n\n if (childrensObj.length === 0) {\n resolve(storedObject);\n }\n\n childrens.forEach(function (children) {\n\n var childObjects = storedObject.childrenObjects[children];\n\n log.log('[SyncherManager._decryptChildrens] dataObjectChilds to decrypt ', childObjects);\n\n var listOfDecryptedObjects = [];\n\n (0, _keys2.default)(childObjects).forEach(function (childId) {\n var child = childObjects[childId];\n var owner = childId.split('#')[0];\n\n if (typeof child.value === 'string') {\n\n log.log('[SyncherManager._decryptChildrens] createdBy ', owner, ' object: ', child.value);\n\n var decrypted = cryptoManager.default.decryptDataObject(JSON.parse(child.value), storedObject.url);\n\n listOfDecryptedObjects.push(decrypted);\n }\n });\n\n _promise2.default.all(listOfDecryptedObjects).then(function (decryptedObjects) {\n\n log.log('[SyncherManager._decryptChildrens] returning decrypted ', decryptedObjects);\n\n decryptedObjects.forEach(function (decryptedObject) {\n var childId = decryptedObject.value.url;\n storedObject.childrenObjects[children][childId].value = decryptedObject.value;\n });\n\n log.log('[SyncherManager._decryptChildrens] storedObject ', storedObject);\n\n resolve(storedObject);\n }).catch(function (reason) {\n log.warn('[SyncherManager._decryptChildrens] failed : ', reason);\n });\n });\n }\n });\n }\n\n // Process invitations to observers\n\n }, {\n key: '_authorise',\n value: function _authorise(msg) {\n var _this = this;\n\n if (!msg.body.resource) {\n throw new Error('[SyncherManager._authorise] invitation request without data object url:', msg);\n }\n\n var objSubscriptorURL = msg.body.resource + '/subscription';\n var p2p = msg.body.p2p ? msg.body.p2p : false;\n\n log.log('[SyncherManager - authorise] - ', msg);\n\n if (msg.body.authorise) {\n msg.body.authorise.forEach(function (hypertyURL) {\n //FLOW-OUT: send invites to list of remote Syncher -> _onRemoteCreate -> onNotification\n\n _this._bus.postMessage({\n type: 'create', from: objSubscriptorURL, to: hypertyURL,\n body: { p2p: p2p, identity: msg.body.identity, source: msg.from, value: msg.body.value, schema: msg.body.schema }\n }, function (reply) {\n // lets forward the invitation response\n var response = {\n from: msg.to,\n to: msg.from,\n id: msg.id,\n type: reply.type,\n body: reply.body\n };\n\n _this._bus.postMessage(response);\n });\n });\n }\n }\n\n //FLOW-IN: message received from DataObjectReporter -> delete\n\n }, {\n key: '_onDelete',\n value: function _onDelete(msg) {\n var _this = this;\n\n var objURL = msg.body.resource;\n\n var object = _this._reporters[objURL];\n if (object) {\n //TODO: is there any policy verification before delete?\n\n object.delete();\n\n this._dataObjectsStorage.deleteResource(objURL).then(function (result) {\n\n log.log('[SyncherManager - onDelete] - deleteResource: ', result);\n\n _this._registry.unregisterDataObject(objURL);\n\n //TODO: unregister object?\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 200 }\n });\n });\n }\n }\n\n //FLOW-IN: message received from local Syncher -> subscribe\n\n }, {\n key: '_onLocalSubscribe',\n value: function _onLocalSubscribe(msg) {\n var _this5 = this;\n\n this._dataObjectsStorage.getResourcesByCriteria(msg, false).then(function (result) {\n\n log.info('[SyncherManager - Subscribe] - ResourcesByCriteria | Message: ', msg, ' result: ', result);\n\n if (result && (0, _keys2.default)(result).length > 0) {\n\n var listOfObservers = [];\n\n // TODO: should reuse the storaged information\n (0, _keys2.default)(result).forEach(function (objURL) {\n log.log('[SyncherManager - resume Subscribe] - reuse current object url: ', result[objURL]);\n listOfObservers.push(_this5._resumeSubscription(msg, result[objURL]));\n });\n\n _promise2.default.all(listOfObservers).then(function (resumedObservers) {\n log.log('[SyncherManager - Observers Resumed]', resumedObservers);\n\n // TODO: shoud send the information if some object was fail;\n var successfullyResumed = (0, _values2.default)(resumedObservers).filter(function (observer) {\n return observer !== false;\n });\n\n //FLOW-OUT: message response to Syncher -> create\n _this5._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 200, value: successfullyResumed }\n });\n });\n } else if (msg.body.schema && msg.body.resource) {\n log.log('[SyncherManager.onLocalSubscribe - new Subscribe] - ', msg.body.schema, msg.body.resource);\n _this5._newSubscription(msg);\n } else {\n //forward to hyperty:\n var reply = {};\n reply.id = msg.id;\n reply.from = msg.to;\n reply.to = msg.from;\n reply.type = 'response';\n reply.body = {\n code: 404,\n desc: 'No data objects observers to be resumed'\n };\n _this5._bus.postMessage(reply);\n }\n });\n }\n }, {\n key: '_newSubscription',\n value: function _newSubscription(msg) {\n var _this6 = this;\n\n var _this = this;\n\n var objURL = msg.body.resource;\n\n var hypertyURL = msg.from;\n var domain = (0, _utils.divideURL)(objURL).domain;\n var objURLSubscription = objURL + '/subscription';\n\n var childBaseURL = objURL + '/children/';\n\n //get schema from catalogue and parse -> (children)\n _this._catalog.getDataSchemaDescriptor(msg.body.schema).then(function (descriptor) {\n var properties = descriptor.sourcePackage.sourceCode.properties;\n var childrens = properties.children ? properties.children.constant : [];\n\n var subscriptions = [];\n subscriptions.push(objURL + '/changes');\n\n childrens.forEach(function (child) {\n return subscriptions.push(childBaseURL + child);\n });\n\n //children addresses\n\n //FLOW-OUT: subscribe message to the msg-node, registering listeners on the broker\n var nodeSubscribeMsg = {\n type: 'subscribe', from: _this._url, to: 'domain://msg-node.' + domain + '/sm',\n body: { identity: msg.body.identity, resources: subscriptions, source: hypertyURL }\n };\n\n //subscribe in msg-node\n _this._bus.postMessage(nodeSubscribeMsg, function (reply) {\n log.log('node-subscribe-response(observer): ', reply);\n if (reply.body.code === 200) {\n\n //FLOW-OUT: reply with provisional response\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: hypertyURL,\n body: { code: 100, childrenResources: childrens, schema: msg.body.schema, resource: msg.body.resource }\n });\n\n //FLOW-OUT: subscribe message to remote ReporterObject -> _onRemoteSubscribe\n var objSubscribeMsg = {\n type: 'subscribe', from: _this._url, to: objURLSubscription,\n body: { identity: nodeSubscribeMsg.body.identity, subscriber: hypertyURL }\n };\n\n //TODO: For Further Study\n if (msg.body.hasOwnProperty('mutual')) objSubscribeMsg.body.mutual = msg.body.mutual;\n log.log('[SyncherManager._newSubscription]', objSubscribeMsg, msg);\n\n //subscribe to reporter SM\n _this._bus.postMessage(objSubscribeMsg, function (reply) {\n log.log('reporter-subscribe-response-new: ', reply);\n if (reply.body.code === 200) {\n\n log.log('[SyncherManager._newSubscription] - observers: ', _this._observers, objURL, _this._observers[objURL]);\n\n var observer = _this._observers[objURL];\n if (!observer) {\n observer = new _ObserverObject2.default(_this, objURL, childrens);\n log.log('[SyncherManager._newSubscription] - observers: create new ObserverObject: ', observer);\n _this._observers[objURL] = observer;\n\n // register new hyperty subscription\n observer.addSubscription(hypertyURL);\n\n // add childrens and listeners to save data if necessary\n observer.addChildrens(childrens);\n }\n\n var interworking = false;\n\n // Store for each reporter hyperty the dataObject\n var userURL = void 0;\n if (msg.body.hasOwnProperty('identity') && msg.body.identity.userProfile && msg.body.identity.userProfile.userURL) {\n userURL = msg.body.identity.userProfile.userURL;\n if (!userURL.includes('user://')) {\n interworking = true;\n }\n } else {\n userURL = _this._registry.getHypertyOwner(msg.from);\n if (!userURL) interworking = true;\n }\n\n var metadata = (0, _utils.deepClone)(reply.body.value);\n\n // let childrenObjects = metadata.childrenObjects || {};\n\n delete metadata.data;\n delete metadata.childrenObjects;\n\n metadata.childrens = childrens;\n metadata.subscriberUser = userURL;\n metadata.isReporter = false;\n metadata.subscriberHyperty = hypertyURL;\n\n if (!interworking) {\n //_this._dataObjectsStorage.set(objURL, false, msg.body.schema, 'on', reply.body.owner, hypertyURL, childrens, userURL);\n _this._dataObjectsStorage.set(metadata);\n if (metadata.hasOwnProperty('store') && metadata.store || metadata.hasOwnProperty('isToSaveData') && metadata.isToSaveData) {\n observer.isToSaveData = true;\n _this._dataObjectsStorage.update(false, objURL, 'isToSaveData', true);\n _this._dataObjectsStorage.saveData(false, objURL, null, reply.body.value.data);\n }\n }\n\n //forward to hyperty:\n reply.id = msg.id;\n reply.from = _this._url;\n reply.to = hypertyURL;\n reply.body.schema = msg.body.schema;\n reply.body.resource = msg.body.resource;\n\n //TODO: For Further Study\n if (msg.body.hasOwnProperty('mutual')) reply.body.mutual = msg.body.mutual;\n log.log('[subscribe] - new subscription: ', msg, reply, observer);\n\n _this6._bus.postMessage(reply);\n }\n });\n } else {\n //listener rejected\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: hypertyURL,\n body: reply.body\n });\n }\n });\n });\n }\n }, {\n key: '_resumeSubscription',\n value: function _resumeSubscription(msg, storedObject) {\n var _this7 = this;\n\n return new _promise2.default(function (resolve) {\n\n var objURL = storedObject.url;\n var schema = storedObject.schema;\n\n var hypertyURL = msg.from;\n\n // let objURLSubscription = objURL + '/subscription';\n\n var childBaseURL = objURL + '/children/';\n\n log.log('[SyncherManager - ReuseSubscription] - objURL: ', objURL, ' - schema:', schema);\n\n //get schema from catalogue and parse -> (children)\n // TODO: remove this since children resources should be available in the DataObjectsStorage\n _this7._catalog.getDataSchemaDescriptor(schema).then(function (descriptor) {\n var properties = descriptor.sourcePackage.sourceCode.properties;\n var childrens = properties.children ? properties.children.constant : [];\n\n //children addresses\n var subscriptions = [];\n subscriptions.push(objURL + '/changes');\n childrens.forEach(function (child) {\n return subscriptions.push(childBaseURL + child);\n });\n\n //FLOW-OUT: reply with provisional response\n _this7._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: hypertyURL,\n body: { code: 100, childrenResources: childrens, schema: schema, resource: objURL }\n });\n\n //FLOW-OUT: subscribe message to remote ReporterObject -> _onRemoteSubscribe\n /*let objSubscribeMsg = {\n type: 'subscribe', from: this._url, to: objURLSubscription,\n body: { subscriber: hypertyURL, identity: msg.body.identity }\n };\n //subscribe to reporter SM\n this._bus.postMessage(objSubscribeMsg, (reply) => {*/\n\n var observer = _this7._observers[objURL];\n if (!observer) {\n observer = new _ObserverObject2.default(_this7, objURL, childrens);\n observer.isToSaveData = storedObject.isToSaveData;\n _this7._observers[objURL] = observer;\n }\n\n //register new hyperty subscription\n observer.addSubscription(hypertyURL);\n observer.addChildrens(childrens);\n\n // Object.assign(storedObject.data, reply.body.value.data);\n // Object.assign(storedObject.childrens, reply.body.value.childrens);\n\n //log.log('[subscribe] - resume subscription: ', msg, reply, storedObject, observer);\n\n return _this7._decryptChildrens(storedObject, childrens);\n }).then(function (decryptedObject) {\n // log.log('result of previous promise');\n resolve(decryptedObject);\n }).catch(function (reason) {\n log.error('[SyncherManager - resume subscription] - fail on getDataSchemaDescriptor: ', reason);\n resolve(false);\n });\n });\n }\n\n //FLOW-IN: message received from local DataObjectObserver -> unsubscribe\n\n }, {\n key: '_onLocalUnSubscribe',\n value: function _onLocalUnSubscribe(msg) {\n var _this = this;\n\n var hypertyURL = msg.from;\n var objURL = msg.body.resource;\n\n var observer = _this._observers[objURL];\n if (observer) {\n //TODO: is there any policy verification before delete?\n observer.removeSubscription(msg);\n\n //TODO: destroy object in the registry?\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 200 }\n });\n\n this._dataObjectsStorage.deleteResource(objURL);\n\n //TODO: remove Object if no more subscription?\n delete _this._observers[objURL];\n }\n }\n }, {\n key: 'url',\n get: function get() {\n return this._url;\n }\n }]);\n return SyncherManager;\n}();\n\nexports.default = SyncherManager;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zeW5jaGVyL1N5bmNoZXJNYW5hZ2VyLmpzPzMzMzciXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4qIENvcHlyaWdodCAyMDE2IFBUIElub3Zhw6fDo28gZSBTaXN0ZW1hcyBTQVxuKiBDb3B5cmlnaHQgMjAxNiBJTkVTQy1JRFxuKiBDb3B5cmlnaHQgMjAxNiBRVU9CSVMgTkVUV09SS1MgU0xcbiogQ29weXJpZ2h0IDIwMTYgRlJBVU5IT0ZFUi1HRVNFTExTQ0hBRlQgWlVSIEZPRVJERVJVTkcgREVSIEFOR0VXQU5EVEVOIEZPUlNDSFVORyBFLlZcbiogQ29weXJpZ2h0IDIwMTYgT1JBTkdFIFNBXG4qIENvcHlyaWdodCAyMDE2IERldXRzY2hlIFRlbGVrb20gQUdcbiogQ29weXJpZ2h0IDIwMTYgQXBpemVlXG4qIENvcHlyaWdodCAyMDE2IFRFQ0hOSVNDSEUgVU5JVkVSU0lUQVQgQkVSTElOXG4qXG4qIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSBcIkxpY2Vuc2VcIik7XG4qIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS5cb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WRSZXBvcnRlcnMpLmZpbHRlcigocmVwb3J0ZXIpID0+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVwb3J0ZXIgIT09IGZhbHNlO1xuICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICBsb2cuaW5mbygnW1N5bmNoZXJNYW5hZ2VyLm9uQ3JlYXRlXSByZXR1cm5pbmcgcmVzdW1lZCBvYmplY3RzIDogJywgc3VjY2Vzc2Z1bGx5UmVzdW1lZCk7XG5cbiAgICAgICAgICAgICAgLy9GTE9XLU9VVDogbWVzc2FnZSByZXNwb25zZSB0byBTeW5jaGVyIC0+IGNyZWF0ZSByZXN1bWVcbiAgICAgICAgICAgICAgdGhpcy5fYnVzLnBvc3RNZXNzYWdlKHtcbiAgICAgICAgICAgICAgICBpZDogbXNnLmlkLCB0eXBlOiAncmVzcG9uc2UnLCBmcm9tOiB0bywgdG86IGZyb20sXG4gICAgICAgICAgICAgICAgYm9keTogeyBjb2RlOiAyMDAsIHZhbHVlOiBzdWNjZXNzZnVsbHlSZXN1bWVkIH1cbiAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vZm9yd2FyZCB0byBoeXBlcnR5OlxuICAgICAgICAgICAgbGV0IHJlcGx5ID0ge307XG4gICAgICAgICAgICByZXBseS5pZCA9IG1zZy5pZDtcbiAgICAgICAgICAgIHJlcGx5LmZyb20gPSBtc2cudG87XG4gICAgICAgICAgICByZXBseS50byA9IG1zZy5mcm9tO1xuICAgICAgICAgICAgcmVwbHkudHlwZSA9ICdyZXNwb25zZSc7XG4gICAgICAgICAgICByZXBseS5ib2R5ID0ge1xuICAgICAgICAgICAgICBjb2RlOiA0MDQsXG4gICAgICAgICAgICAgIGRlc2M6ICdObyBkYXRhIG9iamVjdHMgcmVwb3J0ZXJzIHRvIGJlIHJlc3VtZWQnXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAg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lY2Vzc2FyeVxuICAgICAgICAgICAgICAgIG9ic2VydmVyLmFkZENoaWxkcmVucyhjaGlsZHJlbnMpO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgbGV0IGludGVyd29ya2luZyA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgIC8vIFN0b3JlIGZvciBlYWNoIHJlcG9ydGVyIGh5cGVydHkgdGhlIGRhdGFPYmplY3RcbiAgICAgICAgICAgICAgbGV0IHVzZXJVUkw7XG4gICAgICAgICAgICAgIGlmIChtc2cuYm9keS5oYXNPd25Qcm9wZXJ0eSgnaWRlbnRpdHknKSAmJiBtc2cuYm9keS5pZGVudGl0eS51c2VyUHJvZmlsZSAmJiBtc2cuYm9keS5pZGVudGl0eS51c2VyUHJvZmlsZS51c2VyVVJMKSB7XG4gICAgICAgICAgICAgICAgdXNlclVSTCA9IG1zZy5ib2R5LmlkZW50aXR5LnVzZXJQcm9maWxlLnVzZXJVUkw7XG4gICAgICAgICAgICAgICAgaWYgKCF1c2VyVVJMLmluY2x1ZGVzKCd1c2VyOi8vJykpIHtcbiAgICAgICAgICAgICAgICAgIGludGVyd29ya2luZyA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHVzZXJVUkwgPSBfdGhpcy5fcmVnaXN0cnkuZ2V0SHlwZXJ0eU93bmVyKG1zZy5mcm9tKTtcbiAgICAgICAgICAgICAgICBpZiAoIXVzZXJVUkwpIGludGVyd29ya2luZyA9IHRydWU7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBsZXQgbWV0YWRhdGEgPSBkZWVwQ2xvbmUocmVwbHkuYm9keS52YWx1ZSk7XG5cbiAgICAgICAgICAgICAgLy8gbGV0IGNoaWxkcmVuT2JqZWN0cyA9IG1ldGFkYXRhLmNoaWxkcmVuT2JqZWN0cyB8fCB7fTtcblxuICAgICAgICAgICAgICBkZWxldGUgbWV0YWRhd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xzZSwgb2JqVVJMLCBudWxsLCByZXBseS5ib2R5LnZhbHVlLmRhdGEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIC8vZm9yd2FyZCB0byBoeXBlcnR5OlxuICAgICAgICAgICAgICByZXBseS5pZCA9IG1zZy5pZDtcbiAgICAgICAgICAgICAgcmVwbHkuZnJvbSA9IF90aGlzLl91cmw7XG4gICAgICAgICAgICAgIHJlcGx5LnRvID0gaHlwZXJ0eVVSTDtcbiAgICAgICAgICAgICAgcmVwbHkuYm9keS5zY2hlbWEgPSBtc2cuYm9keS5zY2hlbWE7XG4gICAgICAgICAgICAgIHJlcGx5LmJvZHkucmVzb3VyY2UgPSBtc2cuYm9keS5yZXNvdXJjZTtcblxuICAgICAgICAgICAgICAvL1RPRE86IEZvciBGdXJ0aGVyIFN0dWR5XG4gICAgICAgICAgICAgIGlmIChtc2cuYm9keS5oYXNPd25Qcm9wZXJ0eSgnbXV0dWFsJykpIHJlcGx5LmJvZHkubXV0dWFsID0gbXNnLmJvZHkubXV0dWFsO1xuICAgICAgICAgICAgICBsb2cubG9nKCdbc3Vic2NyaWJlXSAtIG5ldyBzdWJzY3JpcHRpb246ICcsIG1zZywgcmVwbHksIG9ic2VydmVyKTtcblxuICAgICAgICAgICAgICB0aGlzLl9idXMucG9zdE1lc3NhZ2UocmVwbHkpO1xuXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAvL2xpc3RlbmVyIHJlamVjdGVkXG4gICAgICAgICAgX3RoaXMuX2J1cy5wb3N0TWVzc2FnZSh7XG4gICAgICAgICAgICBpZDogbXNnLmlkLCB0eXBlOiAncmVzcG9uc2UnLCBmcm9tOiBtc2cudG8sIHRvOiBoeXBlcnR5VVJMLFxuICAgICAgICAgICAgYm9keTogcmVwbHkuYm9keVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9K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QTtBQUNBO0FBRUE7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFGQTtBQUlBO0FBQ0E7QUFFQTtBQUVBOzs7QUFFQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFGQTtBQUNBO0FBSUE7QUFDQTs7Ozs7OztBQVFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBQ0E7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQXBzQkE7QUFBQTtBQUFBOzs7OztBQXdzQkE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///506\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(508);\nmodule.exports = __webpack_require__(13).Object.values;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvdmFsdWVzLmpzPzRlNjUiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczcub2JqZWN0LnZhbHVlcycpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0LnZhbHVlcztcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvdmFsdWVzLmpzXG4vLyBtb2R1bGUgaWQgPSA1MDdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///507\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-object-values-entries\nvar $export = __webpack_require__(21);\nvar $values = __webpack_require__(509)(false);\n\n$export($export.S, 'Object', {\n values: function values(it) {\n return $values(it);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5vYmplY3QudmFsdWVzLmpzPzdkOTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9naXRodWIuY29tL3RjMzkvcHJvcG9zYWwtb2JqZWN0LXZhbHVlcy1lbnRyaWVzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICR2YWx1ZXMgPSByZXF1aXJlKCcuL19vYmplY3QtdG8tYXJyYXknKShmYWxzZSk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnT2JqZWN0Jywge1xuICB2YWx1ZXM6IGZ1bmN0aW9uIHZhbHVlcyhpdCkge1xuICAgIHJldHVybiAkdmFsdWVzKGl0KTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczcub2JqZWN0LnZhbHVlcy5qc1xuLy8gbW9kdWxlIGlkID0gNTA4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///508\n")},function(module,exports,__webpack_require__){eval("var getKeys = __webpack_require__(67);\nvar toIObject = __webpack_require__(45);\nvar isEnum = __webpack_require__(77).f;\nmodule.exports = function (isEntries) {\n return function (it) {\n var O = toIObject(it);\n var keys = getKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) if (isEnum.call(O, key = keys[i++])) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n } return result;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtdG8tYXJyYXkuanM/OTliNyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2V0S2V5cyA9IHJlcXVpcmUoJy4vX29iamVjdC1rZXlzJyk7XG52YXIgdG9JT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8taW9iamVjdCcpO1xudmFyIGlzRW51bSA9IHJlcXVpcmUoJy4vX29iamVjdC1waWUnKS5mO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXNFbnRyaWVzKSB7XG4gIHJldHVybiBmdW5jdGlvbiAoaXQpIHtcbiAgICB2YXIgTyA9IHRvSU9iamVjdChpdCk7XG4gICAgdmFyIGtleXMgPSBnZXRLZXlzKE8pO1xuICAgIHZhciBsZW5ndGggPSBrZXlzLmxlbmd0aDtcbiAgICB2YXIgaSA9IDA7XG4gICAgdmFyIHJlc3VsdCA9IFtdO1xuICAgIHZhciBrZXk7XG4gICAgd2hpbGUgKGxlbmd0aCA+IGkpIGlmIChpc0VudW0uY2FsbChPLCBrZXkgPSBrZXlzW2krK10pKSB7XG4gICAgICByZXN1bHQucHVzaChpc0VudHJpZXMgPyBba2V5LCBPW2tleV1dIDogT1trZXldKTtcbiAgICB9IHJldHVybiByZXN1bHQ7XG4gIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC10by1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gNTA5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///509\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nexports.schemaValidation = schemaValidation;\n\nvar _tv = __webpack_require__(511);\n\nvar _tv2 = _interopRequireDefault(_tv);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction schemaValidation(scheme, descriptor, value) {\n\n console.log('Scheme: ', scheme);\n\n // schema validation\n console.log('Running object validation...');\n try {\n var obj = value;\n var schema = descriptor.sourcePackage.sourceCode;\n\n // add support for schema referencing itself\n _tv2.default.addSchema(schema.id, schema);\n\n // validate\n var result = _tv2.default.validateMultiple(obj, schema);\n\n // delete error stacks to improve logging\n result.errors.forEach(function (error) {\n delete error.stack;\n });\n\n // print more details about validation if it fails or schema contains $refs\n if (!result.valid || result.missing.length > 0) {\n console.warn('Object validation ' + (result.valid ? 'succeeded, but schema contained references:' : 'failed:'), (0, _stringify2.default)(result, null, 2));\n console.debug('Object:', (0, _stringify2.default)(obj, null, 2), '\\r\\nSchema:', (0, _stringify2.default)(schema, null, 2));\n } else {\n console.log('Object validation succeeded');\n }\n } catch (e) {\n console.warn('Error during object validation:', e);\n }\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTEwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy91dGlscy9zY2hlbWFWYWxpZGF0aW9uLmpzP2JkODkiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR2NCBmcm9tICcuL3R2NCc7XG5cbmV4cG9ydCBmdW5jdGlvbiBzY2hlbWFWYWxpZGF0aW9uKHNjaGVtZSwgZGVzY3JpcHRvciwgdmFsdWUpIHtcblxuICBjb25zb2xlLmxvZygnU2NoZW1lOiAnLCBzY2hlbWUpO1xuXG4gIC8vIHNjaGVtYSB2YWxpZGF0aW9uXG4gIGNvbnNvbGUubG9nKCdSdW5uaW5nIG9iamVjdCB2YWxpZGF0aW9uLi4uJyk7XG4gIHRyeSB7XG4gICAgbGV0IG9iaiA9IHZhbHVlO1xuICAgIGxldCBzY2hlbWEgPSBkZXNjcmlwdG9yLnNvdXJjZVBhY2thZ2Uuc291cmNlQ29kZTtcblxuICAgIC8vIGFkZCBzdXBwb3J0IGZvciBzY2hlbWEgcmVmZXJlbmNpbmcg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RUJQQUNLIEZPT1RFUiAvL1xuLy8gc3JjL3V0aWxzL3NjaGVtYVZhbGlkYXRpb24uanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFFQTtBQUNBO0FBSEE7QUFDQTs7Ozs7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///510\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _defineProperty = __webpack_require__(200);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nvar _isFrozen = __webpack_require__(512);\n\nvar _isFrozen2 = _interopRequireDefault(_isFrozen);\n\nvar _create = __webpack_require__(203);\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = __webpack_require__(98);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/*\n Author: Geraint Luff and others\n Year: 2013\n\n This code is released into the \"public domain\" by its author(s). Anybody may use, alter and distribute the code without restriction. The author makes no guarantees, and takes no liability of any kind for use of this code.\n\n If you find a bug or make an improvement, it would be courteous to let the author know, but it is not compulsory.\n */\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FObject%2Fkeys\nif (!_keys2.default) {\n Object.keys = function () {\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n hasDontEnumBug = !{ toString: null }.propertyIsEnumerable('toString'),\n dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'],\n dontEnumsLength = dontEnums.length;\n\n return function (obj) {\n if ((typeof obj === 'undefined' ? 'undefined' : (0, _typeof3.default)(obj)) !== 'object' && typeof obj !== 'function' || obj === null) {\n throw new TypeError('Object.keys called on non-object');\n }\n\n var result = [];\n\n for (var prop in obj) {\n if (hasOwnProperty.call(obj, prop)) {\n result.push(prop);\n }\n }\n\n if (hasDontEnumBug) {\n for (var i = 0; i < dontEnumsLength; i++) {\n if (hasOwnProperty.call(obj, dontEnums[i])) {\n result.push(dontEnums[i]);\n }\n }\n }\n return result;\n };\n }();\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create\nif (!_create2.default) {\n Object.create = function () {\n function F() {}\n\n return function (o) {\n if (arguments.length !== 1) {\n throw new Error('Object.create implementation only accepts one parameter.');\n }\n F.prototype = o;\n return new F();\n };\n }();\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FisArray\nif (!Array.isArray) {\n Array.isArray = function (vArg) {\n return Object.prototype.toString.call(vArg) === \"[object Array]\";\n };\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FindexOf\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement /*, fromIndex */) {\n if (this === null) {\n throw new TypeError();\n }\n var t = Object(this);\n var len = t.length >>> 0;\n\n if (len === 0) {\n return -1;\n }\n var n = 0;\n if (arguments.length > 1) {\n n = Number(arguments[1]);\n if (n !== n) {\n // shortcut for verifying if it's NaN\n n = 0;\n } else if (n !== 0 && n !== Infinity && n !== -Infinity) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n }\n if (n >= len) {\n return -1;\n }\n var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n for (; k < len; k++) {\n if (k in t && t[k] === searchElement) {\n return k;\n }\n }\n return -1;\n };\n}\n\n// Grungey Object.isFrozen hack\nif (!_isFrozen2.default) {\n Object.isFrozen = function (obj) {\n var key = \"tv4_test_frozen_key\";\n while (obj.hasOwnProperty(key)) {\n key += Math.random();\n }\n try {\n obj[key] = true;\n delete obj[key];\n return false;\n } catch (e) {\n return true;\n }\n };\n}\n// Based on: https://github.com/geraintluff/uri-templates, but with all the de-substitution stuff removed\n\nvar uriTemplateGlobalModifiers = {\n \"+\": true,\n \"#\": true,\n \".\": true,\n \"/\": true,\n \";\": true,\n \"?\": true,\n \"&\": true\n};\nvar uriTemplateSuffices = {\n \"*\": true\n};\n\nfunction notReallyPercentEncode(string) {\n return encodeURI(string).replace(/%25[0-9][0-9]/g, function (doubleEncoded) {\n return \"%\" + doubleEncoded.substring(3);\n });\n}\n\nfunction uriTemplateSubstitution(spec) {\n var modifier = \"\";\n if (uriTemplateGlobalModifiers[spec.charAt(0)]) {\n modifier = spec.charAt(0);\n spec = spec.substring(1);\n }\n var separator = \"\";\n var prefix = \"\";\n var shouldEscape = true;\n var showVariables = false;\n var trimEmptyString = false;\n if (modifier === '+') {\n shouldEscape = false;\n } else if (modifier === \".\") {\n prefix = \".\";\n separator = \".\";\n } else if (modifier === \"/\") {\n prefix = \"/\";\n separator = \"/\";\n } else if (modifier === '#') {\n prefix = \"#\";\n shouldEscape = false;\n } else if (modifier === ';') {\n prefix = \";\";\n separator = \";\";\n showVariables = true;\n trimEmptyString = true;\n } else if (modifier === '?') {\n prefix = \"?\";\n separator = \"&\";\n showVariables = true;\n } else if (modifier === '&') {\n prefix = \"&\";\n separator = \"&\";\n showVariables = true;\n }\n\n var varNames = [];\n var varList = spec.split(\",\");\n var varSpecs = [];\n var varSpecMap = {};\n for (var i = 0; i < varList.length; i++) {\n var varName = varList[i];\n var truncate = null;\n if (varName.indexOf(\":\") !== -1) {\n var parts = varName.split(\":\");\n varName = parts[0];\n truncate = parseInt(parts[1], 10);\n }\n var suffices = {};\n while (uriTemplateSuffices[varName.charAt(varName.length - 1)]) {\n suffices[varName.charAt(varName.length - 1)] = true;\n varName = varName.substring(0, varName.length - 1);\n }\n var varSpec = {\n truncate: truncate,\n name: varName,\n suffices: suffices\n };\n varSpecs.push(varSpec);\n varSpecMap[varName] = varSpec;\n varNames.push(varName);\n }\n var subFunction = function subFunction(valueFunction) {\n var result = \"\";\n var startIndex = 0;\n for (var i = 0; i < varSpecs.length; i++) {\n var varSpec = varSpecs[i];\n var value = valueFunction(varSpec.name);\n if (value === null || value === undefined || Array.isArray(value) && value.length === 0 || (typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) === 'object' && (0, _keys2.default)(value).length === 0) {\n startIndex++;\n continue;\n }\n if (i === startIndex) {\n result += prefix;\n } else {\n result += separator || \",\";\n }\n if (Array.isArray(value)) {\n if (showVariables) {\n result += varSpec.name + \"=\";\n }\n for (var j = 0; j < value.length; j++) {\n if (j > 0) {\n result += varSpec.suffices['*'] ? separator || \",\" : \",\";\n if (varSpec.suffices['*'] && showVariables) {\n result += varSpec.name + \"=\";\n }\n }\n result += shouldEscape ? encodeURIComponent(value[j]).replace(/!/g, \"%21\") : notReallyPercentEncode(value[j]);\n }\n } else if ((typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) === \"object\") {\n if (showVariables && !varSpec.suffices['*']) {\n result += varSpec.name + \"=\";\n }\n var first = true;\n for (var key in value) {\n if (!first) {\n result += varSpec.suffices['*'] ? separator || \",\" : \",\";\n }\n first = false;\n result += shouldEscape ? encodeURIComponent(key).replace(/!/g, \"%21\") : notReallyPercentEncode(key);\n result += varSpec.suffices['*'] ? '=' : \",\";\n result += shouldEscape ? encodeURIComponent(value[key]).replace(/!/g, \"%21\") : notReallyPercentEncode(value[key]);\n }\n } else {\n if (showVariables) {\n result += varSpec.name;\n if (!trimEmptyString || value !== \"\") {\n result += \"=\";\n }\n }\n if (varSpec.truncate != null) {\n value = value.substring(0, varSpec.truncate);\n }\n result += shouldEscape ? encodeURIComponent(value).replace(/!/g, \"%21\") : notReallyPercentEncode(value);\n }\n }\n return result;\n };\n subFunction.varNames = varNames;\n return {\n prefix: prefix,\n substitution: subFunction\n };\n}\n\nfunction UriTemplate(template) {\n if (!(this instanceof UriTemplate)) {\n return new UriTemplate(template);\n }\n var parts = template.split(\"{\");\n var textParts = [parts.shift()];\n var prefixes = [];\n var substitutions = [];\n var varNames = [];\n while (parts.length > 0) {\n var part = parts.shift();\n var spec = part.split(\"}\")[0];\n var remainder = part.substring(spec.length + 1);\n var funcs = uriTemplateSubstitution(spec);\n substitutions.push(funcs.substitution);\n prefixes.push(funcs.prefix);\n textParts.push(remainder);\n varNames = varNames.concat(funcs.substitution.varNames);\n }\n this.fill = function (valueFunction) {\n var result = textParts[0];\n for (var i = 0; i < substitutions.length; i++) {\n var substitution = substitutions[i];\n result += substitution(valueFunction);\n result += textParts[i + 1];\n }\n return result;\n };\n this.varNames = varNames;\n this.template = template;\n}\n\nUriTemplate.prototype = {\n toString: function toString() {\n return this.template;\n },\n fillFromObject: function fillFromObject(obj) {\n return this.fill(function (varName) {\n return obj[varName];\n });\n }\n};\nvar ValidatorContext = function ValidatorContext(parent, collectMultiple, errorReporter, checkRecursive, trackUnknownProperties) {\n this.missing = [];\n this.missingMap = {};\n this.formatValidators = parent ? (0, _create2.default)(parent.formatValidators) : {};\n this.schemas = parent ? (0, _create2.default)(parent.schemas) : {};\n this.collectMultiple = collectMultiple;\n this.errors = [];\n this.handleError = collectMultiple ? this.collectError : this.returnError;\n if (checkRecursive) {\n this.checkRecursive = true;\n this.scanned = [];\n this.scannedFrozen = [];\n this.scannedFrozenSchemas = [];\n this.scannedFrozenValidationErrors = [];\n this.validatedSchemasKey = 'tv4_validation_id';\n this.validationErrorsKey = 'tv4_validation_errors_id';\n }\n if (trackUnknownProperties) {\n this.trackUnknownProperties = true;\n this.knownPropertyPaths = {};\n this.unknownPropertyPaths = {};\n }\n this.errorReporter = errorReporter || defaultErrorReporter('en');\n if (typeof this.errorReporter === 'string') {\n throw new Error('debug');\n }\n this.definedKeywords = {};\n if (parent) {\n for (var key in parent.definedKeywords) {\n this.definedKeywords[key] = parent.definedKeywords[key].slice(0);\n }\n }\n};\nValidatorContext.prototype.defineKeyword = function (keyword, keywordFunction) {\n this.definedKeywords[keyword] = this.definedKeywords[keyword] || [];\n this.definedKeywords[keyword].push(keywordFunction);\n};\nValidatorContext.prototype.createError = function (code, messageParams, dataPath, schemaPath, subErrors, data, schema) {\n var error = new ValidationError(code, messageParams, dataPath, schemaPath, subErrors);\n error.message = this.errorReporter(error, data, schema);\n return error;\n};\nValidatorContext.prototype.returnError = function (error) {\n return error;\n};\nValidatorContext.prototype.collectError = function (error) {\n if (error) {\n this.errors.push(error);\n }\n return null;\n};\nValidatorContext.prototype.prefixErrors = function (startIndex, dataPath, schemaPath) {\n for (var i = startIndex; i < this.errors.length; i++) {\n this.errors[i] = this.errors[i].prefixWith(dataPath, schemaPath);\n }\n return this;\n};\nValidatorContext.prototype.banUnknownProperties = function (data, schema) {\n for (var unknownPath in this.unknownPropertyPaths) {\n var error = this.createError(ErrorCodes.UNKNOWN_PROPERTY, { path: unknownPath }, unknownPath, \"\", null, data, schema);\n var result = this.handleError(error);\n if (result) {\n return result;\n }\n }\n return null;\n};\n\nValidatorContext.prototype.addFormat = function (format, validator) {\n if ((typeof format === 'undefined' ? 'undefined' : (0, _typeof3.default)(format)) === 'object') {\n for (var key in format) {\n this.addFormat(key, format[key]);\n }\n return this;\n }\n this.formatValidators[format] = validator;\n};\nValidatorContext.prototype.resolveRefs = function (schema, urlHistory) {\n if (schema['$ref'] !== undefined) {\n urlHistory = urlHistory || {};\n if (urlHistory[schema['$ref']]) {\n return this.createError(ErrorCodes.CIRCULAR_REFERENCE, { urls: (0, _keys2.default)(urlHistory).join(', ') }, '', '', null, undefined, schema);\n }\n urlHistory[schema['$ref']] = true;\n schema = this.getSchema(schema['$ref'], urlHistory);\n }\n return schema;\n};\nValidatorContext.prototype.getSchema = function (url, urlHistory) {\n var schema;\n if (this.schemas[url] !== undefined) {\n schema = this.schemas[url];\n return this.resolveRefs(schema, urlHistory);\n }\n var baseUrl = url;\n var fragment = \"\";\n if (url.indexOf('#') !== -1) {\n fragment = url.substring(url.indexOf(\"#\") + 1);\n baseUrl = url.substring(0, url.indexOf(\"#\"));\n }\n if ((0, _typeof3.default)(this.schemas[baseUrl]) === 'object') {\n schema = this.schemas[baseUrl];\n var pointerPath = decodeURIComponent(fragment);\n if (pointerPath === \"\") {\n return this.resolveRefs(schema, urlHistory);\n } else if (pointerPath.charAt(0) !== \"/\") {\n return undefined;\n }\n var parts = pointerPath.split(\"/\").slice(1);\n for (var i = 0; i < parts.length; i++) {\n var component = parts[i].replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n if (schema[component] === undefined) {\n schema = undefined;\n break;\n }\n schema = schema[component];\n }\n if (schema !== undefined) {\n return this.resolveRefs(schema, urlHistory);\n }\n }\n if (this.missing[baseUrl] === undefined) {\n this.missing.push(baseUrl);\n this.missing[baseUrl] = baseUrl;\n this.missingMap[baseUrl] = baseUrl;\n }\n};\nValidatorContext.prototype.searchSchemas = function (schema, url) {\n if (Array.isArray(schema)) {\n for (var i = 0; i < schema.length; i++) {\n this.searchSchemas(schema[i], url);\n }\n } else if (schema && (typeof schema === 'undefined' ? 'undefined' : (0, _typeof3.default)(schema)) === \"object\") {\n if (typeof schema.id === \"string\") {\n if (isTrustedUrl(url, schema.id)) {\n if (this.schemas[schema.id] === undefined) {\n this.schemas[schema.id] = schema;\n }\n }\n }\n for (var key in schema) {\n if (key !== \"enum\") {\n if ((0, _typeof3.default)(schema[key]) === \"object\") {\n this.searchSchemas(schema[key], url);\n } else if (key === \"$ref\") {\n var uri = getDocumentUri(schema[key]);\n if (uri && this.schemas[uri] === undefined && this.missingMap[uri] === undefined) {\n this.missingMap[uri] = uri;\n }\n }\n }\n }\n }\n};\nValidatorContext.prototype.addSchema = function (url, schema) {\n //overload\n if (typeof url !== 'string' || typeof schema === 'undefined') {\n if ((typeof url === 'undefined' ? 'undefined' : (0, _typeof3.default)(url)) === 'object' && typeof url.id === 'string') {\n schema = url;\n url = schema.id;\n } else {\n return;\n }\n }\n if (url === getDocumentUri(url) + \"#\") {\n // Remove empty fragment\n url = getDocumentUri(url);\n }\n this.schemas[url] = schema;\n delete this.missingMap[url];\n normSchema(schema, url);\n this.searchSchemas(schema, url);\n};\n\nValidatorContext.prototype.getSchemaMap = function () {\n var map = {};\n for (var key in this.schemas) {\n map[key] = this.schemas[key];\n }\n return map;\n};\n\nValidatorContext.prototype.getSchemaUris = function (filterRegExp) {\n var list = [];\n for (var key in this.schemas) {\n if (!filterRegExp || filterRegExp.test(key)) {\n list.push(key);\n }\n }\n return list;\n};\n\nValidatorContext.prototype.getMissingUris = function (filterRegExp) {\n var list = [];\n for (var key in this.missingMap) {\n if (!filterRegExp || filterRegExp.test(key)) {\n list.push(key);\n }\n }\n return list;\n};\n\nValidatorContext.prototype.dropSchemas = function () {\n this.schemas = {};\n this.reset();\n};\nValidatorContext.prototype.reset = function () {\n this.missing = [];\n this.missingMap = {};\n this.errors = [];\n};\n\nValidatorContext.prototype.validateAll = function (data, schema, dataPathParts, schemaPathParts, dataPointerPath) {\n var topLevel;\n schema = this.resolveRefs(schema);\n if (!schema) {\n return null;\n } else if (schema instanceof ValidationError) {\n this.errors.push(schema);\n return schema;\n }\n\n var startErrorCount = this.errors.length;\n var frozenIndex,\n scannedFrozenSchemaIndex = null,\n scannedSchemasIndex = null;\n if (this.checkRecursive && data && (typeof data === 'undefined' ? 'undefined' : (0, _typeof3.default)(data)) === 'object') {\n topLevel = !this.scanned.length;\n if (data[this.validatedSchemasKey]) {\n var schemaIndex = data[this.validatedSchemasKey].indexOf(schema);\n if (schemaIndex !== -1) {\n this.errors = this.errors.concat(data[this.validationErrorsKey][schemaIndex]);\n return null;\n }\n }\n if ((0, _isFrozen2.default)(data)) {\n frozenIndex = this.scannedFrozen.indexOf(data);\n if (frozenIndex !== -1) {\n var frozenSchemaIndex = this.scannedFrozenSchemas[frozenIndex].indexOf(schema);\n if (frozenSchemaIndex !== -1) {\n this.errors = this.errors.concat(this.scannedFrozenValidationErrors[frozenIndex][frozenSchemaIndex]);\n return null;\n }\n }\n }\n this.scanned.push(data);\n if ((0, _isFrozen2.default)(data)) {\n if (frozenIndex === -1) {\n frozenIndex = this.scannedFrozen.length;\n this.scannedFrozen.push(data);\n this.scannedFrozenSchemas.push([]);\n }\n scannedFrozenSchemaIndex = this.scannedFrozenSchemas[frozenIndex].length;\n this.scannedFrozenSchemas[frozenIndex][scannedFrozenSchemaIndex] = schema;\n this.scannedFrozenValidationErrors[frozenIndex][scannedFrozenSchemaIndex] = [];\n } else {\n if (!data[this.validatedSchemasKey]) {\n try {\n (0, _defineProperty2.default)(data, this.validatedSchemasKey, {\n value: [],\n configurable: true\n });\n (0, _defineProperty2.default)(data, this.validationErrorsKey, {\n value: [],\n configurable: true\n });\n } catch (e) {\n //IE 7/8 workaround\n data[this.validatedSchemasKey] = [];\n data[this.validationErrorsKey] = [];\n }\n }\n scannedSchemasIndex = data[this.validatedSchemasKey].length;\n data[this.validatedSchemasKey][scannedSchemasIndex] = schema;\n data[this.validationErrorsKey][scannedSchemasIndex] = [];\n }\n }\n\n var errorCount = this.errors.length;\n var error = this.validateBasic(data, schema, dataPointerPath) || this.validateNumeric(data, schema, dataPointerPath) || this.validateString(data, schema, dataPointerPath) || this.validateArray(data, schema, dataPointerPath) || this.validateObject(data, schema, dataPointerPath) || this.validateCombinations(data, schema, dataPointerPath) || this.validateHypermedia(data, schema, dataPointerPath) || this.validateFormat(data, schema, dataPointerPath) || this.validateDefinedKeywords(data, schema, dataPointerPath) || null;\n\n if (topLevel) {\n while (this.scanned.length) {\n var item = this.scanned.pop();\n delete item[this.validatedSchemasKey];\n }\n this.scannedFrozen = [];\n this.scannedFrozenSchemas = [];\n }\n\n if (error || errorCount !== this.errors.length) {\n while (dataPathParts && dataPathParts.length || schemaPathParts && schemaPathParts.length) {\n var dataPart = dataPathParts && dataPathParts.length ? \"\" + dataPathParts.pop() : null;\n var schemaPart = schemaPathParts && schemaPathParts.length ? \"\" + schemaPathParts.pop() : null;\n if (error) {\n error = error.prefixWith(dataPart, schemaPart);\n }\n this.prefixErrors(errorCount, dataPart, schemaPart);\n }\n }\n\n if (scannedFrozenSchemaIndex !== null) {\n this.scannedFrozenValidationErrors[frozenIndex][scannedFrozenSchemaIndex] = this.errors.slice(startErrorCount);\n } else if (scannedSchemasIndex !== null) {\n data[this.validationErrorsKey][scannedSchemasIndex] = this.errors.slice(startErrorCount);\n }\n\n return this.handleError(error);\n};\nValidatorContext.prototype.validateFormat = function (data, schema) {\n if (typeof schema.format !== 'string' || !this.formatValidators[schema.format]) {\n return null;\n }\n var errorMessage = this.formatValidators[schema.format].call(null, data, schema);\n if (typeof errorMessage === 'string' || typeof errorMessage === 'number') {\n return this.createError(ErrorCodes.FORMAT_CUSTOM, { message: errorMessage }, '', '/format', null, data, schema);\n } else if (errorMessage && (typeof errorMessage === 'undefined' ? 'undefined' : (0, _typeof3.default)(errorMessage)) === 'object') {\n return this.createError(ErrorCodes.FORMAT_CUSTOM, { message: errorMessage.message || \"?\" }, errorMessage.dataPath || '', errorMessage.schemaPath || \"/format\", null, data, schema);\n }\n return null;\n};\nValidatorContext.prototype.validateDefinedKeywords = function (data, schema, dataPointerPath) {\n for (var key in this.definedKeywords) {\n if (typeof schema[key] === 'undefined') {\n continue;\n }\n var validationFunctions = this.definedKeywords[key];\n for (var i = 0; i < validationFunctions.length; i++) {\n var func = validationFunctions[i];\n var result = func(data, schema[key], schema, dataPointerPath);\n if (typeof result === 'string' || typeof result === 'number') {\n return this.createError(ErrorCodes.KEYWORD_CUSTOM, {\n key: key,\n message: result\n }, '', '', null, data, schema).prefixWith(null, key);\n } else if (result && (typeof result === 'undefined' ? 'undefined' : (0, _typeof3.default)(result)) === 'object') {\n var code = result.code;\n if (typeof code === 'string') {\n if (!ErrorCodes[code]) {\n throw new Error('Undefined error code (use defineError): ' + code);\n }\n code = ErrorCodes[code];\n } else if (typeof code !== 'number') {\n code = ErrorCodes.KEYWORD_CUSTOM;\n }\n var messageParams = (0, _typeof3.default)(result.message) === 'object' ? result.message : {\n key: key,\n message: result.message || \"?\"\n };\n var schemaPath = result.schemaPath || \"/\" + key.replace(/~/g, '~0').replace(/\\//g, '~1');\n return this.createError(code, messageParams, result.dataPath || null, schemaPath, null, data, schema);\n }\n }\n }\n return null;\n};\n\nfunction recursiveCompare(A, B) {\n if (A === B) {\n return true;\n }\n if (A && B && (typeof A === 'undefined' ? 'undefined' : (0, _typeof3.default)(A)) === \"object\" && (typeof B === 'undefined' ? 'undefined' : (0, _typeof3.default)(B)) === \"object\") {\n if (Array.isArray(A) !== Array.isArray(B)) {\n return false;\n } else if (Array.isArray(A)) {\n if (A.length !== B.length) {\n return false;\n }\n for (var i = 0; i < A.length; i++) {\n if (!recursiveCompare(A[i], B[i])) {\n return false;\n }\n }\n } else {\n var key;\n for (key in A) {\n if (B[key] === undefined && A[key] !== undefined) {\n return false;\n }\n }\n for (key in B) {\n if (A[key] === undefined && B[key] !== undefined) {\n return false;\n }\n }\n for (key in A) {\n if (!recursiveCompare(A[key], B[key])) {\n return false;\n }\n }\n }\n return true;\n }\n return false;\n}\n\nValidatorContext.prototype.validateBasic = function validateBasic(data, schema, dataPointerPath) {\n var error;\n if (error = this.validateType(data, schema, dataPointerPath)) {\n return error.prefixWith(null, \"type\");\n }\n if (error = this.validateEnum(data, schema, dataPointerPath)) {\n return error.prefixWith(null, \"type\");\n }\n return null;\n};\n\nValidatorContext.prototype.validateType = function validateType(data, schema) {\n if (schema.type === undefined) {\n return null;\n }\n var dataType = typeof data === 'undefined' ? 'undefined' : (0, _typeof3.default)(data);\n if (data === null) {\n dataType = \"null\";\n } else if (Array.isArray(data)) {\n dataType = \"array\";\n }\n var allowedTypes = schema.type;\n if (!Array.isArray(allowedTypes)) {\n allowedTypes = [allowedTypes];\n }\n\n for (var i = 0; i < allowedTypes.length; i++) {\n var type = allowedTypes[i];\n if (type === dataType || type === \"integer\" && dataType === \"number\" && data % 1 === 0) {\n return null;\n }\n }\n return this.createError(ErrorCodes.INVALID_TYPE, {\n type: dataType,\n expected: allowedTypes.join(\"/\")\n }, '', '', null, data, schema);\n};\n\nValidatorContext.prototype.validateEnum = function validateEnum(data, schema) {\n if (schema[\"enum\"] === undefined) {\n return null;\n }\n for (var i = 0; i < schema[\"enum\"].length; i++) {\n var enumVal = schema[\"enum\"][i];\n if (recursiveCompare(data, enumVal)) {\n return null;\n }\n }\n return this.createError(ErrorCodes.ENUM_MISMATCH, { value: typeof JSON !== 'undefined' ? (0, _stringify2.default)(data) : data }, '', '', null, data, schema);\n};\n\nValidatorContext.prototype.validateNumeric = function validateNumeric(data, schema, dataPointerPath) {\n return this.validateMultipleOf(data, schema, dataPointerPath) || this.validateMinMax(data, schema, dataPointerPath) || this.validateNaN(data, schema, dataPointerPath) || null;\n};\n\nvar CLOSE_ENOUGH_LOW = Math.pow(2, -51);\nvar CLOSE_ENOUGH_HIGH = 1 - CLOSE_ENOUGH_LOW;\nValidatorContext.prototype.validateMultipleOf = function validateMultipleOf(data, schema) {\n var multipleOf = schema.multipleOf || schema.divisibleBy;\n if (multipleOf === undefined) {\n return null;\n }\n if (typeof data === \"number\") {\n var remainder = data / multipleOf % 1;\n if (remainder >= CLOSE_ENOUGH_LOW && remainder < CLOSE_ENOUGH_HIGH) {\n return this.createError(ErrorCodes.NUMBER_MULTIPLE_OF, {\n value: data,\n multipleOf: multipleOf\n }, '', '', null, data, schema);\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateMinMax = function validateMinMax(data, schema) {\n if (typeof data !== \"number\") {\n return null;\n }\n if (schema.minimum !== undefined) {\n if (data < schema.minimum) {\n return this.createError(ErrorCodes.NUMBER_MINIMUM, {\n value: data,\n minimum: schema.minimum\n }, '', '/minimum', null, data, schema);\n }\n if (schema.exclusiveMinimum && data === schema.minimum) {\n return this.createError(ErrorCodes.NUMBER_MINIMUM_EXCLUSIVE, {\n value: data,\n minimum: schema.minimum\n }, '', '/exclusiveMinimum', null, data, schema);\n }\n }\n if (schema.maximum !== undefined) {\n if (data > schema.maximum) {\n return this.createError(ErrorCodes.NUMBER_MAXIMUM, {\n value: data,\n maximum: schema.maximum\n }, '', '/maximum', null, data, schema);\n }\n if (schema.exclusiveMaximum && data === schema.maximum) {\n return this.createError(ErrorCodes.NUMBER_MAXIMUM_EXCLUSIVE, {\n value: data,\n maximum: schema.maximum\n }, '', '/exclusiveMaximum', null, data, schema);\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateNaN = function validateNaN(data, schema) {\n if (typeof data !== \"number\") {\n return null;\n }\n if (isNaN(data) === true || data === Infinity || data === -Infinity) {\n return this.createError(ErrorCodes.NUMBER_NOT_A_NUMBER, { value: data }, '', '/type', null, data, schema);\n }\n return null;\n};\n\nValidatorContext.prototype.validateString = function validateString(data, schema, dataPointerPath) {\n return this.validateStringLength(data, schema, dataPointerPath) || this.validateStringPattern(data, schema, dataPointerPath) || null;\n};\n\nValidatorContext.prototype.validateStringLength = function validateStringLength(data, schema) {\n if (typeof data !== \"string\") {\n return null;\n }\n if (schema.minLength !== undefined) {\n if (data.length < schema.minLength) {\n return this.createError(ErrorCodes.STRING_LENGTH_SHORT, {\n length: data.length,\n minimum: schema.minLength\n }, '', '/minLength', null, data, schema);\n }\n }\n if (schema.maxLength !== undefined) {\n if (data.length > schema.maxLength) {\n return this.createError(ErrorCodes.STRING_LENGTH_LONG, {\n length: data.length,\n maximum: schema.maxLength\n }, '', '/maxLength', null, data, schema);\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateStringPattern = function validateStringPattern(data, schema) {\n if (typeof data !== \"string\" || typeof schema.pattern !== \"string\" && !(schema.pattern instanceof RegExp)) {\n return null;\n }\n var regexp;\n if (schema.pattern instanceof RegExp) {\n regexp = schema.pattern;\n } else {\n var body,\n flags = '';\n // Check for regular expression literals\n // @see http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5\n var literal = schema.pattern.match(/^\\/(.+)\\/([img]*)$/);\n if (literal) {\n body = literal[1];\n flags = literal[2];\n } else {\n body = schema.pattern;\n }\n regexp = new RegExp(body, flags);\n }\n if (!regexp.test(data)) {\n return this.createError(ErrorCodes.STRING_PATTERN, { pattern: schema.pattern }, '', '/pattern', null, data, schema);\n }\n return null;\n};\n\nValidatorContext.prototype.validateArray = function validateArray(data, schema, dataPointerPath) {\n if (!Array.isArray(data)) {\n return null;\n }\n return this.validateArrayLength(data, schema, dataPointerPath) || this.validateArrayUniqueItems(data, schema, dataPointerPath) || this.validateArrayItems(data, schema, dataPointerPath) || null;\n};\n\nValidatorContext.prototype.validateArrayLength = function validateArrayLength(data, schema) {\n var error;\n if (schema.minItems !== undefined) {\n if (data.length < schema.minItems) {\n error = this.createError(ErrorCodes.ARRAY_LENGTH_SHORT, {\n length: data.length,\n minimum: schema.minItems\n }, '', '/minItems', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n if (schema.maxItems !== undefined) {\n if (data.length > schema.maxItems) {\n error = this.createError(ErrorCodes.ARRAY_LENGTH_LONG, {\n length: data.length,\n maximum: schema.maxItems\n }, '', '/maxItems', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateArrayUniqueItems = function validateArrayUniqueItems(data, schema) {\n if (schema.uniqueItems) {\n for (var i = 0; i < data.length; i++) {\n for (var j = i + 1; j < data.length; j++) {\n if (recursiveCompare(data[i], data[j])) {\n var error = this.createError(ErrorCodes.ARRAY_UNIQUE, {\n match1: i,\n match2: j\n }, '', '/uniqueItems', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateArrayItems = function validateArrayItems(data, schema, dataPointerPath) {\n if (schema.items === undefined) {\n return null;\n }\n var error, i;\n if (Array.isArray(schema.items)) {\n for (i = 0; i < data.length; i++) {\n if (i < schema.items.length) {\n if (error = this.validateAll(data[i], schema.items[i], [i], [\"items\", i], dataPointerPath + \"/\" + i)) {\n return error;\n }\n } else if (schema.additionalItems !== undefined) {\n if (typeof schema.additionalItems === \"boolean\") {\n if (!schema.additionalItems) {\n error = this.createError(ErrorCodes.ARRAY_ADDITIONAL_ITEMS, {}, '/' + i, '/additionalItems', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n } else if (error = this.validateAll(data[i], schema.additionalItems, [i], [\"additionalItems\"], dataPointerPath + \"/\" + i)) {\n return error;\n }\n }\n }\n } else {\n for (i = 0; i < data.length; i++) {\n if (error = this.validateAll(data[i], schema.items, [i], [\"items\"], dataPointerPath + \"/\" + i)) {\n return error;\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateObject = function validateObject(data, schema, dataPointerPath) {\n if ((typeof data === 'undefined' ? 'undefined' : (0, _typeof3.default)(data)) !== \"object\" || data === null || Array.isArray(data)) {\n return null;\n }\n return this.validateObjectMinMaxProperties(data, schema, dataPointerPath) || this.validateObjectRequiredProperties(data, schema, dataPointerPath) || this.validateObjectProperties(data, schema, dataPointerPath) || this.validateObjectDependencies(data, schema, dataPointerPath) || null;\n};\n\nValidatorContext.prototype.validateObjectMinMaxProperties = function validateObjectMinMaxProperties(data, schema) {\n var keys = (0, _keys2.default)(data);\n var error;\n if (schema.minProperties !== undefined) {\n if (keys.length < schema.minProperties) {\n error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MINIMUM, {\n propertyCount: keys.length,\n minimum: schema.minProperties\n }, '', '/minProperties', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n if (schema.maxProperties !== undefined) {\n if (keys.length > schema.maxProperties) {\n error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MAXIMUM, {\n propertyCount: keys.length,\n maximum: schema.maxProperties\n }, '', '/maxProperties', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateObjectRequiredProperties = function validateObjectRequiredProperties(data, schema) {\n if (schema.required !== undefined) {\n for (var i = 0; i < schema.required.length; i++) {\n var key = schema.required[i];\n if (data[key] === undefined) {\n var error = this.createError(ErrorCodes.OBJECT_REQUIRED, { key: key }, '', '/required/' + i, null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateObjectProperties = function validateObjectProperties(data, schema, dataPointerPath) {\n var error;\n for (var key in data) {\n var keyPointerPath = dataPointerPath + \"/\" + key.replace(/~/g, '~0').replace(/\\//g, '~1');\n var foundMatch = false;\n if (schema.properties !== undefined && schema.properties[key] !== undefined) {\n foundMatch = true;\n if (error = this.validateAll(data[key], schema.properties[key], [key], [\"properties\", key], keyPointerPath)) {\n return error;\n }\n }\n if (schema.patternProperties !== undefined) {\n for (var patternKey in schema.patternProperties) {\n var regexp = new RegExp(patternKey);\n if (regexp.test(key)) {\n foundMatch = true;\n if (error = this.validateAll(data[key], schema.patternProperties[patternKey], [key], [\"patternProperties\", patternKey], keyPointerPath)) {\n return error;\n }\n }\n }\n }\n if (!foundMatch) {\n if (schema.additionalProperties !== undefined) {\n if (this.trackUnknownProperties) {\n this.knownPropertyPaths[keyPointerPath] = true;\n delete this.unknownPropertyPaths[keyPointerPath];\n }\n if (typeof schema.additionalProperties === \"boolean\") {\n if (!schema.additionalProperties) {\n error = this.createError(ErrorCodes.OBJECT_ADDITIONAL_PROPERTIES, { key: key }, '', '/additionalProperties', null, data, schema).prefixWith(key, null);\n if (this.handleError(error)) {\n return error;\n }\n }\n } else {\n if (error = this.validateAll(data[key], schema.additionalProperties, [key], [\"additionalProperties\"], keyPointerPath)) {\n return error;\n }\n }\n } else if (this.trackUnknownProperties && !this.knownPropertyPaths[keyPointerPath]) {\n this.unknownPropertyPaths[keyPointerPath] = true;\n }\n } else if (this.trackUnknownProperties) {\n this.knownPropertyPaths[keyPointerPath] = true;\n delete this.unknownPropertyPaths[keyPointerPath];\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateObjectDependencies = function validateObjectDependencies(data, schema, dataPointerPath) {\n var error;\n if (schema.dependencies !== undefined) {\n for (var depKey in schema.dependencies) {\n if (data[depKey] !== undefined) {\n var dep = schema.dependencies[depKey];\n if (typeof dep === \"string\") {\n if (data[dep] === undefined) {\n error = this.createError(ErrorCodes.OBJECT_DEPENDENCY_KEY, {\n key: depKey,\n missing: dep\n }, '', '', null, data, schema).prefixWith(null, depKey).prefixWith(null, \"dependencies\");\n if (this.handleError(error)) {\n return error;\n }\n }\n } else if (Array.isArray(dep)) {\n for (var i = 0; i < dep.length; i++) {\n var requiredKey = dep[i];\n if (data[requiredKey] === undefined) {\n error = this.createError(ErrorCodes.OBJECT_DEPENDENCY_KEY, {\n key: depKey,\n missing: requiredKey\n }, '', '/' + i, null, data, schema).prefixWith(null, depKey).prefixWith(null, \"dependencies\");\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n } else {\n if (error = this.validateAll(data, dep, [], [\"dependencies\", depKey], dataPointerPath)) {\n return error;\n }\n }\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateCombinations = function validateCombinations(data, schema, dataPointerPath) {\n return this.validateAllOf(data, schema, dataPointerPath) || this.validateAnyOf(data, schema, dataPointerPath) || this.validateOneOf(data, schema, dataPointerPath) || this.validateNot(data, schema, dataPointerPath) || null;\n};\n\nValidatorContext.prototype.validateAllOf = function validateAllOf(data, schema, dataPointerPath) {\n if (schema.allOf === undefined) {\n return null;\n }\n var error;\n for (var i = 0; i < schema.allOf.length; i++) {\n var subSchema = schema.allOf[i];\n if (error = this.validateAll(data, subSchema, [], [\"allOf\", i], dataPointerPath)) {\n return error;\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateAnyOf = function validateAnyOf(data, schema, dataPointerPath) {\n if (schema.anyOf === undefined) {\n return null;\n }\n var errors = [];\n var startErrorCount = this.errors.length;\n var oldUnknownPropertyPaths, oldKnownPropertyPaths;\n if (this.trackUnknownProperties) {\n oldUnknownPropertyPaths = this.unknownPropertyPaths;\n oldKnownPropertyPaths = this.knownPropertyPaths;\n }\n var errorAtEnd = true;\n for (var i = 0; i < schema.anyOf.length; i++) {\n if (this.trackUnknownProperties) {\n this.unknownPropertyPaths = {};\n this.knownPropertyPaths = {};\n }\n var subSchema = schema.anyOf[i];\n\n var errorCount = this.errors.length;\n var error = this.validateAll(data, subSchema, [], [\"anyOf\", i], dataPointerPath);\n\n if (error === null && errorCount === this.errors.length) {\n this.errors = this.errors.slice(0, startErrorCount);\n\n if (this.trackUnknownProperties) {\n for (var knownKey in this.knownPropertyPaths) {\n oldKnownPropertyPaths[knownKey] = true;\n delete oldUnknownPropertyPaths[knownKey];\n }\n for (var unknownKey in this.unknownPropertyPaths) {\n if (!oldKnownPropertyPaths[unknownKey]) {\n oldUnknownPropertyPaths[unknownKey] = true;\n }\n }\n // We need to continue looping so we catch all the property definitions, but we don't want to return an error\n errorAtEnd = false;\n continue;\n }\n\n return null;\n }\n if (error) {\n errors.push(error.prefixWith(null, \"\" + i).prefixWith(null, \"anyOf\"));\n }\n }\n if (this.trackUnknownProperties) {\n this.unknownPropertyPaths = oldUnknownPropertyPaths;\n this.knownPropertyPaths = oldKnownPropertyPaths;\n }\n if (errorAtEnd) {\n errors = errors.concat(this.errors.slice(startErrorCount));\n this.errors = this.errors.slice(0, startErrorCount);\n return this.createError(ErrorCodes.ANY_OF_MISSING, {}, \"\", \"/anyOf\", errors, data, schema);\n }\n};\n\nValidatorContext.prototype.validateOneOf = function validateOneOf(data, schema, dataPointerPath) {\n if (schema.oneOf === undefined) {\n return null;\n }\n var validIndex = null;\n var errors = [];\n var startErrorCount = this.errors.length;\n var oldUnknownPropertyPaths, oldKnownPropertyPaths;\n if (this.trackUnknownProperties) {\n oldUnknownPropertyPaths = this.unknownPropertyPaths;\n oldKnownPropertyPaths = this.knownPropertyPaths;\n }\n for (var i = 0; i < schema.oneOf.length; i++) {\n if (this.trackUnknownProperties) {\n this.unknownPropertyPaths = {};\n this.knownPropertyPaths = {};\n }\n var subSchema = schema.oneOf[i];\n\n var errorCount = this.errors.length;\n var error = this.validateAll(data, subSchema, [], [\"oneOf\", i], dataPointerPath);\n\n if (error === null && errorCount === this.errors.length) {\n if (validIndex === null) {\n validIndex = i;\n } else {\n this.errors = this.errors.slice(0, startErrorCount);\n return this.createError(ErrorCodes.ONE_OF_MULTIPLE, {\n index1: validIndex,\n index2: i\n }, \"\", \"/oneOf\", null, data, schema);\n }\n if (this.trackUnknownProperties) {\n for (var knownKey in this.knownPropertyPaths) {\n oldKnownPropertyPaths[knownKey] = true;\n delete oldUnknownPropertyPaths[knownKey];\n }\n for (var unknownKey in this.unknownPropertyPaths) {\n if (!oldKnownPropertyPaths[unknownKey]) {\n oldUnknownPropertyPaths[unknownKey] = true;\n }\n }\n }\n } else if (error) {\n errors.push(error);\n }\n }\n if (this.trackUnknownProperties) {\n this.unknownPropertyPaths = oldUnknownPropertyPaths;\n this.knownPropertyPaths = oldKnownPropertyPaths;\n }\n if (validIndex === null) {\n errors = errors.concat(this.errors.slice(startErrorCount));\n this.errors = this.errors.slice(0, startErrorCount);\n return this.createError(ErrorCodes.ONE_OF_MISSING, {}, \"\", \"/oneOf\", errors, data, schema);\n } else {\n this.errors = this.errors.slice(0, startErrorCount);\n }\n return null;\n};\n\nValidatorContext.prototype.validateNot = function validateNot(data, schema, dataPointerPath) {\n if (schema.not === undefined) {\n return null;\n }\n var oldErrorCount = this.errors.length;\n var oldUnknownPropertyPaths, oldKnownPropertyPaths;\n if (this.trackUnknownProperties) {\n oldUnknownPropertyPaths = this.unknownPropertyPaths;\n oldKnownPropertyPaths = this.knownPropertyPaths;\n this.unknownPropertyPaths = {};\n this.knownPropertyPaths = {};\n }\n var error = this.validateAll(data, schema.not, null, null, dataPointerPath);\n var notErrors = this.errors.slice(oldErrorCount);\n this.errors = this.errors.slice(0, oldErrorCount);\n if (this.trackUnknownProperties) {\n this.unknownPropertyPaths = oldUnknownPropertyPaths;\n this.knownPropertyPaths = oldKnownPropertyPaths;\n }\n if (error === null && notErrors.length === 0) {\n return this.createError(ErrorCodes.NOT_PASSED, {}, \"\", \"/not\", null, data, schema);\n }\n return null;\n};\n\nValidatorContext.prototype.validateHypermedia = function validateCombinations(data, schema, dataPointerPath) {\n if (!schema.links) {\n return null;\n }\n var error;\n for (var i = 0; i < schema.links.length; i++) {\n var ldo = schema.links[i];\n if (ldo.rel === \"describedby\") {\n var template = new UriTemplate(ldo.href);\n var allPresent = true;\n for (var j = 0; j < template.varNames.length; j++) {\n if (!(template.varNames[j] in data)) {\n allPresent = false;\n break;\n }\n }\n if (allPresent) {\n var schemaUrl = template.fillFromObject(data);\n var subSchema = { \"$ref\": schemaUrl };\n if (error = this.validateAll(data, subSchema, [], [\"links\", i], dataPointerPath)) {\n return error;\n }\n }\n }\n }\n};\n\n// parseURI() and resolveUrl() are from https://gist.github.com/1088850\n// - released as public domain by author (\"Yaffle\") - see comments on gist\n\nfunction parseURI(url) {\n var m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n // authority = '//' + user + ':' + pass '@' + hostname + ':' port\n return m ? {\n href: m[0] || '',\n protocol: m[1] || '',\n authority: m[2] || '',\n host: m[3] || '',\n hostname: m[4] || '',\n port: m[5] || '',\n pathname: m[6] || '',\n search: m[7] || '',\n hash: m[8] || ''\n } : null;\n}\n\nfunction resolveUrl(base, href) {\n // RFC 3986\n\n function removeDotSegments(input) {\n var output = [];\n input.replace(/^(\\.\\.?(\\/|$))+/, '').replace(/\\/(\\.(\\/|$))+/g, '/').replace(/\\/\\.\\.$/, '/../').replace(/\\/?[^\\/]*/g, function (p) {\n if (p === '/..') {\n output.pop();\n } else {\n output.push(p);\n }\n });\n return output.join('').replace(/^\\//, input.charAt(0) === '/' ? '/' : '');\n }\n\n href = parseURI(href || '');\n base = parseURI(base || '');\n\n return !href || !base ? null : (href.protocol || base.protocol) + (href.protocol || href.authority ? href.authority : base.authority) + removeDotSegments(href.protocol || href.authority || href.pathname.charAt(0) === '/' ? href.pathname : href.pathname ? (base.authority && !base.pathname ? '/' : '') + base.pathname.slice(0, base.pathname.lastIndexOf('/') + 1) + href.pathname : base.pathname) + (href.protocol || href.authority || href.pathname ? href.search : href.search || base.search) + href.hash;\n}\n\nfunction getDocumentUri(uri) {\n return uri.split('#')[0];\n}\n\nfunction normSchema(schema, baseUri) {\n if (schema && (typeof schema === 'undefined' ? 'undefined' : (0, _typeof3.default)(schema)) === \"object\") {\n if (baseUri === undefined) {\n baseUri = schema.id;\n } else if (typeof schema.id === \"string\") {\n baseUri = resolveUrl(baseUri, schema.id);\n schema.id = baseUri;\n }\n if (Array.isArray(schema)) {\n for (var i = 0; i < schema.length; i++) {\n normSchema(schema[i], baseUri);\n }\n } else {\n if (typeof schema['$ref'] === \"string\") {\n schema['$ref'] = resolveUrl(baseUri, schema['$ref']);\n }\n for (var key in schema) {\n if (key !== \"enum\") {\n normSchema(schema[key], baseUri);\n }\n }\n }\n }\n}\n\nfunction defaultErrorReporter(language) {\n language = language || 'en';\n\n var errorMessages = languages[language];\n\n return function (error) {\n var messageTemplate = errorMessages[error.code] || ErrorMessagesDefault[error.code];\n if (typeof messageTemplate !== 'string') {\n return \"Unknown error code \" + error.code + \": \" + (0, _stringify2.default)(error.messageParams);\n }\n var messageParams = error.params;\n // Adapted from Crockford's supplant()\n return messageTemplate.replace(/\\{([^{}]*)\\}/g, function (whole, varName) {\n var subValue = messageParams[varName];\n return typeof subValue === 'string' || typeof subValue === 'number' ? subValue : whole;\n });\n };\n}\n\nvar ErrorCodes = {\n INVALID_TYPE: 0,\n ENUM_MISMATCH: 1,\n ANY_OF_MISSING: 10,\n ONE_OF_MISSING: 11,\n ONE_OF_MULTIPLE: 12,\n NOT_PASSED: 13,\n // Numeric errors\n NUMBER_MULTIPLE_OF: 100,\n NUMBER_MINIMUM: 101,\n NUMBER_MINIMUM_EXCLUSIVE: 102,\n NUMBER_MAXIMUM: 103,\n NUMBER_MAXIMUM_EXCLUSIVE: 104,\n NUMBER_NOT_A_NUMBER: 105,\n // String errors\n STRING_LENGTH_SHORT: 200,\n STRING_LENGTH_LONG: 201,\n STRING_PATTERN: 202,\n // Object errors\n OBJECT_PROPERTIES_MINIMUM: 300,\n OBJECT_PROPERTIES_MAXIMUM: 301,\n OBJECT_REQUIRED: 302,\n OBJECT_ADDITIONAL_PROPERTIES: 303,\n OBJECT_DEPENDENCY_KEY: 304,\n // Array errors\n ARRAY_LENGTH_SHORT: 400,\n ARRAY_LENGTH_LONG: 401,\n ARRAY_UNIQUE: 402,\n ARRAY_ADDITIONAL_ITEMS: 403,\n // Custom/user-defined errors\n FORMAT_CUSTOM: 500,\n KEYWORD_CUSTOM: 501,\n // Schema structure\n CIRCULAR_REFERENCE: 600,\n // Non-standard validation options\n UNKNOWN_PROPERTY: 1000\n};\nvar ErrorCodeLookup = {};\nfor (var key in ErrorCodes) {\n ErrorCodeLookup[ErrorCodes[key]] = key;\n}\nvar ErrorMessagesDefault = {\n INVALID_TYPE: \"Invalid type: {type} (expected {expected})\",\n ENUM_MISMATCH: \"No enum match for: {value}\",\n ANY_OF_MISSING: \"Data does not match any schemas from \\\"anyOf\\\"\",\n ONE_OF_MISSING: \"Data does not match any schemas from \\\"oneOf\\\"\",\n ONE_OF_MULTIPLE: \"Data is valid against more than one schema from \\\"oneOf\\\": indices {index1} and {index2}\",\n NOT_PASSED: \"Data matches schema from \\\"not\\\"\",\n // Numeric errors\n NUMBER_MULTIPLE_OF: \"Value {value} is not a multiple of {multipleOf}\",\n NUMBER_MINIMUM: \"Value {value} is less than minimum {minimum}\",\n NUMBER_MINIMUM_EXCLUSIVE: \"Value {value} is equal to exclusive minimum {minimum}\",\n NUMBER_MAXIMUM: \"Value {value} is greater than maximum {maximum}\",\n NUMBER_MAXIMUM_EXCLUSIVE: \"Value {value} is equal to exclusive maximum {maximum}\",\n NUMBER_NOT_A_NUMBER: \"Value {value} is not a valid number\",\n // String errors\n STRING_LENGTH_SHORT: \"String is too short ({length} chars), minimum {minimum}\",\n STRING_LENGTH_LONG: \"String is too long ({length} chars), maximum {maximum}\",\n STRING_PATTERN: \"String does not match pattern: {pattern}\",\n // Object errors\n OBJECT_PROPERTIES_MINIMUM: \"Too few properties defined ({propertyCount}), minimum {minimum}\",\n OBJECT_PROPERTIES_MAXIMUM: \"Too many properties defined ({propertyCount}), maximum {maximum}\",\n OBJECT_REQUIRED: \"Missing required property: {key}\",\n OBJECT_ADDITIONAL_PROPERTIES: \"Additional properties not allowed\",\n OBJECT_DEPENDENCY_KEY: \"Dependency failed - key must exist: {missing} (due to key: {key})\",\n // Array errors\n ARRAY_LENGTH_SHORT: \"Array is too short ({length}), minimum {minimum}\",\n ARRAY_LENGTH_LONG: \"Array is too long ({length}), maximum {maximum}\",\n ARRAY_UNIQUE: \"Array items are not unique (indices {match1} and {match2})\",\n ARRAY_ADDITIONAL_ITEMS: \"Additional items not allowed\",\n // Format errors\n FORMAT_CUSTOM: \"Format validation failed ({message})\",\n KEYWORD_CUSTOM: \"Keyword failed: {key} ({message})\",\n // Schema structure\n CIRCULAR_REFERENCE: \"Circular $refs: {urls}\",\n // Non-standard validation options\n UNKNOWN_PROPERTY: \"Unknown property (not in schema)\"\n};\n\nfunction ValidationError(code, params, dataPath, schemaPath, subErrors) {\n Error.call(this);\n if (code === undefined) {\n throw new Error(\"No error code supplied: \" + schemaPath);\n }\n this.message = '';\n this.params = params;\n this.code = code;\n this.dataPath = dataPath || \"\";\n this.schemaPath = schemaPath || \"\";\n this.subErrors = subErrors || null;\n\n var err = new Error(this.message);\n this.stack = err.stack || err.stacktrace;\n if (!this.stack) {\n try {\n throw err;\n } catch (err) {\n this.stack = err.stack || err.stacktrace;\n }\n }\n}\n\nValidationError.prototype = (0, _create2.default)(Error.prototype);\nValidationError.prototype.constructor = ValidationError;\nValidationError.prototype.name = 'ValidationError';\n\nValidationError.prototype.prefixWith = function (dataPrefix, schemaPrefix) {\n if (dataPrefix !== null) {\n dataPrefix = dataPrefix.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n this.dataPath = \"/\" + dataPrefix + this.dataPath;\n }\n if (schemaPrefix !== null) {\n schemaPrefix = schemaPrefix.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n this.schemaPath = \"/\" + schemaPrefix + this.schemaPath;\n }\n if (this.subErrors !== null) {\n for (var i = 0; i < this.subErrors.length; i++) {\n this.subErrors[i].prefixWith(dataPrefix, schemaPrefix);\n }\n }\n return this;\n};\n\nfunction isTrustedUrl(baseUrl, testUrl) {\n if (testUrl.substring(0, baseUrl.length) === baseUrl) {\n var remainder = testUrl.substring(baseUrl.length);\n if (testUrl.length > 0 && testUrl.charAt(baseUrl.length - 1) === \"/\" || remainder.charAt(0) === \"#\" || remainder.charAt(0) === \"?\") {\n return true;\n }\n }\n return false;\n}\n\nvar languages = {};\n\nfunction createApi(language) {\n var globalContext = new ValidatorContext();\n var currentLanguage;\n var customErrorReporter;\n var api = {\n setErrorReporter: function setErrorReporter(reporter) {\n if (typeof reporter === 'string') {\n return this.language(reporter);\n }\n customErrorReporter = reporter;\n return true;\n },\n addFormat: function addFormat() {\n globalContext.addFormat.apply(globalContext, arguments);\n },\n language: function language(code) {\n if (!code) {\n return currentLanguage;\n }\n if (!languages[code]) {\n code = code.split('-')[0]; // fall back to base language\n }\n if (languages[code]) {\n currentLanguage = code;\n return code; // so you can tell if fall-back has happened\n }\n return false;\n },\n addLanguage: function addLanguage(code, messageMap) {\n var key;\n for (key in ErrorCodes) {\n if (messageMap[key] && !messageMap[ErrorCodes[key]]) {\n messageMap[ErrorCodes[key]] = messageMap[key];\n }\n }\n var rootCode = code.split('-')[0];\n if (!languages[rootCode]) {\n // use for base language if not yet defined\n languages[code] = messageMap;\n languages[rootCode] = messageMap;\n } else {\n languages[code] = (0, _create2.default)(languages[rootCode]);\n for (key in messageMap) {\n if (typeof languages[rootCode][key] === 'undefined') {\n languages[rootCode][key] = messageMap[key];\n }\n languages[code][key] = messageMap[key];\n }\n }\n return this;\n },\n freshApi: function freshApi(language) {\n var result = createApi();\n if (language) {\n result.language(language);\n }\n return result;\n },\n validate: function validate(data, schema, checkRecursive, banUnknownProperties) {\n var def = defaultErrorReporter(currentLanguage);\n var errorReporter = customErrorReporter ? function (error, data, schema) {\n return customErrorReporter(error, data, schema) || def(error, data, schema);\n } : def;\n var context = new ValidatorContext(globalContext, false, errorReporter, checkRecursive, banUnknownProperties);\n if (typeof schema === \"string\") {\n schema = { \"$ref\": schema };\n }\n context.addSchema(\"\", schema);\n var error = context.validateAll(data, schema, null, null, \"\");\n if (!error && banUnknownProperties) {\n error = context.banUnknownProperties(data, schema);\n }\n this.error = error;\n this.missing = context.missing;\n this.valid = error === null;\n return this.valid;\n },\n validateResult: function validateResult() {\n var result = {};\n this.validate.apply(result, arguments);\n return result;\n },\n validateMultiple: function validateMultiple(data, schema, checkRecursive, banUnknownProperties) {\n var def = defaultErrorReporter(currentLanguage);\n var errorReporter = customErrorReporter ? function (error, data, schema) {\n return customErrorReporter(error, data, schema) || def(error, data, schema);\n } : def;\n var context = new ValidatorContext(globalContext, true, errorReporter, checkRecursive, banUnknownProperties);\n if (typeof schema === \"string\") {\n schema = { \"$ref\": schema };\n }\n context.addSchema(\"\", schema);\n context.validateAll(data, schema, null, null, \"\");\n if (banUnknownProperties) {\n context.banUnknownProperties(data, schema);\n }\n var result = {};\n result.errors = context.errors;\n result.missing = context.missing;\n result.valid = result.errors.length === 0;\n return result;\n },\n addSchema: function addSchema() {\n return globalContext.addSchema.apply(globalContext, arguments);\n },\n getSchema: function getSchema() {\n return globalContext.getSchema.apply(globalContext, arguments);\n },\n getSchemaMap: function getSchemaMap() {\n return globalContext.getSchemaMap.apply(globalContext, arguments);\n },\n getSchemaUris: function getSchemaUris() {\n return globalContext.getSchemaUris.apply(globalContext, arguments);\n },\n getMissingUris: function getMissingUris() {\n return globalContext.getMissingUris.apply(globalContext, arguments);\n },\n dropSchemas: function dropSchemas() {\n globalContext.dropSchemas.apply(globalContext, arguments);\n },\n defineKeyword: function defineKeyword() {\n globalContext.defineKeyword.apply(globalContext, arguments);\n },\n defineError: function defineError(codeName, codeNumber, defaultMessage) {\n if (typeof codeName !== 'string' || !/^[A-Z]+(_[A-Z]+)*$/.test(codeName)) {\n throw new Error('Code name must be a string in UPPER_CASE_WITH_UNDERSCORES');\n }\n if (typeof codeNumber !== 'number' || codeNumber % 1 !== 0 || codeNumber < 10000) {\n throw new Error('Code number must be an integer > 10000');\n }\n if (typeof ErrorCodes[codeName] !== 'undefined') {\n throw new Error('Error already defined: ' + codeName + ' as ' + ErrorCodes[codeName]);\n }\n if (typeof ErrorCodeLookup[codeNumber] !== 'undefined') {\n throw new Error('Error code already used: ' + ErrorCodeLookup[codeNumber] + ' as ' + codeNumber);\n }\n ErrorCodes[codeName] = codeNumber;\n ErrorCodeLookup[codeNumber] = codeName;\n ErrorMessagesDefault[codeName] = ErrorMessagesDefault[codeNumber] = defaultMessage;\n for (var langCode in languages) {\n var language = languages[langCode];\n if (language[codeName]) {\n language[codeNumber] = language[codeNumber] || language[codeName];\n }\n }\n },\n reset: function reset() {\n globalContext.reset();\n this.error = null;\n this.missing = [];\n this.valid = true;\n },\n missing: [],\n error: null,\n valid: true,\n normSchema: normSchema,\n resolveUrl: resolveUrl,\n getDocumentUri: getDocumentUri,\n errorCodes: ErrorCodes\n };\n api.language(language || 'en');\n return api;\n}\n\n//export function validator() {\nvar tv4 = createApi();\ntv4.addLanguage('en-gb', ErrorMessagesDefault);\n\n//legacy property\ntv4.tv4 = tv4;\n//return tv4;\nexports.default = tv4;\n//}\n\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTExLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy91dGlscy90djQuanM/NzkwOCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuIEF1dGhvcjogR2VyYWludCBMdWZmIGFuZCBvdGhlcnNcbiBZZWFyOiAyMDEzXG5cbiBUaGlzIGNvZGUgaXMgcmVsZWFzZWQgaW50byB0aGUgXCJwdWJsaWMgZG9tYWluXCIgYnkgaXRzIGF1dGhvcihzKS4gIEFueWJvZHkgbWF5IHVzZSwgYWx0ZXIgYW5kIGRpc3RyaWJ1dGUgdGhlIGNvZGUgd2l0aG91dCByZXN0cmljdGlvbi4gIFRoZSBhdXRob3IgbWFrZXMgbm8gZ3VhcmFudGVlcywgYW5kIHRha2VzIG5vIGxpYWJpbGl0eSBvZiBhbnkga2luZCBmb3IgdXNlIG9mIHRoaXMgY29kZS5cblxuIElmIHlvdSBmaW5kIGEgYnVnIG9yIG1ha2UgYW4gaW1wcm92ZW1lbnQsIGl0IHdvdWxkIGJlIGNvdXJ0ZW91cyB0byBsZXQgdGhlIGF1dGhvciBrbm93LCBidXQgaXQgaXMgbm90IGNvbXB1bHNvcnkuXG4gKi9cbi8vIGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL0phdmFTY3JpcHQvUmVmZXJlbmNlL0dsb2JhbF9PYmplY3RzL09iamVjdC9rZXlzP3JlZGlyZWN0bG9jYWxlPWVuLVVTJnJlZGlyZWN0c2x1Zz1KYXZhU2NyaXB0JTJGUmVmZXJlbmNlJTJGR2xvYmFsX09iamVjdHMlMkZPYmplY3QlMkZrZXlzXG5pZiAoIU9iamVjdC5rZXlzKSB7XG4gICAgT2JqZWN0LmtleXMgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgaGFzT3duUHJvcGVydHkgPSBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LFxuICAgICAgICAgICAgaGFzRG9udEVudW1CdWcgPSAhKHt0b1N0cmluZzogbnVsbH0pLnByb3BlcnR5SXNFbnVtZXJhYmxlKCd0b1N0cmluZycpLFxuICAgICAgICAgICAgZG9udEVudW1zID0gW1xuICAgICAgICAgICAgICAgICd0b1N0cmluZycsXG4gICAgICAgICAgICAgICAgJ3RvTG9jYWxlU3RyaW5nJyxcbiAgICAgICAgICAgICAgICAndmFsdWVPZicsXG4gICAgICAgICAgICAgICAgJ2hhc093blByb3BlcnR5JyxcbiAgICAgICAgICAgICAgICAnaXNQcm90b3R5cGVPZicsXG4gICAgICAgICAgICAgICAgJ3Byb3BlcnR5SXNFbnVtZXJhYmxlJyxcbiAgICAgICAgICAgICAgICAnY29uc3RydWN0b3InXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgZG9udEVudW1zTGVuZ3RoID0gZG9udEVudW1zLmxlbmd0aDtcblxuICAgICAgICByZXR1cm4gZnVuY3Rpb24gKG9iaikge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBvYmogIT09ICdvYmplY3QnICYmIHR5cGVvZiBvYmogIT09ICdmdW5jdGlvbicgfHwgb2JqID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignT2JqZWN0LmtleXMgY2FsbGVkIG9uIG5vbi1vYmplY3QnKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIHJlc3VsdCA9IFtdO1xuXG4gICAgICAgICAgICBmb3IgKHZhciBwcm9wIGluIG9iaikge1xuICAgICAgICAgICAgICAgIGlmIChoYXNPd25Qcm9wZXJ0eS5jYWxsKG9iaiwgcHJvcCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2gocHJvcCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoaGFzRG9udEVudW1CdWcpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRvbnRFbnVtc0xlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChoYXNPd25Qcm9wZXJ0eS5jYWxsKG9iaiwgZG9udEVudW1zW2ldKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goZG9udEVudW1zW2ldKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH07XG4gICAgfSkoKTtcbn1cbi8vIGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL0phdmFTY3JpcHQvUmVmZXJlbmNlL0dsb2JhbF9PYmplY3RzL09iamVjdC9jcmVhdGVcbmlmICghT2JqZWN0LmNyZWF0ZSkge1xuICAgIE9iamVjdC5jcmVhdGUgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICBmdW5jdGlvbiBGKCkge1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChvKSB7XG4gICAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCAhPT0gMSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignT2JqZWN0LmNyZWF0ZSBpbXBsZW1lbnRhdGlvbiBvbmx5IGFjY2VwdHMgb25lIHBhcmFtZXRlci4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIEYucHJvdG90eXBlID0gbztcbiAgICAgICAgICAgIHJldHVybiBuZXcgRigpO1xuICAgICAgICB9O1xuICAgIH0pKCk7XG59XG4vLyBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9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KGFyZ3VtZW50cy5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICBuID0gTnVtYmVyKGFyZ3VtZW50c1sxXSk7XG4gICAgICAgICAgICBpZiAobiAhPT0gbikgeyAvLyBzaG9ydGN1dCBmb3IgdmVyaWZ5aW5nIGlmIGl0J3MgTmFOXG4gICAgICAgICAgICAgICAgbiA9IDA7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG4gIT09IDAgJiYgbiAhPT0gSW5maW5pdHkgJiYgbiAhPT0gLUluZmluaXR5KSB7XG4gICAgICAgICAgICAgICAgbiA9IChuID4gMCB8fCAtMSkgKiBNYXRoLmZsb29yKE1hdGguYWJzKG4pKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAobiA+PSBsZW4pIHtcbiAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgayA9IG4gPj0gMCA/IG4gOiBNYXRoLm1heChsZW4gLSBNYXRoLmFicyhuKSwgMCk7XG4gICAgICAgIGZvciAoOyBrIDwgbGVuOyBrKyspIHtcbiAgICAgICAgICAgIGlmIChrIGluIHQgJiYgdFtrXSA9PT0gc2VhcmNoRWxlbWVudCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAtMTtcbiAgICB9O1xufVxuXG4vLyBHcnVuZ2V5IE9iamVjdC5pc0Zyb3plbiBoYWNrXG5pZiAoIU9iamVjdC5pc0Zyb3plbikge1xuICAgIE9iamVjdC5pc0Zyb3plbiA9IGZ1bmN0aW9uIChvYmopIHtcbiAgICAgICAgdmFyIGtleSA9IFwidHY0X3Rlc3RfZnJvemVuX2tleVwiO1xuICAgICAgICB3aGlsZSAob2JqLmhhc093blByb3BlcnR5KGtleSkpIHtcbiAgICAgICAgICAgIGtleSArPSBNYXRoLnJhbmRvbSgpO1xuICAgICAgICB9XG4gICAgICAgIHRyeSB7XG4gIC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iAgICAgICAgICAgICAgICBpZiAoc2hvd1ZhcmlhYmxlcykge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gdmFyU3BlYy5uYW1lICsgXCI9XCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdmFsdWUubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGogPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gdmFyU3BlYy5zdWZmaWNlc1snKiddID8gKHNlcGFyYXRvciB8fCBcIixcIikgOiBcIixcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YXJTcGVjLnN1ZmZpY2VzWycqJ10gJiYgc2hvd1ZhcmlhYmxlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSB2YXJTcGVjLm5hbWUgKyBcIj1cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gc2hvdWxkRXNjYXBlID8gZW5jb2RlVVJJQ29tcG9uZW50KHZhbHVlW2pdKS5yZXBsYWNlKC8hL2csIFwiJTIxXCIpIDogbm90UmVhbGx5UGVyY2VudEVuY29kZSh2YWx1ZVtqXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgdmFsdWUgPT09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2hvd1ZhcmlhYmxlcyAmJiAhdmFyU3BlYy5zdWZmaWNlc1snKiddKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSB2YXJTcGVjLm5hbWUgKyBcIj1cIjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIGZpcnN0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFmaXJzdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHZhclNwZWMuc3VmZmljZXNbJyonXSA/IChzZXBhcmF0b3IgfHwgXCIsXCIpIDogXCIsXCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZmlyc3QgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHNob3VsZEVzY2FwZSA/IGVuY29kZVVSSUNvbXBvbmVudChrZXkpLnJlcGxhY2UoLyEvZywgXCIlMjFcIikgOiBub3RSZWFsbHlQZXJjZW50RW5jb2RlKGtleSk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSB2YXJTcGVjLnN1ZmZpY2VzWycqJ10gPyAnPScgOiBcIixcIjtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHNob3VsZEVzY2FwZSA/IGVuY29kZVVSSUNvbXBvbmVudCh2YWx1ZVtrZXldKS5yZXBsYWNlKC8hL2csIFwiJTIxXCIpIDogbm90UmVhbGx5UGVyY2VudEVuY29kZSh2YWx1ZVtrZXldKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChzaG93VmFyaWFibGVzKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSB2YXJTcGVjLm5hbWU7XG4gICAgICAgICAgICAgICAgICAgIGlmICghdHJpbUVtcHR5U3RyaW5nIHx8IHZhbHVlICE9PSBcIlwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gXCI9XCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHZhclNwZWMudHJ1bmNhdGUgIT0gbnVsbCkge1xuICAgICAgICAgICAg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ICAgIHRoaXMubWlzc2luZ01hcFtiYXNlVXJsXSA9IGJhc2VVcmw7XG4gICAgfVxufTtcblZhbGlkYXRvckNvbnRleHQucHJvdG90eXBlLnNlYXJjaFNjaGVtYXMgPSBmdW5jdGlvbiAoc2NoZW1hLCB1cmwpIHtcbiAgICBpZiAoQXJyYXkuaXNBcnJheShzY2hlbWEpKSB7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc2NoZW1hLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB0aGlzLnNlYXJjaFNjaGVtYXMoc2NoZW1hW2ldLCB1cmwpO1xuICAgICAgICB9XG4gICAgfSBlbHNlIGlmIChzY2hlbWEgJiYgdHlwZW9mIHNjaGVtYSA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICBpZiAodHlwZW9mIHNjaGVtYS5pZCA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgaWYgKGlzVHJ1c3RlZFVybCh1cmwsIHNjaGVtYS5pZCkpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zY2hlbWFzW3NjaGVtYS5pZF0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNjaGVtYXNbc2NoZW1hLmlkXSA9IHNjaGVtYTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZm9yICh2YXIga2V5IGluIHNjaGVtYSkge1xuICAgICAgICAgICAgaWYgKGtleSAhPT0gXCJlbnVtXCIpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHNjaGVtYVtrZXldID09PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VhcmNoU2NoZW1hcyhzY2hlbWFba2V5XSwgdXJsKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleSA9PT0gXCIkcmVmXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVyaSA9IGdldERvY3VtZW50VXJpKHNjaGVtYVtrZXldKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHVyaSAmJiB0aGlzLnNjaGVtYXNbdXJpXSA9PT0gdW5kZWZpbmVkICYmIHRoaXMubWlzc2luZ01hcFt1cmldID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWlzc2luZ01hcFt1cmldID0gdXJpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufTtcblZhbGlkYXRvckNvbnRleHQucHJvdG90eXBlLmFkZFNjaGVtYSA9IGZ1bmN0aW9uICh1cmwsIHNjaGVtYSkge1xuICAgIC8vb3ZlcmxvYWRcbiAgICBpZiAodHlwZW9mIHVybCAhPT0gJ3N0cmluZycgfHwgdHlwZW9mIHNjaGVtYSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgaWYgKHR5cGVvZiB1cmwgPT09ICdvYmplY3QnICYmIHR5cGVvZiB1cmwuaWQgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBzY2hlbWEgPSB1cmw7XG4gICAgICAgICAgICB1cmwgPSBzY2hlbWEuaWQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKHVybCA9PT0gZ2V0RG9jdW1lbnRVcmkodXJsKSArIFwiI1wiKSB7XG4gICAgICAgIC8vIFJlbW92ZSBlbXB0eSBmcmFnbWVudFxuICAgICAgICB1cmwgPSBnZXREb2N1bWVudFVyaSh1cmwpO1xuICAgIH1cbiAgICB0aGlzLnNjaGVtYXNbdXJsXSA9IHNjaGVtYTtcbiAgICBkZWxldGUgdGhpcy5taXNzaW5nTWFwW3VybF07XG4gICAgbm9ybVNjaGVtYShzY2hlbWEsIHVybCk7XG4gICAgdGhpcy5zZWF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ZFNjaGVtYXNLZXldLmluZGV4T2Yoc2NoZW1hKTtcbiAgICAgICAgICAgIGlmIChzY2hlbWFJbmRleCAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVycm9ycyA9IHRoaXMuZXJyb3JzLmNvbmNhdChkYXRhW3RoaXMudmFsaWRhdGlvbkVycm9yc0tleV1bc2NoZW1hSW5kZXhdKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoT2JqZWN0LmlzRnJvemVuKGRhdGEpKSB7XG4gICAgICAgICAgICBmcm96ZW5JbmRleCA9IHRoaXMuc2Nhbm5lZEZyb3plbi5pbmRleE9mKGRhdGEpO1xuICAgICAgICAgICAgaWYgKGZyb3plbkluZGV4ICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHZhciBmcm96ZW5TY2hlbWFJbmRleCA9IHRoaXMuc2Nhbm5lZEZyb3plblNjaGVtYXNbZnJvemVuSW5kZXhdLmluZGV4T2Yoc2NoZW1hKTtcbiAgICAgICAgICAgICAgICBpZiAoZnJvemVuU2NoZW1hSW5kZXggIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZXJyb3JzID0gdGhpcy5lcnJvcnMuY29uY2F0KHRoaXMuc2Nhbm5lZEZyb3plblZhbGlkYXRpb25FcnJvcnNbZnJvemVuSW5kZXhdW2Zyb3plblNjaGVtYUluZGV4XSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNjYW5uZWQucHVzaChkYXRhKTtcbiAgICAgICAgaWYgKE9iamVjdC5pc0Zyb3plbihkYXRhKSkge1xuICAgICAgICAgICAgaWYgKGZyb3plbkluZGV4ID09PSAtMSkge1xuICAgICAgICAgICAgICAgIGZyb3plbkluZGV4ID0gdGhpcy5zY2FubmVkRnJvemVuLmxlbmd0aDtcbiAgICAgICAgICAgICAgICB0aGlzLnNjYW5uZWRGcm96ZW4ucHVzaChkYXRhKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNjYW5uZWRGcm96ZW5TY2hlbWFzLnB1c2goW10pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2Nhbm5lZEZyb3plblNjaGVtYUluZGV4ID0gdGhpcy5zY2FubmVkRnJvemVuU2NoZW1hc1tmcm96ZW5JbmRleF0ubGVuZ3RoO1xuICAgICAgICAgICAgdGhpcy5zY2FubmVkRnJvemVuU2NoZW1hc1tmcm96ZW5JbmRleF1bc2Nhbm5lZEZyb3plblNjaGVtYUluZGV4XSA9IHNjaGVtYTtcbiAgICAgICAgICAgIHRoaXMuc2Nhbm5lZEZyb3plblZhbGlkYXRpb25FcnJvcnNbZnJvemVuSW5kZXhdW3NjYW5uZWRGcm96ZW5TY2hlbWFJbmRleF0gPSBbXTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmICghZGF0YVt0aGlzLnZhbGlkYXRlZFNjaGVtYXNLZXldKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGRhdGEsIHRoaXMudmFsaWRhdGVkU2NoZW1hc0tleSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IFtdLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZGF0YSwgdGhpcy52YWxpZGF0aW9uRXJyb3JzS2V5LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogW10sXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gIC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biAgICAgICAgdmFyIHZhbGlkYXRpb25GdW5jdGlvbnMgPSB0aGlzLmRlZmluZWRLZXl3b3Jkc1trZXldO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHZhbGlkYXRpb25GdW5jdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBmdW5jID0gdmFsaWRhdGlvbkZ1bmN0aW9uc1tpXTtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSBmdW5jKGRhdGEsIHNjaGVtYVtrZXldLCBzY2hlbWEsIGRhdGFQb2ludGVyUGF0aCk7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHJlc3VsdCA9PT0gJ3N0cmluZycgfHwgdHlwZW9mIHJlc3VsdCA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVFcnJvcihFcnJvckNvZGVzLktFWVdPUkRfQ1VTVE9NLCB7XG4gICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiByZXN1bHRcbiAgICAgICAgICAgICAgICB9LCAnJywgJycsIG51bGwsIGRhdGEsIHNjaGVtYSkucHJlZml4V2l0aChudWxsLCBrZXkpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXN1bHQgJiYgdHlwZW9mIHJlc3VsdCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICB2YXIgY29kZSA9IHJlc3VsdC5jb2RlO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgY29kZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFFcnJvckNvZGVzW2NvZGVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1VuZGVmaW5lZCBlcnJvciBjb2RlICh1c2UgZGVmaW5lRXJyb3IpOiAnICsgY29kZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29kZSA9IEVycm9yQ29kZXNbY29kZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgY29kZSAhPT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICAgICAgY29kZSA9IEVycm9yQ29kZXMuS0VZV09SRF9DVVNUT007XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBtZXNzYWdlUGFyYW1zID0gKHR5cGVvZiByZXN1bHQubWVzc2FnZSA9PT0gJ29iamVjdCcpID8gcmVzdWx0Lm1lc3NhZ2UgOiB7XG4gICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiByZXN1bHQubWVzc2FnZSB8fCBcIj9cIlxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgdmFyIHNjaGVtYVBhdGggPSByZXN1bHQuc2NoZW1hUGF0aCB8fCAoXCIvXCIgKyBrZXkucmVwbGFjZSgvfi9nLCAnfjAnKS5yZXBsYWNlKC9cXC8vZywgJ34xJykpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmNyZWF0ZUVycm9yKGNvZGUsIG1lc3NhZ2VQYXJhbXMsIHJlc3VsdC5kYXRhUGF0aCB8fCBudWxsLCBzY2hlbWFQYXRoLCBudWxsLCBkYXRhLCBzY2hlbWEpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBudWxsO1xufTtcblxuZnVuY3Rpb24gcmVjdXJzaXZlQ29tcGFyZShBLCBCKSB7XG4gICAgaWYgKEEgPT09IEIpIHtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuICAgIGlmIChBICYmIEIgJiYgdHlwZW9mIEEgPT09IFwib2JqZWN0XCIgJiYgdHlwZW9mIEIgPT09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoQSkgIT09IEFycmF5LmlzQXJyYXkoQikpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KEEpKSB7XG4gICAgICAgICAgICBpZiAoQS5sZW5ndGggIT09IEIubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBBLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFyZWN1cnNpdmVDb21wYXJlKEFbaV0sIEJbaV0pKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIga2V5O1xuICAgICAgICAgICAgZm9yIChrZXkgaW4gQSkge1xuICAgICAgICAgICAgICAgIGlmIChCW2tleV0gPT09IHVuZGVmaW5lZCAmJiBBW2tleV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yIChrZXkgaW4gQikge1xuICAgICAgICAgICAgICAgIGlmIChBW2tleV0gPT09IHVuZGVmaW5lZCAmJiBCW2tleV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yIChrZXkgaW4gQSkge1xuICAgICAgICAgICAgICAgIGlmICghcmVjdXJzaXZlQ29tcGFyZShBW2tleV0sIEJba2V5XSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgf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iYgZGF0YSA9PT0gc2NoZW1hLm1pbmltdW0pIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNyZWF0ZUVycm9yKEVycm9yQ29kZXMuTlVNQkVSX01JTklNVU1fRVhDTFVTSVZFLCB7XG4gICAgICAgICAgICAgICAgdmFsdWU6IGRhdGEsXG4gICAgICAgICAgICAgICAgbWluaW11bTogc2NoZW1hLm1pbmltdW1cbiAgICAgICAgICAgIH0sICcnLCAnL2V4Y2x1c2l2ZU1pbmltdW0nLCBudWxsLCBkYXRhLCBzY2hlbWEpO1xuICAgICAgICB9XG4gICAgfVxuICAgIGlmIChzY2hlbWEubWF4aW11bSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGlmIChkYXRhID4gc2NoZW1hLm1heGltdW0pIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNyZWF0ZUVycm9yKEVycm9yQ29kZXMuTlVNQkVSX01BWElNVU0sIHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogZGF0YSxcbiAgICAgICAgICAgICAgICBtYXhpbXVtOiBzY2hlbWEubWF4aW11bVxuICAgICAgICAgICAgfSwgJycsICcvbWF4aW11bScsIG51bGwsIGRhdGEsIHNjaGVtYSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNjaGVtYS5leGNsdXNpdmVNYXhpbXVtICYmIGRhdGEgPT09IHNjaGVtYS5tYXhpbXVtKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVFcnJvcihFcnJvckNvZGVzLk5VTUJFUl9NQVhJTVVNX0VYQ0xVU0lWRSwge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBkYXRhLFxuICAgICAgICAgICAgICAgIG1heGltdW06IHNjaGVtYS5tYXhpbXVtXG4gICAgICAgICAgICB9LCAnJywgJy9leGNsdXNpdmVNYXhpbXVtJywgbnVsbCwgZGF0YSwgc2NoZW1hKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gbnVsbDtcbn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VTklRVUUsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoMTogaSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoMjogalxuICAgICAgICAgICAgICAgICAgICB9LCAnJywgJy91bmlxdWVJdGVtcycsIG51bGwsIGRhdGEsIHNjaGVtYSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmhhbmRsZUVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBudWxsO1xufTtcblxuVmFsaWRhdG9yQ29udGV4dC5wcm90b3R5cGUudmFsaWRhdGVBcnJheUl0ZW1zID0gZnVuY3Rpb24gdmFsaWRhdGVBcnJheUl0ZW1zKGRhdGEsIHNjaGVtYSwgZGF0YVBvaW50ZXJQYXRoKSB7XG4gICAgaWYgKHNjaGVtYS5pdGVtcyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgICB2YXIgZXJyb3IsIGk7XG4gICAgaWYgKEFycmF5LmlzQXJyYXkoc2NoZW1hLml0ZW1zKSkge1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZGF0YS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKGkgPCBzY2hlbWEuaXRlbXMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgaWYgKGVycm9yID0gdGhpcy52YWxpZGF0ZUFsbChkYXRhW2ldLCBzY2hlbWEuaXRlbXNbaV0sIFtpXSwgW1wiaXRlbXNcIiwgaV0sIGRhdGFQb2ludGVyUGF0aCArIFwiL1wiICsgaSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2NoZW1hLmFkZGl0aW9uYWxJdGVtcyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzY2hlbWEuYWRkaXRpb25hbEl0ZW1zID09PSBcImJvb2xlYW5cIikge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNjaGVtYS5hZGRpdGlvbmFsSXRlbXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yID0gKHRoaXMuY3JlYXRlRXJyb3IoRXJyb3JDb2Rlcy5BUlJBWV9BRERJVElPTkFMX0lURU1TLCB7fSwgJy8nICsgaSwgJy9hZGRpdGlvbmFsSXRlbXMnLCBudWxsLCBkYXRhLCBzY2hlbWEpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmhhbmRsZUVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZXJyb3IgPSB0aGlzLnZhbGlkYXRlQWxsKGRhdGFbaV0sIHNjaGVtYS5hZGRpdGlvbmFsSXRlbXMsIFtpXSwgW1wiYWRkaXRpb25hbEl0ZW1zXCJdLCBkYXRhUG9pbnRlclBhdGggKyBcIi9cIiArIGkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZGF0YS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKGVycm9yID0gdGhpcy52YWxpZGF0ZUFsbChkYXRhW2ldLCBzY2hlbWEuaXRlbXMsIFtpXSwgW1wiaXRlbXNcIl0sIGRhdGFQb2ludGVyUGF0aCArIFwiL1wiICs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hLm1pblByb3BlcnRpZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAoa2V5cy5sZW5ndGggPCBzY2hlbWEubWluUHJvcGVydGllcykge1xuICAgICAgICAgICAgZXJyb3IgPSB0aGlzLmNyZWF0ZUVycm9yKEVycm9yQ29kZXMuT0JKRUNUX1BST1BFUlRJRVNfTUlOSU1VTSwge1xuICAgICAgICAgICAgICAgIHByb3BlcnR5Q291bnQ6IGtleXMubGVuZ3RoLFxuICAgICAgICAgICAgICAgIG1pbmltdW06IHNjaGVtYS5taW5Qcm9wZXJ0aWVzXG4gICAgICAgICAgICB9LCAnJywgJy9taW5Qcm9wZXJ0aWVzJywgbnVsbCwgZGF0YSwgc2NoZW1hKTtcbiAgICAgICAgICAgIGlmICh0aGlzLmhhbmRsZUVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBpZiAoc2NoZW1hLm1heFByb3BlcnRpZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAoa2V5cy5sZW5ndGggPiBzY2hlbWEubWF4UHJvcGVydGllcykge1xuICAgICAgICAgICAgZXJyb3IgPSB0aGlzLmNyZWF0ZUVycm9yKEVycm9yQ29kZXMuT0JKRUNUX1BST1BFUlRJRVNfTUFYSU1VTSwge1xuICAgICAgICAgICAgICAgIHByb3BlcnR5Q291bnQ6IGtleXMubGVuZ3RoLFxuICAgICAgICAgICAgICAgIG1heGltdW06IHNjaGVtYS5tYXhQcm9wZXJ0aWVzXG4gICAgICAgICAgICB9LCAnJywgJy9tYXhQcm9wZXJ0aWVzJywgbnVsbCwgZGF0YSwgc2NoZW1hKTtcbiAgICAgICAgICAgIGlmICh0aGlzLmhhbmRsZUVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbi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ICsgXCIvXCIgKyBrZXkucmVwbGFjZSgvfi9nLCAnfjAnKS5yZXBsYWNlKC9cXC8vZywgJ34xJyk7XG4gICAgICAgIHZhciBmb3VuZE1hdGNoID0gZmFsc2U7XG4gICAgICAgIGlmIChzY2hlbWEucHJvcGVydGllcyAhPT0gdW5kZWZpbmVkICYmIHNjaGVtYS5wcm9wZXJ0aWVzW2tleV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgZm91bmRNYXRjaCA9IHRydWU7XG4gICAgICAgICAgICBpZiAoZXJyb3IgPSB0aGlzLnZhbGlkYXRlQWxsKGRhdGFba2V5XSwgc2NoZW1hLnByb3BlcnRpZXNba2V5XSwgW2tleV0sIFtcInByb3BlcnRpZXNcIiwga2V5XSwga2V5UG9pbnRlclBhdGgpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChzY2hlbWEucGF0dGVyblByb3BlcnRpZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgZm9yICh2YXIgcGF0dGVybktleSBpbiBzY2hlbWEucGF0dGVyblByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICB2YXIgcmVnZXhwID0gbmV3IFJlZ0V4cChwYXR0ZXJuS2V5KTtcbiAgICAgICAgICAgICAgICBpZiAocmVnZXhwLnRlc3Qoa2V5KSkge1xuICAgICAgICAgICAgICAgICAgICBmb3VuZE1hdGNoID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yID0gdGhpcy52YWxpZGF0ZUFsbChkYXRhW2tleV0sIHNjaGVtYS5wYXR0ZXJuUHJvcGVydGllc1twYXR0ZXJuS2V5XSwgW2tleV0sIFtcInBhdHRlcm5Qcm9wZXJ0aWVzXCIsIHBhdHRlcm5LZXldLCBrZXlQb2ludGVyUGF0aCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoIWZvdW5kTWF0Y2gpIHtcbiAgICAgICAgICAgIGlmIChzY2hlbWEuYWRkaXRpb25hbFByb3BlcnRpZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnRyYWNrVW5rbm93blByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5rbm93blByb3BlcnR5UGF0aHNba2V5UG9pbnRlclBhdGhdID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMudW5rbm93blByb3BlcnR5UGF0aHNba2V5UG9pbnRlclBhdGhdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHNjaGVtYS5hZGRpdGlvbmFsUHJvcGVydGllcyA9PT0gXCJib29sZWFuXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzY2hlbWEuYWRkaXRpb25hbFByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yID0gdGhpcy5jcmVhdGVFcnJvcihFcnJvckNvZGVzLk9CSkVDVF9BRERJVElPTkFMX1BST1BFUlRJRVMsIHtrZXk6IGtleX0sICcnLCAnL2FkZGl0aW9uYWxQcm9wZXJ0aWVzJywgbnVsbCwgZGF0YSwgc2NoZW1hKS5wcmVmaXhXaXRoKGtleSwgbnVsbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5oYW5kbGVFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXJyb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZi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biAgICAgICAgICAgIGlmIChkYXRhW2RlcEtleV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHZhciBkZXAgPSBzY2hlbWEuZGVwZW5kZW5jaWVzW2RlcEtleV07XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBkZXAgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGFbZGVwXSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvciA9IHRoaXMuY3JlYXRlRXJyb3IoRXJyb3JDb2Rlcy5PQkpFQ1RfREVQRU5ERU5DWV9LRVksIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGRlcEtleSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaXNzaW5nOiBkZXBcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sICcnLCAnJywgbnVsbCwgZGF0YSwgc2NoZW1hKS5wcmVmaXhXaXRoKG51bGwsIGRlcEtleSkucHJlZml4V2l0aChudWxsLCBcImRlcGVuZGVuY2llc1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmhhbmRsZUVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoQXJyYXkuaXNBcnJheShkZXApKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZGVwLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVxdWlyZWRLZXkgPSBkZXBbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YVtyZXF1aXJlZEtleV0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yID0gdGhpcy5jcmVhdGVFcnJvcihFcnJvckNvZGVzLk9CSkVDVF9ERVBFTkRFTkNZX0tFWSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGRlcEtleSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWlzc2luZzogcmVxdWlyZWRLZXlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAnJywgJy8nICsgaSwgbnVsbCwgZGF0YSwgc2NoZW1hKS5wcmVmaXhXaXRoKG51bGwsIGRlcEtleSkucHJlZml4V2l0aChudWxsLCBcImRlcGVuZGVuY2llc1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5oYW5kbGVFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvciA9IHRoaXMudmFsaWRhdGVBbGwoZGF0YSwgZGVwLCBbXSwgW1wiZGVwZW5kZW5jaWVzXCIsIGRlcEtleV0sIGRhdGFQb2ludGVyUGF0aCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gbnVsbDtcbn07XG5cblZhbGlkYXRvckNvbnRleHQucHJvdG90eXBlLnZhbGlkYXRlQ29tYmluYXRpb25zID0gZnVuY3Rpb24gdmFsaWRhdGVDb21iaW5hdGlvbnMoZGF0YSwgc2NoZW1hLCBkYXRhUG9pbnRlclBhdGgpIHtcb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AgICAgICAgICB0aGlzLmVycm9ycyA9IHRoaXMuZXJyb3JzLnNsaWNlKDAsIHN0YXJ0RXJyb3JDb3VudCk7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnRyYWNrVW5rbm93blByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBrbm93bktleSBpbiB0aGlzLmtub3duUHJvcGVydHlQYXRocykge1xuICAgICAgICAgICAgICAgICAgICBvbGRLbm93blByb3BlcnR5UGF0aHNba25vd25LZXldID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG9sZFVua25vd25Qcm9wZXJ0eVBhdGhzW2tub3duS2V5XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgdW5rbm93bktleSBpbiB0aGlzLnVua25vd25Qcm9wZXJ0eVBhdGhzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghb2xkS25vd25Qcm9wZXJ0eVBhdGhzW3Vua25vd25LZXldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvbGRVbmtub3duUHJvcGVydHlQYXRoc1t1bmtub3duS2V5XSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gV2UgbmVlZCB0byBjb250aW51ZSBsb29waW5nIHNvIHdlIGNhdGNoIGFsbCB0aGUgcHJvcGVydHkgZGVmaW5pdGlvbnMsIGJ1dCB3ZSBkb24ndCB3YW50IHRvIHJldHVybiBhbiBlcnJvclxuICAgICAgICAgICAgICAgIGVycm9yQXRFbmQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgICBlcnJvcnMucHVzaChlcnJvci5wcmVmaXhXaXRoKG51bGwsIF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JhY2tVbmtub3duUHJvcGVydGllcykge1xuICAgICAgICBvbGRVbmtub3duUHJvcGVydHlQYXRocyA9IHRoaXMudW5rbm93blByb3BlcnR5UGF0aHM7XG4gICAgICAgIG9sZEtub3duUHJvcGVydHlQYXRocyA9IHRoaXMua25vd25Qcm9wZXJ0eVBhdGhzO1xuICAgIH1cbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHNjaGVtYS5vbmVPZi5sZW5ndGg7IGkrKykge1xuICAgICAgICBpZiAodGhpcy50cmFja1Vua25vd25Qcm9wZXJ0aWVzKSB7XG4gICAgICAgICAgICB0aGlzLnVua25vd25Qcm9wZXJ0eVBhdGhzID0ge307XG4gICAgICAgICAgICB0aGlzLmtub3duUHJvcGVydHlQYXRocyA9IHt9O1xuICAgICAgICB9XG4gICAgICAgIHZhciBzdWJTY2hlbWEgPSBzY2hlbWEub25lT2ZbaV07XG5cbiAgICAgICAgdmFyIGVycm9yQ291bnQgPSB0aGlzLmVycm9ycy5sZW5ndGg7XG4gICAgICAgIHZhciBlcnJvciA9IHRoaXMudmFsaWRhdGVBbGwoZGF0YSwgc3ViU2NoZW1hLCBbXSwgW1wib25lT2ZcIiwgaV0sIGRhdGFQb2ludGVyUGF0aCk7XG5cbiAgICAgICAgaWYgKGVycm9yID09PSBudWxsICYmIGVycm9yQ291bnQgPT09IHRoaXMuZXJyb3JzLmxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKHZhbGlkSW5kZXggPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB2YWxpZEluZGV4ID0gaTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5lcnJvcnMgPSB0aGlzLmVycm9ycy5zbGljZSgwLCBzdGFydEVycm9yQ291bnQpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmNyZWF0ZUVycm9yKEVycm9yQ29kZXMuT05FX09GX01VTFRJUExFLCB7XG4gICAgICAgICAgICAgICAgICAgIGluZGV4MTogdmFsaWRJbmRleCxcbiAgICAgICAgICAgICAgICAgICAgaW5kZXgyOiBpXG4gICAgICAgICAgICAgICAgfSwgXCJcIiwgXCIvb25lT2ZcIiwgbnVsbCwgZGF0YSwgc2NoZW1hKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLnRyYWNrVW5rbm93blByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBrbm93bktleSBpbiB0aGlzLmtub3duUHJvcGVydHlQYXRocykge1xuICAgICAgICAgICAgICAgICAgICBvbGRLbm93blByb3BlcnR5UGF0aHNba25vd25LZXldID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG9sZFVua25vd25Qcm9wZXJ0eVBhdGhzW2tub3duS2V5XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgdW5rbm93bktleSBpbiB0aGlzLnVua25vd25Qcm9wZXJ0eVBhdGhzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghb2xkS25vd25Qcm9wZXJ0eVBhdGhzW3Vua25vd25LZXldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvbGRVbmtub3duUHJvcGVydHlQYXRoc1t1bmtub3duS2V5XSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgIGVycm9ycy5wdXNoKGVycm9yKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBpZiAodGhpcy50cmFja1Vua25vd25Qcm9wZXJ0aWVzKSB7XG4gICAgICAgIHRoaXMudW5rbm93blByb3BlcnR5UGF0aHMgPSBvbGRVbmtub3duUHJvcGVydHlQYXRocztcbiAgICAgICAgdGhpcy5rbm93blByb3BlcnR5UGF0aHMgPSBvbGRLbm93blByb3BlcnR5UGF0aHM7XG4gICAgfVx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IHtcbiAgICAgICAgdmFyIGxkbyA9IHNjaGVtYS5saW5rc1tpXTtcbiAgICAgICAgaWYgKGxkby5yZWwgPT09IFwiZGVzY3JpYmVkYnlcIikge1xuICAgICAgICAgICAgdmFyIHRlbXBsYXRlID0gbmV3IFVyaVRlbXBsYXRlKGxkby5ocmVmKTtcbiAgICAgICAgICAgIHZhciBhbGxQcmVzZW50ID0gdHJ1ZTtcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGVtcGxhdGUudmFyTmFtZXMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoISh0ZW1wbGF0ZS52YXJOYW1lc1tqXSBpbiBkYXRhKSkge1xuICAgICAgICAgICAgICAgICAgICBhbGxQcmVzZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChhbGxQcmVzZW50KSB7XG4gICAgICAgICAgICAgICAgdmFyIHNjaGVtYVVybCA9IHRlbXBsYXRlLmZpbGxGcm9tT2JqZWN0KGRhdGEpO1xuICAgICAgICAgICAgICAgIHZhciBzdWJTY2hlbWEgPSB7XCIkcmVmXCI6IHNjaGVtYVVybH07XG4gICAgICAgICAgICAgICAgaWYgKGVycm9yID0gdGhpcy52YWxpZGF0ZUFsbChkYXRhLCBzdWJTY2hlbWEsIFtdLCBbXCJsaW5rc1wiLCBpXSwgZGF0YVBvaW50ZXJQYXRoKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXJyb3I7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufTtcblxuLy8gcGFyc2VVUkkoKSBhbmQgcmVzb2x2ZVVybCgpIGFyZSBmcm9tIGh0dHBzOi8vZ2lzdC5naXRodWIuY29tLzEwODg4NTBcbi8vICAgLSAgcmVsZWFzZWQgYXMgcHVibGljIGRvbWF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AgICAgLnJlcGxhY2UoL1xcL1xcLlxcLiQvLCAnLy4uLycpXG4gICAgICAgICAgICAucmVwbGFjZSgvXFwvP1teXFwvXSovZywgZnVuY3Rpb24gKHApIHtcbiAgICAgICAgICAgICAgICBpZiAocCA9PT0gJy8uLicpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnBvcCgpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5wdXNoKHApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gb3V0cHV0LmpvaW4oJycpLnJlcGxhY2UoL15cXC8vLCBpbnB1dC5jaGFyQXQoMCkgPT09ICcvJyA/ICcvJyA6ICcnKTtcbiAgICB9XG5cbiAgICBocmVmID0gcGFyc2VVUkkoaHJlZiB8fCAnJyk7XG4gICAgYmFzZSA9IHBhcnNlVVJJKGJhc2UgfHwgJycpO1xuXG4gICAgcmV0dXJuICFocmVmIHx8ICFiYXNlID8gbnVsbCA6IChocmVmLnByb3RvY29sIHx8IGJhc2UucHJvdG9jb2wpICtcbiAgICAoaHJlZi5wcm90b2NvbCB8fCBocmVmLmF1dGhvcml0eSA/IGhyZWYuYXV0aG9yaXR5IDogYmFzZS5hdXRob3JpdHkpICtcbiAgICByZW1vdmVEb3RTZWdtZW50cyhocmVmLnByb3RvY29sIHx8IGhyZWYuYXV0aG9yaXR5IHx8IGhyZWYucGF0aG5hbWUuY2hhckF0KDApID09PSAnLycgPyBocmVmLnBhdGhuYW1lIDogKGhyZWYucGF0aG5hbWUgPyAoKGJhc2UuYXV0aG9yaXR5ICYmICFiYXNlLnBhdGhuYW1lID8gJy8nIDogJycpICsgYmFzZS5wYXRobmFtZS5zbGljZSgwLCBiYXNlLnBhdGhuYW1lLmxhc3RJbmRleE9mKCcvJykgKyAxKSArIGhyZWYucGF0aG5hbWUpIDogYmFzZS5wYXRobmFtZSkpICtcbiAgICAoaHJ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uY3Rpb24gKHJlcG9ydGVyKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHJlcG9ydGVyID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmxhbmd1YWdlKHJlcG9ydGVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGN1c3RvbUVycm9yUmVwb3J0ZXIgPSByZXBvcnRlcjtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9LFxuICAgICAgICBhZGRGb3JtYXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGdsb2JhbENvbnRleHQuYWRkRm9ybWF0LmFwcGx5KGdsb2JhbENvbnRleHQsIGFyZ3VtZW50cyk7XG4gICAgICAgIH0sXG4gICAgICAgIGxhbmd1YWdlOiBmdW5jdGlvbiAoY29kZSkge1xuICAgICAgICAgICAgaWYgKCFjb2RlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnRMYW5ndWFnZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghbGFuZ3VhZ2VzW2NvZGVdKSB7XG4gICAgICAgICAgICAgICAgY29kZSA9IGNvZGUuc3BsaXQoJy0nKVswXTsgLy8gZmFsbCBiYWNrIHRvIGJhc2UgbGFuZ3VhZ2VcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChsYW5ndWFnZXNbY29kZV0pIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50TGFuZ3VhZ2UgPSBjb2RlO1xuICAgICAgICAgICAgICAgIHJldHVybiBjb2RlOyAvLyBzbyB5b3UgY2FuIHRlbGwgaWYgZmFsbC1iYWNrIGhhcyBoYXBwZW5lZFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9LFxuICAgICAgICBhZGRMYW5ndWFnZTogZnVuY3Rpb24gKGNvZGUsIG1lc3NhZ2VNYXApIHtcbiAgICAgICAgIC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ICAgIHJldHVybiBjdXN0b21FcnJvclJlcG9ydGVyKGVycm9yLCBkYXRhLCBzY2hlbWEpIHx8IGRlZihlcnJvciwgZGF0YSwgc2NoZW1hKTtcbiAgICAgICAgICAgIH0gOiBkZWY7XG4gICAgICAgICAgICB2YXIgY29udGV4dCA9IG5ldyBWYWxpZGF0b3JDb250ZXh0KGdsb2JhbENvbnRleHQsIHRydWUsIGVycm9yUmVwb3J0ZXIsIGNoZWNrUmVjdXJzaXZlLCBiYW5Vbmtub3duUHJvcGVydGllcyk7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHNjaGVtYSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgIHNjaGVtYSA9IHtcIiRyZWZcIjogc2NoZW1hfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnRleHQuYWRkU2NoZW1hKFwiXCIsIHNjaGVtYSk7XG4gICAgICAgICAgICBjb250ZXh0LnZhbGlkYXRlQWxsKGRhdGEsIHNjaGVtYSwgbnVsbCwgbnVsbCwgXCJcIik7XG4gICAgICAgICAgICBpZiAoYmFuVW5rbm93blByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICBjb250ZXh0LmJhblVua25vd25Qcm9wZXJ0aWVzKGRhdGEsIHNjaGVtYSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0ge307XG4gICAgICAgICAgICByZXN1bHQuZXJyb3JzID0gY29udGV4dC5lcnJvcnM7XG4gICAgICAgICAgICByZXN1bHQubWlzc2luZyA9IGNvbnRleHQubWlzc2luZztcbiAgICAgICAgICAgIHJlc3VsdC52YWxpZCA9IChyZXN1bHQuZXJyb3JzLmxlbmd0aCA9PT0gMCk7XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICB9LFxuICAgICAgICBhZGRTY2hlbWE6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBnbG9iYWxDb250ZXh0LmFk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hbWVdID0gY29kZU51bWJlcjtcbiAgICAgICAgICAgIEVycm9yQ29kZUxvb2t1cFtjb2RlTnVtYmVyXSA9IGNvZGVOYW1lO1xuICAgICAgICAgICAgRXJyb3JNZXNzYWdlc0RlZmF1bHRbY29kZU5hbWVdID0gRXJyb3JNZXNzYWdlc0RlZmF1bHRbY29kZU51bWJlcl0gPSBkZWZhdWx0TWVzc2FnZTtcbiAgICAgICAgICAgIGZvciAodmFyIGxhbmdDb2RlIGluIGxhbmd1YWdlcykge1xuICAgICAgICAgICAgICAgIHZhciBsYW5ndWFnZSA9IGxhbmd1YWdlc1tsYW5nQ29kZV07XG4gICAgICAgICAgICAgICAgaWYgKGxhbmd1YWdlW2NvZGVOYW1lXSkge1xuICAgICAgICAgICAgICAgICAgICBsYW5ndWFnZVtjb2RlTnVtYmVyXSA9IGxhbmd1YWdlW2NvZGVOdW1iZXJdIHx8IGxhbmd1YWdlW2NvZGVOYW1lXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHJlc2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBnbG9iYWxDb250ZXh0LnJlc2V0KCk7XG4gICAgICAgICAgICB0aGlzLmVycm9yID0gbnVsbDtcbiAgICAgICAgICAgIHRoaXMubWlzc2luZyA9IFtdO1xuICAgICAgICAgICAgdGhpcy52YWxpZCA9IHRydWU7XG4gICAgICAgIH0sXG4gICAgICAgIG1pc3Npbmc6IFtdLFxuICAgICAgICBlcnJvcjogbnVsbCxcbiAgICAgICAgdmFsaWQ6IHRydWUsXG4gICAgICAgIG5vcm1TY2hlbWE6IG5vcm1TY2hlbWEsXG4gICAgICAgIHJlc29sdmVVcmw6IHJlc29sdmVVcmwsXG4gICAgICAgIGdldERvY3VtZW50VXJpOiBnZXREb2N1bWVudFVyaSxcbiAgICAgICAgZXJyb3JDb2RlczogRXJyb3JDb2Rlc1xuICAgIH07XG4gICAgYXBpLmxhbmd1YW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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBekpBO0FBMkpBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///511\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(513), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTEyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvaXMtZnJvemVuLmpzP2Q5ZmEiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9pcy1mcm96ZW5cIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvb2JqZWN0L2lzLWZyb3plbi5qc1xuLy8gbW9kdWxlIGlkID0gNTEyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///512\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(514);\nmodule.exports = __webpack_require__(13).Object.isFrozen;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTEzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvaXMtZnJvemVuLmpzPzVmZDMiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmlzLWZyb3plbicpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0LmlzRnJvemVuO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9pcy1mcm96ZW4uanNcbi8vIG1vZHVsZSBpZCA9IDUxM1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///513\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.12 Object.isFrozen(O)\nvar isObject = __webpack_require__(36);\n\n__webpack_require__(97)('isFrozen', function ($isFrozen) {\n return function isFrozen(it) {\n return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuaXMtZnJvemVuLmpzP2M5MTIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjEyIE9iamVjdC5pc0Zyb3plbihPKVxudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgnaXNGcm96ZW4nLCBmdW5jdGlvbiAoJGlzRnJvemVuKSB7XG4gIHJldHVybiBmdW5jdGlvbiBpc0Zyb3plbihpdCkge1xuICAgIHJldHVybiBpc09iamVjdChpdCkgPyAkaXNGcm96ZW4gPyAkaXNGcm96ZW4oaXQpIDogZmFsc2UgOiB0cnVlO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczYub2JqZWN0LmlzLWZyb3plbi5qc1xuLy8gbW9kdWxlIGlkID0gNTE0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///514\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _Subscription = __webpack_require__(211);\n\nvar _Subscription2 = _interopRequireDefault(_Subscription);\n\nvar _CryptoManager = __webpack_require__(100);\n\nvar cryptoManager = _interopRequireWildcard(_CryptoManager);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('ReporterObject'); // Log System\n\nvar ReporterObject = function () {\n function ReporterObject(parent, owner, url) {\n (0, _classCallCheck3.default)(this, ReporterObject);\n\n var _this = this;\n\n _this._parent = parent;\n _this._owner = owner;\n _this._url = url;\n\n _this._bus = parent._bus;\n\n _this._domain = (0, _utils.divideURL)(url).domain;\n _this._objSubscriptorURL = _this._url + '/subscription';\n\n _this._subscriptions = {};\n _this._childrens = [];\n _this._childrenListeners = [];\n\n _this._forwards = {};\n\n _this._isToSaveData = false;\n\n _this._allocateListeners();\n }\n\n (0, _createClass3.default)(ReporterObject, [{\n key: '_allocateListeners',\n value: function _allocateListeners() {\n var _this2 = this;\n\n var _this = this;\n\n //add subscription listener...\n _this._subscriptionListener = _this._bus.addListener(_this._objSubscriptorURL, function (msg) {\n log.info('[SyncherManager.ReporterObject received ]', msg);\n switch (msg.type) {\n case 'subscribe':\n _this._onRemoteSubscribe(msg);break;\n case 'unsubscribe':\n _this._onRemoteUnSubscribe(msg);break;\n case 'response':\n _this._onRemoteResponse(msg);break;\n }\n });\n\n var changeURL = _this._url + '/changes';\n _this._changeListener = _this._bus.addListener(changeURL, function (msg) {\n\n log.info('[SyncherManager.ReporterObject ] SyncherManager-' + changeURL + '-RCV: ', msg);\n\n //TODO: what todo here? Save changes?\n if (_this2._isToSaveData && msg.body.attribute) {\n log.log('[SyncherManager.ReporterObject ] SyncherManager - save data: ', msg);\n _this._parent._dataObjectsStorage.update(true, _this._url, 'version', msg.body.version);\n _this._parent._dataObjectsStorage.update(true, _this._url, 'lastModified', msg.body.lastModified);\n _this._parent._dataObjectsStorage.saveData(true, _this._url, msg.body.attribute, msg.body.value);\n }\n });\n }\n }, {\n key: '_releaseListeners',\n value: function _releaseListeners() {\n var _this = this;\n\n _this._subscriptionListener.remove();\n\n _this._changeListener.remove();\n\n _this._childrenListeners.forEach(function (cl) {\n cl.remove();\n });\n\n (0, _keys2.default)(_this._forwards).forEach(function (key) {\n _this.forwardUnSubscribe(key);\n });\n\n //remove all subscriptions\n (0, _keys2.default)(_this._subscriptions).forEach(function (key) {\n _this._subscriptions[key]._releaseListeners();\n });\n }\n }, {\n key: 'resumeSubscriptions',\n value: function resumeSubscriptions(subscriptions) {\n var _this = this;\n\n if (!subscriptions) return;\n\n (0, _keys2.default)(subscriptions).forEach(function (key) {\n var hypertyURL = subscriptions[key];\n\n log.log('[SyncherManager.ReporterObject] - resume subscriptions', _this, hypertyURL, _this._childrens);\n\n if (!_this._subscriptions[hypertyURL]) {\n _this._subscriptions[hypertyURL] = new _Subscription2.default(_this._bus, _this._owner, _this._url, _this._childrens, true);\n }\n });\n }\n\n /**\n * Register a listener in the msg-node and in the local MessageBus, so that messages on this address are forwarded to the reporter object\n * @param {string} address - URL to register the listeners\n * @return {Promise} Return Promise OK or error\n */\n\n }, {\n key: 'forwardSubscribe',\n value: function forwardSubscribe(addresses) {\n var _this = this;\n\n //FLOW-OUT: message sent to the msg-node SubscriptionManager component\n var nodeSubscribeMsg = {\n type: 'subscribe', from: _this._parent._url, to: 'domain://msg-node.' + _this._domain + '/sm',\n body: { resources: addresses, source: _this._owner }\n };\n\n return new _promise2.default(function (resolve, reject) {\n _this._bus.postMessage(nodeSubscribeMsg, function (reply) {\n log.log('[SyncherManager.ReporterObject ]forward-subscribe-response(reporter): ', reply);\n if (reply.body.code === 200) {\n var newForward = _this._bus.addForward(_this._url, _this._owner);\n _this._forwards[addresses[0]] = newForward;\n resolve();\n } else {\n reject('Error on msg-node subscription: ' + reply.body.desc);\n }\n });\n });\n }\n\n /**\n * UnRegister a listener in the msg-node and in the local MessageBus, so that messages on this address are removed from forward\n * @param {string} address - URL to un-register the listeners\n */\n\n }, {\n key: 'forwardUnSubscribe',\n value: function forwardUnSubscribe(address) {\n var _this = this;\n\n _this._forwards[address].remove();\n delete _this._forwards[address];\n\n //FLOW-OUT: message sent to the msg-node SubscriptionManager component\n var nodeUnSubscribeMsg = {\n type: 'unsubscribe', from: _this._parent._url, to: 'domain://msg-node.' + _this._domain + '/sm',\n body: { resources: [address], source: _this._owner }\n };\n\n _this._bus.postMessage(nodeUnSubscribeMsg);\n }\n\n /**\n * Register listeners for a list of childrens. Public channels used to transmit messages.\n * @param {string[]} childrens - channels to register\n * @return {Promise} Return Promise OK or error\n */\n\n }, {\n key: 'addChildrens',\n value: function addChildrens(childrens) {\n var _this3 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n if (childrens.length === 0) {\n resolve();\n return;\n }\n\n var childBaseURL = _this._url + '/children/';\n log.log('[SyncherManager.ReporterObject - addChildrens] - childrens: ', childrens, childBaseURL);\n\n childrens.forEach(function (child) {\n _this._childrens.push(child);\n });\n\n /*\n _this._childrens.forEach((child) => {\n let childId = childBaseURL + child;\n let selfForward = _this._bus.addForward(childId, owner);\n _this._childrenListeners.push(selfForward);\n });*/\n\n var subscriptions = [];\n childrens.forEach(function (child) {\n return subscriptions.push(childBaseURL + child);\n });\n\n //_this._storageSubscriptions[_this._objSubscriptorURL] = {url: _this._url, owner: _this._owner, childrens: _this._childrens};\n\n //FLOW-OUT: message sent to the msg-node SubscriptionManager component\n var nodeSubscribeMsg = {\n type: 'subscribe', from: _this._parent._url, to: 'domain://msg-node.' + _this._domain + '/sm',\n body: { resources: subscriptions, source: _this._owner }\n };\n\n _this._bus.postMessage(nodeSubscribeMsg, function (reply) {\n log.log('[SyncherManager.ReporterObject ]node-subscribe-response(reporter):', reply);\n if (reply.body.code === 200) {\n\n //add children listeners on local ...\n subscriptions.forEach(function (childURL) {\n var childListener = _this._bus.addListener(childURL, function (msg) {\n //TODO: what todo here? Save childrens?\n log.log('[SyncherManager.ReporterObject received]', msg);\n\n if (msg.type === 'create' && msg.to.includes('children') && _this3._isToSaveData) {\n\n // if the value is not encrypted lets encrypt it\n // todo: should be subject to some policy\n var splitedReporterURL = (0, _utils.splitObjectURL)(msg.to);\n\n var url = splitedReporterURL.url;\n\n //remove false when mutualAuthentication is enabled\n if (!(typeof msg.body.value === 'string')) {\n\n log.log('[SyncherManager.ReporterObject] encrypting received data ', msg.body.value);\n\n cryptoManager.default.encryptDataObject(msg.body.value, url).then(function (encryptedValue) {\n log.log('[SyncherManager.ReporterObject] encrypted data ', encryptedValue);\n\n _this._storeChildObject(msg, (0, _stringify2.default)(encryptedValue));\n }).catch(function (reason) {\n log.warn('[SyncherManager._decryptChildrens] failed : ', reason, ' Storing unencrypted');\n _this._storeChildObject(msg, msg.body.value);\n });\n } else {\n _this._storeChildObject(msg, msg.body.value);\n }\n }\n });\n _this._childrenListeners.push(childListener);\n\n var selfForward = _this._bus.addForward(childURL, _this._owner);\n _this._childrenListeners.push(selfForward);\n });\n\n resolve();\n } else {\n reject('Error on msg-node subscription: ' + reply.body.desc);\n }\n });\n });\n }\n\n // store childObject\n\n }, {\n key: '_storeChildObject',\n value: function _storeChildObject(msg, data) {\n var _this = this;\n\n var splitedReporterURL = (0, _utils.splitObjectURL)(msg.to);\n\n var url = splitedReporterURL.url;\n\n var resource = splitedReporterURL.resource;\n var value = {\n identity: msg.body.identity,\n value: data\n };\n\n var objectURLResource = msg.body.resource;\n var attribute = resource;\n\n if (objectURLResource) attribute += '.' + objectURLResource;\n\n // this identity data is not needed to be stored\n delete value.identity.assertion;\n delete value.identity.expires;\n\n console.log('[SyncherManager.ReporterObject._storeChildObject] : ', url, attribute, value);\n\n _this._parent._dataObjectsStorage.saveChildrens(true, url, attribute, value);\n }\n }, {\n key: 'delete',\n value: function _delete() {\n var _this = this;\n var domain = (0, _utils.divideURL)(_this._owner).domain;\n\n //FLOW-OUT: message sent directly to all subscribers of the reporter\n _this._bus.postMessage({\n type: 'delete', from: _this._objSubscriptorURL, to: _this._url + '/changes'\n });\n\n //FLOW-OUT: message sent to the msg-node ObjectAllocationManager component\n _this._bus.postMessage({\n type: 'delete', from: _this._parent._url, to: 'domain://msg-node.' + domain + '/object-address-allocation',\n body: { resource: _this._url, childrenResources: _this._childrens }\n });\n\n _this._releaseListeners();\n delete _this._parent._reporters[_this._url];\n }\n }, {\n key: '_onRemoteResponse',\n value: function _onRemoteResponse(msg) {\n var _this = this;\n\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: _this._url,\n body: { code: msg.body.code, identity: msg.body.identity, source: msg.from }\n });\n }\n\n //FLOW-IN: message received from Syncher -> subscribe\n\n }, {\n key: '_onRemoteSubscribe',\n value: function _onRemoteSubscribe(msg) {\n var _this = this;\n var hypertyURL = msg.body.subscriber;\n\n //validate if subscription already exists?\n if (_this._subscriptions[hypertyURL]) {\n // let errorMsg = {\n // id: msg.id, type: 'response', from: msg.to, to: hypertyURL,\n // body: { code: 500, desc: 'Subscription for (' + _this._url + ' : ' + hypertyURL + ') already exists!' }\n // };\n //\n // _this._bus.postMessage(errorMsg);\n // return;\n\n // new version because of reusage\n _this._subscriptions[hypertyURL]._releaseListeners();\n }\n\n //ask to subscribe to Syncher? (depends on the operation mode)\n //TODO: get mode from object!\n var mode = 'sub/pub';\n\n if (mode === 'sub/pub') {\n //FLOW-OUT: message sent to local hyperty address Syncher -> _onForward\n var forwardMsg = {\n type: 'forward', from: _this._url, to: _this._owner,\n body: { type: msg.type, from: hypertyURL, to: _this._url, identity: msg.body.identity }\n };\n\n //TODO: For Further Study\n if (msg.body.hasOwnProperty('mutual')) forwardMsg.body.mutual = msg.body.mutual;\n\n _this._bus.postMessage(forwardMsg, function (reply) {\n log.log('[SyncherManager.ReporterObject ]forward-reply: ', reply);\n if (reply.body.code === 200) {\n if (!_this._subscriptions[hypertyURL]) {\n log.log('[SyncherManager.ReporterObject] - _onRemoteSubscribe:', _this._childrens);\n _this._subscriptions[hypertyURL] = new _Subscription2.default(_this._bus, _this._owner, _this._url, _this._childrens, true);\n }\n }\n\n //TODO: atualizar mutual no storage e tb na sessionKeys\n\n // Store for each reporter hyperty the dataObject\n var userURL = void 0;\n if (msg.body.identity && msg.body.identity.userProfile.userURL) {\n userURL = msg.body.identity.userProfile.userURL;\n _this._parent._dataObjectsStorage.update(true, _this._url, 'subscriberUsers', userURL);\n }\n\n if (msg.body.hasOwnProperty('mutual')) {\n // _this._parent._identityModule.updateIsToEncryptForDataObjectSessionKey(_this._url, msg.body.mutual).then(()=>{\n _this._parent._dataObjectsStorage.update(true, _this._url, 'mutual', msg.body.mutual);\n // });\n }\n\n _this._parent._dataObjectsStorage.update(true, _this._url, 'subscriptions', hypertyURL);\n\n reply.body.owner = _this._owner;\n\n //FLOW-OUT: subscription response sent (forward from internal Hyperty)\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: reply.body\n });\n });\n }\n }\n\n //FLOW-IN: message received from remote ObserverObject -> removeSubscription\n\n }, {\n key: '_onRemoteUnSubscribe',\n value: function _onRemoteUnSubscribe(msg) {\n var _this = this;\n var unsubscriber = msg.body.source;\n\n var subscription = _this._subscriptions[unsubscriber];\n if (subscription) {\n subscription._releaseListeners();\n delete _this._subscriptions[unsubscriber];\n\n var forwardMsg = {\n type: 'forward', from: _this._url, to: _this._owner,\n body: { type: msg.type, from: unsubscriber, to: _this._url, identity: msg.body.identity }\n };\n\n _this._bus.postMessage(forwardMsg);\n }\n }\n }, {\n key: 'isToSaveData',\n set: function set(value) {\n this._isToSaveData = value;\n }\n }]);\n return ReporterObject;\n}();\n\nexports.default = ReporterObject;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zeW5jaGVyL1JlcG9ydGVyT2JqZWN0LmpzP2M3Y2IiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ2VyIGZyb20gJ2xvZ2xldmVsJztcbmxldCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdSZXBvcnRlck9iamVjdCcpO1xuXG5pbXBvcnQgeyBkaXZpZGVVUkwsIHNwbGl0T2JqZWN0VVJMIH0gZnJvbSAnLi4vdXRpbHMvdXRpbHMnO1xuaW1wb3J0IFN1YnNjcmlwdGlvbiBmcm9tICcuL1N1YnNjcmlwdGlvbic7XG5pbXBvcnQgKiBhcyBjcnlwdG9NYW5hZ2VyIGZyb20gJy4uL2NyeXB0b01hbmFnZXIvQ3J5cHRvTWFuYWdlcic7XG5cbmNsY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ZSk7XG5cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuX3N0b3JlQ2hpbGRPYmplY3QobXNnLCBKU09OLnN0cmluZ2lmeShlbmNyeXB0ZWRWYWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgfSkuY2F0Y2goKHJlYXNvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBsb2cud2FybignW1N5bmNoZXJNYW5hZ2VyLl9kZWNyeXB0Q2hpbGRyZW5zXSBmYWlsZWQgOiAnLCByZWFzb24sICcgU3RvcmluZyB1bmVuY3J5cHRlZCcpO1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5fc3RvcmVDaGlsZE9iamVjdChtc2csIG1zZy5ib2R5LnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBfdGhpcy5fc3RvcmVDaGlsZE9iamVjdChtc2csIG1zZy5ib2R5LnZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBfdGhpcy5fY2hpbGRyZW5MaXN0ZW5lcnMucHVzaChjaGlsZExpc3RlbmVyKTtcblxuICAgICAgICAgICAgbGV0IHNlbGZGb3J3YXJkID0gX3RoaXMuX2J1cy5hZGRGb3J3YXJkKGNoaWxkVVJMLCBfdGhpcy5fb3duZXIpO1xuICAgICAgICAgICAgX3RoaXMuX2NoaWxkcmVuTGlzdGVuZXJzLnB1c2goc2VsZkZvcndhcmQpO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJlamVjdCgnRXJyb3Igb24gbXNnLW5vZGUgc3Vic2NyaXB0aW9uOiAnICsgcmVwbHkuYm9keS5kZXNjKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICAvLyBzdG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Q0E7QUFDQTtBQUNBO0FBRkE7QUFDQTtBQUtBO0FBQ0E7QUFFQTs7O0FBMVVBO0FBQ0E7QUFDQTs7Ozs7QUE0VUE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///515\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _Subscription = __webpack_require__(211);\n\nvar _Subscription2 = _interopRequireDefault(_Subscription);\n\nvar _CryptoManager = __webpack_require__(100);\n\nvar cryptoManager = _interopRequireWildcard(_CryptoManager);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('ObserverObject'); // Log System\n\nvar ObserverObject = function () {\n function ObserverObject(parent, url, childrens) {\n var _this2 = this;\n\n (0, _classCallCheck3.default)(this, ObserverObject);\n\n var _this = this;\n\n _this._parent = parent;\n _this._url = url;\n _this._childrens = childrens;\n\n _this._bus = parent._bus;\n\n _this._subscriptions = {};\n _this._storageSubscriptions = {};\n _this._childrenListeners = [];\n\n this._isToSaveData = false;\n\n var changeURL = _this._url + '/changes';\n _this._changeListener = _this._bus.addListener(changeURL, function (msg) {\n\n log.log('[SyncherManager.ObserverObject ] SyncherManager-' + changeURL + '-RCV: ', msg);\n\n //TODO: what todo here? Save changes?\n if (_this2._isToSaveData && msg.body.attribute) {\n log.log('[SyncherManager.ObserverObject ] SyncherManager - save data: ', msg);\n _this._parent._dataObjectsStorage.update(false, _this._url, 'version', msg.body.version);\n _this._parent._dataObjectsStorage.update(false, _this._url, 'lastModified', msg.body.lastModified);\n _this._parent._dataObjectsStorage.saveData(false, _this._url, msg.body.attribute, msg.body.value);\n }\n });\n }\n\n (0, _createClass3.default)(ObserverObject, [{\n key: '_newSubscription',\n value: function _newSubscription(hyperty) {\n var _this = this;\n\n var subscription = _this._subscriptions[hyperty];\n log.log('[Observer Object - new subscription] - ', _this._subscriptions, hyperty, _this._subscriptions.hasOwnProperty(hyperty));\n if (!subscription) {\n _this._subscriptions[hyperty] = new _Subscription2.default(_this._bus, hyperty, _this._url, _this._childrens, false);\n }\n }\n }, {\n key: 'addSubscription',\n value: function addSubscription(hyperty) {\n var _this = this;\n\n _this._newSubscription(hyperty);\n }\n }, {\n key: 'addChildrens',\n value: function addChildrens(childrens) {\n var _this3 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n if (childrens.length === 0) {\n return resolve();\n }\n\n var childBaseURL = _this._url + '/children/';\n log.log('[SyncherManager.ObserverObject - addChildrens] - childrens: ', childrens, childBaseURL);\n\n childrens.forEach(function (child) {\n\n var childListener = _this._bus.addListener(childBaseURL + child, function (msg) {\n //TODO: what todo here? Save childrens?\n log.log('[SyncherManager.ObserverObject received]', msg);\n\n if (msg.type === 'create' && msg.to.includes('children') && _this3._isToSaveData) {\n var splitedReporterURL = (0, _utils.splitObjectURL)(msg.to);\n\n var url = splitedReporterURL.url;\n\n //remove false when mutualAuthentication is enabled\n if (!(typeof msg.body.value === 'string')) {\n\n log.log('[SyncherManager.ObserverObject] encrypting received data ', msg.body.value);\n\n cryptoManager.default.encryptDataObject(msg.body.value, url).then(function (encryptedValue) {\n log.log('[SyncherManager.ObserverObject] encrypted data ', encryptedValue);\n\n _this._storeChildObject(msg, (0, _stringify2.default)(encryptedValue));\n }).catch(function (reason) {\n log.warn('[SyncherManager.ObserverObject._encryptChild] failed, storing unencrypted ', reason);\n _this._storeChildObject(msg, msg.body.value);\n });\n } else {\n _this._storeChildObject(msg, msg.body.value);\n }\n }\n\n log.log('[SyncherManager.ObserverObject children Listeners]', _this._childrenListeners, childListener);\n if (_this._childrenListeners.indexOf(childListener) === -1) {\n _this._childrenListeners.push(childListener);\n }\n });\n });\n });\n }\n\n // store childObject\n\n }, {\n key: '_storeChildObject',\n value: function _storeChildObject(msg, data) {\n var _this = this;\n\n var splitedReporterURL = (0, _utils.splitObjectURL)(msg.to);\n\n var url = splitedReporterURL.url;\n\n var resource = splitedReporterURL.resource;\n var value = {\n identity: msg.body.identity,\n value: data\n };\n\n // this identity data is not needed to be stored\n delete value.identity.assertion;\n delete value.identity.expires;\n\n var objectURLResource = msg.body.resource;\n var attribute = resource;\n\n if (objectURLResource) attribute += '.' + objectURLResource;\n\n log.log('[SyncherManager.ObserverObject._storeChildObject] : ', url, attribute, value);\n\n _this._parent._dataObjectsStorage.saveChildrens(false, url, attribute, value);\n }\n }, {\n key: 'removeSubscription',\n value: function removeSubscription(msg) {\n var _this = this;\n\n var hyperty = msg.from;\n\n var domain = (0, _utils.divideURL)(hyperty).domain;\n var objURLSubscription = _this._url + '/subscription';\n\n var subscription = _this._subscriptions[hyperty];\n if (subscription) {\n //FLOW-OUT: message sent to remote ReporterObject -> _onRemoteUnSubscribe\n _this._bus.postMessage({\n type: 'unsubscribe', from: _this._parent._url, to: objURLSubscription,\n body: { source: hyperty, identity: msg.body.identity }\n });\n\n //TODO: should I wait for response before unsubscribe on msg-node\n //FLOW-OUT: message sent to msg-node SubscriptionManager component\n _this._bus.postMessage({\n type: 'unsubscribe', from: _this._parent._url, to: 'domain://msg-node.' + domain + '/sm',\n body: { resource: _this._url, childrenResources: _this._childrens }\n });\n\n subscription._releaseListeners();\n delete _this._subscriptions[hyperty];\n }\n }\n }, {\n key: 'isToSaveData',\n set: function set(value) {\n this._isToSaveData = value;\n }\n }]);\n return ObserverObject;\n}();\n\nexports.default = ObserverObject;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zeW5jaGVyL09ic2VydmVyT2JqZWN0LmpzPzFiNTUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ2VyIGZyb20gJ2xvZ2xldmVsJztcbmxldCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdPYnNlcnZlck9iamVjdCcpO1xuXG5pbXBvcnQgeyBkaXZpZGVVUkwsIHNwbGl0T2JqZWN0VVJMIH0gZnJvbSAnLi4vdXRpbHMvdXRpbHMnO1xuaW1wb3J0IFN1YnNjcmlwdGlvbiBmcm9tICcuL1N1YnNjcmlwdGlvbic7XG5pbXBvcnQgKiBhcyBjcnlwdG9NYW5hZ2VyIGZyb20gJy4uL2NyeXB0b01hbmFnZXIvQ3J5cHRvTWFuYWdlcic7XG5cbmNsYXNzIE9ic2VydmVyT2JqZWN0IHtcblxuICBjb25zdHJ1Y3RvcihwYXJlbnQsIHVybCwgY2hpbGRyZW5zKSB7XG4gICAgbGV0IF90aGlzID0gdGhpcztcblxuICAgIF90aGlzLl9wYXJlbnQgPSBwYXJlbnQ7XG4gICAgX3RoaXMuX3VybCA9IHVybDtcbiAgICBfdGhpcy5fY2hpbGRyZW5zID0gY2hpbGRyZW5zO1xuXG4gICAgX3RoaXMuX2J1cyA9IHBhcmVudC5fYnVzO1xuXG4gICAgX3RoaXMuX3N1YnNjcmlwdGlvbnMgPSB7fTtcbiAgICBfdGhpcy5fc3RvcmFnZVN1YnNjcmlwdGlvbnMgPSB7fTtcbiAgIC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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRkE7QUFDQTtBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRkE7QUFDQTtBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFGQTtBQUNBO0FBSUE7QUFDQTtBQUNBO0FBQ0E7OztBQS9IQTtBQUNBO0FBQ0E7Ozs7O0FBaUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///516\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _values = __webpack_require__(210);\n\nvar _values2 = _interopRequireDefault(_values);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _Subscription = __webpack_require__(518);\n\nvar _Subscription2 = _interopRequireDefault(_Subscription);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('SubscriptionManager'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log System\n\n/**\n * @author paulo-g-chainho@alticelabs.com\n * Subscription Manager used to manage routing paths at the runtime.\n */\n\nvar SubscriptionManager = function () {\n function SubscriptionManager(runtimeURL, bus, storage) {\n (0, _classCallCheck3.default)(this, SubscriptionManager);\n\n if (!runtimeURL) throw new Error('[SubscriptionManager] - needs the runtimeURL parameter');\n if (!bus) throw new Error('[SubscriptionManager] - needs the MessageBus instance');\n\n var _this = this;\n\n _this._bus = bus;\n _this._storage = storage;\n\n _this._subscriptions = {};\n\n _this._subscriptionsStorage = {};\n\n //TODO: these should be saved in persistence engine?\n _this.runtimeURL = runtimeURL;\n _this._url = runtimeURL + '/subscriptions';\n\n //TODO: this should not be hardcoded!\n _this._domain = (0, _utils.divideURL)(runtimeURL).domain;\n\n bus.addListener(_this._url, function (msg) {\n log.info('[SubscriptionManager] RCV: ', msg);\n switch (msg.type) {\n case 'subscribe':\n _this._onSubscribe(msg);break;\n case 'unsubscribe':\n _this._onUnSubscribe(msg);break;\n case 'read':\n _this._onRead(msg);break;\n }\n });\n }\n\n (0, _createClass3.default)(SubscriptionManager, [{\n key: 'init',\n value: function init() {\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n\n _this._storage.get('subscriptions').then(function (subscriptions) {\n log.log('[SubscriptionManager.init] resume subscriptions: ', subscriptions);\n if (subscriptions) {\n\n _this._subscriptionsStorage = subscriptions;\n\n (0, _values2.default)(subscriptions).forEach(function (subscription) {\n _this._createSubscription(subscription.domain, subscription.resources, subscription.subscriber, subscription.identity);\n });\n }\n resolve();\n });\n });\n }\n }, {\n key: '_onSubscribe',\n\n\n //message received to set a routing path\n value: function _onSubscribe(msg) {\n\n var _this = this;\n\n var resources = msg.body.resources;\n\n var subscriber = msg.from;\n var domain = (0, _utils.divideURL)(resources[0]).domain; //we are assuming resources are all from the same domain\n\n var identity = msg.body.identity;\n\n _this._createSubscription(domain, resources, subscriber, identity).then(function (reply) {\n //forward to hyperty:\n reply.id = msg.id;\n reply.from = _this._url;\n reply.to = subscriber;\n reply.body = msg.body;\n reply.body.code = 200;\n\n log.log('[SubscriptionManager] - craeteSubscription: ', msg, reply, subscriber);\n\n _this._bus.postMessage(reply);\n\n if (!_this._subscriptionsStorage[subscriber]) {\n\n _this._subscriptionsStorage[subscriber] = {\n domain: domain,\n resources: resources,\n subscriber: subscriber,\n identity: identity\n };\n } else {\n resources.forEach(function (resource) {\n if (!_this._subscriptionsStorage[subscriber].resources.includes(resource)) {\n _this._subscriptionsStorage[subscriber].resources.push(resource);\n }\n });\n }\n\n _this._storage.set('subscriptions', 1, _this._subscriptionsStorage);\n });\n }\n }, {\n key: '_createSubscription',\n value: function _createSubscription(domain, resources, subscriber, identity) {\n\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n //FLOW-OUT: subscribe message to the msg-node, registering listeners on the broker\n\n var nodeSubscribeMsg = {\n type: 'subscribe', from: _this._url, to: 'domain://msg-node.' + domain + '/sm',\n body: { identity: identity, resources: resources, source: subscriber }\n };\n\n //subscribe in msg-node\n _this._bus.postMessage(nodeSubscribeMsg, function (reply) {\n log.log('[SubscriptionManager] node-subscribe-response: ', reply);\n\n //if (reply.body.code === 200) {//TODO: uncomment when MN replies with correct response body code\n\n //TODO: support multiple routes for multiple resources\n\n var subscription = _this._subscriptions[subscriber];\n log.log('[SubscriptionManager] - ', _this._subscriptions, resources, _this._subscriptions.hasOwnProperty(subscriber));\n if (!subscription) {\n _this._subscriptions[subscriber] = {};\n }\n\n resources.forEach(function (resource) {\n _this._subscriptions[subscriber][resource] = new _Subscription2.default(_this._bus, subscriber, resource);\n });\n\n resolve(reply);\n });\n });\n }\n\n // message received to remove routing path\n\n }, {\n key: '_onUnSubscribe',\n value: function _onUnSubscribe(msg) {\n var _this = this;\n\n var unsubscriber = msg.from;\n var resource = msg.body.resource;\n\n if (_this._subscriptions[unsubscriber] && _this._subscriptions[unsubscriber][resource]) {\n var domain = (0, _utils.divideURL)(resource).domain;\n var subscription = _this._subscriptions[unsubscriber][resource];\n\n //FLOW-OUT: message sent to msg-node SubscriptionManager component\n _this._bus.postMessage({\n type: 'unsubscribe', from: _this._url, to: 'domain://msg-node.' + domain + '/sm',\n body: { resources: [resource], source: unsubscriber }\n });\n\n subscription._releaseListeners();\n delete _this._subscriptions[unsubscriber][resource];\n\n if (_this._subscriptionsStorage[unsubscriber]) {\n var i = _this._subscriptionsStorage[unsubscriber].resources.indexOf(resource);\n if (i != -1) {\n _this._subscriptionsStorage[unsubscriber].resources.splice(i, 1);\n }\n _this._storage.set('subscriptions', 1, _this._subscriptionsStorage);\n }\n }\n\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 200 }\n });\n }\n\n //message received to read existing routing paths. At this point limited to read all existing routing paths set for one listener\n\n }, {\n key: '_onRead',\n value: function _onRead(msg) {\n\n var _this = this;\n\n var listenerAddress = msg.body.resource;\n var reply = void 0;\n\n log.log('[SubscriptionManager] - request to read Subscriptions: ', msg);\n\n _this._storage.get('subscriptions').then(function (subscriptions) {\n if (subscriptions && subscriptions[listenerAddress]) {\n var resources = subscriptions[listenerAddress].resources;\n\n reply = {\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 200, value: resources }\n };\n } else {\n reply = {\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 404, description: 'Not Found' }\n };\n }\n _this._bus.postMessage(reply);\n });\n }\n }, {\n key: 'url',\n get: function get() {\n return this._url;\n }\n }]);\n return SubscriptionManager;\n}();\n\nexports.default = SubscriptionManager;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zdWJzY3JpcHRpb25NYW5hZ2VyL1N1YnNjcmlwdGlvbk1hbmFnZXIuanM/ZGE4MiJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE2IFFVT0JJUyBORVRXT1JLUyBTTFxuKiBDb3B5cmlnaHQgMjAxNiBGUkFVTkhPRkVSLUdFU0VMTFNDSEFGVCBaVVIgRk9FUkRFUlVORyBERVIgQU5HRVdBTkRURU4gRk9SU0NIVU5HIEUuVlxuKiBDb3B5cmlnaHQgMjAxNiBPUkFOR0UgU0FcbiogQ29weXJpZ2h0IDIwMTYgRGV1dHNjaGUgVGVsZWtv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UNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBQ0E7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBRUE7QUFDQTs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBQ0E7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFGQTtBQUtBO0FBQ0E7QUFDQTtBQUNBOzs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFGQTtBQUlBO0FBQ0E7QUFDQTtBQUNBOzs7QUF2SkE7QUFBQTtBQUFBOzs7OztBQTBKQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///517\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('Subscription'); // Log System\n\nvar Subscription = function () {\n function Subscription(bus, subscriber, resource) {\n (0, _classCallCheck3.default)(this, Subscription);\n\n var _this = this;\n _this._subscriber = subscriber;\n _this.resource = resource;\n\n log.log('[SubscriptionManager.Subscription] new: ', subscriber, resource);\n\n //add forward\n _this._listener = bus.addForward(resource, subscriber);\n }\n\n (0, _createClass3.default)(Subscription, [{\n key: '_releaseListeners',\n value: function _releaseListeners() {\n var _this = this;\n\n _this._listener.remove();\n }\n }]);\n return Subscription;\n}();\n\nexports.default = Subscription;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zdWJzY3JpcHRpb25NYW5hZ2VyL1N1YnNjcmlwdGlvbi5qcz85NDk1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIExvZyBTeXN0ZW1cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignU3Vic2NyaXB0aW9uJyk7XG5cbmNsYXNzIFN1YnNjcmlwdGlvbiB7XG5cbiAgY29uc3RydWN0b3IoYnVzLCBzdWJzY3JpYmVyLCByZXNvdXJjZSkge1xuICAgIGxldCBfdGhpcyA9IHRoaXM7XG4gICAgX3RoaXMuX3N1YnNjcmliZXIgPSBzdWJzY3JpYmVyO1xuICAgIF90aGlzLnJlc291cmNlID0gcmVzb3VyY2U7XG5cbiAgICBsb2cubG9nKCdbU3Vic2NyaXB0aW9uTWFuYWdlci5TdWJzY3JpcHRpb25dIG5ldzogJywgc3Vic2NyaWJlciwgcmVzb3VyY2UpXG5cbiAgICAvL2FkZCBmb3J3YXJkXG4gICAgX3RoaXMuX2xpc3RlbmVyID0gYnVzLmFkZEZvcndhcmQocmVzb3VyY2UsIHN1YnNjcmliZXIpO1xuXG4gIH1cblxuICBfcmVsZWFzZUxpc3RlbmVycygpIHtcbiAgICBsZXQgX3RoaXMgPSB0aGlzO1xuXG4gICAgX3RoaXMuX2xpc3RlbmVyLnJlbW92ZSgpO1xuXG4gIH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCBTdWJzY3JpcHRpb247XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gc3JjL3N1YnNjcmlwdGlvbk1hbmFnZXIvU3Vic2NyaXB0aW9uLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUNBO0FBQ0E7QUFEQTtBQUNBOzs7OztBQUFBO0FBQ0E7QUFDQTtBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBOzs7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///518\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _AllowOverrides = __webpack_require__(206);\n\nvar _AllowOverrides2 = _interopRequireDefault(_AllowOverrides);\n\nvar _BlockOverrides = __webpack_require__(207);\n\nvar _BlockOverrides2 = _interopRequireDefault(_BlockOverrides);\n\nvar _utils = __webpack_require__(14);\n\nvar _FirstApplicable = __webpack_require__(208);\n\nvar _FirstApplicable2 = _interopRequireDefault(_FirstApplicable);\n\nvar _ReThinkCtx2 = __webpack_require__(520);\n\nvar _ReThinkCtx3 = _interopRequireDefault(_ReThinkCtx2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('PEP');\n\nvar RuntimeCoreCtx = function (_ReThinkCtx) {\n (0, _inherits3.default)(RuntimeCoreCtx, _ReThinkCtx);\n\n function RuntimeCoreCtx(runtimeURL, idModule, runtimeRegistry, storageManager, runtimeCapabilities) {\n (0, _classCallCheck3.default)(this, RuntimeCoreCtx);\n\n var _this2 = (0, _possibleConstructorReturn3.default)(this, (RuntimeCoreCtx.__proto__ || (0, _getPrototypeOf2.default)(RuntimeCoreCtx)).call(this));\n\n _this2._runtimeURL = runtimeURL;\n _this2._pepURL = _this2._runtimeURL + '/pep';\n _this2._guiURL = _this2._runtimeURL + '/policy-gui';\n _this2.idModule = idModule;\n _this2.runtimeRegistry = runtimeRegistry;\n _this2.activeUserPolicy = undefined;\n _this2.serviceProviderPolicy = {};\n _this2.userPolicies = {};\n _this2.storageManager = storageManager;\n _this2.runtimeCapabilities = runtimeCapabilities;\n return _this2;\n }\n\n (0, _createClass3.default)(RuntimeCoreCtx, [{\n key: 'loadConfigurations',\n value: function loadConfigurations() {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n console.log(_this.storageManager);\n\n _this.storageManager.get('rethink:activePolicy').then(function (value) {\n _this.activeUserPolicy = value;\n\n return _this.storageManager.get('rethink:groups');\n }).then(function (groupInfo) {\n var groups = groupInfo;\n _this.groups = groups === undefined ? {} : groups;\n\n return _this.storageManager.get('rethink:spPolicies');\n }).then(function (policiesInfo) {\n var spPolicies = policiesInfo;\n _this.serviceProviderPolicy = spPolicies === undefined ? {} : spPolicies;\n\n _this._loadUserPolicies().then(function () {\n resolve();\n });\n });\n });\n }\n }, {\n key: 'getPolicies',\n value: function getPolicies(message, isIncomingMessage) {\n var policies = {};\n\n if (this.activeUserPolicy !== undefined) {\n policies.userPolicy = this.userPolicies[this.activeUserPolicy];\n }\n\n policies.serviceProviderPolicy = this.getServiceProviderPolicy(message, isIncomingMessage);\n\n return policies;\n }\n }, {\n key: '_isValidUpdate',\n value: function _isValidUpdate(message) {\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n if (message.from.split('://').length > 1) {\n _this.idModule._getHypertyFromDataObject(message.from).then(function (hypertyURL) {\n if (hypertyURL === message.body.source) {\n resolve(message);\n } else {\n reject('The source of the message is not valid.');\n }\n }, function (error) {\n reject(error);\n });\n } else {\n resolve(message);\n }\n });\n }\n }, {\n key: 'getMyEmails',\n value: function getMyEmails() {\n var identities = this.idModule.getIdentities();\n var emails = [];\n\n for (var i in identities) {\n emails.push((0, _utils.getUserEmailFromURL)(identities[i].identity));\n }\n\n return emails;\n }\n }, {\n key: 'getMyHyperties',\n value: function getMyHyperties() {\n var hyperties = this.runtimeRegistry.hypertiesList;\n var hypertiesNames = [];\n\n for (var i in hyperties) {\n var hypertyName = hyperties[i].objectName;\n if (hypertiesNames.indexOf(hypertyName) === -1) {\n hypertiesNames.push(hypertyName);\n }\n }\n\n return hypertiesNames;\n }\n }, {\n key: 'getServiceProviderPolicy',\n value: function getServiceProviderPolicy(message, isIncoming) {\n var policy = void 0;\n\n if (isIncoming) {\n var toHyperty = this.runtimeRegistry.getHypertyName(message.to);\n policy = this.serviceProviderPolicy[toHyperty];\n } else {\n var fromHyperty = this.runtimeRegistry.getHypertyName(message.from);\n policy = this.serviceProviderPolicy[fromHyperty];\n }\n return policy;\n }\n }, {\n key: 'getURL',\n value: function getURL(url) {\n var splitURL = url.split('/');\n return splitURL[0] + '//' + splitURL[2] + '/' + splitURL[3];\n }\n\n /**\n * Creates a group with the given name.\n * @param {String} groupName\n */\n\n }, {\n key: '_loadUserPolicies',\n value: function _loadUserPolicies() {\n var _this3 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.storageManager.get('rethink:userPolicies').then(function (value) {\n var policies = value;\n if (policies !== undefined) {\n for (var i in policies) {\n _this3.pep.addPolicy('USER', i, policies[i]);\n }\n }\n resolve();\n });\n });\n }\n }, {\n key: '_getLastComponentOfURL',\n value: function _getLastComponentOfURL(url) {\n var split = url.split('/');\n return split[split.length - 1];\n }\n }, {\n key: '_getPoliciesJSON',\n value: function _getPoliciesJSON(policies) {\n for (var i in policies) {\n var combiningAlgorithm = policies[i].combiningAlgorithm;\n if (combiningAlgorithm instanceof _BlockOverrides2.default) {\n policies[i].combiningAlgorithm = 'blockOverrides';\n } else {\n if (combiningAlgorithm instanceof _AllowOverrides2.default) {\n policies[i].combiningAlgorithm = 'allowOverrides';\n } else {\n if (combiningAlgorithm instanceof _FirstApplicable2.default) {\n policies[i].combiningAlgorithm = 'firstApplicable';\n } else {\n policies[i].combiningAlgorithm = undefined;\n }\n }\n }\n }\n\n return policies;\n }\n }, {\n key: 'saveActivePolicy',\n value: function saveActivePolicy() {\n var _this4 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this.storageManager.set('rethink:activePolicy', 0, _this4.activeUserPolicy).then(function () {\n resolve();\n });\n });\n }\n }, {\n key: 'saveGroups',\n value: function saveGroups() {\n var _this5 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this.storageManager.set('rethink:groups', 0, _this5.groups).then(function () {\n resolve();\n });\n });\n }\n }, {\n key: 'savePolicies',\n value: function savePolicies(source, policy, key) {\n var policiesJson = void 0;\n\n switch (source) {\n case 'USER':\n policiesJson = (0, _stringify2.default)(this.userPolicies);\n policiesJson = this._getPoliciesJSON(JSON.parse(policiesJson));\n this.storageManager.set('rethink:userPolicies', 0, policiesJson);\n break;\n case 'SERVICE_PROVIDER':\n if (policy !== undefined & key !== undefined) {\n this.serviceProviderPolicy[key] = policy;\n }\n policiesJson = (0, _stringify2.default)(this.serviceProviderPolicy);\n policiesJson = this._getPoliciesJSON(JSON.parse(policiesJson));\n this.storageManager.set('rethink:spPolicies', 0, policiesJson);\n break;\n default:\n throw Error('Unknown policy source: ' + source);\n }\n }\n }, {\n key: 'getGroupsNames',\n value: function getGroupsNames() {\n var myGroups = this.groups;\n var groupsNames = [];\n if (myGroups !== undefined) {\n for (var groupName in myGroups) {\n groupsNames.push(groupName);\n }\n }\n return groupsNames;\n }\n }, {\n key: 'getGroup',\n value: function getGroup(groupName, destination) {\n var members = [];\n\n if (groupName === 'preauthorised') {\n var dataObjectURL = destination.split('/');\n dataObjectURL.pop();\n dataObjectURL = dataObjectURL[0] + '//' + dataObjectURL[2];\n members = this.runtimeRegistry.getPreAuthSubscribers(dataObjectURL);\n } else {\n if (this.groups[groupName] !== undefined) {\n members = this.groups[groupName];\n }\n }\n\n return members;\n }\n\n /**\n * Creates a group with the given name.\n * @param {String} groupName\n */\n\n }, {\n key: 'createGroup',\n value: function createGroup(groupName) {\n this.groups[groupName] = [];\n this.saveGroups();\n }\n }, {\n key: 'deleteGroup',\n value: function deleteGroup(groupName) {\n delete this.groups[groupName];\n this.saveGroups();\n }\n\n /**\n * Adds the given user email to the group with the given name.\n * @param {String} userEmail\n * @param {String} groupName\n */\n\n }, {\n key: 'addToGroup',\n value: function addToGroup(groupName, userEmail) {\n var myGroups = this.groups;\n if (myGroups[groupName] !== undefined) {\n if (myGroups[groupName].indexOf(userEmail) === -1) {\n myGroups[groupName].push(userEmail);\n this.saveGroups();\n }\n } else {\n throw Error('Group \"' + groupName + '\" does not exist!');\n }\n }\n }, {\n key: 'removeFromGroup',\n value: function removeFromGroup(groupName, userEmail) {\n var group = this.groups[groupName];\n\n group.splice(group.indexOf(userEmail), 1);\n this.saveGroups();\n }\n }, {\n key: 'pepURL',\n get: function get() {\n var _this = this;\n return _this._pepURL;\n }\n }, {\n key: 'guiURL',\n get: function get() {\n var _this = this;\n return _this._guiURL;\n }\n }, {\n key: 'runtimeURL',\n get: function get() {\n var _this = this;\n return _this._runtimeURL;\n }\n\n /**\n * return the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n\n }, {\n key: 'messageBus',\n get: function get() {\n var _this = this;\n return _this._messageBus;\n }\n\n /**\n * Set the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n ,\n set: function set(messageBus) {\n var _this = this;\n _this._messageBus = messageBus;\n }\n }, {\n key: 'subscription',\n get: function get() {\n return this._subscription;\n },\n set: function set(params) {\n this._subscription = params.message.body.subscriber;\n }\n }]);\n return RuntimeCoreCtx;\n}(_ReThinkCtx3.default);\n\nexports.default = RuntimeCoreCtx;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29udGV4dC9SdW50aW1lQ29yZUN0eC5qcz85NWRhIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignUEVQJy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classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ReThinkCtx = function () {\n function ReThinkCtx() {\n (0, _classCallCheck3.default)(this, ReThinkCtx);\n\n this.defaultBehaviour = true;\n this.groups = {};\n }\n\n (0, _createClass3.default)(ReThinkCtx, [{\n key: 'scheme',\n get: function get() {\n return this._scheme;\n },\n set: function set(params) {\n var from = params.message.from;\n if ((0, _utils.isDataObjectURL)(from)) {\n this._scheme = (0, _utils.divideURL)(from).type;\n } else {\n this._scheme = undefined;\n }\n }\n }, {\n key: 'date',\n get: function get() {\n return this._date;\n },\n set: function set(now) {\n var date = new Date();\n var day = String(date.getDate());\n if (day.length === 1) {\n day = '0' + day;\n }\n var month = String(date.getMonth() + 1);\n if (month.length === 1) {\n month = '0' + month;\n }\n this._date = day + '/' + month + '/' + date.getFullYear();\n }\n }, {\n key: 'domain',\n get: function get() {\n return this._domain;\n },\n set: function set(params) {\n if (params.message.body.identity !== undefined) {\n this._domain = (0, _utils.divideEmail)(params.message.body.identity.userProfile.username).domain;\n }\n }\n }, {\n key: 'type',\n get: function get() {\n return this._type;\n },\n set: function set(params) {\n var message = params.message;\n if (message.body.value !== undefined) {\n this._type = message.body.value.resourceType;\n }\n }\n }, {\n key: 'source',\n get: function get() {\n return this._source;\n },\n set: function set(params) {\n if (params.message.body.identity !== undefined) {\n this._source = params.message.body.identity.userProfile.username;\n }\n }\n }, {\n key: 'time',\n get: function get() {\n return this._time;\n },\n set: function set(now) {\n now = new Date();\n var minutes = String(now.getMinutes());\n if (minutes.length === 1) {\n minutes = '0' + minutes;\n }\n this._time = parseInt(String(now.getHours()) + minutes);\n }\n }, {\n key: 'weekday',\n get: function get() {\n return this._weekday;\n },\n set: function set(now) {\n this._weekday = String(new Date().getDay());\n }\n }]);\n return ReThinkCtx;\n}();\n\nexports.default = ReThinkCtx;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTIwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvUmVUaGlua0N0eC5qcz82ZmRhIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7ZGl2aWRlRW1haWwsIGRpdmlkZVVSTCwgaXNEYXRhT2JqZWN0VVJMfSBmcm9tICcuLi91dGlscy91dGlscyc7XG5cbmNsYXNzIFJlVGhpbmtDdHgge1xuXG4gIGNvbnN0cnVjdG9yKCkge1xuICAgIHRoaXMuZGVmYXVsdEJlaGF2aW91ciA9IHRydWU7XG4gICAgdGhpcy5ncm91cHMgPSB7fTtcbiAgfVxuXG4gIGdldCBzY2hlbWUoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NjaGVtZTtcbiAgfVxuXG4gIGdldCBkYXRlKCkge1xuICAgIHJldHVybiB0aGlzLl9kYXRlO1xuICB9XG5cbiAgZ2V0IGRvbWFpbigpIHtcbiAgICByZXR1cm4gdGhpcy5fZG9tYWluO1xuICB9XG5cbiAgZ2V0IHR5cGUoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3R5cGU7XG4gIH1cblxuICBnZXQgc291cmNlKCkge1xuICAgIHJldHVybiB0aGlzLl9zb3VyY2U7XG4gIH1cblxuICBnZXQgdGltZSgpIHtcbiAgICByZXR1cm4gdGhpcy5fdGltZTtcbiAgfVxuXG4gIGdldCB3ZWVrZGF5KCkge1xuICAgIHJldHVybiB0aGlzLl93ZWVrZGF5O1xuICB9XG5cbiAgc2V0IHNjaGVtZShwYXJhbXMpIHtcbiAgICBsZXQgZnJvbSA9IHBhcmFtcy5tZXNzYWdlLmZyb207XG4gICAgaWYgKGlzRGF0YU9iamVjdFVSTChmcm9tKSkge1xuICAgICAgdGhpcy5fc2NoZW1l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QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBN0NBO0FBQ0E7QUFDQTtBQTZDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUEvQ0E7QUFDQTtBQUNBO0FBK0NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQXBEQTtBQUNBO0FBQ0E7QUFvREE7QUFDQTtBQUNBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///520\n")}])}); \ No newline at end of file +!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("Runtime",[],n):"object"==typeof exports?exports.Runtime=n():e.Runtime=n()}("undefined"!=typeof self?self:this,function(){return function(e){var n={};function t(c){if(n[c])return n[c].exports;var g=n[c]={i:c,l:!1,exports:{}};return e[c].call(g.exports,g,g.exports,t),g.l=!0,g.exports}return t.m=e,t.c=n,t.d=function(e,n,c){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:c})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=212)}([function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar core = __webpack_require__(30);\nvar hide = __webpack_require__(18);\nvar redefine = __webpack_require__(19);\nvar ctx = __webpack_require__(27);\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2V4cG9ydC5qcz8wZWNlIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBjb3JlID0gcmVxdWlyZSgnLi9fY29yZScpO1xudmFyIGhpZGUgPSByZXF1aXJlKCcuL19oaWRlJyk7XG52YXIgcmVkZWZpbmUgPSByZXF1aXJlKCcuL19yZWRlZmluZScpO1xudmFyIGN0eCA9IHJlcXVpcmUoJy4vX2N0eCcpO1xudmFyIFBST1RPVFlQRSA9ICdwcm90b3R5cGUnO1xuXG52YXIgJGV4cG9ydCA9IGZ1bmN0aW9uICh0eXBlLCBuYW1lLCBzb3VyY2UpIHtcbiAgdmFyIElTX0ZPUkNFRCA9IHR5cGUgJiAkZXhwb3J0LkY7XG4gIHZhciBJU19HTE9CQUwgPSB0eXBlICYgJGV4cG9ydC5HO1xuICB2YXIgSVNfU1RBVElDID0gdHlwZSAmICRleHBvcnQuUztcbiAgdmFyI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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2hlbHBlcnMvY2xhc3NDYWxsQ2hlY2suanM/NjZiOSJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuZXhwb3J0cy5fX2VzTW9kdWxlID0gdHJ1ZTtcblxuZXhwb3J0cy5kZWZhdWx0ID0gZnVuY3Rpb24gKGluc3RhbmNlLCBDb25zdHJ1Y3Rvcikge1xuICBpZiAoIShpbnN0YW5jZSBpbnN0YW5jZW9mIENvbnN0cnVjdG9yKSkge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb25cIik7XG4gIH1cbn07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2NsYXNzQ2FsbENoZWNrLmpzXG4vLyBtb2R1bGUgaWQgPSAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1\n')},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _defineProperty = __webpack_require__(200);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2hlbHBlcnMvY3JlYXRlQ2xhc3MuanM/YzMxMCJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuZXhwb3J0cy5fX2VzTW9kdWxlID0gdHJ1ZTtcblxudmFyIF9kZWZpbmVQcm9wZXJ0eSA9IHJlcXVpcmUoXCIuLi9jb3JlLWpzL29iamVjdC9kZWZpbmUtcHJvcGVydHlcIik7XG5cbnZhciBfZGVmaW5lUHJvcGVydHkyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfZGVmaW5lUHJvcGVydHkpO1xuXG5mdW5jdGlvbiBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KG9iaikgeyByZXR1cm4gb2JqICYmIG9iai5fX2VzTW9kdWxlID8gb2JqIDogeyBkZWZhdWx0OiBvYmogfTsgfVxuXG5leHBvcnRzLmRlZmF1bHQgPSBmdW5jdGlvbiAoKSB7XG4gIGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXModGFyZ2V0LCBwcm9wcykge1xu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BQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///2\n')},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(6);\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2FuLW9iamVjdC5qcz8wYzg1Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKCFpc09iamVjdChpdCkpIHRocm93IFR5cGVFcnJvcihpdCArICcgaXMgbm90IGFuIG9iamVjdCEnKTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYW4tb2JqZWN0LmpzXG4vLyBtb2R1bGUgaWQgPSAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///3\n")},function(module,exports){eval("// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2dsb2JhbC5qcz8zYjMyIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS96bG9pcm9jay9jb3JlLWpzL2lzc3Vlcy84NiNpc3N1ZWNvbW1lbnQtMTE1NzU5MDI4XG52YXIgZ2xvYmFsID0gbW9kdWxlLmV4cG9ydHMgPSB0eXBlb2Ygd2luZG93ICE9ICd1bmRlZmluZWQnICYmIHdpbmRvdy5NYXRoID09IE1hdGhcbiAgPyB3aW5kb3cgOiB0eXBlb2Ygc2VsZiAhPSAndW5kZWZpbmVkJyAmJiBzZWxmLk1hdGggPT0gTWF0aCA/IHNlbGZcbiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLW5ldy1mdW5jXG4gIDogRnVuY3Rpb24oJ3JldHVybiB0aGlzJykoKTtcbmlmICh0eXBlb2YgX19nID09ICdudW1iZXInKSBfX2cgPSBnbG9iYWw7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tdW5kZWZcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZ2xvYmFsLmpzXG4vLyBtb2R1bGUgaWQgPSA0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///4\n")},function(module,exports){eval("module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2ZhaWxzLmpzP2NlMDIiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoZXhlYykge1xuICB0cnkge1xuICAgIHJldHVybiAhIWV4ZWMoKTtcbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiB0cnVlO1xuICB9XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19mYWlscy5qc1xuLy8gbW9kdWxlIGlkID0gNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///5\n")},function(module,exports){eval("module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2lzLW9iamVjdC5qcz81MGEzIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiB0eXBlb2YgaXQgPT09ICdvYmplY3QnID8gaXQgIT09IG51bGwgOiB0eXBlb2YgaXQgPT09ICdmdW5jdGlvbic7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1vYmplY3QuanNcbi8vIG1vZHVsZSBpZCA9IDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///6\n")},function(module,exports,__webpack_require__){eval('var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n "use strict";\n if (true) {\n !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === \'function\' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if (typeof module === \'object\' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n "use strict";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = "undefined";\n\n var logMethods = [\n "trace",\n "debug",\n "info",\n "warn",\n "error"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === \'function\') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === \'debug\') {\n methodName = \'log\';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, \'log\');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn\'t present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n var storageKey = "loglevel";\n if (name) {\n storageKey += ":" + name;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || \'silent\').toUpperCase();\n\n if (typeof window === undefinedType) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + "=" + levelName + ";";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + "=");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,\n "ERROR": 4, "SILENT": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return "No console available for logging";\n }\n } else {\n throw "log.setLevel() called with invalid level: " + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel == null ? "WARN" : defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if (typeof name !== "string" || name === "") {\n throw new TypeError("You must supply a name when creating a logger.");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n return defaultLogger;\n}));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9sb2dsZXZlbC9saWIvbG9nbGV2ZWwuanM/MDZmYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuKiBsb2dsZXZlbCAtIGh0dHBzOi8vZ2l0aHViLmNvbS9waW10ZXJyeS9sb2dsZXZlbFxuKlxuKiBDb3B5cmlnaHQgKGMpIDIwMTMgVGltIFBlcnJ5XG4qIExpY2Vuc2VkIHVuZGVyIHRoZSBNSVQgbGljZW5zZS5cbiovXG4oZnVuY3Rpb24gKHJvb3QsIGRlZmluaXRpb24pIHtcbiAgICBcInVzZSBzdHJpY3RcIjtcbiAgICBpZiAodHlwZW9mIGRlZmluZSA9PT0gJ2Z1bmN0aW9uJyAmJiBkZWZpbmUuYW1kKSB7XG4gICAgICAgIGRlZmluZShkZWZpbml0aW9uKTtcbiAgICB9IGVsc2UgaWYgKHR5cGVvZiBtb2R1bGUgPT09ICdvYmplY3QnICYmIG1vZHVsZS5leHBvcnRzKSB7XG4gICAgICAgIG1vZHVsZS5leHBvcnRzID0gZGVmaW5pdGlvbigpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJvb3QubG9nID0gZGVmaW5pdGlvbigpO1xuICAgIH1cbn0odGhpcywgZnVuY3Rpb24gKCkge1xuICAgIFwidXNlIHN0cmljdFwiO1xuXG4gICAgLy8gU2xpZ2h0bHkgZHViaW91cyB0cmlja3MgdG8gY3V0IGRvd24gbWluaW1pemVkIGZpbGUgc2l6ZVxuICAgIHZhciBub29wID0gZnVuY3Rpb24oKSB7fTtcbiAgICB2YXIgdW5kZWZpbmVkVHlwZSA9IFwidW5kZWZpbmVkXCI7XG5cbiAgICB2YXIgbG9nTWV0aG9kcyA9IFtcbiAgICAgICAgXCJ0cmFjZVwiLFxuICAgICAgICBcImRlYnVnXCIsXG4gICAgICAgIFwiaW5mb1wiLFxuICAgICAgICBcIndhcm5cIixcbiAgICAgICAgXCJlcnJvclwiXG4gICAgXTtcblxuICAgIC8vIENyb3NzLWJyb3dzZXIgYmluZCBlcXVpdmFsZW50IHRoYXQgd29ya3MgYXQgbGVhc3QgYmFjayB0byBJRTZcbiAgICBmdW5jdGlvbiBiaW5kTWV0aG9kKG9iaiwgbWV0aG9kTmFtZSkge1xuICAgICAgICB2YXIgbWV0aG9kID0gb2JqW21ldGhvZE5hbWVdO1xuICAgICAgICBpZiAodHlwZW9mIG1ldGhvZC5iaW5kID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICByZXR1cm4gbWV0aG9kLmJpbmQob2JqKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEZ1bmN0aW9uLnByb3RvdHlwZS5iaW5kLmNhbGwobWV0aG9kLCBvYmopO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIC8vIE1pc3NpbmcgYmluZCBzaGltIG9yIElFOCArIE1vZGVybml6ciwgZmFsbGJhY2sgdG8gd3JhcHBpbmdcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGdW5jdGlvbi5wcm90b3R5cGUuYXBwbHkuYXBwbHkobWV0aG9kLCBbb2JqLCBhcmd1bWVudHNdKTtcbiAgICAgICAgICAgICAgIC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Y29va2llO1xuICAgICAgICAgICAgICAgICAgdmFyIGxvY2F0aW9uID0gY29va2llLmluZGV4T2YoXG4gICAgICAgICAgICAgICAgICAgICAgZW5jb2RlVVJJQ29tcG9uZW50KHN0b3JhZ2VLZXkpICsgXCI9XCIpO1xuICAgICAgICAgICAgICAgICAgaWYgKGxvY2F0aW9uICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgIHN0b3JlZExldmVsID0gL14oW147XSspLy5leGVjKGNvb2tpZS5zbGljZShsb2NhdGlvbikpWzFdO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGNhdGNoIChpZ25vcmUpIHt9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLy8gSWYgdGhlIHN0b3JlZCBsZXZlbCBpcyBub3QgdmFsaWQsIHRyZWF0IGl0IGFzIGlmIG5vdGhpbmcgd2FzIHN0b3JlZC5cbiAgICAgICAgICBpZiAoc2VsZi5sZXZlbHNbc3RvcmVkTGV2ZWxdID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgc3RvcmVkTGV2ZWwgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHN0b3JlZExldmVsO1xuICAgICAgfVxuXG4gICAgICAvKlxuICAgICAgICpcbiAgICAgICAqIFB1YmxpYyBsb2dnZXIgQVBJIC0gc2VlIGh0dHBzOi8vZ2l0aHViLmNvbS9waW10ZXJyeS9sb2dsZXZlbCBmb3IgZGV0YWlsc1xuICAgICAgICpcbiAgICAgICAqL1xuXG4gICAgICBzZWxmLm5hbWUgPSBuYW1lO1xuXG4gICAgICBzZWxmLmxldmVscyA9IHsgXCJUUkFDRVwiOiAwLCBcIkRFQlVHXCI6IDEsIFwiSU5GT1wiOiAyLCBcIldBUk5cIjogMyxcbiAgICAgICAgICBcIkVSUk9SXCI6IDQsIFwiU0lMRU5UXCI6IDV9O1xuXG4gICAgICBzZWxmLm1ldGhvZEZhY3Rvcnk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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7\n')},function(module,exports,__webpack_require__){eval("var store = __webpack_require__(78)('wks');\nvar uid = __webpack_require__(48);\nvar Symbol = __webpack_require__(4).Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3drcy5qcz85MjQwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBzdG9yZSA9IHJlcXVpcmUoJy4vX3NoYXJlZCcpKCd3a3MnKTtcbnZhciB1aWQgPSByZXF1aXJlKCcuL191aWQnKTtcbnZhciBTeW1ib2wgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5TeW1ib2w7XG52YXIgVVNFX1NZTUJPTCA9IHR5cGVvZiBTeW1ib2wgPT0gJ2Z1bmN0aW9uJztcblxudmFyICRleHBvcnRzID0gbW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAobmFtZSkge1xuICByZXR1cm4gc3RvcmVbbmFtZV0gfHwgKHN0b3JlW25hbWVdID1cbiAgICBVU0VfU1lNQk9MICYmIFN5bWJvbFtuYW1lXSB8fCAoVVNFX1NZTUJPTCA/IFN5bWJvbCA6IHVpZCkoJ1N5bWJvbC4nICsgbmFtZSkpO1xufTtcblxuJGV4cG9ydHMuc3RvcmUgPSBzdG9yZTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fd2tzLmpzXG4vLyBtb2R1bGUgaWQgPSA4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(416), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvcHJvbWlzZS5qcz9mZmYxIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0geyBcImRlZmF1bHRcIjogcmVxdWlyZShcImNvcmUtanMvbGlicmFyeS9mbi9wcm9taXNlXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL3Byb21pc2UuanNcbi8vIG1vZHVsZSBpZCA9IDlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///9\n')},function(module,exports,__webpack_require__){eval("// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(5)(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19kZXNjcmlwdG9ycy5qcz82ZDRhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIFRoYW5rJ3MgSUU4IGZvciBoaXMgZnVubnkgZGVmaW5lUHJvcGVydHlcbm1vZHVsZS5leHBvcnRzID0gIXJlcXVpcmUoJy4vX2ZhaWxzJykoZnVuY3Rpb24gKCkge1xuICByZXR1cm4gT2JqZWN0LmRlZmluZVByb3BlcnR5KHt9LCAnYScsIHsgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiA3OyB9IH0pLmEgIT0gNztcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19kZXNjcmlwdG9ycy5qc1xuLy8gbW9kdWxlIGlkID0gMTBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///10\n")},function(module,exports,__webpack_require__){eval("var anObject = __webpack_require__(3);\nvar IE8_DOM_DEFINE = __webpack_require__(148);\nvar toPrimitive = __webpack_require__(31);\nvar dP = Object.defineProperty;\n\nexports.f = __webpack_require__(10) ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\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vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZHAuanNcbi8vIG1vZHVsZSBpZCA9IDExXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///11\n")},function(module,exports,__webpack_require__){eval("// 7.1.15 ToLength\nvar toInteger = __webpack_require__(33);\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1sZW5ndGguanM/MDViYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjEuMTUgVG9MZW5ndGhcbnZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgbWluID0gTWF0aC5taW47XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXQgPiAwID8gbWluKHRvSW50ZWdlcihpdCksIDB4MWZmZmZmZmZmZmZmZmYpIDogMDsgLy8gcG93KDIsIDUzKSAtIDEgPT0gOTAwNzE5OTI1NDc0MDk5MVxufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdG8tbGVuZ3RoLmpzXG4vLyBtb2R1bGUgaWQgPSAxMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///12\n")},function(module,exports){eval("var core = module.exports = { version: '2.5.3' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NvcmUuanM/MTVlMCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY29yZSA9IG1vZHVsZS5leHBvcnRzID0geyB2ZXJzaW9uOiAnMi41LjMnIH07XG5pZiAodHlwZW9mIF9fZSA9PSAnbnVtYmVyJykgX19lID0gY29yZTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby11bmRlZlxuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NvcmUuanNcbi8vIG1vZHVsZSBpZCA9IDEzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///13\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nexports.divideURL = divideURL;\nexports.emptyObject = emptyObject;\nexports.secondsSinceEpoch = secondsSinceEpoch;\nexports.deepClone = deepClone;\nexports.removePathFromURL = removePathFromURL;\nexports.getUserURLFromEmail = getUserURLFromEmail;\nexports.getUserEmailFromURL = getUserEmailFromURL;\nexports.convertToUserURL = convertToUserURL;\nexports.isDataObjectURL = isDataObjectURL;\nexports.isLegacy = isLegacy;\nexports.isURL = isURL;\nexports.isUserURL = isUserURL;\nexports.isHypertyURL = isHypertyURL;\nexports.getConfigurationResources = getConfigurationResources;\nexports.buildURL = buildURL;\nexports.generateGUID = generateGUID;\nexports.getUserIdentityDomain = getUserIdentityDomain;\nexports.isBackendServiceURL = isBackendServiceURL;\nexports.divideEmail = divideEmail;\nexports.assign = assign;\nexports.splitObjectURL = splitObjectURL;\nexports.checkAttribute = checkAttribute;\nexports.parseAttributes = parseAttributes;\nexports.isEmpty = isEmpty;\nexports.chatkeysToStringCloner = chatkeysToStringCloner;\nexports.chatkeysToArrayCloner = chatkeysToArrayCloner;\nexports.parseMessageURL = parseMessageURL;\nexports.availableSpace = availableSpace;\nexports.encode = encode;\nexports.decode = decode;\nexports.decodeToUint8Array = decodeToUint8Array;\nexports.stringify = stringify;\nexports.parse = parse;\nexports.parseToUint8Array = parseToUint8Array;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n/**\n * Support module with some functions will be useful\n * @module utils\n */\n\n/**\n * @typedef divideURL\n * @type Object\n * @property {string} type The type of URL\n * @property {string} domain The domain of URL\n * @property {string} identity The identity of URL\n */\n\n/**\n * Divide an url in type, domain and identity\n * @param {URL.URL} url - url address\n * @return {divideURL} the result of divideURL\n */\nfunction divideURL(url) {\n\n function recurse(value) {\n var regex = /([a-zA-Z-]*)(:\\/\\/(?:\\.)?|:)([-a-zA-Z0-9@:%._+~#=]{2,256})([-a-zA-Z0-9@:%._+~#=/]*)/gi;\n var subst = '$1,$3,$4';\n var parts = value.replace(regex, subst).split(',');\n return parts;\n }\n\n var parts = recurse(url);\n\n // If the url has no scheme\n if (parts[0] === url && !parts[0].includes('@')) {\n\n var _result = {\n type: '',\n domain: url,\n identity: ''\n };\n\n console.warn('[DivideURL] DivideURL don\\'t support url without scheme. Please review your url address', url);\n\n return _result;\n }\n\n // check if the url has the scheme and includes an @\n if (parts[0] === url && parts[0].includes('@')) {\n var scheme = parts[0] === url ? 'smtp' : parts[0];\n parts = recurse(scheme + '://' + parts[0]);\n }\n\n // if the domain includes an @, divide it to domain and identity respectively\n if (parts[1].includes('@')) {\n parts[2] = parts[0] + '://' + parts[1];\n parts[1] = parts[1].substr(parts[1].indexOf('@') + 1);\n } /*else if (parts[2].includes('/')) {\n parts[2] = parts[2].substr(parts[2].lastIndexOf('/')+1);\n }*/\n\n var result = {\n type: parts[0],\n domain: parts[1],\n identity: parts[2]\n };\n\n return result;\n}\n\n/**\n * Check if an Object is empty\n * @param {Object} object Object to be checked\n * @return {Boolean} status of Object, empty or not (true|false);\n */\nfunction emptyObject(object) {\n return (0, _keys2.default)(object).length > 0 ? false : true;\n}\n\nfunction secondsSinceEpoch() {\n return Math.floor(Date.now() / 1000);\n}\n\n/**\n * Make a COPY of the original data\n * @param {Object} obj - object to be cloned\n * @return {Object}\n */\nfunction deepClone(obj) {\n //TODO: simple but inefficient JSON deep clone...\n if (obj) return JSON.parse((0, _stringify2.default)(obj));\n}\n\nfunction removePathFromURL(url) {\n var splitURL = url.split('/');\n return splitURL[0] + '//' + splitURL[2] + '/' + splitURL[3];\n}\n\n/**\n * Obtains the user URL that corresponds to a given email\n * @param {string} userEmail The user email\n * @return {URL.URL} userURL The user URL\n */\nfunction getUserURLFromEmail(userEmail) {\n var indexOfAt = userEmail.indexOf('@');\n return 'user://' + userEmail.substring(indexOfAt + 1, userEmail.length) + '/' + userEmail.substring(0, indexOfAt);\n}\n\n/**\n * Obtains the user email that corresponds to a given URL\n * @param {URL.URL} userURL The user URL\n * @return {string} userEmail The user email\n */\nfunction getUserEmailFromURL(userURL) {\n var url = divideURL(userURL);\n return url.identity.replace('/', '') + '@' + url.domain; // identity field has '/exampleID' instead of 'exampleID'\n}\n\n/**\n * Check if the user identifier is already in the URL format, if not, convert to URL format\n * @param {string} identifier user identifier\n * @return {string} userURL the user URL\n */\nfunction convertToUserURL(identifier) {\n\n // check if the identifier is already in the url format\n if (identifier.substring(0, 7) === 'user://') {\n var dividedURL = divideURL(identifier);\n\n //check if the url is well formated\n if (dividedURL.domain && dividedURL.identity) {\n return identifier;\n } else {\n throw 'userURL with wrong format';\n }\n\n //if not, convert the user email to URL format\n } else {\n return getUserURLFromEmail(identifier);\n }\n}\n\nfunction isDataObjectURL(url) {\n var schemasToIgnore = ['domain-idp', 'runtime', 'domain', 'hyperty'];\n var splitURL = url.split('://');\n var urlSchema = splitURL[0];\n\n return schemasToIgnore.indexOf(urlSchema) === -1;\n}\n\nfunction isLegacy(url) {\n if (url.split('@').length > 1) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction isURL(url) {\n return url.split('/').length >= 3;\n}\n\nfunction isUserURL(url) {\n return divideURL(url).type === 'user';\n}\n\nfunction isHypertyURL(url) {\n return divideURL(url).type === 'hyperty';\n}\n\n/**\n * get information relative each component configured on runtime configuration;\n * @param {object} configuration object with all configuration\n * @param {string} component string with the component to get the configuration, like, runtimeURLS, catalogueURLs, msgNodeURL, domainRegistryURL;\n * @param {string} resource type of resource to get, like, catalogue, runtimeUA, protocolstub, idpProxy\n * @return {object} return an object with all configurations;\n */\nfunction getConfigurationResources(configuration, component, resource) {\n var objectResource = configuration[component];\n var resourceType = objectResource[resource];\n\n return resourceType;\n}\n\n/**\n * Build a full url with the runtime configuration;\n * @param {object} configuration object with all configuration\n * @param {string} component string with the component to get the configuration, like, runtimeURLS, catalogueURLs, msgNodeURL, domainRegistryURL;\n * @param {string} resource type of resource to get, like, catalogue, runtimeUA, protocolstub, idpProxy\n * @param {string} type resource to get, like a hyperty name or protocolstub name;\n * @param {boolean} useFallback if true the function will check if have a fallback url;\n * @return {string} partial url to contact the resource;\n */\nfunction buildURL(configuration, component, resource, type) {\n var useFallback = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n var objectResource = configuration[component];\n var url = void 0;\n\n if (!objectResource.hasOwnProperty(resource)) {\n throw Error('The configuration ' + (0, _stringify2.default)(objectResource, '', 2) + ' don\\'t have the ' + resource + ' resource you are looking for');\n }\n\n var resourceType = objectResource[resource];\n\n if (type) {\n url = resourceType.prefix + configuration.domain + resourceType.suffix + type;\n if (resourceType.hasOwnProperty('fallback') && useFallback) {\n if (resourceType.fallback.indexOf('%domain%')) {\n url = resourceType.fallback.replace(/(%domain%)/g, configuration.domain) + type;\n } else {\n url = resourceType.fallback + type;\n }\n }\n } else {\n url = resourceType.prefix + configuration.domain + resourceType.suffix;\n }\n\n // console.log(url);\n\n return url;\n}\n\n/**\n * Generate a Global Unique ID\n *\n * @returns String;\n */\nfunction generateGUID() {\n\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }\n\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n}\n\nfunction getUserIdentityDomain(url) {\n var dividedURL = divideURL(url);\n var splitedDomain = dividedURL.domain.split('.');\n var splitedLength = splitedDomain.length;\n if (splitedLength == 1) {\n return splitedDomain[splitedLength - 1];\n }\n var domain = splitedDomain[splitedLength - 2] + '.' + splitedDomain[splitedLength - 1];\n return domain;\n}\n\n/**\n * Check if URL is from a backend service\n * @param {string} url URL to be processed\n * @return {boolean}\n */\n\nfunction isBackendServiceURL(url) {\n var dividedURL = divideURL(url);\n var splitedDomain = dividedURL.domain.split('.');\n var backendSchemes = ['domain', 'global', 'domain-idp']; // should be defined in the runtime configuration\n var backendSubDomains = ['registry', 'msg-node']; // should be defined in the runtime configuration\n var subDomain = void 0;\n\n if (splitedDomain.length > 1) {\n subDomain = splitedDomain.filter(function (item) {\n return backendSubDomains.indexOf(item) !== -1;\n })[0];\n }\n\n if (subDomain && backendSubDomains.indexOf(subDomain) !== -1) {\n return true;\n }\n\n if (dividedURL.type) {\n return backendSchemes.indexOf(dividedURL.type) !== -1;\n }\n\n return false;\n}\n\nfunction divideEmail(email) {\n var indexOfAt = email.indexOf('@');\n\n var result = {\n username: email.substring(0, indexOfAt),\n domain: email.substring(indexOfAt + 1, email.length)\n };\n\n return result;\n}\n\nfunction assign(obj, keyPath, value) {\n\n if (!obj) obj = {};\n if (typeof keyPath === 'string') keyPath = parseAttributes(keyPath);\n\n var lastKeyIndex = keyPath.length - 1;\n\n for (var i = 0; i < lastKeyIndex; ++i) {\n var key = keyPath[i];\n if (!(key in obj)) {\n obj[key] = {};\n }\n\n obj = obj[key];\n }\n\n obj[keyPath[lastKeyIndex]] = value;\n}\n\nfunction splitObjectURL(dataObjectURL) {\n console.info('[utils - splitObjectURL]: ', dataObjectURL);\n\n var splitedURL = dataObjectURL.split('/');\n var url = splitedURL[0] + '//' + splitedURL[2] + '/' + splitedURL[3];\n var resource = splitedURL[5];\n\n var result = {\n url: url,\n resource: resource\n };\n\n console.info('[utils - splitObjectURL]: ', result);\n\n return result;\n}\n\nfunction checkAttribute(path) {\n\n var regex = /((([a-zA-Z]+):\\/\\/([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})\\/[a-zA-Z0-9.]+@[a-zA-Z0-9]+(-)?[a-zA-Z0-9]+(\\.)?[a-zA-Z0-9]{2,10}?\\.[a-zA-Z]{2,10})(.+(?=.identity))?/gm;\n\n var list = [];\n var final = [];\n var test = path.match(regex);\n\n if (test == null) {\n final = path.split('.');\n } else {\n var m = void 0;\n while ((m = regex.exec(path)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (m.index === regex.lastIndex) {\n regex.lastIndex++;\n }\n\n // The result can be accessed through the `m`-variable.\n m.forEach(function (match, groupIndex) {\n if (groupIndex === 0) {\n list.push(match);\n }\n });\n }\n var result = void 0;\n list.forEach(function (url) {\n\n result = path.replace(url, '*-*');\n final = result.split('.').map(function (item) {\n\n if (item === '*-*') {\n return url;\n }\n\n return item;\n });\n });\n }\n\n console.log('[RuntimeCore.Utils.checkAttribute]', final);\n return final;\n}\n\nfunction parseAttributes(path) {\n var regex = /([0-9a-zA-Z][-\\w]*):\\/\\//g;\n\n var string3 = 'identity';\n\n if (!path.includes('://')) {\n return path.split('.');\n } else {\n var string1 = path.split(regex)[0];\n\n var array1 = string1.split('.');\n\n var string2 = path.replace(string1, '');\n\n if (path.includes(string3)) {\n\n var array2 = string2.split(string3 + '.');\n\n console.log('array2 ' + array2);\n\n string2 = array2[0].slice('.', -1);\n\n array2 = array2[1].split('.');\n\n array1.push(string2, string3);\n\n array1 = array1.concat(array2);\n } else {\n array1.push(string2);\n }\n\n return array1.filter(Boolean);\n }\n}\n\nfunction isEmpty(obj) {\n for (var prop in obj) {\n\n if (obj.hasOwnProperty(prop)) {\n return false;\n }\n }\n\n return (0, _stringify2.default)(obj) === (0, _stringify2.default)({});\n}\n\nfunction chatkeysToStringCloner(sessionKeys) {\n var dataObjectSessionKeysClone = {};\n var fields = (0, _keys2.default)(sessionKeys);\n if (fields) {\n try {\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n dataObjectSessionKeysClone[field] = {};\n dataObjectSessionKeysClone[field].sessionKey = sessionKeys[field].sessionKey.toString();\n dataObjectSessionKeysClone[field].isToEncrypt = sessionKeys[field].isToEncrypt;\n }\n } catch (err) {\n console.error('_chatkeysToStringCloner:err', err);\n }\n }\n return dataObjectSessionKeysClone;\n}\n\nfunction chatkeysToArrayCloner(sessionKeys) {\n var dataObjectSessionKeysClone = {};\n var fields = (0, _keys2.default)(sessionKeys);\n if (fields) {\n try {\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n dataObjectSessionKeysClone[field] = {};\n var arrayValues = JSON.parse('[' + sessionKeys[field].sessionKey + ']');\n dataObjectSessionKeysClone[field].sessionKey = new Uint8Array(arrayValues);\n dataObjectSessionKeysClone[field].isToEncrypt = sessionKeys[field].isToEncrypt;\n }\n } catch (err) {\n console.error('_chatkeysToArrayCloner:err', err);\n }\n }\n return dataObjectSessionKeysClone;\n}\n\nfunction parseMessageURL(URL) {\n var splitedToURL = URL.split('/');\n if (splitedToURL.length <= 6) {\n return splitedToURL[0] + '//' + splitedToURL[2] + '/' + splitedToURL[3];\n } else {\n return splitedToURL[0] + '//' + splitedToURL[2] + '/' + splitedToURL[3] + '/' + splitedToURL[4];\n }\n}\n\nfunction availableSpace(usage, quota) {\n var available = (usage / quota).toFixed(2);\n return {\n quota: quota,\n usage: usage,\n percent: Number(available)\n };\n}\n\n/**\n* Encodes a JS object to base 64 encode\n* @param {Object} value byteArray value\n* @return {string} encoded value\n*/\nfunction encode(value) {\n try {\n var stringValue = stringify(value);\n return btoa(stringValue);\n } catch (err) {\n console.error('[Utils.encode:err] ' + err);\n throw err;\n }\n}\n\n/**\n * Decode a base64 string to object\n * @param {string_b64} value value encoded in base 64\n * @return {Object} decodedValue\n */\nfunction decode(value) {\n try {\n return JSON.parse(atob(value));\n } catch (err) {\n console.log('[Utils.decode:err] ' + err);\n throw err;\n }\n}\n\n/**\n* Decode a base64 string to Uint8Array\n* @param {string_b64} value byteArray value\n* @return {Uint8Array} encoded value\n*/\nfunction decodeToUint8Array(value) {\n try {\n return new Uint8Array(decode(value));\n } catch (err) {\n console.error('[Utils.decodeToUint8Array:err] ' + err);\n throw err;\n }\n}\n\n/**\n* Converts a JS object to string\n* NOTE: Special conversion for Uint8Arrays\n* @param {Object} value byteArray value\n* @return {Uint8Array} encoded value\n*/\nfunction stringify(value) {\n try {\n var stringValue = void 0;\n if (value.constructor === Uint8Array) {\n stringValue = '[' + value.toString() + ']'; // the [] is for JSON.parse compatibility\n } else {\n stringValue = (0, _stringify2.default)(value);\n }\n return stringValue;\n } catch (err) {\n console.error('[Utils.stringify:err] ' + err);\n throw err;\n }\n}\n\n/**\n* Converts a stringified object to object\n* @param {String} value byteArray value\n* @return {Object} encoded value\n*/\nfunction parse(value) {\n try {\n return JSON.parse(value);\n } catch (err) {\n console.error('[Utils.parse:err]' + err);\n console.trace();\n console.error('That that cause the error:', value);\n throw err;\n }\n}\n\n/**\n* Converts a stringified object to object\n* @param {String} value byteArray value\n* @return {Uint8Array} encoded value\n*/\nfunction parseToUint8Array(value) {\n try {\n return new Uint8Array(parse(value));\n } catch (err) {\n console.error('[Utils.parseToUint8Array:err]' + err);\n throw err;\n }\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL3V0aWxzL3V0aWxzLmpzP2JlNzMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4qIENvcHlyaWdodCAyMDE2IFBUIElub3Zhw6fDo28gZSBTaXN0ZW1hcyBTQVxuKiBDb3B5cmlnaHQgMjAxNiBJTkVTQy1JRFxuKiBDb3B5cmlnaHQgMjAxNiBRVU9CSVMgTkVUV09SS1MgU0xcbiogQ29weXJpZ2h0IDIwMTYgRlJBVU5IT0ZFUi1HRVNFTExTQ0hBRlQgWlVSIEZPRVJERVJ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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUhBO0FBS0E7QUFDQTtBQUNBOzs7OztBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7OztBQU1BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFLQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///14\n")},function(module,exports,__webpack_require__){eval("// 7.1.13 ToObject(argument)\nvar defined = __webpack_require__(32);\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1vYmplY3QuanM/MTZiYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjEuMTMgVG9PYmplY3QoYXJndW1lbnQpXG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBPYmplY3QoZGVmaW5lZChpdCkpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdG8tb2JqZWN0LmpzXG4vLyBtb2R1bGUgaWQgPSAxNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///15\n")},function(module,exports){eval("module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hLWZ1bmN0aW9uLmpzPzVkMjMiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKHR5cGVvZiBpdCAhPSAnZnVuY3Rpb24nKSB0aHJvdyBUeXBlRXJyb3IoaXQgKyAnIGlzIG5vdCBhIGZ1bmN0aW9uIScpO1xuICByZXR1cm4gaXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hLWZ1bmN0aW9uLmpzXG4vLyBtb2R1bGUgaWQgPSAxNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///16\n")},function(module,exports){eval("var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19oYXMuanM/NTgxNyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgaGFzT3duUHJvcGVydHkgPSB7fS5oYXNPd25Qcm9wZXJ0eTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCBrZXkpIHtcbiAgcmV0dXJuIGhhc093blByb3BlcnR5LmNhbGwoaXQsIGtleSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19oYXMuanNcbi8vIG1vZHVsZSBpZCA9IDE3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///17\n")},function(module,exports,__webpack_require__){eval("var dP = __webpack_require__(11);\nvar createDesc = __webpack_require__(47);\nmodule.exports = __webpack_require__(10) ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19oaWRlLmpzP2RhOWQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGRQID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJyk7XG52YXIgY3JlYXRlRGVzYyA9IHJlcXVpcmUoJy4vX3Byb3BlcnR5LWRlc2MnKTtcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKSA/IGZ1bmN0aW9uIChvYmplY3QsIGtleSwgdmFsdWUpIHtcbiAgcmV0dXJuIGRQLmYob2JqZWN0LCBrZXksIGNyZWF0ZURlc2MoMSwgdmFsdWUpKTtcbn0gOiBmdW5jdGlvbiAob2JqZWN0LCBrZXksIHZhbHVlKSB7XG4gIG9iamVjdFtrZXldID0gdmFsdWU7XG4gIHJldHVybiBvYmplY3Q7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19oaWRlLmpzXG4vLyBtb2R1bGUgaWQgPSAxOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///18\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar hide = __webpack_require__(18);\nvar has = __webpack_require__(17);\nvar SRC = __webpack_require__(48)('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\n__webpack_require__(30).inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19yZWRlZmluZS5qcz80NzcwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBoaWRlID0gcmVxdWlyZSgnLi9faGlkZScpO1xudmFyIGhhcyA9IHJlcXVpcmUoJy4vX2hhcycpO1xudmFyIFNSQyA9IHJlcXVpcmUoJy4vX3VpZCcpKCdzcmMnKTtcbnZhciBUT19TVFJJTkcgPSAndG9TdHJpbmcnO1xudmFyICR0b1N0cmluZyA9IEZ1bmN0aW9uW1RPX1NUUklOR107XG52YXIgVFBMID0gKCcnICsgJHRvU3RyaW5nKS5zcGxpdChUT19TVFJJTkcpO1xuXG5yZXF1aXJlKCcuL19jb3JlJykuaW5zcGVjdFNvdXJjZSA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gJHRvU3RyaW5nLmNhbGwoaXQpO1xufTtcblxuKG1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKE8sIGtleSwgdmFsLCBzYWZlKSB7XG4gIHZhciBpc0Z1bmN0aW9uID0gdHlwZW9mIHZhb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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///19\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar fails = __webpack_require__(5);\nvar defined = __webpack_require__(32);\nvar quot = /\"/g;\n// B.2.3.2.1 CreateHTML(string, tag, attribute, value)\nvar createHTML = function (string, tag, attribute, value) {\n var S = String(defined(string));\n var p1 = '<' + tag;\n if (attribute !== '') p1 += ' ' + attribute + '=\"' + String(value).replace(quot, '"') + '\"';\n return p1 + '>' + S + '';\n};\nmodule.exports = function (NAME, exec) {\n var O = {};\n O[NAME] = exec(createHTML);\n $export($export.P + $export.F * fails(function () {\n var test = ''[NAME]('\"');\n return test !== test.toLowerCase() || test.split('\"').length > 3;\n }), 'String', O);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zdHJpbmctaHRtbC5qcz9jYjdkIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgZmFpbHMgPSByZXF1aXJlKCcuL19mYWlscycpO1xudmFyIGRlZmluZWQgPSByZXF1aXJlKCcuL19kZWZpbmVkJyk7XG52YXIgcXVvdCA9IC9cIi9nO1xuLy8gQi4yLjMuMi4xIENyZWF0ZUhUTUwoc3RyaW5nLCB0YWcsIGF0dHJpYnV0ZSw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291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///20\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(22);\nvar core = __webpack_require__(13);\nvar ctx = __webpack_require__(65);\nvar hide = __webpack_require__(58);\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && key in exports) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2V4cG9ydC5qcz85MGNkIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBjb3JlID0gcmVxdWlyZSgnLi9fY29yZScpO1xudmFyIGN0eCA9IHJlcXVpcmUoJy4vX2N0eCcpO1xudmFyIGhpZGUgPSByZXF1aXJlKCcuL19oaWRlJyk7XG52YXIgUFJPVE9UWVBFID0gJ3Byb3RvdHlwZSc7XG5cbnZhciAkZXhwb3J0ID0gZnVuY3Rpb24gKHR5cGUsIG5hbWUsIHNvdXJjZSkge1xuICB2YXIgSVNfRk9SQ0VEID0gdHlwZSAmICRleHBvcnQuRjtcbiAgdmFyIElTX0dMT0JBTCA9IHR5cGUgJiAkZXhwb3J0Lkc7XG4gIHZhciBJU19TVEFUSUMgPSB0eXBlICYgJGV4cG9ydC5TO1xuICB2YXIgSVNfUFJPVE8gPSB0eXBlICYgJGV4cG9ydC5QO1xuICB2YXIgSVNfQklORCA9IHR5cGUgJiAkZXhwb3J0LkI7XG4gIHZhciBJU19XUkFQID0gdHlwZSAmICRleHBvcnQuVztcbiAgdmFyIGV4cG9ydHMgPSBJU19HTE9CQUwgPyBjb3JlIDogY29yZVtuYW1lXSB8fCAoY29yZVtuYW1lXSA9IHt9KTtcbiAgdmFyIGV4cFByb3RvID0gZXhwb3J0c1tQUk9UT1RZUEVdO1xuICB2YXIgdGFyZ2V0ID0gSVNfR0xPQkFMID8gZ2xvYmFsIDogSVNfU1RBVElDID8gZ2xvYmFsW25hbWVdIDogKGdsb2JhbFtuYW1lXSB8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C5XID0gMzI7ICAvLyB3cmFwXG4kZXhwb3J0LlUgPSA2NDsgIC8vIHNhZmVcbiRleHBvcnQuUiA9IDEyODsgLy8gcmVhbCBwcm90byBtZXRob2QgZm9yIGBsaWJyYXJ5YFxubW9kdWxlLmV4cG9ydHMgPSAkZXhwb3J0O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2V4cG9ydC5qc1xuLy8gbW9kdWxlIGlkID0gMjFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///21\n")},function(module,exports){eval("// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2dsb2JhbC5qcz9lY2FiIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS96bG9pcm9jay9jb3JlLWpzL2lzc3Vlcy84NiNpc3N1ZWNvbW1lbnQtMTE1NzU5MDI4XG52YXIgZ2xvYmFsID0gbW9kdWxlLmV4cG9ydHMgPSB0eXBlb2Ygd2luZG93ICE9ICd1bmRlZmluZWQnICYmIHdpbmRvdy5NYXRoID09IE1hdGhcbiAgPyB3aW5kb3cgOiB0eXBlb2Ygc2VsZiAhPSAndW5kZWZpbmVkJyAmJiBzZWxmLk1hdGggPT0gTWF0aCA/IHNlbGZcbiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLW5ldy1mdW5jXG4gIDogRnVuY3Rpb24oJ3JldHVybiB0aGlzJykoKTtcbmlmICh0eXBlb2YgX19nID09ICdudW1iZXInKSBfX2cgPSBnbG9iYWw7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tdW5kZWZcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19nbG9iYWwuanNcbi8vIG1vZHVsZSBpZCA9IDIyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///22\n")},function(module,exports,__webpack_require__){eval("var store = __webpack_require__(136)('wks');\nvar uid = __webpack_require__(94);\nvar Symbol = __webpack_require__(22).Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy5qcz83NTJjIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBzdG9yZSA9IHJlcXVpcmUoJy4vX3NoYXJlZCcpKCd3a3MnKTtcbnZhciB1aWQgPSByZXF1aXJlKCcuL191aWQnKTtcbnZhciBTeW1ib2wgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5TeW1ib2w7XG52YXIgVVNFX1NZTUJPTCA9IHR5cGVvZiBTeW1ib2wgPT0gJ2Z1bmN0aW9uJztcblxudmFyICRleHBvcnRzID0gbW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAobmFtZSkge1xuICByZXR1cm4gc3RvcmVbbmFtZV0gfHwgKHN0b3JlW25hbWVdID1cbiAgICBVU0VfU1lNQk9MICYmIFN5bWJvbFtuYW1lXSB8fCAoVVNFX1NZTUJPTCA/IFN5bWJvbCA6IHVpZCkoJ1N5bWJvbC4nICsgbmFtZSkpO1xufTtcblxuJGV4cG9ydHMuc3RvcmUgPSBzdG9yZTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL193a3MuanNcbi8vIG1vZHVsZSBpZCA9IDIzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///23\n")},function(module,exports,__webpack_require__){eval("// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = __webpack_require__(70);\nvar defined = __webpack_require__(32);\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1pb2JqZWN0LmpzPzNjN2EiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gdG8gaW5kZXhlZCBvYmplY3QsIHRvT2JqZWN0IHdpdGggZmFsbGJhY2sgZm9yIG5vbi1hcnJheS1saWtlIEVTMyBzdHJpbmdzXG52YXIgSU9iamVjdCA9IHJlcXVpcmUoJy4vX2lvYmplY3QnKTtcbnZhciBkZWZpbmVkID0gcmVxdWlyZSgnLi9fZGVmaW5lZCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIElPYmplY3QoZGVmaW5lZChpdCkpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdG8taW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gMjRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///24\n")},function(module,exports,__webpack_require__){eval("var pIE = __webpack_require__(71);\nvar createDesc = __webpack_require__(47);\nvar toIObject = __webpack_require__(24);\nvar toPrimitive = __webpack_require__(31);\nvar has = __webpack_require__(17);\nvar IE8_DOM_DEFINE = __webpack_require__(148);\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = __webpack_require__(10) ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZ29wZC5qcz9jN2RjIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBwSUUgPSByZXF1aXJlKCcuL19vYmplY3QtcGllJyk7XG52YXIgY3JlYXRlRGVzYyA9IHJlcXVpcmUoJy4vX3Byb3BlcnR5LWRlc2MnKTtcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgdG9QcmltaXRpdmUgPSByZXF1aXJlKCcuL190by1wcmltaXRpdmUnKTtcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciBJRThfRE9NX0RFRklORSA9IHJlcXVpcmUoJy4vX2llOC1kb20tZGVmaW5lJyk7XG52YXIgZ09QRCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3I7XG5cbmV4cG9ydHMuZiA9IHJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgPyBnT1BEIDogZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKE8sIFApIHtcbiAgTyA9IHRvSU9iamVjdChPKTtcbiAgUCA9IHRvUHJpbWl0aXZlKFAsIHRydWUpO1xuICBpZiAoSUU4X0RPTV9ERUZJTkUpIHRyeSB7XG4gICAgcmV0dXJuIGdPUEQoTywgUCk7XG4gIH0gY2F0Y2ggKGUpIHsgLyogZW1wdHkgKi8gfVxuICBpZiAoaGFzKE8sIFApKSByZXR1cm4gY3JlYXRlRGVzYyghcElFLmYuY2FsbChPLCBQKSwgT1tQXSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZ29wZC5qc1xuLy8gbW9kdWxlIGlkID0gMjVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///25\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = __webpack_require__(17);\nvar toObject = __webpack_require__(15);\nvar IE_PROTO = __webpack_require__(103)('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZ3BvLmpzPzI4ZWEiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjkgLyAxNS4yLjMuMiBPYmplY3QuZ2V0UHJvdG90eXBlT2YoTylcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIElFX1BST1RPID0gcmVxdWlyZSgnLi9fc2hhcmVkLWtleScpKCdJRV9QUk9UTycpO1xudmFyIE9iamVjdFByb3RvID0gT2JqZWN0LnByb3RvdHlwZTtcblxubW9kdWxlLmV4cG9ydHMgPSBPYmplY3QuZ2V0UHJvdG90eXBlT2YgfHwgZnVuY3Rpb24gKE8pIHtcbiAgTyA9IHRvT2JqZWN0KE8pO1xuICBpZiAoaGFzKE8sIElFX1BST1RPKSkgcmV0dXJuIE9bSUVfUFJPVE9dO1xuICBpZiAodHlwZW9mIE8uY29uc3RydWN0b3IgPT0gJ2Z1bmN0aW9uJyAmJiBPIGluc3RhbmNlb2YgTy5jb25zdHJ1Y3Rvcikge1xuICAgIHJldHVybiBPLmNvbnN0cnVjdG9yLnByb3RvdHlwZTtcbiAgfSByZXR1cm4gTyBpbnN0YW5jZW9mIE9iamVjdCA/IE9iamVjdFByb3RvIDogbnVsbDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1ncG8uanNcbi8vIG1vZHVsZSBpZCA9IDI2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///26\n")},function(module,exports,__webpack_require__){eval("// optional / simple context binding\nvar aFunction = __webpack_require__(16);\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jdHguanM/YWM1YyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBvcHRpb25hbCAvIHNpbXBsZSBjb250ZXh0IGJpbmRpbmdcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuL19hLWZ1bmN0aW9uJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChmbiwgdGhhdCwgbGVuZ3RoKSB7XG4gIGFGdW5jdGlvbihmbik7XG4gIGlmICh0aGF0ID09PSB1bmRlZmluZWQpIHJldHVybiBmbjtcbiAgc3dpdGNoIChsZW5ndGgpIHtcbiAgICBjYXNlIDE6IHJldHVybiBmdW5jdGlvbiAoYSkge1xuICAgICAgcmV0dXJuIGZuLmNhbGwodGhhdCwgYSk7XG4gICAgfTtcbiAgICBjYXNlIDI6IHJldHVybiBmdW5jdGlvbiAoYSwgYikge1xuICAgICAgcmV0dXJuIGZuLmNhbGwodGhhdCwgYSwgYik7XG4gICAgfTtcbiAgICBjYXNlIDM6IHJldHVybiBmdW5jdGlvbiAoYSwgYiwgYykge1xuICAgICAgcmV0dXJuIGZuLmNhbGwodGhhdCwgYSwgYiwgYyk7XG4gICAgfTtcbiAgfVxuICByZXR1cm4gZnVuY3Rpb24gKC8qIC4uLmFyZ3MgKi8pIHtcbiAgICByZXR1cm4gZm4uYXBwbHkodGhhdCwgYXJndW1lbnRzKTtcbiAgfTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2N0eC5qc1xuLy8gbW9kdWxlIGlkID0gMjdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///27\n")},function(module,exports){eval("var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jb2YuanM/YzlkMCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgdG9TdHJpbmcgPSB7fS50b1N0cmluZztcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIHRvU3RyaW5nLmNhbGwoaXQpLnNsaWNlKDgsIC0xKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2NvZi5qc1xuLy8gbW9kdWxlIGlkID0gMjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///28\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar fails = __webpack_require__(5);\n\nmodule.exports = function (method, arg) {\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call\n arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zdHJpY3QtbWV0aG9kLmpzPzM0ZGEiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGZhaWxzID0gcmVxdWlyZSgnLi9fZmFpbHMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAobWV0aG9kLCBhcmcpIHtcbiAgcmV0dXJuICEhbWV0aG9kICYmIGZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tdXNlbGVzcy1jYWxsXG4gICAgYXJnID8gbWV0aG9kLmNhbGwobnVsbCwgZnVuY3Rpb24gKCkgeyAvKiBlbXB0eSAqLyB9LCAxKSA6IG1ldGhvZC5jYWxsKG51bGwpO1xuICB9KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3N0cmljdC1tZXRob2QuanNcbi8vIG1vZHVsZSBpZCA9IDI5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///29\n")},function(module,exports){eval("var core = module.exports = { version: '2.5.3' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jb3JlLmpzP2VlMDUiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGNvcmUgPSBtb2R1bGUuZXhwb3J0cyA9IHsgdmVyc2lvbjogJzIuNS4zJyB9O1xuaWYgKHR5cGVvZiBfX2UgPT0gJ251bWJlcicpIF9fZSA9IGNvcmU7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tdW5kZWZcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fY29yZS5qc1xuLy8gbW9kdWxlIGlkID0gMzBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///30\n")},function(module,exports,__webpack_require__){eval("// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = __webpack_require__(6);\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub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b3JlLWpzL21vZHVsZXMvX3RvLXByaW1pdGl2ZS5qc1xuLy8gbW9kdWxlIGlkID0gMzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///31\n")},function(module,exports){eval('// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError("Can\'t call method on " + it);\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19kZWZpbmVkLmpzP2ZmMDgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4yLjEgUmVxdWlyZU9iamVjdENvZXJjaWJsZShhcmd1bWVudClcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIGlmIChpdCA9PSB1bmRlZmluZWQpIHRocm93IFR5cGVFcnJvcihcIkNhbid0IGNhbGwgbWV0aG9kIG9uICBcIiArIGl0KTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZGVmaW5lZC5qc1xuLy8gbW9kdWxlIGlkID0gMzJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///32\n')},function(module,exports){eval("// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1pbnRlZ2VyLmpzP2ExZTgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4xLjQgVG9JbnRlZ2VyXG52YXIgY2VpbCA9IE1hdGguY2VpbDtcbnZhciBmbG9vciA9IE1hdGguZmxvb3I7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXNOYU4oaXQgPSAraXQpID8gMCA6IChpdCA+IDAgPyBmbG9vciA6IGNlaWwpKGl0KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3RvLWludGVnZXIuanNcbi8vIG1vZHVsZSBpZCA9IDMzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///33\n")},function(module,exports,__webpack_require__){eval("// most Object methods by ES6 should accept primitives\nvar $export = __webpack_require__(0);\nvar core = __webpack_require__(30);\nvar fails = __webpack_require__(5);\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3Qtc2FwLmpzP2RlMmUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gbW9zdCBPYmplY3QgbWV0aG9kcyBieSBFUzYgc2hvdWxkIGFjY2VwdCBwcmltaXRpdmVzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGNvcmUgPSByZXF1aXJlKCcuL19jb3JlJyk7XG52YXIgZmFpbHMgPSByZXF1aXJlKCcuL19mYWlscycpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoS0VZLCBleGVjKSB7XG4gIHZhciBmbiA9IChjb3JlLk9iamVjdCB8fCB7fSlbS0VZXSB8fCBPYmplY3RbS0VZXTtcbiAgdmFyIGV4cCA9IHt9O1xuICBleHBbS0VZXSA9IGV4ZWMoZm4pO1xuICAkZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqIGZhaWxzKGZ1bmN0aW9uICgpIHsgZm4oMSk7IH0pLCAnT2JqZWN0JywgZXhwKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1zYXAuanNcbi8vIG1vZHVsZSBpZCA9IDM0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///34\n")},function(module,exports,__webpack_require__){eval("// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = __webpack_require__(27);\nvar IObject = __webpack_require__(70);\nvar toObject = __webpack_require__(15);\nvar toLength = __webpack_require__(12);\nvar asc = __webpack_require__(120);\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hcnJheS1tZXRob2RzLmpzPzJlMTQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMCAtPiBBcnJheSNmb3JFYWNoXG4vLyAxIC0+IEFycmF5I21hcFxuLy8gMiAtPiBBcnJheSNmaWx0ZXJcbi8vIDMgLT4gQXJyYXkjc29tZVxuLy8gNCAtPiBBcnJheSNldmVyeVxuLy8gNSAtPiBBcnJheSNmaW5kXG4vLyA2IC0+IEFycmF5I2ZpbmRJbmRleFxudmFyIGN0eCA9IH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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///35\n")},function(module,exports){eval("module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lzLW9iamVjdC5qcz8xMmE4Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiB0eXBlb2YgaXQgPT09ICdvYmplY3QnID8gaXQgIT09IG51bGwgOiB0eXBlb2YgaXQgPT09ICdmdW5jdGlvbic7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lzLW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gMzZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///36\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(440), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9rZXlzLmpzPzdkOTgiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9rZXlzXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSAzN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///37\n')},function(module,exports,__webpack_require__){"use strict";eval("\nif (__webpack_require__(10)) {\n var LIBRARY = __webpack_require__(49);\n var global = __webpack_require__(4);\n var fails = __webpack_require__(5);\n var $export = __webpack_require__(0);\n var $typed = __webpack_require__(88);\n var $buffer = __webpack_require__(126);\n var ctx = __webpack_require__(27);\n var anInstance = __webpack_require__(55);\n var propertyDesc = __webpack_require__(47);\n var hide = __webpack_require__(18);\n var redefineAll = __webpack_require__(57);\n var toInteger = __webpack_require__(33);\n var toLength = __webpack_require__(12);\n var toIndex = __webpack_require__(174);\n var toAbsoluteIndex = __webpack_require__(51);\n var toPrimitive = __webpack_require__(31);\n var has = __webpack_require__(17);\n var classof = __webpack_require__(72);\n var isObject = __webpack_require__(6);\n var toObject = __webpack_require__(15);\n var isArrayIter = __webpack_require__(117);\n var create = __webpack_require__(52);\n var getPrototypeOf = __webpack_require__(26);\n var gOPN = __webpack_require__(53).f;\n var getIterFn = __webpack_require__(119);\n var uid = __webpack_require__(48);\n var wks = __webpack_require__(8);\n var createArrayMethod = __webpack_require__(35);\n var createArrayIncludes = __webpack_require__(79);\n var speciesConstructor = __webpack_require__(86);\n var ArrayIterators = __webpack_require__(122);\n var Iterators = __webpack_require__(63);\n var $iterDetect = __webpack_require__(83);\n var setSpecies = __webpack_require__(54);\n var arrayFill = __webpack_require__(121);\n var arrayCopyWithin = __webpack_require__(164);\n var $DP = __webpack_require__(11);\n var $GOPD = __webpack_require__(25);\n var dP = $DP.f;\n var gOPD = $GOPD.f;\n var RangeError = global.RangeError;\n var TypeError = global.TypeError;\n var Uint8Array = global.Uint8Array;\n var ARRAY_BUFFER = 'ArrayBuffer';\n var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;\n var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\n var PROTOTYPE = 'prototype';\n var ArrayProto = Array[PROTOTYPE];\n var $ArrayBuffer = $buffer.ArrayBuffer;\n var $DataView = $buffer.DataView;\n var arrayForEach = createArrayMethod(0);\n var arrayFilter = createArrayMethod(2);\n var arraySome = createArrayMethod(3);\n var arrayEvery = createArrayMethod(4);\n var arrayFind = createArrayMethod(5);\n var arrayFindIndex = createArrayMethod(6);\n var arrayIncludes = createArrayIncludes(true);\n var arrayIndexOf = createArrayIncludes(false);\n var arrayValues = ArrayIterators.values;\n var arrayKeys = ArrayIterators.keys;\n var arrayEntries = ArrayIterators.entries;\n var arrayLastIndexOf = ArrayProto.lastIndexOf;\n var arrayReduce = ArrayProto.reduce;\n var arrayReduceRight = ArrayProto.reduceRight;\n var arrayJoin = ArrayProto.join;\n var arraySort = ArrayProto.sort;\n var arraySlice = ArrayProto.slice;\n var arrayToString = ArrayProto.toString;\n var arrayToLocaleString = ArrayProto.toLocaleString;\n var ITERATOR = wks('iterator');\n var TAG = wks('toStringTag');\n var TYPED_CONSTRUCTOR = uid('typed_constructor');\n var DEF_CONSTRUCTOR = uid('def_constructor');\n var ALL_CONSTRUCTORS = $typed.CONSTR;\n var TYPED_ARRAY = $typed.TYPED;\n var VIEW = $typed.VIEW;\n var WRONG_LENGTH = 'Wrong length!';\n\n var $map = createArrayMethod(1, function (O, length) {\n return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);\n });\n\n var LITTLE_ENDIAN = fails(function () {\n // eslint-disable-next-line no-undef\n return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;\n });\n\n var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {\n new Uint8Array(1).set({});\n });\n\n var toOffset = function (it, BYTES) {\n var offset = toInteger(it);\n if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');\n return offset;\n };\n\n var validate = function (it) {\n if (isObject(it) && TYPED_ARRAY in it) return it;\n throw TypeError(it + ' is not a typed array!');\n };\n\n var allocate = function (C, length) {\n if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {\n throw TypeError('It is not a typed array constructor!');\n } return new C(length);\n };\n\n var speciesFromList = function (O, list) {\n return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);\n };\n\n var fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = allocate(C, length);\n while (length > index) result[index] = list[index++];\n return result;\n };\n\n var addGetter = function (it, key, internal) {\n dP(it, key, { get: function () { return this._d[internal]; } });\n };\n\n var $from = function from(source /* , mapfn, thisArg */) {\n var O = toObject(source);\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iterFn = getIterFn(O);\n var i, length, values, result, step, iterator;\n if (iterFn != undefined && !isArrayIter(iterFn)) {\n for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {\n values.push(step.value);\n } O = values;\n }\n if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);\n for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n };\n\n var $of = function of(/* ...items */) {\n var index = 0;\n var length = arguments.length;\n var result = allocate(this, length);\n while (length > index) result[index] = arguments[index++];\n return result;\n };\n\n // iOS Safari 6.x fails here\n var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });\n\n var $toLocaleString = function toLocaleString() {\n return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);\n };\n\n var proto = {\n copyWithin: function copyWithin(target, start /* , end */) {\n return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n },\n every: function every(callbackfn /* , thisArg */) {\n return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars\n return arrayFill.apply(validate(this), arguments);\n },\n filter: function filter(callbackfn /* , thisArg */) {\n return speciesFromList(this, arrayFilter(validate(this), callbackfn,\n arguments.length > 1 ? arguments[1] : undefined));\n },\n find: function find(predicate /* , thisArg */) {\n return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n findIndex: function findIndex(predicate /* , thisArg */) {\n return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n forEach: function forEach(callbackfn /* , thisArg */) {\n arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n indexOf: function indexOf(searchElement /* , fromIndex */) {\n return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n includes: function includes(searchElement /* , fromIndex */) {\n return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n join: function join(separator) { // eslint-disable-line no-unused-vars\n return arrayJoin.apply(validate(this), arguments);\n },\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars\n return arrayLastIndexOf.apply(validate(this), arguments);\n },\n map: function map(mapfn /* , thisArg */) {\n return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduce.apply(validate(this), arguments);\n },\n reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduceRight.apply(validate(this), arguments);\n },\n reverse: function reverse() {\n var that = this;\n var length = validate(that).length;\n var middle = Math.floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n },\n some: function some(callbackfn /* , thisArg */) {\n return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n sort: function sort(comparefn) {\n return arraySort.call(validate(this), comparefn);\n },\n subarray: function subarray(begin, end) {\n var O = validate(this);\n var length = O.length;\n var $begin = toAbsoluteIndex(begin, length);\n return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(\n O.buffer,\n O.byteOffset + $begin * O.BYTES_PER_ELEMENT,\n toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)\n );\n }\n };\n\n var $slice = function slice(start, end) {\n return speciesFromList(this, arraySlice.call(validate(this), start, end));\n };\n\n var $set = function set(arrayLike /* , offset */) {\n validate(this);\n var offset = toOffset(arguments[1], 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError(WRONG_LENGTH);\n while (index < len) this[offset + index] = src[index++];\n };\n\n var $iterators = {\n entries: function entries() {\n return arrayEntries.call(validate(this));\n },\n keys: function keys() {\n return arrayKeys.call(validate(this));\n },\n values: function values() {\n return arrayValues.call(validate(this));\n }\n };\n\n var isTAIndex = function (target, key) {\n return isObject(target)\n && target[TYPED_ARRAY]\n && typeof key != 'symbol'\n && key in target\n && String(+key) == String(key);\n };\n var $getDesc = function getOwnPropertyDescriptor(target, key) {\n return isTAIndex(target, key = toPrimitive(key, true))\n ? propertyDesc(2, target[key])\n : gOPD(target, key);\n };\n var $setDesc = function defineProperty(target, key, desc) {\n if (isTAIndex(target, key = toPrimitive(key, true))\n && isObject(desc)\n && has(desc, 'value')\n && !has(desc, 'get')\n && !has(desc, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !desc.configurable\n && (!has(desc, 'writable') || desc.writable)\n && (!has(desc, 'enumerable') || desc.enumerable)\n ) {\n target[key] = desc.value;\n return target;\n } return dP(target, key, desc);\n };\n\n if (!ALL_CONSTRUCTORS) {\n $GOPD.f = $getDesc;\n $DP.f = $setDesc;\n }\n\n $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {\n getOwnPropertyDescriptor: $getDesc,\n defineProperty: $setDesc\n });\n\n if (fails(function () { arrayToString.call({}); })) {\n arrayToString = arrayToLocaleString = function toString() {\n return arrayJoin.call(this);\n };\n }\n\n var $TypedArrayPrototype$ = redefineAll({}, proto);\n redefineAll($TypedArrayPrototype$, $iterators);\n hide($TypedArrayPrototype$, ITERATOR, $iterators.values);\n redefineAll($TypedArrayPrototype$, {\n slice: $slice,\n set: $set,\n constructor: function () { /* noop */ },\n toString: arrayToString,\n toLocaleString: $toLocaleString\n });\n addGetter($TypedArrayPrototype$, 'buffer', 'b');\n addGetter($TypedArrayPrototype$, 'byteOffset', 'o');\n addGetter($TypedArrayPrototype$, 'byteLength', 'l');\n addGetter($TypedArrayPrototype$, 'length', 'e');\n dP($TypedArrayPrototype$, TAG, {\n get: function () { return this[TYPED_ARRAY]; }\n });\n\n // eslint-disable-next-line max-statements\n module.exports = function (KEY, BYTES, wrapper, CLAMPED) {\n CLAMPED = !!CLAMPED;\n var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + KEY;\n var SETTER = 'set' + KEY;\n var TypedArray = global[NAME];\n var Base = TypedArray || {};\n var TAC = TypedArray && getPrototypeOf(TypedArray);\n var FORCED = !TypedArray || !$typed.ABV;\n var O = {};\n var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];\n var getter = function (that, index) {\n var data = that._d;\n return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);\n };\n var setter = function (that, index, value) {\n var data = that._d;\n if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;\n data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);\n };\n var addElement = function (that, index) {\n dP(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n if (FORCED) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME, '_d');\n var index = 0;\n var offset = 0;\n var buffer, byteLength, length, klass;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new $ArrayBuffer(byteLength);\n } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n buffer = data;\n offset = toOffset($offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - offset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (TYPED_ARRAY in data) {\n return fromList(TypedArray, data);\n } else {\n return $from.call(TypedArray, data);\n }\n hide(that, '_d', {\n b: buffer,\n o: offset,\n l: byteLength,\n e: length,\n v: new $DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);\n hide(TypedArrayPrototype, 'constructor', TypedArray);\n } else if (!fails(function () {\n TypedArray(1);\n }) || !fails(function () {\n new TypedArray(-1); // eslint-disable-line no-new\n }) || !$iterDetect(function (iter) {\n new TypedArray(); // eslint-disable-line no-new\n new TypedArray(null); // eslint-disable-line no-new\n new TypedArray(1.5); // eslint-disable-line no-new\n new TypedArray(iter); // eslint-disable-line no-new\n }, true)) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME);\n var klass;\n // `ws` module bug, temporarily remove validation length for Uint8Array\n // https://github.com/websockets/ws/pull/645\n if (!isObject(data)) return new Base(toIndex(data));\n if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n return $length !== undefined\n ? new Base(data, toOffset($offset, BYTES), $length)\n : $offset !== undefined\n ? new Base(data, toOffset($offset, BYTES))\n : new Base(data);\n }\n if (TYPED_ARRAY in data) return fromList(TypedArray, data);\n return $from.call(TypedArray, data);\n });\n arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {\n if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);\n });\n TypedArray[PROTOTYPE] = TypedArrayPrototype;\n if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;\n }\n var $nativeIterator = TypedArrayPrototype[ITERATOR];\n var CORRECT_ITER_NAME = !!$nativeIterator\n && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);\n var $iterator = $iterators.values;\n hide(TypedArray, TYPED_CONSTRUCTOR, true);\n hide(TypedArrayPrototype, TYPED_ARRAY, NAME);\n hide(TypedArrayPrototype, VIEW, true);\n hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);\n\n if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {\n dP(TypedArrayPrototype, TAG, {\n get: function () { return NAME; }\n });\n }\n\n O[NAME] = TypedArray;\n\n $export($export.G + $export.W + $export.F * (TypedArray != Base), O);\n\n $export($export.S, NAME, {\n BYTES_PER_ELEMENT: BYTES\n });\n\n $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {\n from: $from,\n of: $of\n });\n\n if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);\n\n $export($export.P, NAME, proto);\n\n setSpecies(NAME);\n\n $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });\n\n $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);\n\n if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;\n\n $export($export.P + $export.F * fails(function () {\n new TypedArray(1).slice();\n }), NAME, { slice: $slice });\n\n $export($export.P + $export.F * (fails(function () {\n return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();\n }) || !fails(function () {\n TypedArrayPrototype.toLocaleString.call([1, 2]);\n })), NAME, { toLocaleString: $toLocaleString });\n\n Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;\n if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);\n };\n} else module.exports = function () { /* empty */ };\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190eXBlZC1hcnJheS5qcz9lZmI1Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbmlmIChyZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpKSB7XG4gIHZhciBMSUJSQVJZID0gcmVxdWlyZSgnLi9fbGlicmFyeScpO1xuICB2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG4gIHZhciBmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG4gIHZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG4gIHZhciAkdHlwZWQgPSByZXF1aXJlKCcuL190eXBlZCcpO1xuICB2YXIgJGJ1ZmZlciA9IHJlcXVpcmUoJy4vX3R5cGVkLWJ1ZmZlcicpO1xuICB2YXIgY3R4ID0gcmVxdWlyZSgnLi9fY3R4Jyk7XG4gIHZhciBhbkluc3RhbmN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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///38\n")},function(module,exports,__webpack_require__){eval("var Map = __webpack_require__(169);\nvar $export = __webpack_require__(0);\nvar shared = __webpack_require__(78)('metadata');\nvar store = shared.store || (shared.store = new (__webpack_require__(172))());\n\nvar getOrCreateMetadataMap = function (target, targetKey, create) {\n var targetMetadata = store.get(target);\n if (!targetMetadata) {\n if (!create) return undefined;\n store.set(target, targetMetadata = new Map());\n }\n var keyMetadata = targetMetadata.get(targetKey);\n if (!keyMetadata) {\n if (!create) return undefined;\n targetMetadata.set(targetKey, keyMetadata = new Map());\n } return keyMetadata;\n};\nvar ordinaryHasOwnMetadata = function (MetadataKey, O, P) {\n var metadataMap = getOrCreateMetadataMap(O, P, false);\n return metadataMap === undefined ? false : metadataMap.has(MetadataKey);\n};\nvar ordinaryGetOwnMetadata = function (MetadataKey, O, P) {\n var metadataMap = getOrCreateMetadataMap(O, P, false);\n return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);\n};\nvar ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {\n getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);\n};\nvar ordinaryOwnMetadataKeys = function (target, targetKey) {\n var metadataMap = getOrCreateMetadataMap(target, targetKey, false);\n var keys = [];\n if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });\n return keys;\n};\nvar toMetaKey = function (it) {\n return it === undefined || typeof it == 'symbol' ? it : String(it);\n};\nvar exp = function (O) {\n $export($export.S, 'Reflect', O);\n};\n\nmodule.exports = {\n store: store,\n map: getOrCreateMetadataMap,\n has: ordinaryHasOwnMetadata,\n get: ordinaryGetOwnMetadata,\n set: ordinaryDefineOwnMetadata,\n keys: ordinaryOwnMetadataKeys,\n key: toMetaKey,\n exp: exp\n};\n//# sourceURL=[module]\n//# sourceMappingUR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BQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///39\n")},function(module,exports,__webpack_require__){eval("var anObject = __webpack_require__(41);\nvar IE8_DOM_DEFINE = __webpack_require__(184);\nvar toPrimitive = __webpack_require__(132);\nvar dP = Object.defineProperty;\n\nexports.f = __webpack_require__(44) ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1kcC5qcz83YWYwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIElFOF9ET01fREVGSU5FID0gcmVxdWlyZSgnLi9faWU4LWRvbS1kZWZpbmUnKTtcbnZhciB0b1ByaW1pdGl2ZSA9IHJlcXVpcmUoJy4vX3RvLXByaW1pdGl2ZScpO1xudmFyIGRQID0gT2JqZWN0LmRlZmluZVByb3BlcnR5O1xuXG5leHBvcnRzLmYgPSByZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpID8gT2JqZWN0LmRlZmluZVByb3BlcnR5IDogZnVuY3Rpb24gZGVmaW5lUHJvcGVydHkoTywgUCwgQXR0cmlidXRlcykge1xuICBhbk9iamVjdChPKTtcbiAgUCA9IHRvUHJpbWl0aXZlKFAsIHRydWUpO1xuICBhbk9iamVjdChBdHRyaWJ1dGVzKTtcbiAgaWYgKElFOF9ET01fREVGSU5FKSB0cnkge1xuICAgIHJldHVybiBkUChPLCBQLCBBdHRyaWJ1dGVzKTtcbiAgfSBjYXRjaCAoZSkgeyAvKiBlbXB0eSAqLyB9XG4gIGlmICgnZ2V0JyBpbiBBdHRyaWJ1dGVzIHx8ICdzZXQnIGluIEF0dHJpYnV0ZXMpIHRocm93IFR5cGVFcnJvcignQWNjZXNzb3JzIG5vdCBzdXBwb3J0ZWQhJyk7XG4gIGlmICgndmFsdWUnIGluIEF0dHJpYnV0ZXMpIE9bUF0gPSBBdHRyaWJ1dGVzLnZhbHVlO1xuICByZXR1cm4gTztcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWRwLmpzXG4vLyBtb2R1bGUgaWQgPSA0MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///40\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(36);\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FuLW9iamVjdC5qcz9lZmIzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKCFpc09iamVjdChpdCkpIHRocm93IFR5cGVFcnJvcihpdCArICcgaXMgbm90IGFuIG9iamVjdCEnKTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hbi1vYmplY3QuanNcbi8vIG1vZHVsZSBpZCA9IDQxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///41\n")},function(module,exports,__webpack_require__){eval("var META = __webpack_require__(48)('meta');\nvar isObject = __webpack_require__(6);\nvar has = __webpack_require__(17);\nvar setDesc = __webpack_require__(11).f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !__webpack_require__(5)(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19tZXRhLmpzP2Q1YTAiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIE1FVEEgPSByZXF1aXJlKCcuL191aWQnKSgnbWV0YScpO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgaGFzID0gcmVxdWlyZSgnLi9faGFzJyk7XG52YXIgc2V0RGVzYyA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmY7XG52YXIgaWQgPSAwO1xudmFyIGlzRXh0ZW5zaWJsZSA9IE9iamVjdC5pc0V4dGVuc2libGUgfHwgZnVuY3Rpb24gKCkge1xuICByZXR1cm4gdHJ1ZTtcbn07XG52YXIgRlJFRVpFID0gIXJlcXVpcmUoJy4vX2ZhaWxzJykoZnVuY3Rpb24gKCkge1xuICByZXR1cm4gaXNFeHRlbnNpYmxlKE9iamVjdC5wcmV2ZW50RXh0ZW5zaW9ucyh7fSkpO1xufSk7XG52YXIgc2V0TWV0YSA9IGZ1bmN0aW9uIChpdCkge1xuICBzZXREZXNjKGl0LCBNRVRBLCB7IHZhbHVlOiB7XG4gICAgaTogJ08nICsgKytpZCwgLy8gb2JqZWN0IElEXG4gICAgdzoge30gICAgICAgICAgLy8gd2VhayBjb2xsZWN0aW9ucyBJRHNcbiAgfSB9KTtcbn07XG52YXIgZmFzdEtleSA9IGZ1bmN0aW9uIChpdCwgY3JlYXRlKSB7XG4gIC8vIHJldHVybiBwcmltaXRpdm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VuY3Rpb24gKGl0KSB7XG4gIGlmIChGUkVFWkUgJiYgbWV0YS5ORUVEICYmIGlzRXh0ZW5zaWJsZShpdCkgJiYgIWhhcyhpdCwgTUVUQSkpIHNldE1ldGEoaXQpO1xuICByZXR1cm4gaXQ7XG59O1xudmFyIG1ldGEgPSBtb2R1bGUuZXhwb3J0cyA9IHtcbiAgS0VZOiBNRVRBLFxuICBORUVEOiBmYWxzZSxcbiAgZmFzdEtleTogZmFzdEtleSxcbiAgZ2V0V2VhazogZ2V0V2VhayxcbiAgb25GcmVlemU6IG9uRnJlZXplXG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19tZXRhLmpzXG4vLyBtb2R1bGUgaWQgPSA0MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///42\n")},function(module,exports,__webpack_require__){eval("// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = __webpack_require__(8)('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(18)(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hZGQtdG8tdW5zY29wYWJsZXMuanM/NDYxMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMi4xLjMuMzEgQXJyYXkucHJvdG90eXBlW0BAdW5zY29wYWJsZXNdXG52YXIgVU5TQ09QQUJMRVMgPSByZXF1aXJlKCcuL193a3MnKSgndW5zY29wYWJsZXMnKTtcbnZhciBBcnJheVByb3RvID0gQXJyYXkucHJvdG90eXBlO1xuaWYgKEFycmF5UHJvdG9bVU5TQ09QQUJMRVNdID09IHVuZGVmaW5lZCkgcmVxdWlyZSgnLi9faGlkZScpKEFycmF5UHJvdG8sIFVOU0NPUEFCTEVTLCB7fSk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChrZXkpIHtcbiAgQXJyYXlQcm90b1tVTlNDT1BBQkxFU11ba2V5XSA9IHRydWU7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hZGQtdG8tdW5zY29wYWJsZXMuanNcbi8vIG1vZHVsZSBpZCA9IDQzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///43\n")},function(module,exports,__webpack_require__){eval("// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(66)(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2Rlc2NyaXB0b3JzLmpzP2Y4NGQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gVGhhbmsncyBJRTggZm9yIGhpcyBmdW5ueSBkZWZpbmVQcm9wZXJ0eVxubW9kdWxlLmV4cG9ydHMgPSAhcmVxdWlyZSgnLi9fZmFpbHMnKShmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBPYmplY3QuZGVmaW5lUHJvcGVydHkoe30sICdhJywgeyBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIDc7IH0gfSkuYSAhPSA3O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZGVzY3JpcHRvcnMuanNcbi8vIG1vZHVsZSBpZCA9IDQ0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///44\n")},function(module,exports,__webpack_require__){eval("// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = __webpack_require__(187);\nvar defined = __webpack_require__(130);\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWlvYmplY3QuanM/NGRjNCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyB0byBpbmRleGVkIG9iamVjdCwgdG9PYmplY3Qgd2l0aCBmYWxsYmFjayBmb3Igbm9uLWFycmF5LWxpa2UgRVMzIHN0cmluZ3NcbnZhciBJT2JqZWN0ID0gcmVxdWlyZSgnLi9faW9iamVjdCcpO1xudmFyIGRlZmluZWQgPSByZXF1aXJlKCcuL19kZWZpbmVkJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gSU9iamVjdChkZWZpbmVkKGl0KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWlvYmplY3QuanNcbi8vIG1vZHVsZSBpZCA9IDQ1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///45\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(464), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL2pzb24vc3RyaW5naWZ5LmpzPzlhZjEiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL2pzb24vc3RyaW5naWZ5XCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL2pzb24vc3RyaW5naWZ5LmpzXG4vLyBtb2R1bGUgaWQgPSA0NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///46\n')},function(module,exports){eval("module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19wcm9wZXJ0eS1kZXNjLmpzPzdkNGQiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoYml0bWFwLCB2YWx1ZSkge1xuICByZXR1cm4ge1xuICAgIGVudW1lcmFibGU6ICEoYml0bWFwICYgMSksXG4gICAgY29uZmlndXJhYmxlOiAhKGJpdG1hcCAmIDIpLFxuICAgIHdyaXRhYmxlOiAhKGJpdG1hcCAmIDQpLFxuICAgIHZhbHVlOiB2YWx1ZVxuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcHJvcGVydHktZGVzYy5qc1xuLy8gbW9kdWxlIGlkID0gNDdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///47\n")},function(module,exports){eval("var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL191aWQuanM/YmE1NCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgaWQgPSAwO1xudmFyIHB4ID0gTWF0aC5yYW5kb20oKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGtleSkge1xuICByZXR1cm4gJ1N5bWJvbCgnLmNvbmNhdChrZXkgPT09IHVuZGVmaW5lZCA/ICcnIDoga2V5LCAnKV8nLCAoKytpZCArIHB4KS50b1N0cmluZygzNikpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdWlkLmpzXG4vLyBtb2R1bGUgaWQgPSA0OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///48\n")},function(module,exports){eval("module.exports = false;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19saWJyYXJ5LmpzPzU3NzkiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmYWxzZTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbGlicmFyeS5qc1xuLy8gbW9kdWxlIGlkID0gNDlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///49\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = __webpack_require__(150);\nvar enumBugKeys = __webpack_require__(104);\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3Qta2V5cy5qcz80MjFkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi4xNCAvIDE1LjIuMy4xNCBPYmplY3Qua2V5cyhPKVxudmFyICRrZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMtaW50ZXJuYWwnKTtcbnZhciBlbnVtQnVnS2V5cyA9IHJlcXVpcmUoJy4vX2VudW0tYnVnLWtleXMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBPYmplY3Qua2V5cyB8fCBmdW5jdGlvbiBrZXlzKE8pIHtcbiAgcmV0dXJuICRrZXlzKE8sIGVudW1CdWdLZXlzKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSA1MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///50\n")},function(module,exports,__webpack_require__){eval("var toInteger = __webpack_require__(33);\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1hYnNvbHV0ZS1pbmRleC5qcz9jZThmIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgbWF4ID0gTWF0aC5tYXg7XG52YXIgbWluID0gTWF0aC5taW47XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpbmRleCwgbGVuZ3RoKSB7XG4gIGluZGV4ID0gdG9JbnRlZ2VyKGluZGV4KTtcbiAgcmV0dXJuIGluZGV4IDwgMCA/IG1heChpbmRleCArIGxlbmd0aCwgMCkgOiBtaW4oaW5kZXgsIGxlbmd0aCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1hYnNvbHV0ZS1pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gNTFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///51\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = __webpack_require__(3);\nvar dPs = __webpack_require__(151);\nvar enumBugKeys = __webpack_require__(104);\nvar IE_PROTO = __webpack_require__(103)('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(101)('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n __webpack_require__(105).appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtY3JlYXRlLmpzP2VmMjkiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjIgLyAxNS4yLjMuNSBPYmplY3QuY3JlYXRlKE8gWywgUHJvcGVydGllc10pXG52YXIgYW5PYmplY3Q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gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///52\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = __webpack_require__(150);\nvar hiddenKeys = __webpack_require__(104).concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZ29wbi5qcz81OWMzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi43IC8gMTUuMi4zLjQgT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMoTylcbnZhciAka2V5cyA9IHJlcXVpcmUoJy4vX29iamVjdC1rZXlzLWludGVybmFsJyk7XG52YXIgaGlkZGVuS2V5cyA9IHJlcXVpcmUoJy4vX2VudW0tYnVnLWtleXMnKS5jb25jYXQoJ2xlbmd0aCcsICdwcm90b3R5cGUnKTtcblxuZXhwb3J0cy5mID0gT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMgfHwgZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlOYW1lcyhPKSB7XG4gIHJldHVybiAka2V5cyhPLCBoaWRkZW5LZXlzKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1nb3BuLmpzXG4vLyBtb2R1bGUgaWQgPSA1M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///53\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar global = __webpack_require__(4);\nvar dP = __webpack_require__(11);\nvar DESCRIPTORS = __webpack_require__(10);\nvar SPECIES = __webpack_require__(8)('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtc3BlY2llcy5qcz8wODQ5Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBkUCA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpO1xudmFyIERFU0NSSVBUT1JTID0gcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKTtcbnZhciBTUEVDSUVTID0gcmVxdWlyZSgnLi9fd2tzJykoJ3NwZWNpZXMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoS0VZKSB7XG4gIHZhciBDID0gZ2xvYmFsW0tFWV07XG4gIGlmIChERVNDUklQVE9SUyAmJiBDICYmICFDW1NQRUNJRVNdKSBkUC5mKEMsIFNQRUNJRVMsIHtcbiAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzOyB9XG4gIH0pO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc2V0LXNwZWNpZXMuanNcbi8vIG1vZHVsZSBpZCA9IDU0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///54\n")},function(module,exports){eval("module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hbi1pbnN0YW5jZS5qcz9mNDZhIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCBDb25zdHJ1Y3RvciwgbmFtZSwgZm9yYmlkZGVuRmllbGQpIHtcbiAgaWYgKCEoaXQgaW5zdGFuY2VvZiBDb25zdHJ1Y3RvcikgfHwgKGZvcmJpZGRlbkZpZWxkICE9PSB1bmRlZmluZWQgJiYgZm9yYmlkZGVuRmllbGQgaW4gaXQpKSB7XG4gICAgdGhyb3cgVHlwZUVycm9yKG5hbWUgKyAnOiBpbmNvcnJlY3QgaW52b2NhdGlvbiEnKTtcbiAgfSByZXR1cm4gaXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hbi1pbnN0YW5jZS5qc1xuLy8gbW9kdWxlIGlkID0gNTVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///55\n")},function(module,exports,__webpack_require__){eval("var ctx = __webpack_require__(27);\nvar call = __webpack_require__(162);\nvar isArrayIter = __webpack_require__(117);\nvar anObject = __webpack_require__(3);\nvar toLength = __webpack_require__(12);\nvar getIterFn = __webpack_require__(119);\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTYuanMiLCJz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internal:///56\n")},function(module,exports,__webpack_require__){eval("var redefine = __webpack_require__(19);\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19yZWRlZmluZS1hbGwuanM/MDM1ZSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgcmVkZWZpbmUgPSByZXF1aXJlKCcuL19yZWRlZmluZScpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAodGFyZ2V0LCBzcmMsIHNhZmUpIHtcbiAgZm9yICh2YXIga2V5IGluIHNyYykgcmVkZWZpbmUodGFyZ2V0LCBrZXksIHNyY1trZXldLCBzYWZlKTtcbiAgcmV0dXJuIHRhcmdldDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3JlZGVmaW5lLWFsbC5qc1xuLy8gbW9kdWxlIGlkID0gNTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///57\n")},function(module,exports,__webpack_require__){eval("var dP = __webpack_require__(40);\nvar createDesc = __webpack_require__(73);\nmodule.exports = __webpack_require__(44) ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2hpZGUuanM/ODQ5YyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZFAgPSByZXF1aXJlKCcuL19vYmplY3QtZHAnKTtcbnZhciBjcmVhdGVEZXNjID0gcmVxdWlyZSgnLi9fcHJvcGVydHktZGVzYycpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpID8gZnVuY3Rpb24gKG9iamVjdCwga2V5LCB2YWx1ZSkge1xuICByZXR1cm4gZFAuZihvYmplY3QsIGtleSwgY3JlYXRlRGVzYygxLCB2YWx1ZSkpO1xufSA6IGZ1bmN0aW9uIChvYmplY3QsIGtleSwgdmFsdWUpIHtcbiAgb2JqZWN0W2tleV0gPSB2YWx1ZTtcbiAgcmV0dXJuIG9iamVjdDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faGlkZS5qc1xuLy8gbW9kdWxlIGlkID0gNThcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///58\n")},function(module,exports){eval("var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2hhcy5qcz8wZjYyIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBoYXNPd25Qcm9wZXJ0eSA9IHt9Lmhhc093blByb3BlcnR5O1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQsIGtleSkge1xuICByZXR1cm4gaGFzT3duUHJvcGVydHkuY2FsbChpdCwga2V5KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faGFzLmpzXG4vLyBtb2R1bGUgaWQgPSA1OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///59\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(443), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9nZXQtcHJvdG90eXBlLW9mLmpzPzY3MWUiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9nZXQtcHJvdG90eXBlLW9mXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9nZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSA2MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///60\n')},function(module,exports,__webpack_require__){eval("var def = __webpack_require__(11).f;\nvar has = __webpack_require__(17);\nvar TAG = __webpack_require__(8)('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtdG8tc3RyaW5nLXRhZy5qcz9jOThiIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBkZWYgPSByZXF1aXJlKCcuL19vYmplY3QtZHAnKS5mO1xudmFyIGhhcyA9IHJlcXVpcmUoJy4vX2hhcycpO1xudmFyIFRBRyA9IHJlcXVpcmUoJy4vX3drcycpKCd0b1N0cmluZ1RhZycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCwgdGFnLCBzdGF0KSB7XG4gIGlmIChpdCAmJiAhaGFzKGl0ID0gc3RhdCA/IGl0IDogaXQucHJvdG90eXBlLCBUQUcpKSBkZWYoaXQsIFRBRywgeyBjb25maWd1cmFibGU6IHRydWUsIHZhbHVlOiB0YWcgfSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtdG8tc3RyaW5nLXRhZy5qc1xuLy8gbW9kdWxlIGlkID0gNjFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///61\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar defined = __webpack_require__(32);\nvar fails = __webpack_require__(5);\nvar spaces = __webpack_require__(107);\nvar space = '[' + spaces + ']';\nvar non = '\\u200b\\u0085';\nvar ltrim = RegExp('^' + space + space + '*');\nvar rtrim = RegExp(space + space + '*$');\n\nvar exporter = function (KEY, exec, ALIAS) {\n var exp = {};\n var FORCE = fails(function () {\n return !!spaces[KEY]() || non[KEY]() != non;\n });\n var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];\n if (ALIAS) exp[ALIAS] = fn;\n $export($export.P + $export.F * FORCE, 'String', exp);\n};\n\n// 1 -> String#trimLeft\n// 2 -> String#trimRight\n// 3 -> String#trim\nvar trim = exporter.trim = function (string, TYPE) {\n string = String(defined(string));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n};\n\nmodule.exports = exporter;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zdHJpbmctdHJpbS5qcz82MjY3Il0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcbnZhciBmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG52YXIgc3BhY2VzID0gcmVxdWlyZSgnLi9fc3RyaW5nLXdzJyk7XG52YXIgc3BhY2UgPSAnWycgKyBzcGFjZXMgKyAnXSc7XG52YXIgbm9uID0gJ1xcdTIwMGJcXHUwMDg1JztcbnZhciBsdHJpbSA9IFJlZ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WQgPSA2MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///62\n")},function(module,exports){eval("module.exports = {};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pdGVyYXRvcnMuanM/NmNkZCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHt9O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pdGVyYXRvcnMuanNcbi8vIG1vZHVsZSBpZCA9IDYzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///63\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(6);\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL192YWxpZGF0ZS1jb2xsZWN0aW9uLmpzP2NlYWYiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCwgVFlQRSkge1xuICBpZiAoIWlzT2JqZWN0KGl0KSB8fCBpdC5fdCAhPT0gVFlQRSkgdGhyb3cgVHlwZUVycm9yKCdJbmNvbXBhdGlibGUgcmVjZWl2ZXIsICcgKyBUWVBFICsgJyByZXF1aXJlZCEnKTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdmFsaWRhdGUtY29sbGVjdGlvbi5qc1xuLy8gbW9kdWxlIGlkID0gNjRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///64\n")},function(module,exports,__webpack_require__){eval("// optional / simple context binding\nvar aFunction = __webpack_require__(93);\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJy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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///65\n")},function(module,exports){eval("module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2ZhaWxzLmpzPzRiY2QiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoZXhlYykge1xuICB0cnkge1xuICAgIHJldHVybiAhIWV4ZWMoKTtcbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiB0cnVlO1xuICB9XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2ZhaWxzLmpzXG4vLyBtb2R1bGUgaWQgPSA2NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///66\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = __webpack_require__(186);\nvar enumBugKeys = __webpack_require__(137);\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1rZXlzLmpzPzk2NGIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjE0IC8gMTUuMi4zLjE0IE9iamVjdC5rZXlzKE8pXG52YXIgJGtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cy1pbnRlcm5hbCcpO1xudmFyIGVudW1CdWdLZXlzID0gcmVxdWlyZSgnLi9fZW51bS1idWcta2V5cycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IE9iamVjdC5rZXlzIHx8IGZ1bmN0aW9uIGtleXMoTykge1xuICByZXR1cm4gJGtleXMoTywgZW51bUJ1Z0tleXMpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3Qta2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gNjdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///67\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _typeof2 = __webpack_require__(98);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n\n return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjguanMiLCJzb3VyY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LyBtb2R1bGUgaWQgPSA2OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///68\n')},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = __webpack_require__(456);\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = __webpack_require__(203);\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = __webpack_require__(98);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2luaGVyaXRzLmpzPzNkZmQiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmV4cG9ydHMuX19lc01vZHVsZSA9IHRydWU7XG5cbnZhciBfc2V0UHJvdG90eXBlT2YgPSByZX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HJvdG90eXBlLCB7XG4gICAgY29uc3RydWN0b3I6IHtcbiAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9XG4gIH0pO1xuICBpZiAoc3VwZXJDbGFzcykgX3NldFByb3RvdHlwZU9mMi5kZWZhdWx0ID8gKDAsIF9zZXRQcm90b3R5cGVPZjIuZGVmYXVsdCkoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpIDogc3ViQ2xhc3MuX19wcm90b19fID0gc3VwZXJDbGFzcztcbn07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2luaGVyaXRzLmpzXG4vLyBtb2R1bGUgaWQgPSA2OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///69\n')},function(module,exports,__webpack_require__){eval("// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = __webpack_require__(28);\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pb2JqZWN0LmpzPzQzYTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZmFsbGJhY2sgZm9yIG5vbi1hcnJheS1saWtlIEVTMyBhbmQgbm9uLWVudW1lcmFibGUgb2xkIFY4IHN0cmluZ3NcbnZhciBjb2YgPSByZXF1aXJlKCcuL19jb2YnKTtcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1wcm90b3R5cGUtYnVpbHRpbnNcbm1vZHVsZS5leHBvcnRzID0gT2JqZWN0KCd6JykucHJvcGVydHlJc0VudW1lcmFibGUoMCkgPyBPYmplY3QgOiBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIGNvZihpdCkgPT0gJ1N0cmluZycgPyBpdC5zcGxpdCgnJykgOiBPYmplY3QoaXQpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gNzBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///70\n")},function(module,exports){eval("exports.f = {}.propertyIsEnumerable;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtcGllLmpzPzYzNTYiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0cy5mID0ge30ucHJvcGVydHlJc0VudW1lcmFibGU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1waWUuanNcbi8vIG1vZHVsZSBpZCA9IDcxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///71\n")},function(module,exports,__webpack_require__){eval("// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = __webpack_require__(28);\nvar TAG = __webpack_require__(8)('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jbGFzc29mLmpzP2MwMmQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZ2V0dGluZyB0YWcgZnJvbSAxOS4xLjMuNiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nKClcbnZhciBjb2YgPSByZXF1aXJlKCcuL19jb2YnKTtcbnZhciBUQUcgPSByZXF1aXJlKCcuL193a3MnKSgndG9TdHJpbmdUYWcnKTtcbi8vIEVTMyB3c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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///72\n")},function(module,exports){eval("module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3Byb3BlcnR5LWRlc2MuanM/NWZjMCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChiaXRtYXAsIHZhbHVlKSB7XG4gIHJldHVybiB7XG4gICAgZW51bWVyYWJsZTogIShiaXRtYXAgJiAxKSxcbiAgICBjb25maWd1cmFibGU6ICEoYml0bWFwICYgMiksXG4gICAgd3JpdGFibGU6ICEoYml0bWFwICYgNCksXG4gICAgdmFsdWU6IHZhbHVlXG4gIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3Byb3BlcnR5LWRlc2MuanNcbi8vIG1vZHVsZSBpZCA9IDczXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///73\n")},function(module,exports){eval("module.exports = {};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXJhdG9ycy5qcz9mZGI0Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0ge307XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXRlcmF0b3JzLmpzXG4vLyBtb2R1bGUgaWQgPSA3NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///74\n")},function(module,exports){eval("var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NvZi5qcz80N2QzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b1N0cmluZyA9IHt9LnRvU3RyaW5nO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gdG9TdHJpbmcuY2FsbChpdCkuc2xpY2UoOCwgLTEpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19jb2YuanNcbi8vIG1vZHVsZSBpZCA9IDc1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///75\n")},function(module,exports,__webpack_require__){eval("// 7.1.13 ToObject(argument)\nvar defined = __webpack_require__(130);\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLW9iamVjdC5qcz9iMDFkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMS4xMyBUb09iamVjdChhcmd1bWVudClcbnZhciBkZWZpbmVkID0gcmVxdWlyZSgnLi9fZGVmaW5lZCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIE9iamVjdChkZWZpbmVkKGl0KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gNzZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///76\n")},function(module,exports){eval("exports.f = {}.propertyIsEnumerable;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1waWUuanM/MzY5MiJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnRzLmYgPSB7fS5wcm9wZXJ0eUlzRW51bWVyYWJsZTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtcGllLmpzXG4vLyBtb2R1bGUgaWQgPSA3N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///77\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zaGFyZWQuanM/NTU2OCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgU0hBUkVEID0gJ19fY29yZS1qc19zaGFyZWRfXyc7XG52YXIgc3RvcmUgPSBnbG9iYWxbU0hBUkVEXSB8fCAoZ2xvYmFsW1NIQVJFRF0gPSB7fSk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChrZXkpIHtcbiAgcmV0dXJuIHN0b3JlW2tleV0gfHwgKHN0b3JlW2tleV0gPSB7fSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zaGFyZWQuanNcbi8vIG1vZHVsZSBpZCA9IDc4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///78\n")},function(module,exports,__webpack_require__){eval("// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(24);\nvar toLength = __webpack_require__(12);\nvar toAbsoluteIndex = __webpack_require__(51);\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hcnJheS1pbmNsdWRlcy5qcz9hMmRlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGZhbHNlIC0+IEFycmF5I2luZGV4T2Zcbi8vIHRydWUgIC0+IEFycmF5I2luY2x1ZGVzXG52YXIgdG9JT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8taW9iamVjdCcpO1xudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi9fdG8tbGVuZ3RoJyk7XG52YXIgdG9BYnNvbHV0ZUluZGV4ID0gcmVxdWlyZSgnLi9fdG8tYWJzb2x1dGUtaW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vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hcnJheS1pbmNsdWRlcy5qc1xuLy8gbW9kdWxlIGlkID0gNzlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///79\n")},function(module,exports){eval("exports.f = Object.getOwnPropertySymbols;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZ29wcy5qcz82MzUzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydHMuZiA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1nb3BzLmpzXG4vLyBtb2R1bGUgaWQgPSA4MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///80\n")},function(module,exports,__webpack_require__){eval("// 7.2.2 IsArray(argument)\nvar cof = __webpack_require__(28);\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1hcnJheS5qcz81Y2VkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMi4yIElzQXJyYXkoYXJndW1lbnQpXG52YXIgY29mID0gcmVxdWlyZSgnLi9fY29mJyk7XG5tb2R1bGUuZXhwb3J0cyA9IEFycmF5LmlzQXJyYXkgfHwgZnVuY3Rpb24gaXNBcnJheShhcmcpIHtcbiAgcmV0dXJuIGNvZihhcmcpID09ICdBcnJheSc7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gODFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///81\n")},function(module,exports,__webpack_require__){eval("// 7.2.8 IsRegExp(argument)\nvar isObject = __webpack_require__(6);\nvar cof = __webpack_require__(28);\nvar MATCH = __webpack_require__(8)('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1yZWdleHAuanM/YmI0MyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjIuOCBJc1JlZ0V4cChhcmd1bWVudClcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIGNvZiA9IHJlcXVpcmUoJy4vX2NvZicpO1xudmFyIE1BVENIID0gcmVxdWlyZSgnLi9fd2tzJykoJ21hdGNoJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICB2YXIgaXNSZWdFeHA7XG4gIHJldHVybiBpc09iamVjdChpdCkgJiYgKChpc1JlZ0V4cCA9IGl0W01BVENIXSkgIT09IHVuZGVmaW5lZCA/ICEhaXNSZWdFeHAgOiBjb2YoaXQpID09ICdSZWdFeHAnKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2lzLXJlZ2V4cC5qc1xuLy8gbW9kdWxlIGlkID0gODJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///82\n")},function(module,exports,__webpack_require__){eval("var ITERATOR = __webpack_require__(8)('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODMuanMiLCJzb3VyY2VzIjpb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9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2l0ZXItZGV0ZWN0LmpzXG4vLyBtb2R1bGUgaWQgPSA4M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///83\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = __webpack_require__(3);\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19mbGFncy5qcz9kMjkxIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDIxLjIuNS4zIGdldCBSZWdFeHAucHJvdG90eXBlLmZsYWdzXG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKCkge1xuICB2YXIgdGhhdCA9IGFuT2JqZWN0KHRoaXMpO1xuICB2YXIgcmVzdWx0ID0gJyc7XG4gIGlmICh0aGF0Lmdsb2JhbCkgcmVzdWx0ICs9ICdnJztcbiAgaWYgKHRoYXQuaWdub3JlQ2FzZSkgcmVzdWx0ICs9ICdpJztcbiAgaWYgKHRoYXQubXVsdGlsaW5lKSByZXN1bHQgKz0gJ20nO1xuICBpZiAodGhhdC51bmljb2RlKSByZXN1bHQgKz0gJ3UnO1xuICBpZiAodGhhdC5zdGlja3kpIHJlc3VsdCArPSAneSc7XG4gIHJldHVybiByZXN1bHQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19mbGFncy5qc1xuLy8gbW9kdWxlIGlkID0gODRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///84\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar hide = __webpack_require__(18);\nvar redefine = __webpack_require__(19);\nvar fails = __webpack_require__(5);\nvar defined = __webpack_require__(32);\nvar wks = __webpack_require__(8);\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n var fns = exec(defined, SYMBOL, ''[KEY]);\n var strfn = fns[0];\n var rxfn = fns[1];\n if (fails(function () {\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n })) {\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJma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ICAgICAgPyBmdW5jdGlvbiAoc3RyaW5nLCBhcmcpIHsgcmV0dXJuIHJ4Zm4uY2FsbChzdHJpbmcsIHRoaXMsIGFyZyk7IH1cbiAgICAgIC8vIDIxLjIuNS42IFJlZ0V4cC5wcm90b3R5cGVbQEBtYXRjaF0oc3RyaW5nKVxuICAgICAgLy8gMjEuMi41LjkgUmVnRXhwLnByb3RvdHlwZVtAQHNlYXJjaF0oc3RyaW5nKVxuICAgICAgOiBmdW5jdGlvbiAoc3RyaW5nKSB7IHJldHVybiByeGZuLmNhbGwoc3RyaW5nLCB0aGlzKTsgfVxuICAgICk7XG4gIH1cbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2ZpeC1yZS13a3MuanNcbi8vIG1vZHVsZSBpZCA9IDg1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///85\n")},function(module,exports,__webpack_require__){eval("// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = __webpack_require__(3);\nvar aFunction = __webpack_require__(16);\nvar SPECIES = __webpack_require__(8)('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zcGVjaWVzLWNvbnN0cnVjdG9yLmpzP2VjZWQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4zLjIwIFNwZWNpZXNDb25zdHJ1Y3RvcihPLCBkZWZhdWx0Q29uc3RydWN0b3IpXG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuL19hLWZ1bmN0aW9uJyk7XG52YXIgU1BFQ0lFUyA9IHJlcXVpcmUoJy4vX3drcycpKCdzcGVjaWVzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChPLCBEKSB7XG4gIHZhciBDID0gYW5PYmplY3QoTykuY29uc3RydWN0b3I7XG4gIHZhciBTO1xuICByZXR1cm4gQyA9PT0gdW5kZWZpbmVkIHx8IChTID0gYW5PYmplY3QoQylbU1BFQ0lFU10pID09IHVuZGVmaW5lZCA/IEQgOiBhRnVuY3Rpb24oUyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zcGVjaWVzLWNvbnN0cnVjdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSA4NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///86\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar global = __webpack_require__(4);\nvar $export = __webpack_require__(0);\nvar redefine = __webpack_require__(19);\nvar redefineAll = __webpack_require__(57);\nvar meta = __webpack_require__(42);\nvar forOf = __webpack_require__(56);\nvar anInstance = __webpack_require__(55);\nvar isObject = __webpack_require__(6);\nvar fails = __webpack_require__(5);\nvar $iterDetect = __webpack_require__(83);\nvar setToStringTag = __webpack_require__(61);\nvar inheritIfRequired = __webpack_require__(108);\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n var fixMethod = function (KEY) {\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n var instance = new C();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new C();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if (!ACCEPT_ITERABLES) {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME);\n var that = inheritIfRequired(new Base(), target, C);\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n // weak collections should not contains .clear method\n if (IS_WEAK && proto.clear) delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jb2xsZWN0aW9uLmpzP2QxMTgiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciByZWRlZmluZSA9IHJlcXVpcmUoJy4vX3JlZGVmaW5lJyk7XG52YXIgcmVkZWZpbmVBbGwgPSByZXF1aXJlKCcuL19yZWRlZmluZS1hbGwnKTtcbnZhciBtZXRhID0gcmVxdWlyZSgnLi9fbWV0YScpO1xudmFyIGZvck9mID0gcmVxdWlyZSgnLi9fZm9yLW9mJyk7XG52YXIgYW5JbnN0YW5jZSA9IHJlcXVpcmUoJy4vX2FuLWluc3RhbmNlJyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBmYWlscyA9IH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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///87\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar hide = __webpack_require__(18);\nvar uid = __webpack_require__(48);\nvar TYPED = uid('typed_array');\nvar VIEW = uid('view');\nvar ABV = !!(global.ArrayBuffer && global.DataView);\nvar CONSTR = ABV;\nvar i = 0;\nvar l = 9;\nvar Typed;\n\nvar TypedArrayConstructors = (\n 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'\n).split(',');\n\nwhile (i < l) {\n if (Typed = global[TypedArrayConstructors[i++]]) {\n hide(Typed.prototype, TYPED, true);\n hide(Typed.prototype, VIEW, true);\n } else CONSTR = false;\n}\n\nmodule.exports = {\n ABV: ABV,\n CONSTR: CONSTR,\n TYPED: TYPED,\n VIEW: VIEW\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJ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8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdHlwZWQuanNcbi8vIG1vZHVsZSBpZCA9IDg4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///88\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// Forced replacement prototype accessors methods\nmodule.exports = __webpack_require__(49) || !__webpack_require__(5)(function () {\n var K = Math.random();\n // In FF throws only define methods\n // eslint-disable-next-line no-undef, no-useless-call\n __defineSetter__.call(null, K, function () { /* empty */ });\n delete __webpack_require__(4)[K];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtZm9yY2VkLXBhbS5qcz83NjZlIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEZvcmNlZCByZXBsYWNlbWVudCBwcm90b3R5cGUgYWNjZXNzb3JzIG1ldGhvZHNcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9fbGlicmFyeScpIHx8ICFyZXF1aXJlKCcuL19mYWlscycpKGZ1bmN0aW9uICgpIHtcbiAgdmFyIEsgPSBNYXRoLnJhbmRvbSgpO1xuICAvLyBJbiBGRiB0aHJvd3Mgb25seSBkZWZpbmUgbWV0aG9kc1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tdW5kZWYsIG5vLXVzZWxlc3MtY2FsbFxuICBfX2RlZmluZVNldHRlcl9fLmNhbGwobnVsbCwgSywgZnVuY3Rpb24gKCkgeyAvKiBlbXB0eSAqLyB9KTtcbiAgZGVsZXRlIHJlcXVpcmUoJy4vX2dsb2JhbCcpW0tdO1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX29iamVjdC1mb3JjZWQtcGFtLmpzXG4vLyBtb2R1bGUgaWQgPSA4OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///89\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = __webpack_require__(0);\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { of: function of() {\n var length = arguments.length;\n var A = new Array(length);\n while (length--) A[length] = arguments[length];\n return new this(A);\n } });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtY29sbGVjdGlvbi1vZi5qcz9kMjNkIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vcHJvcG9zYWwtc2V0bWFwLW9mZnJvbS9cbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKENPTExFQ1RJT04pIHtcbiAgJGV4cG9ydCgkZXhwb3J0LlMsIENPTExFQ1RJT04sIHsgb2Y6IGZ1bmN0aW9uIG9mKCkge1xuICAgIHZhciBsZW5ndGggPSBhcmd1bWVudHMubGVuZ3RoO1xuICAgIHZhciBBID0gbmV3IEFycmF5KGxlbmd0aCk7XG4gICAgd2hpbGUgKGxlbmd0aC0tKSBBW2xlbmd0aF0gPSBhcmd1bWVudHNbbGVuZ3RoXTtcbiAgICByZXR1cm4gbmV3IHRoaXMoQSk7XG4gIH0gfSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtY29sbGVjdGlvbi1vZi5qc1xuLy8gbW9kdWxlIGlkID0gOTBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///90\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = __webpack_require__(0);\nvar aFunction = __webpack_require__(16);\nvar ctx = __webpack_require__(27);\nvar forOf = __webpack_require__(56);\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {\n var mapFn = arguments[1];\n var mapping, A, n, cb;\n aFunction(this);\n mapping = mapFn !== undefined;\n if (mapping) aFunction(mapFn);\n if (source == undefined) return new this();\n A = [];\n if (mapping) {\n n = 0;\n cb = ctx(mapFn, arguments[2], 2);\n forOf(source, false, function (nextItem) {\n A.push(cb(nextItem, n++));\n });\n } else {\n forOf(source, false, A.push, A);\n }\n return new this(A);\n } });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtY29sbGVjdGlvbi1mcm9tLmpzPzg4YWEiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9wcm9wb3NhbC1zZXRtYXAtb2Zmcm9tL1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuL19hLWZ1bmN0aW9uJyk7XG52YXIgY3R4ID0gcmVxdWlyZSgnLi9fY3R4Jyk7XG52YXIgZm9yT2YgPSByZXF1aXJlKCcuL19mb3Itb2YnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoQ09MTEVDVElPTikge1xuICAkZXhwb3J0KCRleHBvcnQuUywgQ09MTEVDVElPTiwgeyBmcm9tOiBmdW5jdGlvbiBmcm9tKHNvdXJjZSAvKiAsIG1hcEZuLCB0aGlzQXJnICovKSB7XG4gICAgdmFyIG1hcEZuID0gYXJndW1lbnRzWzFdO1xuICAgIHZhciBtYXBwaW5nLCBBLCBuLCBjYjtcbiAgICBhRnVuY3Rpb24odGhpcyk7XG4gICAgbWFwcGluZyA9IG1hcEZuICE9PSB1bmRlZmluZWQ7XG4gICAgaWYgKG1hcHBpbmcpIGFGdW5jdGlvbihtYXBGbik7XG4gICAgaWYgKHNvdXJjZSA9PSB1bmRlZmluZWQpIHJldHVybiBuZXcgdGhpcygpO1xuICAgIEEgPSBbXTtcbiAgICBpZiAobWFwcGluZykge1xuICAgICAgbiA9IDA7XG4gICAgICBjYiA9IGN0eChtYXBGbiwgYXJndW1lbnRzWzJdLCAyKTtcbiAgICAgIGZvck9mKHNvdXJjZSwgZmFsc2UsIGZ1bmN0aW9uIChuZXh0SXRlbSkge1xuICAgICAgICBBLnB1c2goY2IobmV4dEl0ZW0sIG4rKykpO1xuICAgICAgfSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGZvck9mKHNvdXJjZSwgZmFsc2UsIEEucHVzaCwgQSk7XG4gICAgfVxuICAgIHJldHVybiBuZXcgdGhpcyhBKTtcbiAgfSB9KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3NldC1jb2xsZWN0aW9uLWZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDkxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///91\n")},function(module,exports){eval("module.exports = true;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2xpYnJhcnkuanM/M2I4OCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHRydWU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fbGlicmFyeS5qc1xuLy8gbW9kdWxlIGlkID0gOTJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///92\n")},function(module,exports){eval("module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2EtZnVuY3Rpb24uanM/OTRlOSJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICBpZiAodHlwZW9mIGl0ICE9ICdmdW5jdGlvbicpIHRocm93IFR5cGVFcnJvcihpdCArICcgaXMgbm90IGEgZnVuY3Rpb24hJyk7XG4gIHJldHVybiBpdDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fYS1mdW5jdGlvbi5qc1xuLy8gbW9kdWxlIGlkID0gOTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///93\n")},function(module,exports){eval("var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3VpZC5qcz9kYzRhIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpZCA9IDA7XG52YXIgcHggPSBNYXRoLnJhbmRvbSgpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoa2V5KSB7XG4gIHJldHVybiAnU3ltYm9sKCcuY29uY2F0KGtleSA9PT0gdW5kZWZpbmVkID8gJycgOiBrZXksICcpXycsICgrK2lkICsgcHgpLnRvU3RyaW5nKDM2KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3VpZC5qc1xuLy8gbW9kdWxlIGlkID0gOTRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///94\n")},function(module,exports,__webpack_require__){eval("var def = __webpack_require__(40).f;\nvar has = __webpack_require__(59);\nvar TAG = __webpack_require__(23)('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NldC10by1zdHJpbmctdGFnLmpzPzdiYTkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGRlZiA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmY7XG52YXIgaGFzID0gcmVxdWlyZSgnLi9faGFzJyk7XG52YXIgVEFHID0gcmVxdWlyZSgnLi9fd2tzJykoJ3RvU3RyaW5nVGFnJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCB0YWcsIHN0YXQpIHtcbiAgaWYgKGl0ICYmICFoYXMoaXQgPSBzdGF0ID8gaXQgOiBpdC5wcm90b3R5cGUsIFRBRykpIGRlZihpdCwgVEFHLCB7IGNvbmZpZ3VyYWJsZTogdHJ1ZSwgdmFsdWU6IHRhZyB9KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fc2V0LXRvLXN0cmluZy10YWcuanNcbi8vIG1vZHVsZSBpZCA9IDk1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///95\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(434), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9hc3NpZ24uanM/YzI4MyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHsgXCJkZWZhdWx0XCI6IHJlcXVpcmUoXCJjb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L2Fzc2lnblwiKSwgX19lc01vZHVsZTogdHJ1ZSB9O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvYXNzaWduLmpzXG4vLyBtb2R1bGUgaWQgPSA5NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///96\n')},function(module,exports,__webpack_require__){eval("// most Object methods by ES6 should accept primitives\nvar $export = __webpack_require__(21);\nvar core = __webpack_require__(13);\nvar fails = __webpack_require__(66);\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1zYXAuanM/YmFhNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBtb3N0IE9iamVjdCBtZXRob2RzIGJ5IEVTNiBzaG91bGQgYWNjZXB0IHByaW1pdGl2ZXNcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgY29yZSA9IHJlcXVpcmUoJy4vX2NvcmUnKTtcbnZhciBmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChLRVksIGV4ZWMpIHtcbiAgdmFyIGZuID0gKGNvcmUuT2JqZWN0IHx8IHt9KVtLRVldIHx8IE9iamVjdFtLRVldO1xuICB2YXIgZXhwID0ge307XG4gIGV4cFtLRVldID0gZXhlYyhmbik7XG4gICRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GICogZmFpbHMoZnVuY3Rpb24gKCkgeyBmbigxKTsgfSksICdPYmplY3QnLCBleHApO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3Qtc2FwLmpzXG4vLyBtb2R1bGUgaWQgPSA5N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///97\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _iterator = __webpack_require__(445);\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = __webpack_require__(447);\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {\n return typeof obj === "undefined" ? "undefined" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTguanMiLCJz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IHR5cGVvZiBfc3ltYm9sMi5kZWZhdWx0ID09PSBcImZ1bmN0aW9uXCIgJiYgX3R5cGVvZihfaXRlcmF0b3IyLmRlZmF1bHQpID09PSBcInN5bWJvbFwiID8gZnVuY3Rpb24gKG9iaikge1xuICByZXR1cm4gdHlwZW9mIG9iaiA9PT0gXCJ1bmRlZmluZWRcIiA/IFwidW5kZWZpbmVkXCIgOiBfdHlwZW9mKG9iaik7XG59IDogZnVuY3Rpb24gKG9iaikge1xuICByZXR1cm4gb2JqICYmIHR5cGVvZiBfc3ltYm9sMi5kZWZhdWx0ID09PSBcImZ1bmN0aW9uXCIgJiYgb2JqLmNvbnN0cnVjdG9yID09PSBfc3ltYm9sMi5kZWZhdWx0ICYmIG9iaiAhPT0gX3N5bWJvbDIuZGVmYXVsdC5wcm90b3R5cGUgPyBcInN5bWJvbFwiIDogdHlwZW9mIG9iaiA9PT0gXCJ1bmRlZmluZWRcIiA/IFwidW5kZWZpbmVkXCIgOiBfdHlwZW9mKG9iaik7XG59O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvaGVscGVycy90eXBlb2YuanNcbi8vIG1vZHVsZSBpZCA9IDk4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///98\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('address-allocation'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log system\n\n\n// TODO: this could not be the best way to do a Singleton but at this moment it works;\n\nvar instance = void 0;\n\n/**\n * Class will ask to the message node for addresses\n */\n\nvar AddressAllocation = function () {\n /* private\n _url: URL\n _bus: MiniBus\n */\n\n /**\n * Create an Address Allocation\n * @param {URL.URL} url - url from who is sending the message\n * @param {MiniBus} bus - MiniBus used for address allocation\n */\n function AddressAllocation(url, bus, registry) {\n (0, _classCallCheck3.default)(this, AddressAllocation);\n\n\n if (!instance) {\n this._url = url + '/address-allocation';\n this._bus = bus;\n this._registry = registry;\n instance = this;\n } else {\n return instance;\n }\n }\n\n (0, _createClass3.default)(AddressAllocation, [{\n key: 'create',\n\n\n /**\n *\n * Ask for creation of a number of Hyperty addresses, to the domain message node.\n *\n * @param {Domain} domain - domain of the message node\n * @param {Number} number - number of address to be allocated\n * @param {Descriptor} info - descriptor to search for the hyperty (TODO:// this should be confirmed)\n * @see https://github.com/reTHINK-project/specs/blob/master/datamodel/core/hyperty-catalogue/readme.md#catalogue-data-model\n * @param {scheme} scheme - scheme of address to be created or reused, like: hyperty, comm, context, etc;\n * @param {boolean|URL.HypertyURL} reuseURL - reuseURL is used to reuse the hypertyURL previously registred;\n * @returns {Promise} this is Promise and returns an object with the address information\n *\n * @memberOf AddressAllocation\n */\n value: function create(domain, number, info, scheme, reuseURL) {\n\n // // console.log('typeof(reuseURL)', typeof(reuseURL), reuseURL);\n\n if (reuseURL) {\n\n if (typeof reuseURL === 'boolean') {\n\n if (reuseURL) {\n return this._reuseAllocatedAddress(domain, number, info, scheme, reuseURL);\n } else {\n return this._allocateNewAddress(domain, scheme, number);\n }\n }\n\n if (typeof reuseURL === 'string' && (0, _utils.isURL)(reuseURL)) {\n return this._reuseAllocatedAddress(domain, number, info, scheme, reuseURL);\n }\n } else {\n log.info('[AddressAllocation] - new address will be allocated');\n\n // if there is no URL saved request a new URL\n return this._allocateNewAddress(domain, scheme, number);\n }\n }\n }, {\n key: '_reuseAllocatedAddress',\n value: function _reuseAllocatedAddress(domain, number, info, scheme, reuseURL) {\n var _this2 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this2._registry.checkRegisteredURLs(info, reuseURL).then(function (urls) {\n\n if (urls) {\n log.info('[AddressAllocation - ' + scheme + '] - Reuse URL');\n var value = { newAddress: false, address: urls };\n resolve(value);\n } else {\n\n if (typeof reuseURL === 'string') {\n log.info('[AddressAllocation - reuseURL] - Object ' + reuseURL + ' not found');\n reject('URL Not Found');\n } else if (typeof reuseURL === 'boolean') {\n _this2._allocateNewAddress(domain, scheme, number).then(resolve).catch(reject);\n } else {\n reject('URL Not Found');\n }\n }\n });\n });\n }\n }, {\n key: '_allocateNewAddress',\n value: function _allocateNewAddress(domain, scheme, number) {\n var _this3 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var msg = {\n type: 'create', from: _this3._url, to: 'domain://msg-node.' + domain + '/address-allocation',\n body: { value: { number: number } }\n };\n\n if (scheme !== 'hyperty') msg.body.scheme = scheme;\n\n log.info('[AddressAllocation - ' + scheme + '] - Request new URL');\n\n _this3._bus.postMessage(msg, function (reply) {\n if (reply.body.code === 200) {\n var result = { newAddress: true, address: reply.body.value.allocated };\n resolve(result);\n } else {\n reject(reply.body.desc);\n }\n });\n });\n }\n\n /**\n * Send a request to the domain message node, to deallocate one or more addresses\n * @param {Domain} domain - Domain of the message node.\n * @param {addresses} addresses to request the deallocation\n * @returns {Promise} the response by the message node\n */\n\n }, {\n key: 'delete',\n value: function _delete(domain, addresses) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var message = {\n type: 'delete', from: _this._url, to: 'domain://msg-node.' + domain + '/address-allocation',\n body: { childrenResources: addresses }\n };\n\n _this._bus.postMessage(message, function (reply) {\n if (reply.body.code === 200) {\n resolve(reply.body.code);\n } else {\n reject(reply.body.desc);\n }\n });\n });\n }\n }, {\n key: 'url',\n\n\n /**\n * get the URL value\n * @return {string} The url value;\n */\n get: function get() {\n return this._url;\n }\n }], [{\n key: 'instance',\n get: function get() {\n if (!instance) {\n throw new Error('The address allocation was not instantiated');\n }\n\n return instance;\n }\n }]);\n return AddressAllocation;\n}();\n\nexports.default = AddressAllocation;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2FsbG9jYX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TtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7OztBQUVBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFFQTtBQUNBOzs7QUFFQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRkE7QUFDQTtBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFDQTtBQUNBOzs7Ozs7Ozs7QUFNQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRkE7QUFDQTtBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTs7Ozs7QUFqSUE7Ozs7QUFJQTtBQUFBO0FBQUE7OztBQVpBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQXNJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///99\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _Crypto = __webpack_require__(490);\n\nvar _Crypto2 = _interopRequireDefault(_Crypto);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('CryptoManager'); // Log System\n\n/**\n* The Crypto Manager provides manages cryptographic features for the runtime including:\n* - Mutual Authentication between peers\n* - Crypto Keys\n* - e2e encryption and decription of communication between Hyperties and dta objects\n*\n*/\nvar CryptoManager = function () {\n\n /**\n * This is the constructor to initialise the CryptoManager, it does not require any input.\n * The init() must called in order to set mandatories attributes\n */\n\n function CryptoManager(storageManager) {\n (0, _classCallCheck3.default)(this, CryptoManager);\n\n this.storageManager = storageManager;\n this.userDefaultKeyRef = 'userAsymmetricKey';\n }\n\n (0, _createClass3.default)(CryptoManager, [{\n key: 'init',\n value: function init(runtimeURL, runtimeCapabilities, storageManager, dataObjectsStorage, registry, coreDiscovery, idm, runtimeFactory) {\n var _this = this;\n\n if (!runtimeURL) throw new Error('[] runtimeURL is missing.');\n if (!storageManager) throw new Error('storageManager is missing');\n if (!runtimeFactory) throw new Error('runtimeFactory is missing');\n\n _this._runtimeURL = runtimeURL;\n _this._cryptoManagerURL = _this._runtimeURL + '/cryptoManager';\n\n //_this._myURL = _this._runtimeURL + '/crypto';\n _this.storageManager = storageManager;\n _this.dataObjectsStorage = dataObjectsStorage;\n _this.runtimeCapabilities = runtimeCapabilities;\n\n _this._runtimeFactory = runtimeFactory;\n _this._domain = (0, _utils.divideURL)(_this._runtimeURL).domain;\n\n _this.crypto = new _Crypto2.default(_this._runtimeFactory);\n\n // hashTable to store all the crypto information between two hyperties\n _this.chatKeys = {};\n\n // hashTable to store the symmetric keys to be used in the chat group\n _this.dataObjectSessionKeys = {};\n\n //failsafe to enable/disable all the criptographic functions\n _this.isToUseEncryption = true;\n\n _this._registry = registry;\n _this._coreDiscovery = coreDiscovery;\n\n _this._idm = idm;\n }\n\n //******************* GET AND SET METHODS *******************\n\n /**\n * return the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n\n }, {\n key: 'loadSessionKeys',\n\n\n // to be used to initialise IDM with SessionKeys used in previous session\n\n value: function loadSessionKeys() {\n var _this = this;\n return new _promise2.default(function (resolve) {\n\n _this.storageManager.get('dataObjectSessionKeys').then(function (sessionKeys) {\n if (sessionKeys) _this.dataObjectSessionKeys = sessionKeys;else _this.dataObjectSessionKeys = {};\n resolve();\n });\n });\n }\n }, {\n key: '_isFromRemoteSM',\n value: function _isFromRemoteSM(from) {\n var splitFrom = from.split('://');\n return splitFrom[0] === 'runtime' && from !== this._runtimeURL + '/sm';\n }\n }, {\n key: 'addCryptoGUIListeners',\n value: function addCryptoGUIListeners() {\n //TODO: Change the GUI invocation of this method\n var _this = this;\n\n _this._messageBus.addListener(_this._cryptoManagerURL, function (msg) {\n var funcName = msg.body.method;\n\n //let returnedValue;\n if (funcName === 'generateRSAKeyPair') {\n _this._crypto.getMyPublicKey().then(function (key) {\n var value = { type: 'execute', value: key, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if generateRSAKeyPair method postMessage error: ' + err);\n }\n });\n return;\n }\n });\n }\n\n //******************* ENCRYPTION METHODS *******************\n /**\n * Identifies the messages to be encrypted\n * @param {Message} message\n * @returns {boolean} returns true if the message requires encryption\n */\n\n }, {\n key: '_isToEncrypt',\n value: function _isToEncrypt(message) {\n log.info('[CryptoManager.istoChyperModule]', message);\n var isCreate = message.type === 'create';\n var isFromHyperty = message.from.includes('hyperty://');\n var isToHyperty = message.to.includes('hyperty://');\n var isToDataObject = (0, _utils.isDataObjectURL)(message.to);\n\n var doMutualAuthentication = message.body.hasOwnProperty('mutual') ? message.body.mutual : true;\n\n if (!doMutualAuthentication) return false;\n\n //if is not to apply encryption, then returns resolve\n if (!this.isToUseEncryption && !(message.type === 'handshake')) {\n log.info('not handshake: encryption disabled');\n return false;\n }\n\n if (message.type === 'update') {\n log.info('update:encryption disabled');\n return false;\n }\n\n if ((0, _utils.isLegacy)(message.to)) return false;\n\n return isCreate && isFromHyperty && isToHyperty || isCreate && isFromHyperty && isToDataObject && doMutualAuthentication || message.type === 'handshake' || message.type === 'update' && doMutualAuthentication;\n }\n }, {\n key: '_isToDecrypt',\n value: function _isToDecrypt(message) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n // For sybscribe message let's start the mutualAuthentication\n var isSubscription = message.type === 'subscribe';\n var isFromRemoteSM = _this._isFromRemoteSM(message.from);\n\n if (isSubscription & isFromRemoteSM) {\n log.log('_doMutualAuthenticationPhase1');\n\n _this._doMutualAuthenticationPhase1(message).then(function () {\n resolve(false);\n }, function (error) {\n reject(error);\n });\n } else if (message.hasOwnProperty('body') && message.body.hasOwnProperty('value') && typeof message.body.value === 'string') {\n log.log('_isToDecrypt:true');\n resolve(true);\n } else {\n log.log('_isToDecrypt:false');\n resolve(false);\n }\n }).catch(function (error) {\n log.error('[CryptoManager._isToDecrypt]', error);\n });\n }\n }, {\n key: 'encryptMessage',\n value: function encryptMessage(message) {\n //log.info('encryptMessage:message', message);\n var _this = this;\n\n log.log('encrypt message ');\n\n return new _promise2.default(function (resolve, reject) {\n\n var isHandShakeType = message.type === 'handshake';\n\n //if is not to apply encryption, then returns resolve\n if (!_this._isToEncrypt(message)) {\n // log.log('decryption disabled');\n return resolve(message);\n }\n\n var dataObjectURL = (0, _utils.parseMessageURL)(message.to);\n\n var isToDataObject = (0, _utils.isDataObjectURL)(dataObjectURL);\n var isToLegacyIdentity = (0, _utils.isLegacy)(message.to);\n var isFromHyperty = (0, _utils.divideURL)(message.from).type === 'hyperty';\n var isToHyperty = (0, _utils.divideURL)(message.to).type === 'hyperty';\n\n if (message.type === 'update') {\n log.log('encrypt message: message type update');\n return resolve(message);\n }\n\n if (isToLegacyIdentity) {\n resolve(message);\n } else if (isFromHyperty && isToHyperty) {\n var userURL = _this._registry.getHypertyOwner(message.from);\n if (userURL) {\n\n // check if exists any keys between two users\n var chatKeys = _this.chatKeys[message.from + '<->' + message.to];\n if (!chatKeys) {\n chatKeys = _this._newChatCrypto(message, userURL);\n\n //log.log('createChatKey encrypt', message.from + message.to);\n _this.chatKeys[message.from + '<->' + message.to] = chatKeys;\n message.body.handshakePhase = 'startHandShake';\n }\n\n if (chatKeys.authenticated && !isHandShakeType) {\n\n var iv = _this.crypto.generateIV();\n _this.crypto.encryptAES(chatKeys.keys.hypertyFromSessionKey, (0, _utils.stringify)(message.body.value), iv).then(function (encryptedValue) {\n\n var filteredMessage = _this._filterMessageToHash(message, (0, _utils.stringify)(message.body.value) + (0, _utils.stringify)(iv), chatKeys.hypertyFrom.messageInfo);\n\n _this.crypto.hashHMAC(chatKeys.keys.hypertyFromHashKey, filteredMessage).then(function (hash) {\n //log.log('result of hash ', hash);\n var value = { iv: (0, _utils.encode)(iv), value: (0, _utils.encode)(encryptedValue), hash: (0, _utils.encode)(hash) };\n message.body.value = (0, _utils.encode)(value);\n\n resolve(message);\n });\n });\n\n // if is a handshake message, just resolve it\n } else if (isHandShakeType) {\n resolve(message);\n\n // else, starts a new handshake protocol\n } else {\n _this._doHandShakePhase(message, chatKeys).then(function (value) {\n _this.chatKeys[message.from + '<->' + message.to] = value.chatKeys;\n\n _this._messageBus.postMessage(value.message);\n reject('encrypt handshake protocol phase ');\n });\n }\n } else {\n reject('In encryptMessage: Hyperty owner URL was not found');\n }\n\n //if from hyperty to a dataObjectURL\n } else if (isFromHyperty && isToDataObject) {\n\n //log.log('dataObject value to encrypt: ', message.body.value);\n //log.log('IdentityModule - encrypt from hyperty to dataobject ', message);\n\n _this.storageManager.get('dataObjectSessionKeys').then(function (sessionKeys) {\n sessionKeys = (0, _utils.chatkeysToArrayCloner)(sessionKeys || {});\n var dataObjectKey = sessionKeys ? sessionKeys[dataObjectURL] : null;\n\n _this.dataObjectsStorage.getDataObject(dataObjectURL).then(function (isHypertyReporter) {\n //if no key exists, create a new one if is the reporter of dataObject\n if (!dataObjectKey) {\n // if the hyperty is the reporter of the dataObject then generates a session key\n if (isHypertyReporter.reporter && isHypertyReporter.reporter === message.from) {\n\n var sessionKey = _this.crypto.generateRandom();\n _this.dataObjectSessionKeys[dataObjectURL] = { sessionKey: sessionKey, isToEncrypt: true };\n var dataObjectSessionKeysClone = (0, _utils.chatkeysToStringCloner)(_this.dataObjectSessionKeys);\n\n //TODO: check if this does not need to be stored\n _this.storageManager.set('dataObjectSessionKeys', 0, dataObjectSessionKeysClone).catch(function (err) {\n reject('On encryptMessage from method storageManager.set error: ' + err);\n });\n dataObjectKey = _this.dataObjectSessionKeys[dataObjectURL];\n }\n }\n\n //check if there is already a session key for the chat room\n if (dataObjectKey) {\n\n // and if is to apply encryption, encrypt the messages\n if (dataObjectKey.isToEncrypt) {\n var _iv = _this.crypto.generateIV();\n var stringifiedIV = (0, _utils.stringify)(_iv);\n var stringifiedMessageBody = (0, _utils.stringify)(message.body.value);\n\n _this.crypto.encryptAES(dataObjectKey.sessionKey, stringifiedMessageBody, _iv).then(function (encryptedValue) {\n delete message.body.identity.assertion; //TODO: Check why assertion is comming on the message!\n delete message.body.identity.expires; //TODO: Check why expires is comming on the message!\n var filteredMessage = _this._filterMessageToHash(message, stringifiedMessageBody + stringifiedIV);\n\n _this.crypto.hashHMAC(dataObjectKey.sessionKey, filteredMessage).then(function (hash) {\n // log.log('hash ', hash);\n\n var newValue = { value: (0, _utils.encode)(encryptedValue), iv: (0, _utils.encode)(_iv), hash: (0, _utils.encode)(hash) };\n\n message.body.value = (0, _utils.stringify)(newValue);\n resolve(message);\n });\n });\n\n // if not, just send the message\n } else {\n resolve(message);\n }\n\n // start the generation of a new session Key\n } else {\n reject('Data object key could not be defined: Failed to decrypt message ');\n }\n }).catch(function (err) {\n reject('On encryptMessage from method dataObjectsStorage.getDataObject error: ' + err);\n });\n }).catch(function (err) {\n reject('On encryptMessage from method storageManager.get error: ' + err);\n });\n }\n });\n }\n }, {\n key: 'encryptDataObject',\n value: function encryptDataObject(dataObject, sender) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n log.info('dataObject value to encrypt: ', dataObject);\n\n var dataObjectURL = (0, _utils.parseMessageURL)(sender);\n\n _this.storageManager.get('dataObjectSessionKeys').then(function (sessionKeys) {\n sessionKeys = (0, _utils.chatkeysToArrayCloner)(sessionKeys || {});\n var dataObjectKey = sessionKeys ? sessionKeys[dataObjectURL] : null;\n\n //check if there is already a session key for the chat room\n if (dataObjectKey) {\n\n // and if is to apply encryption, encrypt the messages\n if (dataObjectKey.isToEncrypt) {\n var iv = _this.crypto.generateIV();\n\n _this.crypto.encryptAES(dataObjectKey.sessionKey, (0, _utils.stringify)(dataObject), iv).then(function (encryptedValue) {\n var newValue = { value: (0, _utils.encode)(encryptedValue), iv: (0, _utils.encode)(iv) };\n\n //log.log('encrypted dataObject', newValue);\n return resolve(newValue);\n }).catch(function (err) {\n reject('On encryptDataObject from method encryptAES error: ' + err);\n });\n\n // if not, just send the message\n } else {\n log.info('The dataObject is not encrypted');\n return resolve(dataObject);\n }\n\n // start the generation of a new session Key\n } else {\n return reject('No dataObjectKey for this dataObjectURL:', dataObjectURL);\n }\n }).catch(function (err) {\n reject('On encryptDataObject from method storageManager.get error: ' + err);\n });\n });\n }\n }, {\n key: 'decryptMessage',\n value: function decryptMessage(message) {\n var _this = this;\n\n // log.log('decryptMessage:message', message);\n\n return new _promise2.default(function (resolve, reject) {\n var isHandShakeType = message.type === 'handshake';\n\n _this._isToDecrypt(message).then(function (isToDecrypt) {\n\n //if is not to apply encryption, then returns resolve\n if (!isToDecrypt) return resolve(message);\n\n var dataObjectURL = (0, _utils.parseMessageURL)(message.to);\n\n var isToDataObject = (0, _utils.isDataObjectURL)(dataObjectURL);\n var isFromHyperty = (0, _utils.divideURL)(message.from).type === 'hyperty';\n var isToHyperty = (0, _utils.divideURL)(message.to).type === 'hyperty';\n\n if (message.type === 'update') {\n return resolve(message);\n }\n\n //is is hyperty to hyperty communication\n if (isFromHyperty && isToHyperty) {\n // log.log('decrypt hyperty to hyperty');\n var userURL = _this._registry.getHypertyOwner(message.to);\n if (userURL) {\n\n var chatKeys = _this.chatKeys[message.to + '<->' + message.from];\n if (!chatKeys) {\n chatKeys = _this._newChatCrypto(message, userURL, 'decrypt');\n _this.chatKeys[message.to + '<->' + message.from] = chatKeys;\n }\n\n if (chatKeys.authenticated && !isHandShakeType) {\n var value = (0, _utils.decode)(message.body.value);\n var iv = (0, _utils.decodeToUint8Array)(value.iv);\n var data = (0, _utils.decodeToUint8Array)(value.value);\n var hash = (0, _utils.decodeToUint8Array)(value.hash);\n _this.crypto.decryptAES(chatKeys.keys.hypertyToSessionKey, data, iv).then(function (decryptedData) {\n // log.log('decrypted value ', decryptedData);\n message.body.value = decryptedData;\n\n var filteredMessage = _this._filterMessageToHash(message, decryptedData + iv);\n\n _this.crypto.verifyHMAC(chatKeys.keys.hypertyToHashKey, filteredMessage, hash).then(function (result) {\n //log.log('result of hash verification! ', result);\n message.body.assertedIdentity = true;\n resolve(message);\n });\n });\n } else if (isHandShakeType) {\n _this._doHandShakePhase(message, chatKeys).then(function (value) {\n\n //if it was started by doMutualAuthentication then ends the protocol\n if (value === 'handShakeEnd') {\n //reject('decrypt handshake protocol phase');\n\n // if was started by a message, then resend that message\n } else {\n _this.chatKeys[message.to + '<->' + message.from] = value.chatKeys;\n _this._messageBus.postMessage(value.message);\n\n //reject('decrypt handshake protocol phase ');\n }\n });\n } else {\n reject('wrong message do decrypt');\n }\n } else {\n reject('error on decrypt message');\n }\n\n //if from hyperty to a dataObjectURL\n } else if (isFromHyperty && isToDataObject) {\n // log.log('dataObject value to decrypt: ', message.body);\n\n _this.storageManager.get('dataObjectSessionKeys').then(function (sessionKeys) {\n sessionKeys = (0, _utils.chatkeysToArrayCloner)(sessionKeys || {});\n var dataObjectKey = sessionKeys ? sessionKeys[dataObjectURL] : null;\n\n if (dataObjectKey) {\n\n //check if is to apply encryption\n if (dataObjectKey.isToEncrypt) {\n var parsedValue = (0, _utils.parse)(message.body.value);\n var _iv2 = (0, _utils.decodeToUint8Array)(parsedValue.iv);\n var encryptedValue = (0, _utils.decodeToUint8Array)(parsedValue.value);\n var _hash = (0, _utils.decodeToUint8Array)(parsedValue.hash);\n\n _this.crypto.decryptAES(dataObjectKey.sessionKey, encryptedValue, _iv2).then(function (decryptedValue) {\n var parsedValue = (0, _utils.parse)(decryptedValue);\n\n // log.log('decrypted Value,', parsedValue);\n message.body.value = parsedValue;\n\n var filteredMessage = _this._filterMessageToHash(message, (0, _utils.stringify)(parsedValue) + (0, _utils.stringify)(_iv2));\n\n _this.crypto.verifyHMAC(dataObjectKey.sessionKey, filteredMessage, _hash).then(function (result) {\n log.log('Received message HMAC result', result);\n\n message.body.assertedIdentity = true;\n resolve(message);\n }).catch(function (err) {\n reject('Message HMAC is invalid: ' + err);\n });\n });\n\n //if not, just return the message\n } else {\n message.body.assertedIdentity = true;\n resolve(message);\n }\n } else {\n message.body.assertedIdentity = true;\n resolve(message);\n\n //reject('no sessionKey for chat room found');\n }\n });\n } else {\n reject('wrong message to decrypt');\n }\n });\n });\n }\n }, {\n key: 'decryptDataObject',\n value: function decryptDataObject(dataObject, sender) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n //if is not to apply encryption, then returns resolve\n if (!_this.isToUseEncryption) {\n // log.log('decryption disabled');\n return resolve(dataObject);\n }\n\n var dataObjectURL = (0, _utils.parseMessageURL)(sender);\n\n // log.log('dataObject value to decrypt: ', dataObject);\n\n _this.storageManager.get('dataObjectSessionKeys').then(function (sessionKeys) {\n sessionKeys = (0, _utils.chatkeysToArrayCloner)(sessionKeys);\n var dataObjectKey = sessionKeys ? sessionKeys[dataObjectURL] : null;\n\n if (dataObjectKey) {\n\n //check if is to apply encryption\n if (dataObjectKey.isToEncrypt) {\n var iv = (0, _utils.decodeToUint8Array)(dataObject.iv);\n var encryptedValue = (0, _utils.decodeToUint8Array)(dataObject.value);\n\n _this.crypto.decryptAES(dataObjectKey.sessionKey, encryptedValue, iv).then(function (decryptedValue) {\n var parsedValue = (0, _utils.parse)(decryptedValue);\n var newValue = { value: parsedValue, iv: (0, _utils.encode)(iv) };\n\n // log.log('decrypted dataObject,', newValue);\n\n return resolve(newValue);\n }).catch(function (err) {\n reject('On decryptDataObject from method encryptAES error: ' + err);\n });\n\n //if not, just return the dataObject\n } else {\n // log.log('The dataObject is not encrypted');\n return resolve(dataObject);\n }\n } else {\n return reject('No dataObjectKey for this dataObjectURL:', dataObjectURL);\n }\n });\n });\n }\n }, {\n key: '_doMutualAuthenticationPhase1',\n value: function _doMutualAuthenticationPhase1(message) {\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n var to = message.to.split('/');\n\n //let subsIndex = to.indexOf('subscription');\n //let isDataObjectSubscription = subsIndex !== -1;\n to.pop();\n var dataObjectURL = to[0] + '//' + to[2] + '/' + to[3];\n _this._doMutualAuthenticationPhase2(dataObjectURL, message.body.subscriber).then(function () {\n _this._registry.registerSubscriber(dataObjectURL, message.body.subscriber);\n resolve();\n }, function (error) {\n reject(error);\n });\n });\n }\n }, {\n key: '_doMutualAuthenticationPhase2',\n value: function _doMutualAuthenticationPhase2(sender, receiver) {\n log.info('doMutualAuthentication:sender ', sender);\n log.info('doMutualAuthentication:receiver ', receiver);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var dataObjectURL = void 0;\n\n // check if the sender is a dataObject and if so stores that value\n var reporterURL = _this._registry.getReporterURLSynchonous(sender);\n if (reporterURL) {\n dataObjectURL = sender;\n sender = reporterURL;\n }\n\n var msg = {\n to: receiver,\n from: sender,\n callback: undefined,\n body: { handshakePhase: 'startHandShake', ignore: 'ignoreMessage' }\n };\n\n if (!sender || !receiver) {\n return reject('sender or receiver missing on doMutualAuthentication');\n }\n\n var chatKeys = _this.chatKeys[sender + '<->' + receiver];\n var userURL = _this._registry.getHypertyOwner(sender);\n\n if (userURL) {\n\n if (!chatKeys) {\n // callback to resolve when finish the mutual authentication\n var resolved = function resolved(value) {\n // log.log('callback value:', value);\n resolve(value);\n };\n msg.callback = resolved;\n msg.dataObjectURL = dataObjectURL;\n\n chatKeys = _this._newChatCrypto(msg, userURL);\n _this.chatKeys[sender + '<->' + receiver] = chatKeys;\n }\n\n if (chatKeys.authenticated) {\n\n var startSessionKeyExchange = {\n to: sender,\n from: receiver\n };\n chatKeys.dataObjectURL = dataObjectURL;\n _this._sendReporterSessionKey(startSessionKeyExchange, chatKeys).then(function (value) {\n\n _this._messageBus.postMessage(value.message);\n resolve('exchange of chat sessionKey initiated');\n }).catch(function (err) {\n reject('On doMutualAuthentication from method _sendReporterSessionKey error: ' + err);\n });\n } else {\n _this._doHandShakePhase(msg, chatKeys);\n }\n } else {\n reject('Mutual authentication error: Hyperty owner could not be resolved');\n }\n });\n }\n\n /**\n * returns the reporter associated to the dataObject URL\n * @param {String} dataObjectURL dataObject url\n * @return {String} reporter dataObject url reporter\n */\n /* _getHypertyFromDataObject(dataObjectURL) {\n log.info('_getHypertyFromDataObject:dataObjectURL', dataObjectURL);\n let _this = this;\n return new Promise(function(resolve, reject) {\n let splitedURL = divideURL(dataObjectURL);\n let domain = splitedURL.domain;\n let finalURL = _this._parseMessageURL(dataObjectURL);\n // check if is the creator of the hyperty\n let reporterURL = _this.registry.getReporterURLSynchonous(finalURL);\n log.info('_getHypertyFromDataObject:reporterURL', reporterURL);\n if (reporterURL) {\n resolve(reporterURL);\n } else {\n // check if there is already an association from an hypertyURL to the dataObject\n let storedReporterURL = _this.dataObjectsIdentity[finalURL];\n log.info('_getHypertyFromDataObject:storedReporterURL', storedReporterURL);\n if (storedReporterURL) {\n resolve(storedReporterURL);\n } else {\n // check if there is any hyperty that subscribed the dataObjectURL\n let subscriberHyperty = _this.registry.getDataObjectSubscriberHyperty(dataObjectURL);\n log.info('_getHypertyFromDataObject:subscriberHyperty', subscriberHyperty);\n if (subscriberHyperty) {\n resolve(subscriberHyperty);\n } else {\n // search in domain registry for the hyperty associated to the dataObject\n // search in case is a subscriber who wants to know the reporter\n _this._coreDiscovery.discoverDataObjectPerURL(finalURL, domain).then(dataObject => {\n log.info('_getHypertyFromDataObject:dataObject', dataObject);\n _this.dataObjectsIdentity[finalURL] = dataObject.reporter;\n log.info('_getHypertyFromDataObject:dataObject.reporter', dataObject.reporter);\n resolve(dataObject.reporter);\n }, err => {\n reject(err);\n });\n }\n }\n }\n });\n }*/\n\n }, {\n key: '_sendReporterSessionKey',\n value: function _sendReporterSessionKey(message, chatKeys) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var sessionKeyBundle = _this.dataObjectSessionKeys[chatKeys.dataObjectURL];\n var reporterSessionKeyMsg = void 0;\n var valueToEncrypt = void 0;\n var sessionKey = void 0;\n var iv = void 0;\n var value = {};\n\n //if there is not yet a session Key, generates a new one\n if (!sessionKeyBundle) {\n sessionKey = _this.crypto.generateRandom();\n _this.dataObjectSessionKeys[chatKeys.dataObjectURL] = { sessionKey: sessionKey, isToEncrypt: true };\n\n var dataObjectSessionKeysClone = (0, _utils.chatkeysToStringCloner)(_this.dataObjectSessionKeys);\n\n _this.storageManager.set('dataObjectSessionKeys', 0, dataObjectSessionKeysClone).catch(function (err) {\n reject('On _sendReporterSessionKey from method storageManager.set(dataObjectSessionKeys...) error: ' + err);\n });\n } else {\n sessionKey = sessionKeyBundle.sessionKey;\n }\n\n try {\n valueToEncrypt = (0, _utils.encode)({ value: (0, _utils.encode)(sessionKey), dataObjectURL: chatKeys.dataObjectURL });\n } catch (err) {\n return reject('On _sendReporterSessionKey from method storageManager.set error valueToEncrypt: ' + err);\n }\n\n iv = _this.crypto.generateIV();\n value.iv = (0, _utils.encode)(iv);\n _this.crypto.encryptAES(chatKeys.keys.hypertyFromSessionKey, valueToEncrypt, iv).then(function (encryptedValue) {\n\n reporterSessionKeyMsg = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'reporterSessionKey',\n value: (0, _utils.encode)(encryptedValue)\n }\n };\n\n var filteredMessage = _this._filterMessageToHash(reporterSessionKeyMsg, valueToEncrypt + iv, chatKeys.hypertyFrom.messageInfo);\n\n return _this.crypto.hashHMAC(chatKeys.keys.hypertyFromHashKey, filteredMessage);\n }).then(function (hashedMessage) {\n var valueWithHash = (0, _utils.encode)({ value: reporterSessionKeyMsg.body.value, hash: (0, _utils.encode)(hashedMessage), iv: value.iv });\n\n reporterSessionKeyMsg.body.value = valueWithHash;\n\n resolve({ message: reporterSessionKeyMsg, chatKeys: chatKeys });\n }).catch(function (err) {\n reject('On _sendReporterSessionKey from chained promises encryptAES error: ' + err);\n });\n });\n }\n\n /**\n * Function that resolve and create the domainURL in case it is provided one. If not, resolve the default domainURL\n * @param {String} idpDomain idpDomain (Optional)\n */\n\n }, {\n key: '_resolveDomain',\n value: function _resolveDomain(idpDomain) {\n if (!idpDomain) {\n return 'domain-idp://google.com';\n } else {\n return 'domain-idp://' + idpDomain;\n }\n }\n }, {\n key: '_doHandShakePhase',\n value: function _doHandShakePhase(message, chatKeys) {\n // log('_doHandShakePhase:dataObject', message);\n //\tlog('_doHandShakePhase:chatKeys', chatKeys);\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var handshakeType = message.body.handshakePhase;\n var iv = void 0;\n var hash = void 0;\n var value = {};\n var filteredMessage = void 0;\n var privateKeyHolder = void 0;\n\n log.info('handshake phase: ', handshakeType);\n\n switch (handshakeType) {\n\n case 'startHandShake':\n {\n chatKeys.keys.fromRandom = _this.crypto.generateRandom();\n var startHandShakeMsg = {\n type: 'handshake',\n to: message.to,\n from: message.from,\n body: {\n handshakePhase: 'senderHello',\n value: (0, _utils.encode)(chatKeys.keys.fromRandom)\n }\n };\n chatKeys.handshakeHistory.senderHello = _this._filterMessageToHash(startHandShakeMsg, undefined, chatKeys.hypertyFrom.messageInfo);\n\n // check if was the encrypt function or the mutual authentication that request the\n // start of the handShakePhase.\n\n if (chatKeys.initialMessage) {\n resolve({ message: startHandShakeMsg, chatKeys: chatKeys });\n } else {\n _this.chatKeys[message.from + '<->' + message.to] = chatKeys;\n _this._messageBus.postMessage(startHandShakeMsg);\n }\n\n break;\n }\n case 'senderHello':\n {\n\n log.log('senderHello');\n chatKeys.handshakeHistory.senderHello = _this._filterMessageToHash(message);\n chatKeys.keys.fromRandom = (0, _utils.decodeToUint8Array)(message.body.value);\n chatKeys.keys.toRandom = _this.crypto.generateRandom();\n\n var senderHelloMsg = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'receiverHello',\n value: (0, _utils.encode)(chatKeys.keys.toRandom)\n }\n };\n chatKeys.handshakeHistory.receiverHello = _this._filterMessageToHash(senderHelloMsg, undefined, chatKeys.hypertyFrom.messageInfo);\n resolve({ message: senderHelloMsg, chatKeys: chatKeys });\n\n break;\n }\n case 'receiverHello':\n {\n\n log.log('receiverHello');\n _this.getMyPrivateKey().then(function (privateKey) {\n privateKeyHolder = privateKey;\n\n chatKeys.handshakeHistory.receiverHello = _this._filterMessageToHash(message);\n\n return _this._idm.validateAssertion(message.body.identity.assertion, undefined, message.body.identity.idp.domain);\n }).then(function (value) {\n\n //TODO remove later this verification as soon as all the IdP proxy are updated in the example\n var encodedpublicKey = typeof value.contents === 'string' ? value.contents : value.contents.nonce;\n\n var receiverPublicKey = (0, _utils.parseToUint8Array)(encodedpublicKey);\n var premasterSecret = _this.crypto.generatePMS();\n var toRandom = message.body.value;\n chatKeys.hypertyTo.assertion = message.body.identity.assertion;\n chatKeys.hypertyTo.publicKey = receiverPublicKey;\n chatKeys.hypertyTo.userID = message.body.identity.userProfile.userURL;\n chatKeys.keys.toRandom = (0, _utils.decodeToUint8Array)(toRandom);\n chatKeys.keys.premasterKey = premasterSecret;\n\n var concatKey = _this.crypto.concatPMSwithRandoms(premasterSecret, chatKeys.keys.toRandom, chatKeys.keys.fromRandom);\n\n return _this.crypto.generateMasterSecret(concatKey, 'messageHistoric' + chatKeys.keys.toRandom + chatKeys.keys.fromRandom);\n\n //generate the master key\n }).then(function (masterKey) {\n chatKeys.keys.masterKey = masterKey;\n\n return _this.crypto.generateKeys(masterKey, 'key expansion' + chatKeys.keys.toRandom + chatKeys.keys.fromRandom);\n\n //generate the symmetric and hash keys\n }).then(function (keys) {\n\n chatKeys.keys.hypertyToSessionKey = new Uint8Array(keys[0]);\n chatKeys.keys.hypertyFromSessionKey = new Uint8Array(keys[1]);\n chatKeys.keys.hypertyToHashKey = new Uint8Array(keys[2]);\n chatKeys.keys.hypertyFromHashKey = new Uint8Array(keys[3]);\n iv = _this.crypto.generateIV();\n value.iv = (0, _utils.encode)(iv);\n\n var messageStructure = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'senderCertificate'\n }\n };\n\n // hash the value and the iv\n filteredMessage = _this._filterMessageToHash(messageStructure, 'ok' + iv, chatKeys.hypertyFrom.messageInfo);\n return _this.crypto.hashHMAC(chatKeys.keys.hypertyFromHashKey, filteredMessage);\n }).then(function (hash) {\n value.hash = (0, _utils.encode)(hash);\n\n //encrypt the data\n return _this.crypto.encryptAES(chatKeys.keys.hypertyFromSessionKey, 'ok', iv);\n }).then(function (encryptedData) {\n value.symetricEncryption = (0, _utils.encode)(encryptedData);\n\n return _this.crypto.encryptRSA(chatKeys.hypertyTo.publicKey, chatKeys.keys.premasterKey);\n }).then(function (encryptedValue) {\n value.assymetricEncryption = (0, _utils.encode)(encryptedValue);\n\n var messageStructure = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'senderCertificate'\n }\n };\n\n var messageToHash = _this._filterMessageToHash(messageStructure, chatKeys.keys.premasterKey, chatKeys.hypertyFrom.messageInfo);\n return _this.crypto.signRSA(privateKeyHolder, (0, _utils.encode)(chatKeys.handshakeHistory) + (0, _utils.encode)(messageToHash));\n }).then(function (signature) {\n\n value.signature = (0, _utils.encode)(signature);\n\n var receiverHelloMsg = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'senderCertificate',\n value: (0, _utils.encode)(value)\n }\n };\n chatKeys.handshakeHistory.senderCertificate = _this._filterMessageToHash(receiverHelloMsg, 'ok' + iv, chatKeys.hypertyFrom.messageInfo);\n\n resolve({ message: receiverHelloMsg, chatKeys: chatKeys });\n }, function (error) {\n return reject(error);\n });\n\n break;\n }\n case 'senderCertificate':\n {\n\n log.log('senderCertificate');\n\n var receivedValue = (0, _utils.decode)(message.body.value);\n\n _this.getMyPrivateKey().then(function (privateKey) {\n privateKeyHolder = privateKey;\n\n return _this._idm.validateAssertion(message.body.identity.assertion, undefined, message.body.identity.idp.domain);\n }).then(function (value) {\n var encryptedPMS = (0, _utils.decodeToUint8Array)(receivedValue.assymetricEncryption);\n\n //TODO remove later this verification as soon as all the IdP proxy are updated in the example\n var encodedpublicKey = typeof value.contents === 'string' ? value.contents : value.contents.nonce;\n\n var senderPublicKey = (0, _utils.parseToUint8Array)(encodedpublicKey);\n chatKeys.hypertyTo.assertion = message.body.identity.assertion;\n chatKeys.hypertyTo.publicKey = senderPublicKey;\n chatKeys.hypertyTo.userID = message.body.identity.userProfile.userURL;\n\n return _this.crypto.decryptRSA(privateKeyHolder, encryptedPMS);\n }, function (error) {\n // log.log(error);\n reject('Error during authentication of identity: ', error.message);\n\n //obtain the PremasterKey using the private key\n }).then(function (pms) {\n\n chatKeys.keys.premasterKey = new Uint8Array(pms);\n\n var signature = (0, _utils.decodeToUint8Array)(receivedValue.signature);\n\n var receivedmsgToHash = _this._filterMessageToHash(message, chatKeys.keys.premasterKey);\n\n return _this.crypto.verifyRSA(chatKeys.hypertyTo.publicKey, (0, _utils.encode)(chatKeys.handshakeHistory) + (0, _utils.encode)(receivedmsgToHash), signature);\n\n // validates the signature received\n }).then(function (signValidationResult) {\n\n //log.log('SenderCertificate - signature validation result ', signValidationResult);\n var concatKey = _this.crypto.concatPMSwithRandoms(chatKeys.keys.premasterKey, chatKeys.keys.toRandom, chatKeys.keys.fromRandom);\n\n return _this.crypto.generateMasterSecret(concatKey, 'messageHistoric' + chatKeys.keys.toRandom + chatKeys.keys.fromRandom);\n\n // generates the master keys from the Premaster key and the randoms\n }).then(function (masterKey) {\n chatKeys.keys.masterKey = masterKey;\n\n return _this.crypto.generateKeys(masterKey, 'key expansion' + chatKeys.keys.toRandom + chatKeys.keys.fromRandom);\n\n // generates the symmetric keys to be used in the symmetric encryption\n }).then(function (keys) {\n chatKeys.keys.hypertyFromSessionKey = new Uint8Array(keys[0]);\n chatKeys.keys.hypertyToSessionKey = new Uint8Array(keys[1]);\n chatKeys.keys.hypertyFromHashKey = new Uint8Array(keys[2]);\n chatKeys.keys.hypertyToHashKey = new Uint8Array(keys[3]);\n iv = (0, _utils.decodeToUint8Array)(receivedValue.iv);\n var data = (0, _utils.decodeToUint8Array)(receivedValue.symetricEncryption);\n\n return _this.crypto.decryptAES(chatKeys.keys.hypertyToSessionKey, data, iv);\n }).then(function (decryptedData) {\n // log.log('decryptedData', decryptedData);\n\n chatKeys.handshakeHistory.senderCertificate = _this._filterMessageToHash(message, decryptedData + iv);\n\n var hashReceived = (0, _utils.decodeToUint8Array)(receivedValue.hash);\n\n filteredMessage = _this._filterMessageToHash(message, decryptedData + iv);\n\n return _this.crypto.verifyHMAC(chatKeys.keys.hypertyToHashKey, filteredMessage, hashReceived);\n }).then(function (verifiedHash) {\n\n // log.log('result of hash verification ', verifiedHash);\n var receiverFinishedMessage = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'receiverFinishedMessage'\n }\n };\n iv = _this.crypto.generateIV();\n value.iv = (0, _utils.encode)(iv);\n\n filteredMessage = _this._filterMessageToHash(receiverFinishedMessage, 'ok!' + iv, chatKeys.hypertyFrom.messageInfo);\n\n //log.log('TIAGO: doHandShakePhase verifiedHash');\n return _this.crypto.hashHMAC(chatKeys.keys.hypertyFromHashKey, filteredMessage);\n }).then(function (hash) {\n\n value.hash = (0, _utils.encode)(hash);\n return _this.crypto.encryptAES(chatKeys.keys.hypertyFromSessionKey, 'ok!', iv);\n }).then(function (encryptedValue) {\n value.value = (0, _utils.encode)(encryptedValue);\n var receiverFinishedMessage = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'receiverFinishedMessage',\n value: (0, _utils.encode)(value)\n }\n };\n\n chatKeys.handshakeHistory.receiverFinishedMessage = _this._filterMessageToHash(receiverFinishedMessage, 'ok!' + iv, chatKeys.hypertyFrom.messageInfo);\n chatKeys.authenticated = true;\n resolve({ message: receiverFinishedMessage, chatKeys: chatKeys });\n }).catch(function (err) {\n reject('On _doHandShakePhase from senderCertificate error: ' + err);\n });\n\n break;\n }\n case 'receiverFinishedMessage':\n {\n\n chatKeys.authenticated = true;\n\n value = (0, _utils.decode)(message.body.value);\n\n iv = (0, _utils.decodeToUint8Array)(value.iv);\n var data = (0, _utils.decodeToUint8Array)(value.value);\n hash = (0, _utils.decodeToUint8Array)(value.hash);\n\n _this.crypto.decryptAES(chatKeys.keys.hypertyToSessionKey, data, iv).then(function (decryptedData) {\n // log.log('decryptedData', decryptedData);\n chatKeys.handshakeHistory.receiverFinishedMessage = _this._filterMessageToHash(message, decryptedData + iv);\n\n var filteredMessage = _this._filterMessageToHash(message, decryptedData + iv);\n _this.crypto.verifyHMAC(chatKeys.keys.hypertyToHashKey, filteredMessage, hash).then(function (result) {\n\n // check if there was an initial message that was blocked and send it\n if (chatKeys.initialMessage) {\n\n var initialMessage = {\n type: 'create',\n to: message.from,\n from: message.to,\n body: {\n value: chatKeys.initialMessage.body.value\n }\n };\n\n resolve({ message: initialMessage, chatKeys: chatKeys });\n\n //sends the sessionKey to the subscriber hyperty\n } else {\n _this._sendReporterSessionKey(message, chatKeys).then(function (value) {\n\n resolve(value);\n }).catch(function (err) {\n reject('On _doHandShakePhase from receiverFinishedMessage error: ' + err);\n });\n }\n });\n });\n\n break;\n }\n\n case 'reporterSessionKey':\n {\n\n log.log('reporterSessionKey');\n\n var valueIVandHash = (0, _utils.decode)(message.body.value);\n hash = (0, _utils.decodeToUint8Array)(valueIVandHash.hash);\n iv = (0, _utils.decodeToUint8Array)(valueIVandHash.iv);\n var encryptedValue = (0, _utils.decodeToUint8Array)(valueIVandHash.value);\n var parsedValue = void 0;\n var sessionKey = void 0;\n var dataObjectURL = void 0;\n var receiverAcknowledgeMsg = void 0;\n\n //log.log('[IdentityModule reporterSessionKey] - decryptAES: ', chatKeys.keys.hypertyToSessionKey, encryptedValue, iv);\n\n _this.crypto.decryptAES(chatKeys.keys.hypertyToSessionKey, encryptedValue, iv).then(function (decryptedValue) {\n\n parsedValue = (0, _utils.decode)(decryptedValue);\n sessionKey = (0, _utils.decodeToUint8Array)(parsedValue.value);\n dataObjectURL = parsedValue.dataObjectURL;\n\n var messageToHash = _this._filterMessageToHash(message, decryptedValue + iv);\n\n return _this.crypto.verifyHMAC(chatKeys.keys.hypertyToHashKey, messageToHash, hash);\n }).then(function (hashResult) {\n\n // log.log('hash successfully validated ', hashResult);\n\n _this.dataObjectSessionKeys[dataObjectURL] = { sessionKey: sessionKey, isToEncrypt: true };\n var dataObjectSessionKeysClone = (0, _utils.chatkeysToStringCloner)(_this.dataObjectSessionKeys);\n _this.storageManager.set('dataObjectSessionKeys', 0, dataObjectSessionKeysClone).catch(function (err) {\n reject('On _sendReporterSessionKey from method reporterSessionKey error: ' + err);\n });\n\n iv = _this.crypto.generateIV();\n value.iv = (0, _utils.encode)(iv);\n\n return _this.crypto.encryptAES(chatKeys.keys.hypertyFromSessionKey, 'ok!!', iv);\n }).then(function (encryptedValue) {\n\n receiverAcknowledgeMsg = {\n type: 'handshake',\n to: message.from,\n from: message.to,\n body: {\n handshakePhase: 'receiverAcknowledge'\n }\n };\n\n value.value = (0, _utils.encode)(encryptedValue);\n var messageToHash = _this._filterMessageToHash(receiverAcknowledgeMsg, 'ok!!' + iv, chatKeys.hypertyFrom.messageInfo);\n\n return _this.crypto.hashHMAC(chatKeys.keys.hypertyFromHashKey, messageToHash);\n }).then(function (hashedMessage) {\n var finalValue = (0, _utils.encode)({ value: value.value, hash: (0, _utils.encode)(hashedMessage), iv: value.iv });\n\n receiverAcknowledgeMsg.body.value = finalValue;\n resolve({ message: receiverAcknowledgeMsg, chatKeys: chatKeys });\n }).catch(function (err) {\n reject('On _doHandShakePhase from reporterSessionKey error: ' + err);\n });\n\n break;\n }\n\n case 'receiverAcknowledge':\n {\n\n log.log('receiverAcknowledge');\n\n var receivedvalueIVandHash = (0, _utils.decode)(message.body.value);\n var receivedHash = (0, _utils.decodeToUint8Array)(receivedvalueIVandHash.hash);\n iv = (0, _utils.decodeToUint8Array)(receivedvalueIVandHash.iv);\n var receivedEncryptedValue = (0, _utils.decodeToUint8Array)(receivedvalueIVandHash.value);\n\n _this.crypto.decryptAES(chatKeys.keys.hypertyToSessionKey, receivedEncryptedValue, iv).then(function (decryptedValue) {\n\n var filteredMessage = _this._filterMessageToHash(message, decryptedValue + iv);\n return _this.crypto.verifyHMAC(chatKeys.keys.hypertyToHashKey, filteredMessage, receivedHash);\n }).then(function (hashResult) {\n // log.log('hashResult ', hashResult);\n\n var callback = chatKeys.callback;\n\n if (callback) {\n callback('handShakeEnd');\n }\n resolve('handShakeEnd');\n }).catch(function (err) {\n reject('On _doHandShakePhase from receiverAcknowledge error: ' + err);\n });\n\n break;\n }\n\n default:\n reject(message);\n }\n });\n }\n\n /**\n * filter the messages to hash, by removing some fields not generated by the runtime core\n * @param {Message} message message\n * @param {String} decryptedValue (Optional) value from body.value in case it originally comes encrypted\n * @param {JSON} identity(Optional) add the hyperty identity associated in case is not added to the initial message\n * @return {Message} new message filtered\n */\n\n }, {\n key: '_filterMessageToHash',\n value: function _filterMessageToHash(message, decryptedValue, identity) {\n\n return {\n type: message.type,\n from: message.from,\n to: message.to,\n body: {\n identity: identity || message.body.identity,\n value: decryptedValue || message.body.value,\n handshakePhase: message.body.handshakePhase\n }\n };\n }\n\n /**\n * generates the initial structure for the keys between two users\n * @param {JSON} message initial message that triggers the mutual authentication\n * @param {String} userURL userURL\n * @param {boolean} receiver(Optional) indicates if is the sender or the receiver that creates a new chat crypto\n * @return {JSON} newChatCrypto new JSON structure for the chat crypto\n */\n\n }, {\n key: '_newChatCrypto',\n value: function _newChatCrypto(message, userURL, receiver) {\n var _this = this;\n\n //check whether is the sender or the receiver to create a new chatCrypto\n //to mantain consistency on the keys if the receiver create a new chatCrypto,\n //then invert the fields\n var from = receiver ? message.to : message.from;\n var to = receiver ? message.from : message.to;\n\n var userInfo = _this._idm.getIdentity(userURL);\n\n var newChatCrypto = {\n hypertyFrom: {\n hyperty: from,\n userID: userInfo.userProfile.userURL,\n\n //privateKey: \"getMyPublicKey\",\n //publicKey: \"getMyPrivateKey\",\n assertion: userInfo.assertion,\n messageInfo: userInfo\n },\n hypertyTo: {\n hyperty: to,\n userID: undefined,\n publicKey: undefined,\n assertion: undefined\n },\n keys: {\n hypertyToSessionKey: undefined,\n hypertyFromSessionKey: undefined,\n hypertyToHashKey: undefined,\n hypertyFromHashKey: undefined,\n toRandom: undefined,\n fromRandom: undefined,\n premasterKey: undefined,\n masterKey: undefined\n },\n handshakeHistory: {\n senderHello: undefined,\n receiverHello: undefined,\n senderCertificate: undefined,\n receiverFinishedMessage: undefined\n },\n initialMessage: message.body.ignore ? undefined : message,\n callback: message.callback,\n authenticated: false,\n dataObjectURL: message.dataObjectURL\n };\n\n return newChatCrypto;\n }\n\n /**\n * Retrieves a public keys given a user refrence. If no key is found,\n generates a new key asymmetric key and retrieves the public keys.\n * @param {userRef} String user reference for the key pair\n * @return {Array} public key\n */\n\n }, {\n key: 'getMyPublicKey',\n value: function getMyPublicKey() {\n var userRef = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.userDefaultKeyRef;\n\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n _this.storageManager.get(userRef).then(function (storedKeyPair) {\n if (storedKeyPair) {\n return resolve(storedKeyPair.public);\n }\n _this._generateAndStoreNewAsymetricKey(userRef).then(function (generatedKeyPair) {\n resolve(generatedKeyPair.public);\n }).catch(function (err) {\n log.error('[getMyPublicKey:_generateAndStoreNewAsymetricKey:err]: ' + err.message);\n reject(err);\n });\n }).catch(function (err) {\n log.error('[getMyPublicKey:storageManager:err]: ' + err.message);\n reject(err);\n });\n });\n }\n\n /**\n * Retrieves a private keys given a user refrence. If no key is found,\n generates a new key asymmetric key and retrieves the private key.\n * @param {userRef} String user reference for the key pair\n * @return {Array} private key\n **/\n\n }, {\n key: 'getMyPrivateKey',\n value: function getMyPrivateKey() {\n var userRef = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.userDefaultKeyRef;\n\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n _this.storageManager.get(userRef).then(function (storedKeyPair) {\n if (storedKeyPair) {\n return resolve(storedKeyPair.private);\n }\n _this._generateAndStoreNewAsymetricKey(userRef).then(function (generatedKeyPair) {\n resolve(generatedKeyPair.private);\n }).catch(function (err) {\n log.error('[getMyPrivateKey:_generateAndStoreNewAsymetricKey:err]: ' + err.message);\n reject(err);\n });\n }).catch(function (err) {\n log.error('[getMyPrivateKey:storageManager:err]: ' + err.message);\n reject(err);\n });\n });\n }\n\n /**\n * Generates a new key pair, stores and retrives the key pair.\n * @param {userRef} String user reference for the key pair\n * @return {Array} private key\n **/\n\n }, {\n key: '_generateAndStoreNewAsymetricKey',\n value: function _generateAndStoreNewAsymetricKey(userRef) {\n var _this = this;\n var keyPair = undefined;\n return new _promise2.default(function (resolve, reject) {\n _this.crypto.generateRSAKeyPair().then(function (generatedKeyPair) {\n log.log('_generateAndStoreNewAsymetricKey:userAsymmetricKeyGenerated', generatedKeyPair);\n keyPair = generatedKeyPair;\n return _this.storageManager.set(userRef, 0, generatedKeyPair);\n }).then(function (storedReference) {\n log.log('_generateAndStoreNewAsymetricKey:userAsymmetricKeySuccess', storedReference);\n resolve(keyPair);\n }).catch(function (err) {\n log.error('[_generateAndStoreNewAsymetricKey:err]: ' + err.message);\n reject(err);\n });\n });\n }\n }, {\n key: 'messageBus',\n get: function get() {\n var _this = this;\n return _this._messageBus;\n }\n\n /**\n * Set the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n ,\n set: function set(messageBus) {\n var _this = this;\n _this._messageBus = messageBus;\n\n _this.addCryptoGUIListeners();\n }\n\n /**\n * return the coreDiscovery component\n */\n\n }, {\n key: 'coreDiscovery',\n get: function get() {\n var _this = this;\n return _this._coreDiscovery;\n }\n\n /**\n * return user's public key\n */\n\n /* getMyPublicKey() {\n // to be implemented\n return new Promise((resolve)=> {\n resolve('mypublickey');\n });\n }\n */\n /**\n * Set the coreDiscovery component\n * @param {coreDiscovery} coreDiscovery\n */\n ,\n set: function set(coreDiscovery) {\n var _this = this;\n _this._coreDiscovery = coreDiscovery;\n }\n\n /**\n * return the registry in this idModule\n * @param {registry} registry\n */\n\n }, {\n key: 'registry',\n get: function get() {\n var _this = this;\n return _this._registry;\n }\n\n /**\n * Set the registry in this idModule\n * @param {registry} reg\n */\n ,\n set: function set(registry) {\n var _this = this;\n _this._registry = registry;\n }\n }]);\n return CryptoManager;\n}();\n\n/*\nconst nodeJSKeyPairPopulate = { public: [48, 130, 1, 34, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 3, 130, 1, 15, 0, 48, 130, 1, 10, 2, 130, 1, 1, 0, 228, 43, 101, 12, 121, 7, 157, 71, 81, 58, 219, 32, 10, 108, 193, 179, 212, 116, 255, 59, 217, 32, 161, 201, 53, 171, 226, 199, 137, 202, 171, 60, 82, 53, 125, 62, 177, 126, 165, 24, 141, 30, 15, 226, 59, 107, 34, 7, 13, 149, 112, 125, 10, 230, 191, 156, 164, 177, 10, 185, 13, 66, 3, 217, 166, 244, 90, 119, 111, 27, 145, 104, 71, 189, 166, 226, 255, 133, 83, 151, 231, 101, 151, 89, 22, 19, 65, 154, 10, 53, 208, 218, 252, 219, 37, 50, 212, 86, 145, 107, 132, 90, 233, 202, 227, 108, 114, 141, 29, 73, 187, 31, 13, 234, 0, 232, 24, 191, 35, 149, 179, 138, 214, 159, 245, 162, 148, 221, 118, 17, 105, 89, 151, 146, 209, 55, 236, 61, 143, 233, 228, 10, 115, 8, 81, 197, 45, 123, 187, 223, 176, 254, 165, 69, 143, 29, 100, 114, 17, 130, 226, 223, 33, 11, 240, 81, 61, 172, 191, 157, 246, 202, 87, 131, 221, 88, 48, 127, 159, 119, 160, 152, 117, 61, 253, 174, 65, 214, 203, 218, 63, 50, 78, 160, 181, 221, 211, 128, 70, 178, 191, 170, 0, 13, 122, 173, 12, 203, 252, 4, 184, 225, 252, 7, 62, 96, 116, 15, 216, 158, 55, 85, 48, 16, 9, 206, 119, 74, 112, 243, 136, 84, 184, 223, 254, 101, 91, 61, 10, 91, 85, 192, 147, 144, 57, 29, 66, 238, 199, 244, 193, 194, 150, 232, 200, 107, 2, 3, 1, 0, 1],\n private: [48, 130, 4, 191, 2, 1, 0, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 4, 130, 4, 169, 48, 130, 4, 165, 2, 1, 0, 2, 130, 1, 1, 0, 228, 43, 101, 12, 121, 7, 157, 71, 81, 58, 219, 32, 10, 108, 193, 179, 212, 116, 255, 59, 217, 32, 161, 201, 53, 171, 226, 199, 137, 202, 171, 60, 82, 53, 125, 62, 177, 126, 165, 24, 141, 30, 15, 226, 59, 107, 34, 7, 13, 149, 112, 125, 10, 230, 191, 156, 164, 177, 10, 185, 13, 66, 3, 217, 166, 244, 90, 119, 111, 27, 145, 104, 71, 189, 166, 226, 255, 133, 83, 151, 231, 101, 151, 89, 22, 19, 65, 154, 10, 53, 208, 218, 252, 219, 37, 50, 212, 86, 145, 107, 132, 90, 233, 202, 227, 108, 114, 141, 29, 73, 187, 31, 13, 234, 0, 232, 24, 191, 35, 149, 179, 138, 214, 159, 245, 162, 148, 221, 118, 17, 105, 89, 151, 146, 209, 55, 236, 61, 143, 233, 228, 10, 115, 8, 81, 197, 45, 123, 187, 223, 176, 254, 165, 69, 143, 29, 100, 114, 17, 130, 226, 223, 33, 11, 240, 81, 61, 172, 191, 157, 246, 202, 87, 131, 221, 88, 48, 127, 159, 119, 160, 152, 117, 61, 253, 174, 65, 214, 203, 218, 63, 50, 78, 160, 181, 221, 211, 128, 70, 178, 191, 170, 0, 13, 122, 173, 12, 203, 252, 4, 184, 225, 252, 7, 62, 96, 116, 15, 216, 158, 55, 85, 48, 16, 9, 206, 119, 74, 112, 243, 136, 84, 184, 223, 254, 101, 91, 61, 10, 91, 85, 192, 147, 144, 57, 29, 66, 238, 199, 244, 193, 194, 150, 232, 200, 107, 2, 3, 1, 0, 1, 2, 130, 1, 0, 103, 244, 137, 118, 116, 82, 14, 203, 102, 107, 253, 88, 12, 199, 222, 60, 243, 136, 86, 157, 74, 224, 190, 53, 113, 57, 157, 250, 49, 130, 96, 31, 252, 136, 152, 70, 143, 17, 215, 96, 103, 51, 18, 35, 141, 212, 210, 205, 9, 216, 83, 70, 245, 71, 138, 119, 112, 229, 164, 176, 9, 37, 81, 161, 193, 154, 68, 249, 115, 106, 201, 6, 12, 225, 144, 126, 141, 210, 141, 242, 128, 159, 221, 163, 222, 21, 233, 230, 167, 206, 59, 24, 250, 233, 81, 122, 102, 26, 6, 233, 72, 133, 47, 77, 155, 238, 86, 6, 139, 24, 131, 163, 179, 112, 48, 247, 142, 6, 207, 204, 173, 223, 140, 199, 150, 95, 123, 152, 202, 155, 131, 238, 62, 96, 133, 4, 217, 51, 121, 30, 38, 178, 189, 216, 44, 35, 241, 93, 7, 62, 90, 111, 216, 66, 209, 243, 128, 234, 141, 84, 135, 181, 13, 38, 220, 114, 245, 240, 178, 95, 220, 206, 11, 186, 234, 213, 66, 121, 83, 68, 89, 75, 46, 183, 145, 183, 147, 160, 215, 118, 198, 125, 181, 146, 30, 251, 58, 87, 47, 209, 237, 97, 24, 47, 179, 6, 110, 242, 99, 150, 226, 148, 198, 174, 146, 101, 213, 87, 178, 10, 223, 105, 18, 56, 53, 22, 212, 158, 170, 176, 51, 86, 145, 125, 124, 44, 9, 85, 19, 144, 246, 170, 78, 124, 30, 32, 12, 166, 174, 139, 77, 63, 173, 82, 10, 153, 2, 129, 129, 0, 248, 18, 143, 246, 137, 136, 145, 219, 178, 39, 27, 94, 64, 90, 47, 163, 114, 60, 63, 187, 131, 143, 244, 16, 42, 128, 231, 117, 92, 98, 219, 155, 62, 107, 252, 17, 245, 45, 160, 225, 103, 142, 72, 36, 193, 150, 235, 214, 175, 62, 212, 56, 45, 9, 0, 60, 114, 107, 134, 228, 204, 131, 131, 214, 94, 201, 148, 159, 99, 139, 181, 13, 119, 38, 30, 107, 166, 165, 203, 43, 34, 20, 207, 171, 32, 58, 167, 62, 196, 153, 103, 204, 213, 247, 48, 111, 227, 59, 95, 97, 194, 187, 53, 10, 247, 108, 58, 86, 28, 29, 113, 8, 110, 171, 220, 245, 11, 82, 233, 223, 91, 68, 166, 117, 174, 187, 62, 77, 2, 129, 129, 0, 235, 118, 2, 105, 239, 212, 30, 104, 157, 41, 109, 11, 248, 152, 22, 236, 97, 40, 153, 131, 228, 5, 86, 187, 113, 126, 144, 76, 141, 79, 110, 250, 146, 152, 49, 58, 156, 201, 176, 92, 189, 209, 30, 112, 108, 175, 204, 204, 247, 164, 46, 129, 239, 98, 127, 49, 145, 218, 63, 193, 124, 174, 18, 98, 201, 99, 154, 162, 138, 78, 159, 253, 3, 248, 3, 209, 36, 239, 193, 155, 193, 5, 19, 236, 37, 78, 118, 135, 250, 199, 7, 141, 248, 120, 36, 136, 93, 98, 174, 60, 18, 215, 93, 174, 107, 141, 116, 145, 167, 221, 210, 169, 247, 67, 254, 222, 161, 134, 63, 221, 90, 87, 42, 99, 227, 81, 173, 151, 2, 129, 129, 0, 133, 23, 168, 103, 83, 232, 146, 160, 181, 23, 40, 38, 204, 13, 214, 203, 49, 41, 195, 227, 189, 181, 8, 243, 119, 106, 75, 67, 250, 250, 10, 234, 98, 118, 26, 250, 35, 121, 132, 124, 10, 76, 26, 198, 165, 154, 108, 19, 117, 88, 23, 17, 192, 143, 184, 177, 181, 141, 157, 4, 185, 248, 193, 77, 204, 243, 7, 170, 240, 4, 111, 113, 183, 0, 27, 136, 20, 19, 149, 74, 33, 241, 218, 108, 236, 80, 171, 148, 16, 116, 97, 109, 83, 74, 88, 145, 94, 239, 102, 192, 19, 114, 207, 5, 128, 51, 111, 164, 237, 86, 154, 99, 52, 197, 62, 57, 182, 6, 152, 245, 61, 137, 58, 105, 159, 2, 84, 109, 2, 129, 129, 0, 226, 67, 111, 132, 95, 91, 101, 177, 63, 189, 44, 53, 193, 184, 92, 230, 223, 98, 133, 74, 209, 86, 52, 7, 65, 195, 206, 100, 81, 178, 144, 65, 167, 151, 42, 79, 89, 149, 18, 173, 188, 21, 244, 251, 49, 230, 41, 150, 153, 46, 35, 38, 231, 99, 174, 56, 115, 32, 215, 253, 85, 147, 108, 197, 147, 34, 236, 216, 222, 177, 57, 90, 136, 114, 207, 48, 46, 31, 90, 220, 18, 58, 143, 239, 111, 214, 27, 95, 6, 36, 53, 229, 62, 108, 45, 39, 1, 30, 47, 178, 56, 164, 206, 56, 42, 208, 46, 193, 61, 31, 147, 45, 147, 23, 187, 22, 50, 255, 111, 229, 132, 199, 152, 75, 142, 136, 209, 151, 2, 129, 129, 0, 165, 56, 232, 76, 55, 57, 240, 159, 92, 207, 220, 143, 130, 30, 57, 234, 251, 172, 171, 180, 54, 159, 229, 96, 246, 73, 112, 146, 75, 157, 242, 201, 161, 218, 37, 176, 35, 170, 50, 90, 148, 102, 191, 199, 239, 174, 78, 72, 67, 85, 199, 45, 149, 145, 132, 161, 212, 33, 157, 75, 216, 79, 39, 233, 18, 210, 255, 26, 72, 229, 239, 44, 12, 147, 158, 176, 192, 95, 126, 32, 175, 23, 226, 131, 139, 197, 175, 193, 62, 8, 151, 252, 68, 154, 94, 89, 189, 125, 90, 30, 36, 175, 73, 230, 194, 13, 233, 247, 123, 60, 241, 47, 171, 51, 189, 112, 111, 213, 141, 89, 70, 249, 236, 63, 236, 110, 115, 208]};\n*/\n\nexports.default = new CryptoManager();\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9jcnlwdG9NYW5hZ2VyL0NyeXB0b01hbmFnZXIuanM/ZDliYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBMb2cgU3lzdGVtXG5pbXBvcnQgKiBhcyBsb2dnZXIgZnJvbSAnbG9nbGV2ZWwnO1xubGV0IGxvZyA9IGxvZ2dlci5nZXRMb2dnZXIoJ0NyeXB0b01hbmFnZXInKTtcblxuaW1wb3J0IHtkaXZpZGVVUkwsIGlzRGF0YU9iamVjdFVSTCwgaXNMZWdhY3ksIGNoYXRrZXlzVG9TdHJpbmdDbG9uZXIsIGNoYXRrZXlzVG9BcnJheUNsb25lciwgcGFyc2VNZXNzYWdlVVJMLFxuICBwYXJzZSwgc3RyaW5naWZ5LCBlbmNvZGUsIGRlY29kZSwgZGVjb2RlVG9VaW50OEFycmF5LCBwYXJzZVRvVWludDhBcnJheX0gZnJvbSAnLi4vdXRpbHMvdXRpbHMuanMnO1xuaW1wb3J0IENyeXB0byBmcm9tICcuL0NyeXB0byc7XG5cbi8qKlxuKiAgVGhlIENyeXB0byBNYW5hZ2VyIHByb3ZpZGVzIG1hbmFnZXMgY3J5cHRvZ3JhcGhpYyBmZWF0dXJlcyBmb3IgdGhlIHJ1bnRpbWUgaW5jbHVkaW5nOlxuKiAgLSBNdXR1YWwgQXV0aGVudGljYXRpb24gYmV0d2VlbiBwZWVyc1xuKiAgLSBDcnlwdG8gS2V5c1xuKiAgLSBlMmUgZW5jcnlwdGlvbiBhbmQgZGVjcmlwdGlvbiBvZiBjb21tdW5pY2F0aW9uIGJldHdlZW4gSHlwZXJ0aWVzIGFuZCBkdGEgb2JqZWN0c1xuKlxuKi9cbmNsYXNzIENyeXB0b01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mVyaWZ5SE1BQyhkYXRhT2JqZWN0S2V5LnNlc3Npb25LZXksIGZpbHRlcmVkTWVzc2FnZSwgaGFzaCkudGhlbihyZXN1bHQgPT4ge1xuICAgICAgICAgICAgICAgICAgICBsb2cubG9nKCdSZWNlaXZlZCBtZXNzYWdlIEhNQUMgcmVzdWx0JywgcmVzdWx0KTtcblxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJvZHkuYXNzZXJ0ZWRJZGVudGl0eSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUobWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgICB9KS5jYXRjaChlcnIgPT4geyByZWplY3QoJ01lc3NhZ2UgSE1BQyBpcyBpbnZhbGlkOiAnICsgZXJyKTsgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAvL2lmIG5vdCwganVzdCByZXR1cm4gdGhlIG1lc3NhZ2VcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBtZXNzYWdlLmJvZHkuYXNzZXJ0ZWRJZGVudGl0eSA9IHRydWU7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZShtZXNzYWdlKTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBtZXNzYWdlLmJvZHkuYXNzZXJ0ZWRJZGVudGl0eSA9IHRydWU7XG4gICAgICAgICAgICAgIHJlc29sdmUobWVzc2FnZSk7XG5cbiAgICAgICAgICAgICAgLy9yZWplY3QoJ25vIHNlc3Npb25LZXkgZm9yIGNoYXQgcm9vbSBmb3VuZCcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmVqZWN0KCd3cm9uZyBtZXNzYWdlIHRvIGRlY3J5cHQnKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICB9KTtcbiAgfVxuXG4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RLZXlzfSk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIF90aGlzLmNoYXRLZXlzW21lc3NhZ2UuZnJvbSArICc8LT4nICsgbWVzc2FnZS50b10gPSBjaGF0S2V5cztcbiAgICAgICAgICAgIF90aGlzLl9tZXNzYWdlQnVzLnBvc3RNZXNzYWdlKHN0YXJ0SGFuZFNoYWtlTXNnKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcblxuICAgICAgICB9XG4gICAgICAgIGNhc2UgJ3NlbmRlckhlbGxvJzoge1xuXG4gICAgICAgICAgbG9nLmxvZygnc2VuZGVySGVsbG8nKTtcbiAgICAgICAgICBjaGF0S2V5cy5oYW5kc2hha2VIaXN0b3J5LnNlbmRlckhlbGxvID0gX3RoaXMuX2ZpbHRlck1lc3NhZ2VUb0hhc2gobWVzc2FnZSk7XG4gICAgICAgICAgY2hhdEtleXMua2V5cy5mcm9tUmFuZG9tID0gZGVjb2RlVG9VaW50OEFycmF5KG1lc3NhZ2UuYm9keS52YWx1ZSk7XG4gICAgICAgICAgY2hhdEtleXMua2V5cy50b1JhbmRvbSA9IF90aGlzLmNyeXB0by5nZW5lcmF0ZVJhbmRvbSgpO1xuXG4gICAgICAgICAgbGV0IHNlbmRlckhlbGxvTXNnID0ge1xuICAgICAgICAgICAgdHlwZTogJ2hhbmRzaGFrZScsXG4gICAgICAgICAgICB0bzogbWVzc2FnZS5mcm9tLFxuICAgICAgICAgICAgZnJvbTogbWVzc2FnZS50byxcbiAgICAgICAgICAgIGJvZHk6IHtcbiAgICAgICAgICAgICAgaGFuZHNoYWtlUGhhc2U6ICdyZWNlaXZlckhlbGxvJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGVuY29kZShjaGF0S2V5cy5rZXlzLnRvUmFuZG9tKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgICAgY2hhdEtleXMuaGFuZHNoYWtlSGlzdG9yeS5yZWNlaXZlckhlbGxvID0gX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IHNlbmQgaXRcbiAgICAgICAgICAgICAgaWYgKGNoYXRLZXlzLmluaXRpYWxNZXNzYWdlKSB7XG5cbiAgICAgICAgICAgICAgICBsZXQgaW5pdGlhbE1lc3NhZ2UgPSB7XG4gICAgICAgICAgICAgICAgICB0eXBlOiAnY3JlYXRlJyxcbiAgICAgICAgICAgICAgICAgIHRvOiBtZXNzYWdlLmZyb20sXG4gICAgICAgICAgICAgICAgICBmcm9tOiBtZXNzYWdlLnRvLFxuICAgICAgICAgICAgICAgICAgYm9keToge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogY2hhdEtleXMuaW5pdGlhbE1lc3NhZ2UuYm9keS52YWx1ZVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICByZXNvbHZlKHttZXNzYWdlOiBpbml0aWFsTWVzc2FnZSwgY2hhdEtleXM6IGNoYXRLZXlzfSk7XG5cbiAgICAgICAgICAgICAgICAvL3NlbmRzIHRoZSBzZXNzaW9uS2V5IHRvIHRoZSBzdWJzY3JpYmVyIGh5cGVydHlcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5fc2VuZFJlcG9ydGVyU2Vzc2lvbktleShtZXNzYWdlLCBjaGF0S2V5cykudGhlbih2YWx1ZSA9PiB7XG5cbiAgICAgICAgICAgICAgICAgIHJlc29sdmUodmFsdWUpO1xuICAgICAgICAgICAgICAgIH0pLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgICAgICAgICByZWplY3QoJ09uIF9kb0hhbmRTaGFrZVBoYXNlIGZyb20gcmVjZWl2ZXJGaW5pc2hlZE1lc3NhZ2UgZXJyb3I6ICcgKyBlcnIpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgY2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ICAgICAgICB1c2VySUQ6IHVzZXJJbmZvLnVzZXJQcm9maWxlLnVzZXJVUkwsXG5cbiAgICAgICAgICAvL3ByaXZhdGVLZXk6IFwiZ2V0TXlQdWJsaWNLZXlcIixcbiAgICAgICAgICAvL3B1YmxpY0tleTogXCJnZXRNeVByaXZhdGVLZXlcIixcbiAgICAgICAgICBhc3NlcnRpb246IHVzZXJJbmZvLmFzc2VydGlvbixcbiAgICAgICAgICBtZXNzYWdlSW5mbzogdXNlckluZm9cbiAgICAgICAgfSxcbiAgICAgICAgaHlwZXJ0eVRvOlxuICAgICAgICB7XG4gICAgICAgICAgaHlwZXJ0eTogdG8sXG4gICAgICAgICAgdXNlcklEOiB1bmRlZmluZWQsXG4gICAgICAgICAgcHVibGljS2V5OiB1bmRlZmluZWQsXG4gICAgICAgICAgYXNzZXJ0aW9uOiB1bmRlZmluZWRcbiAgICAgICAgfSxcbiAgICAgICAga2V5czpcbiAgICAgICAge1xuICAgICAgICAgIGh5cGVydHlUb1Nlc3Npb25LZXk6IHVuZGVmaW5lZCxcbiAgICAgICAgICBoeXBlcnR5RnJvbVNlc3Npb25LZXk6IHVuZGVmaW5lZCxcbiAgICAgICAgICBoeXBlcnR5VG9IYXNoS2V5OiB1bmRlZmluZWQsXG4gICAgICAgICAgaHlwZXJ0eUZyb21IYXNoS2V5OiB1bmRlZmluZWQsXG4gICAgICAgICAgdG9SYW5kb206IHVuZGVmaW5lZCxcbiAgICAgICAgICBmcm9tUmFuZG9tOiB1bmRlZmluZWQsXG4gICAgICAgICAgcHJlbWFzdGVyS2V5OiB1bmRlZmluZWQsXG4gICAgICAgICAgbWFzdGVyS2V5OiB1bmRlZmluZWRcbiAgICAgICAgfSxcbiAgICAgICAgaGFuZHNoYWtlSGlzdG9yeToge1xuICAgICAgICAgIHNlbmRlckhlbGxvOiB1bmRlZmluZWQsXG4gICAgICAgICAgcmVjZWl2ZXJIZWxsbzogdW5kZWZpbmVkLFxuICAgICAgICAgIHNlbmRlckNlcn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7QUFDQTtBQXRDQTtBQUNBO0FBd0NBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7Ozs7QUFNQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7Ozs7QUFNQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBOzs7Ozs7OztBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQTV6Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7OztBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7OztBQUlBOzs7Ozs7O0FBU0E7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQWt3Q0E7Ozs7O0FBS0E7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///100\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(6);\nvar document = __webpack_require__(4).document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZG9tLWNyZWF0ZS5qcz84ZTFjIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIGRvY3VtZW50ID0gcmVxdWlyZSgnLi9fZ2xvYmFsJykuZG9jdW1lbnQ7XG4vLyB0eXBlb2YgZG9jdW1lbnQuY3JlYXRlRWxlbWVudCBpcyAnb2JqZWN0JyBpbiBvbGQgSUVcbnZhciBpcyA9IGlzT2JqZWN0KGRvY3VtZW50KSAmJiBpc09iamVjdChkb2N1bWVudC5jcmVhdGVFbGVtZW50KTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBpcyA/IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoaXQpIDoge307XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19kb20tY3JlYXRlLmpzXG4vLyBtb2R1bGUgaWQgPSAxMDFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///101\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar core = __webpack_require__(30);\nvar LIBRARY = __webpack_require__(49);\nvar wksExt = __webpack_require__(149);\nvar defineProperty = __webpack_require__(11).f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fd2tzLWRlZmluZS5qcz9kZTBmIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBjb3JlID0gcmVxdWlyZSgnLi9fY29yZScpO1xudmFyIExJQlJBUlkgPSByZXF1aXJlKCcuL19saWJyYXJ5Jyk7XG52YXIgd2tzRXh0ID0gcmVxdWlyZSgnLi9fd2tzLWV4dCcpO1xudmFyIGRlZmluZVByb3BlcnR5ID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJykuZjtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKG5hbWUpIHtcbiAgdmFyICRTeW1ib2wgPSBjb3JlLlN5bWJvbCB8fCAoY29yZS5TeW1ib2wgPSBMSUJSQVJZID8ge30gOiBnbG9iYWwuU3ltYm9sIHx8IHt9KTtcbiAgaWYgKG5hbWUuY2hhckF0KDApICE9ICdfJyAmJiAhKG5hbWUgaW4gJFN5bWJvbCkpIGRlZmluZVByb3BlcnR5KCRTeW1ib2wsIG5hbWUsIHsgdmFsdWU6IHdrc0V4dC5mKG5hbWUpIH0pO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fd2tzLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMTAyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///102\n")},function(module,exports,__webpack_require__){eval("var shared = __webpack_require__(78)('keys');\nvar uid = __webpack_require__(48);\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc2hhcmVkLWtleS5qcz85OTkzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBzaGFyZWQgPSByZXF1aXJlKCcuL19zaGFyZWQnKSgna2V5cycpO1xudmFyIHVpZCA9IHJlcXVpcmUoJy4vX3VpZCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoa2V5KSB7XG4gIHJldHVybiBzaGFyZWRba2V5XSB8fCAoc2hhcmVkW2tleV0gPSB1aWQoa2V5KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zaGFyZWQta2V5LmpzXG4vLyBtb2R1bGUgaWQgPSAxMDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///103\n")},function(module,exports){eval("// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZW51bS1idWcta2V5cy5qcz80MGE1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIElFIDgtIGRvbid0IGVudW0gYnVnIGtleXNcbm1vZHVsZS5leHBvcnRzID0gKFxuICAnY29uc3RydWN0b3IsaGFzT3duUHJvcGVydHksaXNQcm90b3R5cGVPZixwcm9wZXJ0eUlzRW51bWVyYWJsZSx0b0xvY2FsZVN0cmluZyx0b1N0cmluZyx2YWx1ZU9mJ1xuKS5zcGxpdCgnLCcpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19lbnVtLWJ1Zy1rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSAxMDRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///104\n")},function(module,exports,__webpack_require__){eval("var document = __webpack_require__(4).document;\nmodule.exports = document && document.documentElement;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faHRtbC5qcz83NzRlIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBkb2N1bWVudCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpLmRvY3VtZW50O1xubW9kdWxlLmV4cG9ydHMgPSBkb2N1bWVudCAmJiBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQ7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2h0bWwuanNcbi8vIG1vZHVsZSBpZCA9IDEwNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///105\n")},function(module,exports,__webpack_require__){eval("// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = __webpack_require__(6);\nvar anObject = __webpack_require__(3);\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = __webpack_require__(27)(Function.call, __webpack_require__(25).f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc2V0LXByb3RvLmpzPzgyZjAiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gV29ya3Mgd2l0aCBfX3Byb3RvX18gb25seS4gT2xkIHY4IGNhbid0IHdvcmsgd2l0aCBudWxsIHByb3RvIG9iamVjdHMuXG4vKiBlc2xpbnQtZGlzYWJsZSBuby1wcm90byAqL1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIg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HVsZXMvY29yZS1qcy9tb2R1bGVzL19zZXQtcHJvdG8uanNcbi8vIG1vZHVsZSBpZCA9IDEwNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///106\n")},function(module,exports){eval("module.exports = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' +\n '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLXdzLmpzPzVkZGIiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSAnXFx4MDlcXHgwQVxceDBCXFx4MENcXHgwRFxceDIwXFx4QTBcXHUxNjgwXFx1MTgwRVxcdTIwMDBcXHUyMDAxXFx1MjAwMlxcdTIwMDMnICtcbiAgJ1xcdTIwMDRcXHUyMDA1XFx1MjAwNlxcdTIwMDdcXHUyMDA4XFx1MjAwOVxcdTIwMEFcXHUyMDJGXFx1MjA1RlxcdTMwMDBcXHUyMDI4XFx1MjAyOVxcdUZFRkYnO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19zdHJpbmctd3MuanNcbi8vIG1vZHVsZSBpZCA9IDEwN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///107\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(6);\nvar setPrototypeOf = __webpack_require__(106).set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faW5oZXJpdC1pZi1yZXF1aXJlZC5qcz85MjI3Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIHNldFByb3RvdHlwZU9mID0gcmVxdWlyZSgnLi9fc2V0LXByb3RvJykuc2V0O1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAodGhhdCwgdGFyZ2V0LCBDKSB7XG4gIHZhciBTID0gdGFyZ2V0LmNvbnN0cnVjdG9yO1xuICB2YXIgUDtcbiAgaWYgKFMgIT09IEMgJiYgdHlwZW9mIFMgPT0gJ2Z1bmN0aW9uJyAmJiAoUCA9IFMucHJvdG90eXBlKSAhPT0gQy5wcm90b3R5cGUgJiYgaXNPYmplY3QoUCkgJiYgc2V0UHJvdG90eXBlT2YpIHtcbiAgICBzZXRQcm90b3R5cGVPZih0aGF0LCBQKTtcbiAgfSByZXR1cm4gdGhhdDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2luaGVyaXQtaWYtcmVxdWlyZWQuanNcbi8vIG1vZHVsZSBpZCA9IDEwOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///108\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar toInteger = __webpack_require__(33);\nvar defined = __webpack_require__(32);\n\nmodule.exports = function repeat(count) {\n var str = String(defined(this));\n var res = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError(\"Count can't be negative\");\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;\n return res;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLXJlcGVhdC5qcz9jNDA3Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiByZXBlYXQoY291bnQpIHtcbiAgdmFyIHN0ciA9IFN0cmluZyhkZWZpbmVkKHRoaXMpKTtcbiAgdmFyIHJlcyA9ICcnO1xuICB2YXIgbiA9IHRvSW50ZWdlcihjb3VudCk7XG4gIGlmIChuIDwgMCB8fCBuID09IEluZmluaXR5KSB0aHJvdyBSYW5nZUVycm9yKFwiQ291bnQgY2FuJ3QgYmUgbmVnYXRpdmVcIik7XG4gIGZvciAoO24gPiAwOyAobiA+Pj49IDEpICYmIChzdHIgKz0gc3RyKSkgaWYgKG4gJiAxKSByZXMgKz0gc3RyO1xuICByZXR1cm4gcmVzO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLXJlcGVhdC5qc1xuLy8gbW9kdWxlIGlkID0gMTA5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///109\n")},function(module,exports){eval("// 20.2.2.28 Math.sign(x)\nmodule.exports = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1zaWduLmpzPzczMDkiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjI4IE1hdGguc2lnbih4KVxubW9kdWxlLmV4cG9ydHMgPSBNYXRoLnNpZ24gfHwgZnVuY3Rpb24gc2lnbih4KSB7XG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgcmV0dXJuICh4ID0gK3gpID09IDAgfHwgeCAhPSB4ID8geCA6IHggPCAwID8gLTEgOiAxO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1zaWduLmpzXG4vLyBtb2R1bGUgaWQgPSAxMTBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///110\n")},function(module,exports){eval("// 20.2.2.14 Math.expm1(x)\nvar $expm1 = Math.expm1;\nmodule.exports = (!$expm1\n // Old FF bug\n || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168\n // Tor Browser bug\n || $expm1(-2e-17) != -2e-17\n) ? function expm1(x) {\n return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;\n} : $expm1;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTExLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1leHBtMS5qcz9jN2JmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4xNCBNYXRoLmV4cG0xKHgpXG52YXIgJGV4cG0xID0gTWF0aC5leHBtMTtcbm1vZHVsZS5leHBvcnRzID0gKCEkZXhwbTFcbiAgLy8gT2xkIEZGIGJ1Z1xuICB8fCAkZXhwbTEoMTApID4gMjIwMjUuNDY1Nzk0ODA2NzE5IHx8ICRleHBtMSgxMCkgPCAyMjAyNS40NjU3OTQ4MDY3MTY1MTY4XG4gIC8vIFRvciBCcm93c2VyIGJ1Z1xuICB8fCAkZXhwbTEoLTJlLTE3KSAhPSAtMmUtMTdcbikgPyBmdW5jdGlvbiBleHBtMSh4KSB7XG4gIHJldHVybiAoeCA9ICt4KSA9PSAwID8geCA6IHggPiAtMWUtNiAmJiB4IDwgMWUtNiA/IHggKyB4ICogeCAvIDIgOiBNYXRoLmV4cCh4KSAtIDE7XG59IDogJGV4cG0xO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19tYXRoLWV4cG0xLmpzXG4vLyBtb2R1bGUgaWQgPSAxMTFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///111\n")},function(module,exports,__webpack_require__){eval("var toInteger = __webpack_require__(33);\nvar defined = __webpack_require__(32);\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLWF0LmpzP2UzZGEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHRvSW50ZWdlciA9IHJlcXVpcmUoJy4vX3RvLWludGVnZXInKTtcbnZh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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///112\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar LIBRARY = __webpack_require__(49);\nvar $export = __webpack_require__(0);\nvar redefine = __webpack_require__(19);\nvar hide = __webpack_require__(18);\nvar has = __webpack_require__(17);\nvar Iterators = __webpack_require__(63);\nvar $iterCreate = __webpack_require__(114);\nvar setToStringTag = __webpack_require__(61);\nvar getPrototypeOf = __webpack_require__(26);\nvar ITERATOR = __webpack_require__(8)('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = (!BUGGY && $native) || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXRlci1kZWZpbmUuanM/YjljZCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgTElCUkFSWSA9IHJlcXVpcmUoJy4vX2xpYnJhcnknKTtcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgcmVkZWZpbmUgPSByZXF1aXJlKCcuL19yZWRlZmluZScpO1xudmFyIGhpZGUgPSByZXF1aXJlKCcuL19oaWRlJyk7XG52YXIgaGFzID0gcmVxdWlyZSgnLi9faGFzJyk7XG52YXIgSXRlcmF0b3JzID0gcmVxdWlyZSgnLi9faXRlcmF0b3JzJyk7XG52YXIgJGl0ZXJDcmVhdGUgPSByZXF1aXJlKCcuL19pdGVyLWNyZWF0ZScpO1xudmFyIHNldFRvU3RyaW5nVGFnID0gcmVxdWlyZSgnLi9fc2V0LXRvLXN0cmluZy10YWcnKTtcbnZhciBnZX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b3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqIChCVUdHWSB8fCBWQUxVRVNfQlVHKSwgTkFNRSwgbWV0aG9kcyk7XG4gIH1cbiAgcmV0dXJuIG1ldGhvZHM7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pdGVyLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMTEzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///113\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar create = __webpack_require__(52);\nvar descriptor = __webpack_require__(47);\nvar setToStringTag = __webpack_require__(61);\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(18)(IteratorPrototype, __webpack_require__(8)('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXRlci1jcmVhdGUuanM/MjExMiJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgY3JlYXRlID0gcmVxdWlyZSgnLi9fb2JqZWN0LWNyZWF0ZScpO1xudmFyIGRlc2NyaXB0b3IgPSByZXF1aXJlKCcuL19wcm9wZXJ0eS1kZXNjJyk7XG52YXIgc2V0VG9TdHJpbmdUYWcgPSByZXF1aXJlKCcuL19zZXQtdG8tc3RyaW5nLXRhZycpO1xudmFyIEl0ZXJhdG9yUHJvdG90eXBlID0ge307XG5cbi8vIDI1LjEuMi4xLjEgJUl0ZXJhdG9yUHJvdG90eXBlJVtAQGl0ZXJhdG9yXSgpXG5yZXF1aXJlKCcuL19oaWRlJykoSXRlcmF0b3JQcm90b3R5cGUsIHJlcXVpcmUoJy4vX3drcycpKCdpdGVyYXRvcicpLCBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzOyB9KTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoQ29uc3RydWN0b3IsIE5BTUUsIG5leHQpIHtcbiAgQ29uc3RydWN0b3IucHJvdG90eXBlID0gY3JlYXRlKEl0ZXJhdG9yUHJvdG90eXBlLCB7IG5leHQ6IGRlc2NyaXB0b3IoMSwgbmV4dCkgfSk7XG4gIHNldFRvU3RyaW5nVGFnKENvbnN0cnVjdG9yLCBOQU1FICsgJyBJdGVyYXRvcicpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXRlci1jcmVhdGUuanNcbi8vIG1vZHVsZSBpZCA9IDExNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///114\n")},function(module,exports,__webpack_require__){eval("// helper for String#{startsWith, endsWith, includes}\nvar isRegExp = __webpack_require__(82);\nvar defined = __webpack_require__(32);\n\nmodule.exports = function (that, searchString, NAME) {\n if (isRegExp(searchString)) throw TypeError('String#' + NAME + \" doesn't accept regex!\");\n return String(defined(that));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLWNvbnRleHQuanM/OTJhYSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBoZWxwZXIgZm9yIFN0cmluZyN7c3RhcnRzV2l0aCwgZW5kc1dpdGgsIGluY2x1ZGVzfVxudmFyIGlzUmVnRXhwID0gcmVxdWlyZSgnLi9faXMtcmVnZXhwJyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAodGhhdCwgc2VhcmNoU3RyaW5nLCBOQU1FKSB7XG4gIGlmIChpc1JlZ0V4cChzZWFyY2hTdHJpbmcpKSB0aHJvdyBUeXBlRXJyb3IoJ1N0cmluZyMnICsgTkFNRSArIFwiIGRvZXNuJ3QgYWNjZXB0IHJlZ2V4IVwiKTtcbiAgcmV0dXJuIFN0cmluZyhkZWZpbmVkKHRoYXQpKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3N0cmluZy1jb250ZXh0LmpzXG4vLyBtb2R1bGUgaWQgPSAxMTVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///115\n")},function(module,exports,__webpack_require__){eval("var MATCH = __webpack_require__(8)('match');\nmodule.exports = function (KEY) {\n var re = /./;\n try {\n '/./'[KEY](re);\n } catch (e) {\n try {\n re[MATCH] = false;\n return !'/./'[KEY](re);\n } catch (f) { /* empty */ }\n } return true;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZmFpbHMtaXMtcmVnZXhwLmpzP2Q0NDQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIE1BVENIID0gcmVxdWlyZSgnLi9fd2tzJykoJ21hdGNoJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChLRVkpIHtcbiAgdmFyIHJlID0gLy4vO1xuICB0cnkge1xuICAgICcvLi8nW0tFWV0ocmUpO1xuICB9IGNhdGNoIChlKSB7XG4gICAgdHJ5IHtcbiAgICAgIHJlW01BVENIXSA9IGZhbHNlO1xuICAgICAgcmV0dXJuICEnLy4vJ1tLRVldKHJlKTtcbiAgICB9IGNhdGNoIChmKSB7IC8qIGVtcHR5ICovIH1cbiAgfSByZXR1cm4gdHJ1ZTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2ZhaWxzLWlzLXJlZ2V4cC5qc1xuLy8gbW9kdWxlIGlkID0gMTE2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///116\n")},function(module,exports,__webpack_require__){eval("// check on default Array iterator\nvar Iterators = __webpack_require__(63);\nvar ITERATOR = __webpack_require__(8)('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXMtYXJyYXktaXRlci5qcz9mNmY2Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGNoZWNrIG9uIGRlZmF1bHQgQXJyYXkgaXRlcmF0b3JcbnZhciBJdGVyYXRvcnMgPSByZXF1aXJlKCcuL19pdGVyYXRvcnMnKTtcbnZhciBJVEVSQVRPUiA9IHJlcXVpcmUoJy4vX3drcycpKCdpdGVyYXRvcicpO1xudmFyIEFycmF5UHJvdG8gPSBBcnJheS5wcm90b3R5cGU7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBpdCAhPT0gdW5kZWZpbmVkICYmIChJdGVyYXRvcnMuQXJyYXkgPT09IGl0IHx8IEFycmF5UHJvdG9bSVRFUkFUT1JdID09PSBpdCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1hcnJheS1pdGVyLmpzXG4vLyBtb2R1bGUgaWQgPSAxMTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///117\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $defineProperty = __webpack_require__(11);\nvar createDesc = __webpack_require__(47);\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fY3JlYXRlLXByb3BlcnR5LmpzPzZkMjMiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRkZWZpbmVQcm9wZXJ0eSA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpO1xudmFyIGNyZWF0ZURlc2MgPSByZXF1aXJlKCcuL19wcm9wZXJ0eS1kZXNjJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKG9iamVjdCwgaW5kZXgsIHZhbHVlKSB7XG4gIGlmIChpbmRleCBpbiBvYmplY3QpICRkZWZpbmVQcm9wZXJ0eS5mKG9iamVjdCwgaW5kZXgsIGNyZWF0ZURlc2MoMCwgdmFsdWUpKTtcbiAgZWxzZSBvYmplY3RbaW5kZXhdID0gdmFsdWU7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19jcmVhdGUtcHJvcGVydHkuanNcbi8vIG1vZHVsZSBpZCA9IDExOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///118\n")},function(module,exports,__webpack_require__){eval("var classof = __webpack_require__(72);\nvar ITERATOR = __webpack_require__(8)('iterator');\nvar Iterators = __webpack_require__(63);\nmodule.exports = __webpack_require__(30).getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTE5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9jb3JlLmdldC1pdGVyYXRvci1tZXRob2QuanM/NDg3NyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY2xhc3NvZiA9IHJlcXVpcmUoJy4vX2NsYXNzb2YnKTtcbnZhciBJVEVSQVRPUiA9IHJlcXVpcmUoJy4vX3drcycpKCdpdGVyYXRvcicpO1xudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4vX2l0ZXJhdG9ycycpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL19jb3JlJykuZ2V0SXRlcmF0b3JNZXRob2QgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKGl0ICE9IHVuZGVmaW5lZCkgcmV0dXJuIGl0W0lURVJBVE9SXVxuICAgIHx8IGl0WydAQGl0ZXJhdG9yJ11cbiAgICB8fCBJdGVyYXRvcnNbY2xhc3NvZihpdCldO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9jb3JlLmdldC1pdGVyYXRvci1tZXRob2QuanNcbi8vIG1vZHVsZSBpZCA9IDExOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///119\n")},function(module,exports,__webpack_require__){eval("// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = __webpack_require__(305);\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktc3BlY2llcy1jcmVhdGUuanM/YTY1NCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA5LjQuMi4zIEFycmF5U3BlY2llc0NyZWF0ZShvcmlnaW5hbEFycmF5LCBsZW5ndGgpXG52YXIgc3BlY2llc0NvbnN0cnVjdG9yID0gcmVxdWlyZSgnLi9fYXJyYXktc3BlY2llcy1jb25zdHJ1Y3RvcicpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChvcmlnaW5hbCwgbGVuZ3RoKSB7XG4gIHJldHVybiBuZXcgKHNwZWNpZXNDb25zdHJ1Y3RvcihvcmlnaW5hbCkpKGxlbmd0aCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hcnJheS1zcGVjaWVzLWNyZWF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMTIwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///120\n")},function(module,exports,__webpack_require__){"use strict";eval("// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\n\nvar toObject = __webpack_require__(15);\nvar toAbsoluteIndex = __webpack_require__(51);\nvar toLength = __webpack_require__(12);\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var aLen = arguments.length;\n var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);\n var end = aLen > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktZmlsbC5qcz9jYzI2Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIyLjEuMy42IEFycmF5LnByb3RvdHlwZS5maWxsKHZhbHVlLCBzdGFydCA9IDAsIGVuZCA9IHRoaXMubGVuZ3RoKVxuJ3VzZSBzdHJpY3QnO1xudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgdG9BYnNvbHV0ZUluZGV4ID0gcmVxdWlyZSgnLi9fdG8tYWJzb2x1dGUtaW5kZXgnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4vX3RvLWxlbmd0aCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBmaWxsKHZhbHVlIC8qICwgc3RhcnQgPSAwLCBlbmQgPSBAbGVuZ3RoICovKSB7XG4gIHZhciBPID0gdG9PYmplY3QodGhpcyk7XG4gIHZhciBsZW5ndGggPSB0b0xlbmd0aChPLmxlbmd0aCk7XG4gIHZhciBhTGVuID0gYXJndW1lbnRzLmxlbmd0aDtcbiAgdmFyIGluZGV4ID0gdG9BYnNvbHV0ZUluZGV4KGFMZW4gPiAxID8gYXJndW1lbnRzWzFdIDogdW5kZWZpbmVkLCBsZW5ndGgpO1xuICB2YXIgZW5kID0gYUxlbiA+IDIgPyBhcmd1bWVudHNbMl0gOiB1bmRlZmluZWQ7XG4gIHZhciBlbmRQb3MgPSBlbmQgPT09IHVuZGVmaW5lZCA/IGxlbmd0aCA6IHRvQWJzb2x1dGVJbmRleChlbmQsIGxlbmd0aCk7XG4gIHdoaWxlIChlbmRQb3MgPiBpbmRleCkgT1tpbmRleCsrXSA9IHZhbHVlO1xuICByZXR1cm4gTztcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2FycmF5LWZpbGwuanNcbi8vIG1vZHVsZSBpZCA9IDEyMVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///121\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar addToUnscopables = __webpack_require__(43);\nvar step = __webpack_require__(165);\nvar Iterators = __webpack_require__(63);\nvar toIObject = __webpack_require__(24);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(113)(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuaXRlcmF0b3IuanM/NWEwNCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgYWRkVG9VbnNjb3BhYmxlcyA9IHJlcXVpcmUoJy4vX2FkZC10by11bnNjb3BhYmxlcycpO1xudmFyIHN0ZXAgPSByZXF1aXJlKCcuL19pdGVyLXN0ZXAnKTtcbnZhciBJdGVyYXRvcnMgPSByZXF1aXJlKCcuL19pdGVyYXRvcnMnKTtcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG5cbi8vIDIyLjEuMy40IEFycmF5LnByb3RvdHlwZS5lbnRyaWVzKClcbi8vIDIyLjEuMy4xMyBBcnJheS5wcm90b3R5cGUua2V5cygpXG4vLyAyMi4xLjMuMjkgQXJyYXkucHJvdG90eXBl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VlcycpO1xuYWRkVG9VbnNjb3BhYmxlcygnZW50cmllcycpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5hcnJheS5pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gMTIyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///122\n")},function(module,exports,__webpack_require__){eval("var ctx = __webpack_require__(27);\nvar invoke = __webpack_require__(155);\nvar html = __webpack_require__(105);\nvar cel = __webpack_require__(101);\nvar global = __webpack_require__(4);\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (__webpack_require__(28)(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdGFzay5qcz80OWU4Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBjdHggPSByZXF1aXJlKCcuL19jdHgnKTtcbnZhciBpbnZva2UgPSByZXF1aXJlKCcuL19pbnZva2UnKTtcbnZhciBodG1sID0gcmVxdWlyZSgnLi9faHRtbCcpO1xudmFyIGNlbCA9IHJlcXVpcmUoJy4vX2RvbS1jcmVhdGUnKTtcbnZhciBnbG9iYWwgPSByZXF1aXJl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vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdGFzay5qc1xuLy8gbW9kdWxlIGlkID0gMTIzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///123\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar macrotask = __webpack_require__(123).set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = __webpack_require__(28)(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n var promise = Promise.resolve();\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWljcm90YXNrLmpzPzgzN2UiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIG1hY3JvdGFzayA9IHJlcXVpcmUoJy4vX3Rhc2snKS5zZXQ7XG52YXIgT2JzZXJ2ZXIgPSBnbG9iYWwuTXV0YXRpb25PYnNlcnZlciB8fCBnbG9iYWwuV2ViS2l0TXV0YXRpb25PYnNlcnZlcjtcbnZhciBwcm9jZXNzID0gZ2xvYmFsLnByb2Nlc3M7XG52YXIgUHJvbWlzZSA9IGdsb2JhbC5Qcm9taXNlO1xudmFyIGl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pbmVkIH07XG4gICAgaWYgKGxhc3QpIGxhc3QubmV4dCA9IHRhc2s7XG4gICAgaWYgKCFoZWFkKSB7XG4gICAgICBoZWFkID0gdGFzaztcbiAgICAgIG5vdGlmeSgpO1xuICAgIH0gbGFzdCA9IHRhc2s7XG4gIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19taWNyb3Rhc2suanNcbi8vIG1vZHVsZSBpZCA9IDEyNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///124\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = __webpack_require__(16);\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbmV3LXByb21pc2UtY2FwYWJpbGl0eS5qcz9jM2EwIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDI1LjQuMS41IE5ld1Byb21pc2VDYXBhYmlsaXR5KEMpXG52YXIgYUZ1bmN0aW9uID0gcmVxdWlyZSgnLi9fYS1mdW5jdGlvbicpO1xuXG5mdW5jdGlvbiBQcm9taXNlQ2FwYWJpbGl0eShDKSB7XG4gIHZhciByZXNvbHZlLCByZWplY3Q7XG4gIHRoaXMucHJvbWlzZSA9IG5ldyBDKGZ1bmN0aW9uICgkJHJlc29sdmUsICQkcmVqZWN0KSB7XG4gICAgaWYgKHJlc29sdmUgIT09IHVuZGVmaW5lZCB8fCByZWplY3QgIT09IHVuZGVmaW5lZCkgdGhyb3cgVHlwZUVycm9yKCdCYWQgUHJvbWlzZSBjb25zdHJ1Y3RvcicpO1xuICAgIHJlc29sdmUgPSAkJHJlc29sdmU7XG4gICAgcmVqZWN0ID0gJCRyZWplY3Q7XG4gIH0pO1xuICB0aGlzLnJlc29sdmUgPSBhRnVuY3Rpb24ocmVzb2x2ZSk7XG4gIHRoaXMucmVqZWN0ID0gYUZ1bmN0aW9uKHJlamVjdCk7XG59XG5cbm1vZHVsZS5leHBvcnRzLmYgPSBmdW5jdGlvbiAoQykge1xuICByZXR1cm4gbmV3IFByb21pc2VDYXBhYmlsaXR5KEMpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbmV3LXByb21pc2UtY2FwYWJpbGl0eS5qc1xuLy8gbW9kdWxlIGlkID0gMTI1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///125\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar global = __webpack_require__(4);\nvar DESCRIPTORS = __webpack_require__(10);\nvar LIBRARY = __webpack_require__(49);\nvar $typed = __webpack_require__(88);\nvar hide = __webpack_require__(18);\nvar redefineAll = __webpack_require__(57);\nvar fails = __webpack_require__(5);\nvar anInstance = __webpack_require__(55);\nvar toInteger = __webpack_require__(33);\nvar toLength = __webpack_require__(12);\nvar toIndex = __webpack_require__(174);\nvar gOPN = __webpack_require__(53).f;\nvar dP = __webpack_require__(11).f;\nvar arrayFill = __webpack_require__(121);\nvar setToStringTag = __webpack_require__(61);\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length!';\nvar WRONG_INDEX = 'Wrong index!';\nvar $ArrayBuffer = global[ARRAY_BUFFER];\nvar $DataView = global[DATA_VIEW];\nvar Math = global.Math;\nvar RangeError = global.RangeError;\n// eslint-disable-next-line no-shadow-restricted-names\nvar Infinity = global.Infinity;\nvar BaseBuffer = $ArrayBuffer;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\nvar BUFFER = 'buffer';\nvar BYTE_LENGTH = 'byteLength';\nvar BYTE_OFFSET = 'byteOffset';\nvar $BUFFER = DESCRIPTORS ? '_b' : BUFFER;\nvar $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;\nvar $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;\n\n// IEEE754 conversions based on https://github.com/feross/ieee754\nfunction packIEEE754(value, mLen, nBytes) {\n var buffer = new Array(nBytes);\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var i = 0;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n var e, m, c;\n value = abs(value);\n // eslint-disable-next-line no-self-compare\n if (value != value || value === Infinity) {\n // eslint-disable-next-line no-self-compare\n m = value != value ? 1 : 0;\n e = eMax;\n } else {\n e = floor(log(value) / LN2);\n if (value * (c = pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * pow(2, eBias - 1) * pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);\n buffer[--i] |= s * 128;\n return buffer;\n}\nfunction unpackIEEE754(buffer, mLen, nBytes) {\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = eLen - 7;\n var i = nBytes - 1;\n var s = buffer[i--];\n var e = s & 127;\n var m;\n s >>= 7;\n for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : s ? -Infinity : Infinity;\n } else {\n m = m + pow(2, mLen);\n e = e - eBias;\n } return (s ? -1 : 1) * m * pow(2, e - mLen);\n}\n\nfunction unpackI32(bytes) {\n return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];\n}\nfunction packI8(it) {\n return [it & 0xff];\n}\nfunction packI16(it) {\n return [it & 0xff, it >> 8 & 0xff];\n}\nfunction packI32(it) {\n return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];\n}\nfunction packF64(it) {\n return packIEEE754(it, 52, 8);\n}\nfunction packF32(it) {\n return packIEEE754(it, 23, 4);\n}\n\nfunction addGetter(C, key, internal) {\n dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });\n}\n\nfunction get(view, bytes, index, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = store.slice(start, start + bytes);\n return isLittleEndian ? pack : pack.reverse();\n}\nfunction set(view, bytes, index, conversion, value, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = conversion(+value);\n for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];\n}\n\nif (!$typed.ABV) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n this._b = arrayFill.call(new Array(byteLength), 0);\n this[$LENGTH] = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = buffer[$LENGTH];\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n this[$BUFFER] = buffer;\n this[$OFFSET] = offset;\n this[$LENGTH] = byteLength;\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, BYTE_LENGTH, '_l');\n addGetter($DataView, BUFFER, '_b');\n addGetter($DataView, BYTE_LENGTH, '_l');\n addGetter($DataView, BYTE_OFFSET, '_o');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1]));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packF32, value, arguments[2]);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packF64, value, arguments[2]);\n }\n });\n} else {\n if (!fails(function () {\n $ArrayBuffer(1);\n }) || !fails(function () {\n new $ArrayBuffer(-1); // eslint-disable-line no-new\n }) || fails(function () {\n new $ArrayBuffer(); // eslint-disable-line no-new\n new $ArrayBuffer(1.5); // eslint-disable-line no-new\n new $ArrayBuffer(NaN); // eslint-disable-line no-new\n return $ArrayBuffer.name != ARRAY_BUFFER;\n })) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new BaseBuffer(toIndex(length));\n };\n var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];\n for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);\n }\n if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;\n }\n // iOS Safari 7.x bug\n var view = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataView[PROTOTYPE].setInt8;\n view.setInt8(0, 2147483648);\n view.setInt8(1, 2147483649);\n if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, true);\n}\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\nhide($DataView[PROTOTYPE], $typed.VIEW, true);\nexports[ARRAY_BUFFER] = $ArrayBuffer;\nexports[DATA_VIEW] = $DataView;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdHlwZWQtYnVmZmVyLmpzPzJlYjciXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIERFU0NSSVBUT1JTID0gcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKTtcbnZhciBMSUJSQVJZID0gcmVxdWlyZSgnLi9fbGlicmFyeScpO1xudmFyICR0eXBlZCA9IHJlcXVpcmUoJy4vX3R5cGVkJyk7XG52YXIgaGlkZSA9IHJlcXVpcmUoJy4vX2hpZGUnKTtcbnZhciByZWRlZmluZUFsbCA9IHJlcXVpcmUoJy4vX3JlZGVmaW5lLWFsbCcpO1xudmFyIGZhaWxzID0gcmVxdWlyZSgnLi9fZmFpbHMnKTtcbnZhciBhbkluc3RhbmNlID0gcmVxdWlyZSgnLi9fYW4taW5zdGFuY2UnKTtcbnZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgdG9MZW5ndGggPSByZXF1aXJlKCcuL190by1sZW5ndGgnKTtcbnZhciB0b0luZGV4ID0gcmVxdWlyZSgnLi9fdG8taW5kZXgnKTtcbnZhciBnT1BOID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcG4nKS5mO1xudmFyIGRQID0gcmVxdWlyZS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BQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///126\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar navigator = global.navigator;\n\nmodule.exports = navigator && navigator.userAgent || '';\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdXNlci1hZ2VudC5qcz9lMzVjIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBuYXZpZ2F0b3IgPSBnbG9iYWwubmF2aWdhdG9yO1xuXG5tb2R1bGUuZXhwb3J0cyA9IG5hdmlnYXRvciAmJiBuYXZpZ2F0b3IudXNlckFnZW50IHx8ICcnO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL191c2VyLWFnZW50LmpzXG4vLyBtb2R1bGUgaWQgPSAxMjdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///127\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $at = __webpack_require__(417)(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\n__webpack_require__(183)(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5zdHJpbmcuaXRlcmF0b3IuanM/Y2QwNCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGF0ID0gcmVxdWlyZSgnLi9fc3RyaW5nLWF0JykodHJ1ZSk7XG5cbi8vIDIxLjEuMy4yNyBTdHJpbmcucHJvdG90eXBlW0BAaXRlcmF0b3JdKClcbnJlcXVpcmUoJy4vX2l0ZXItZGVmaW5lJykoU3RyaW5nLCAnU3RyaW5nJywgZnVuY3Rpb24gKGl0ZXJhdGVkKSB7XG4gIHRoaXMuX3QgPSBTdHJpbmcoaXRlcmF0ZWQpOyAvLyB0YXJnZXRcbiAgdGhpcy5faSA9IDA7ICAgICAgICAgICAgICAgIC8vIG5leHQgaW5kZXhcbi8vIDIxLjEuNS4yLjEgJVN0cmluZ0l0ZXJhdG9yUHJvdG90eXBlJS5uZXh0KClcbn0sIGZ1bmN0aW9uICgpIHtcbiAgdmFyIE8gPSB0aGlzLl90O1xuICB2YXIgaW5kZXggPSB0aGlzLl9pO1xuICB2YXIgcG9pbnQ7XG4gIGlmIChpbmRleCA+PSBPLmxlbmd0aCkgcmV0dXJuIHsgdmFsdWU6IHVuZGVmaW5lZCwgZG9uZTogdHJ1ZSB9O1xuICBwb2ludCA9ICRhdChPLCBpbmRleCk7XG4gIHRoaXMuX2kgKz0gcG9pbnQubGVuZ3RoO1xuICByZXR1cm4geyB2YWx1ZTogcG9pbnQsIGRvbmU6IGZhbHNlIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5zdHJpbmcuaXRlcmF0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDEyOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///128\n")},function(module,exports){eval("// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1pbnRlZ2VyLmpzPzUyZTEiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4xLjQgVG9JbnRlZ2VyXG52YXIgY2VpbCA9IE1hdGguY2VpbDtcbnZhciBmbG9vciA9IE1hdGguZmxvb3I7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXNOYU4oaXQgPSAraXQpID8gMCA6IChpdCA+IDAgPyBmbG9vciA6IGNlaWwpKGl0KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fdG8taW50ZWdlci5qc1xuLy8gbW9kdWxlIGlkID0gMTI5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///129\n")},function(module,exports){eval('// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError("Can\'t call method on " + it);\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19kZWZpbmVkLmpzP2U3NjgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4yLjEgUmVxdWlyZU9iamVjdENvZXJjaWJsZShhcmd1bWVudClcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIGlmIChpdCA9PSB1bmRlZmluZWQpIHRocm93IFR5cGVFcnJvcihcIkNhbid0IGNhbGwgbWV0aG9kIG9uICBcIiArIGl0KTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19kZWZpbmVkLmpzXG4vLyBtb2R1bGUgaWQgPSAxMzBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///130\n')},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(36);\nvar document = __webpack_require__(22).document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19kb20tY3JlYXRlLmpzPzM4ZGQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgZG9jdW1lbnQgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5kb2N1bWVudDtcbi8vIHR5cGVvZiBkb2N1bWVudC5jcmVhdGVFbGVtZW50IGlzICdvYmplY3QnIGluIG9sZCBJRVxudmFyIGlzID0gaXNPYmplY3QoZG9jdW1lbnQpICYmIGlzT2JqZWN0KGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIGlzID8gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChpdCkgOiB7fTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZG9tLWNyZWF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMTMxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///131\n")},function(module,exports,__webpack_require__){eval("// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = __webpack_require__(36);\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1wcmltaXRpdmUuanM/MzI2MyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjEuMSBUb1ByaW1pdGl2ZShpbnB1dCBbLCBQcmVmZXJyZWRUeXBlXSlcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xuLy8gaW5zdGVhZCBvZiB0aGUgRVM2IHNwZWMgdmVyc2lvbiwgd2UgZGlkbid0IGltcGxlbWVudCBAQHRvUHJpbW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2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = __webpack_require__(41);\nvar dPs = __webpack_require__(419);\nvar enumBugKeys = __webpack_require__(137);\nvar IE_PROTO = __webpack_require__(135)('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(131)('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n __webpack_require__(188).appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtY3JlYXRlLmpzPzYyODYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjIgLyAxNS4yLjMuNSBPYmplY3QuY3JlYXRlKE8gWywgUHJvcGVydGllc10pXG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnK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DAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///133\n")},function(module,exports,__webpack_require__){eval("// 7.1.15 ToLength\nvar toInteger = __webpack_require__(129);\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1sZW5ndGguanM/NDExMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjEuMTUgVG9MZW5ndGhcbnZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgbWluID0gTWF0aC5taW47XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXQgPiAwID8gbWluKHRvSW50ZWdlcihpdCksIDB4MWZmZmZmZmZmZmZmZmYpIDogMDsgLy8gcG93KDIsIDUzKSAtIDEgPT0gOTAwNzE5OTI1NDc0MDk5MVxufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1sZW5ndGguanNcbi8vIG1vZHVsZSBpZCA9IDEzNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///134\n")},function(module,exports,__webpack_require__){eval("var shared = __webpack_require__(136)('keys');\nvar uid = __webpack_require__(94);\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zaGFyZWQta2V5LmpzPzZiMWQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHNoYXJlZCA9IHJlcXVpcmUoJy4vX3NoYXJlZCcpKCdrZXlzJyk7XG52YXIgdWlkID0gcmVxdWlyZSgnLi9fdWlkJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChrZXkpIHtcbiAgcmV0dXJuIHNoYXJlZFtrZXldIHx8IChzaGFyZWRba2V5XSA9IHVpZChrZXkpKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fc2hhcmVkLWtleS5qc1xuLy8gbW9kdWxlIGlkID0gMTM1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///135\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(22);\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zaGFyZWQuanM/N2JjMCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgU0hBUkVEID0gJ19fY29yZS1qc19zaGFyZWRfXyc7XG52YXIgc3RvcmUgPSBnbG9iYWxbU0hBUkVEXSB8fCAoZ2xvYmFsW1NIQVJFRF0gPSB7fSk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChrZXkpIHtcbiAgcmV0dXJuIHN0b3JlW2tleV0gfHwgKHN0b3JlW2tleV0gPSB7fSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NoYXJlZC5qc1xuLy8gbW9kdWxlIGlkID0gMTM2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///136\n")},function(module,exports){eval("// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19lbnVtLWJ1Zy1rZXlzLmpzP2M2NzciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gSUUgOC0gZG9uJ3QgZW51bSBidWcga2V5c1xubW9kdWxlLmV4cG9ydHMgPSAoXG4gICdjb25zdHJ1Y3RvcixoYXNPd25Qcm9wZXJ0eSxpc1Byb3RvdHlwZU9mLHByb3BlcnR5SXNFbnVtZXJhYmxlLHRvTG9jYWxlU3RyaW5nLHRvU3RyaW5nLHZhbHVlT2YnXG4pLnNwbGl0KCcsJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZW51bS1idWcta2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gMTM3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///137\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = __webpack_require__(93);\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM4LmpzIiwic291cmNlcyI6WyJ3ZWJwYW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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///138\n")},function(module,exports){eval("exports.f = Object.getOwnPropertySymbols;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTM5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wcy5qcz9kNjQ0Il0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydHMuZiA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWdvcHMuanNcbi8vIG1vZHVsZSBpZCA9IDEzOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///139\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nvar runtimeUtils = exports.runtimeUtils = {\n runtimeDescriptor: {},\n runtimeCapabilities: {\n constraints: {}\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL3J1bnRpbWVVdGlscy5qcz9iYWE0Il0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBsZXQgcnVudGltZVV0aWxzID0ge1xuICBydW50aW1lRGVzY3JpcHRvcjoge30sXG4gIHJ1bnRpbWVDYXBhYmlsaXRpZXM6IHtcbiAgICBjb25zdHJhaW50czoge31cbiAgfVxufTtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvcnVudGltZS9ydW50aW1lVXRpbHMuanMiXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFEQTtBQUZBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///140\n')},function(module,exports,__webpack_require__){eval("exports.f = __webpack_require__(23);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL193a3MtZXh0LmpzPzJhMWUiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0cy5mID0gcmVxdWlyZSgnLi9fd2tzJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fd2tzLWV4dC5qc1xuLy8gbW9kdWxlIGlkID0gMTQxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///141\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(22);\nvar core = __webpack_require__(13);\nvar LIBRARY = __webpack_require__(92);\nvar wksExt = __webpack_require__(141);\nvar defineProperty = __webpack_require__(40).f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL193a3MtZGVmaW5lLmpzPzcyYjkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIGNvcmUgPSByZXF1aXJlKCcuL19jb3JlJyk7XG52YXIgTElCUkFSWSA9IHJlcXVpcmUoJy4vX2xpYnJhcnknKTtcbnZhciB3a3NFeHQgPSByZXF1aXJlKCcuL193a3MtZXh0Jyk7XG52YXIgZGVmaW5lUHJvcGVydHkgPSByZXF1aXJlKCcuL19vYmplY3QtZHAnKS5mO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAobmFtZSkge1xuICB2YXIgJFN5bWJvbCA9IGNvcmUuU3ltYm9sIHx8IChjb3JlLlN5bWJvbCA9IExJQlJBUlkgPyB7fSA6IGdsb2JhbC5TeW1ib2wgfHwge30pO1xuICBpZiAobmFtZS5jaGFyQXQoMCkgIT0gJ18nICYmICEobmFtZSBpbiAkU3ltYm9sKSkgZGVmaW5lUHJvcGVydHkoJFN5bWJvbCwgbmFtZSwgeyB2YWx1ZTogd2tzRXh0LmYobmFtZSkgfSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy1kZWZpbmUuanNcbi8vIG1vZHVsZSBpZCA9IDE0MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///142\n")},function(module,exports,__webpack_require__){eval("var pIE = __webpack_require__(77);\nvar createDesc = __webpack_require__(73);\nvar toIObject = __webpack_require__(45);\nvar toPrimitive = __webpack_require__(132);\nvar has = __webpack_require__(59);\nvar IE8_DOM_DEFINE = __webpack_require__(184);\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = __webpack_require__(44) ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wZC5qcz8yY2E2Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBwSUUgPSByZXF1aXJlKCcuL19vYmplY3QtcGllJyk7XG52YXIgY3JlYXRlRGVzYyA9IHJlcXVpcmUoJy4vX3Byb3BlcnR5LWRlc2MnKTtcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgdG9QcmltaXRpdmUgPSByZXF1aXJlKCcuL190by1wcmltaXRpdmUnKTtcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciBJRThfRE9NX0RFRklORSA9IHJlcXVpcmUoJy4vX2llOC1kb20tZGVmaW5lJyk7XG52YXIgZ09QRCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3I7XG5cbmV4cG9ydHMuZiA9IHJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgPyBnT1BEIDogZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKE8sIFApIHtcbiAgTyA9IHRvSU9iamVjdChPKTtcbiAgUCA9IHRvUHJpbWl0aXZlKFAsIHRydWUpO1xuICBpZiAoSUU4X0RPTV9ERUZJTkUpIHRyeSB7XG4gICAgcmV0dXJuIGdPUEQoTywgUCk7XG4gIH0gY2F0Y2ggKGUpIHsgLyogZW1wdHkgKi8gfVxuICBpZiAoaGFzKE8sIFApKSByZXR1cm4gY3JlYXRlRGVzYyghcElFLmYuY2FsbChPLCBQKSwgT1tQXSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1nb3BkLmpzXG4vLyBtb2R1bGUgaWQgPSAxNDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///143\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar runtimeConfiguration = exports.runtimeConfiguration = {\n\n // TODO this should be changed with the definition used for indexeddb\n // look at: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore\n // Now we are using the definition for Dexie; (http://dexie.org/docs/Version/Version.stores())\n storageSchemas: {\n capabilities: {\n capabilities: 'key,version,value'\n },\n subscriptions: {\n subscriptions: 'key,version,value'\n },\n runtime: {\n 'runtime:URL': 'key,version,value',\n 'p2pHandler:URL': 'key,version,value'\n },\n registry: {\n 'registry:DataObjectURLs': 'key,version,value',\n 'registry:HypertyURLs': 'key,version,value'\n },\n cryptoManager: {\n userAsymmetricKey: 'key,version,value',\n dataObjectSessionKeys: 'key,version,value'\n },\n identity: {\n accessTokens: 'key,version,value',\n identities: 'userURL, userProfile.email, userProfile.userURL, userProfile.name'\n },\n runtimeCatalogue: {\n runtimeCatalogue: '&cguid, accessControlPolicy, constraints, dataObjects, hypertyType, objectName, sourcePackage, version'\n },\n policy: {\n 'rethink:activePolicy': 'key,version,value',\n 'rethink:groups': 'key,version,value',\n 'rethink:userPolicies': 'key,version,value',\n 'rethink:spPolicies': 'key,version,value'\n },\n syncherManager: {\n 'syncherManager:ObjectURLs': 'key,version,value'\n },\n hypertyResources: {\n hypertyResources: '&resourceURL, name, contentUrl, content, created, reporter, resourceType'\n }\n },\n\n runtimeURLS: {\n registry: {\n prefix: 'hyperty-runtime://',\n suffix: 'registry'\n },\n identityModule: {\n prefix: 'hyperty-runtime://',\n suffix: '/idm'\n },\n runtimeUA: {\n prefix: 'hyperty-runtime://',\n suffix: '/ua'\n },\n catalogue: {\n prefix: 'hyperty-runtime://',\n suffix: '/catalogue'\n },\n graphConnector: {\n prefix: 'hyperty-runtime://',\n suffix: '/graph'\n },\n syncManager: {\n prefix: 'hyperty-runtime://',\n suffix: '/sm'\n }\n },\n catalogueURLs: {\n protocolstub: {\n prefix: 'hyperty-catalogue://catalogue.',\n suffix: '/.well-known/protocolstub/',\n fallback: 'hyperty-catalogue://catalogue.%domain%/.well-known/protocolstub/'\n },\n idpProxy: {\n prefix: 'hyperty-catalogue://catalogue.',\n suffix: '/.well-known/idp-proxy/',\n fallback: 'hyperty-catalogue://catalogue.%domain%/.well-known/idp-proxy/'\n }\n },\n msgNodeURL: {\n prefix: 'domain://msg-node.',\n suffix: '',\n hypertyAddressAllocation: '/hyperty-address-allocation',\n objectAddressAllocation: '/object-address-allocation',\n subscriptionManagement: '/sm'\n },\n domainRegistryURL: {\n prefix: 'domain://registry.',\n suffix: ''\n },\n globalRegistryURL: 'global://registry.'\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL3J1bnRpbWVDb25maWd1cmF0aW9uLmpzPzZiMWIiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IHJ1bnRpbWVDb25maWd1cmF0aW9uID0ge1xuXG4gIC8vIFRPRE8gdGhpcyBzaG91bGQgYmUgY2hhbmdlZCB3aXRoIHRoZSBkZWZpbml0aW9uIHVzZWQgZm9yIGluZGV4ZWRkYlxuICAvLyBsb29rIGF0OiBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9BUEkvSURCT2JqZWN0U3RvcmVcbiAgLy8gTm93IHdlIGFyZSB1c2luZyB0aGUgZGVmaW5pdGlvbiBmb3IgRGV4aWU7IChodHRwOi8vZGV4aWUub3JnL2RvY3MvVmVyc2lvbi9WZXJzaW9uLnN0b3JlcygpKVxuICBzdG9yYWdlU2NoZW1hczoge1xuICAgIGNhcGFiaWxpdGllczoge1xuICAgICAgY2FwYWJpbGl0aWVzOiAna2V5LHZlcnNpb24sdmFsdWUnXG4gICAgfSxcbiAgICBzdWJzY3JpcHRpb25zOiB7XG4gICAgICBzdWJzY3JpcHRpb25zOiAna2V5LHZlcnNpb24sdmFsdWUnXG4gICAgfSxcbiAgICBydW50aW1lOiB7XG4gICAgICAncnVudGltZTpVUkwnOiAna2V5LHZlcnNpb24sdmFsdWUnLFxuICAgICAgJ3AycEhhbmRsZXI6VVJMJzogJ2tleSx2ZXJzaW9uLHZhbHVlJ1xuICAgIH0sXG4gICAgcmVnaXN0cnk6IHtcbiAgICAgICdyZWdpc3RyeTpEYXRhT2JqZWN0VVJMcyc6ICdrZXksdmVyc2lvbix2YWx1ZScsXG4gICAgICAncmVnaXN0cnk6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BRkE7QUFJQTtBQUNBO0FBQ0E7QUFGQTtBQUlBO0FBQ0E7QUFDQTtBQUZBO0FBSUE7QUFDQTtBQUNBO0FBRkE7QUFJQTtBQUNBO0FBREE7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBSkE7QUFNQTtBQUNBO0FBREE7QUFHQTtBQUNBO0FBREE7QUFuQ0E7QUFDQTtBQXVDQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBSUE7QUFDQTtBQUNBO0FBRkE7QUFJQTtBQUNBO0FBQ0E7QUFGQTtBQUlBO0FBQ0E7QUFDQTtBQUZBO0FBSUE7QUFDQTtBQUNBO0FBRkE7QUFJQTtBQUNBO0FBQ0E7QUFGQTtBQXJCQTtBQTBCQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBSEE7QUFLQTtBQUNBO0FBQ0E7QUFDQTtBQUhBO0FBTkE7QUFZQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFMQTtBQU9BO0FBQ0E7QUFDQTtBQUZBO0FBSUE7QUE5RkEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///144\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Operators = function () {\n function Operators() {\n (0, _classCallCheck3.default)(this, Operators);\n }\n\n (0, _createClass3.default)(Operators, [{\n key: 'and',\n value: function and(params) {\n return params[0] && params[1];\n }\n }, {\n key: 'between',\n value: function between(params) {\n var start = parseInt(params[0][0]);\n var end = parseInt(params[0][1]);\n var now = params[1];\n\n if (end < start) {\n now = now < start ? now += 2400 : now;\n end += 2400;\n }\n\n return now > start && now < end;\n }\n }, {\n key: 'equals',\n value: function equals(params) {\n return String(params[0]) === '*' || String(params[0]) === String(params[1]);\n }\n }, {\n key: 'greaterThan',\n value: function greaterThan(params) {\n return params[1] > params[0];\n }\n }, {\n key: 'in',\n value: function _in(params) {\n return params[0].indexOf(params[1]) > -1;\n }\n }, {\n key: 'lessThan',\n value: function lessThan(params) {\n return params[1] < params[0];\n }\n }, {\n key: 'not',\n value: function not(params) {\n return !params[0];\n }\n }, {\n key: 'or',\n value: function or(params) {\n return params[0] || params[1];\n }\n }]);\n return Operators;\n}();\n\nexports.default = Operators;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvT3BlcmF0b3JzLmpzPzFjNDIiXSwic291cmNlc0NvbnRlbnQiOlsiY2xhc3MgT3BlcmF0b3JzIHtcblxuICBhbmQocGFyYW1zKSB7XG4gICAgcmV0dXJuIHBhcmFtc1swXSAmJiBwYXJhbXNbMV07XG4gIH1cblxuICBiZXR3ZWVuKHBhcmFtcykge1xuICAgIGxldCBzdGFydCA9IHBhcnNlSW50KHBhcmFtc1swXVswXSk7XG4gICAgbGV0IGVuZCA9IHBhcnNlSW50KHBhcmFtc1swXVsxXSk7XG4gICAgbGV0IG5vdyA9IHBhcmFtc1sxXTtcblxuICAgIGlmIChlbmQgPCBzdGFydCkge1xuICAgICAgbm93ID0gKG5vdyA8IHN0YXJ0KSA/IG5vdyArPSAyNDAwIDogbm93O1xuICAgICAgZW5kICs9IDI0MDA7XG4gICAgfVxuXG4gICAgcmV0dXJuIChub3cgPiBzdGFydCAmJiBub3cgPCBlbmQpO1xuICB9XG5cbiAgZXF1YWxzKHBhcmFtcykge1xuICAgIHJldHVybiBTdHJpbmcocGFyYW1zWzBdKSA9PT0gJyonIHx8IFN0cmluZyhwYXJhbXNbMF0pID09PSBTdHJpbmcocGFyYW1zWzFdKTtcbiAgfVxuXG4gIGdyZWF0ZXJUaGFuKHBhcmFtcykge1xuICAgIHJldHVybiBwYXJhbXNbMV0gPiBwYXJhbXNbMF07XG4gIH1cblxuICBpbihwYXJhbXMpIHtcbiAgICByZXR1cm4gcGFyYW1zWzBdLmluZGV4T2YocGFyYW1zWzFdKSA+IC0xO1xuICB9XG5cbiAgbGVzc1RoYW4ocGFyYW1zKSB7XG4gICAgcmV0dXJuIHBhcmFtc1sxXSA8IHBhcmFtc1swXTtcbiAgfVxuXG4gIG5vdChwYXJhbXMpIHtcbiAgICByZXR1cm4gIXBhcmFtc1swXTtcbiAgfVxuXG4gIG9yKHBhcmFtcykge1xuICAgIHJldHVybiBwYXJhbXNbMF0gfHwgcGFyYW1zWzFdO1xuICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgT3BlcmF0b3JzO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9wb2xpY3kvT3BlcmF0b3JzLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7Ozs7Ozs7QUFFQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///145\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _Operators = __webpack_require__(145);\n\nvar _Operators2 = _interopRequireDefault(_Operators);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* @author Ana Caldeira \n* @classdesc Class to represent a condition and evaluate its applicability.\n*/\nvar Condition = function () {\n\n /**\n * Creates a new Condition.\n * @class\n * @param {string} attribute\n * @param {string} operator\n * @param {*} params\n */\n function Condition(attribute, operator, params) {\n (0, _classCallCheck3.default)(this, Condition);\n\n this.attribute = attribute;\n this.operator = operator;\n this.params = params;\n this.operators = new _Operators2.default();\n }\n\n /**\n * Verifies if the condition is applicable to the message. First, the system value that corresponds to the attribute is retrieved; then, that value is compared with the parameter specified in the condition by executing the operator implementation. If the operator is 'in' and the name of a group is given, then the array holding the members of the group is retrieved before the comparison.\n * @param {Object} context environment where the Policy Engine is being used\n * @param {Object} message\n */\n\n\n (0, _createClass3.default)(Condition, [{\n key: 'isApplicable',\n value: function isApplicable(context, message) {\n context[this.attribute] = { message: message };\n var value = context[this.attribute];\n var tempParam = void 0;\n\n if (this.operator === 'in') {\n if (!Array.isArray(this.params)) {\n tempParam = context.getGroup(this.params, message.to);\n return this.operators[this.operator]([tempParam, value]);\n }\n }\n\n return this.operators[this.operator]([this.params, value]);\n }\n }]);\n return Condition;\n}(); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nexports.default = Condition;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29uZGl0aW9ucy9Db25kaXRpb24uanM/MmUzMyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE2IFFVT0JJUyBORVRXT1JLUyBTTFxuKiBDb3B5cmlnaHQgMjAxNiBGUkFVTkhPRkVSLUdFU0VMTFNDSEFGVCBaVVIgRk9FUkRFUlVORyBERVIgQU5HRVdBTkRURU4gRk9SU0NIVU5HIEUuVlxuKiBDb3B5cmlnaHQgMjAxNiBPUkFOR0UgU0FcbiogQ29weXJpZ2h0IDIwMTYgRGV1dHNjaGUgVGVsZWtvbSBBR1xuKiBDb3B5cmlnaHQgMjAxNiBBcGl6ZWVcbiogQ29weXJpZ2h0IDIwMTYgVEVDSE5JU0NIRSBVTklWRVJTSVRBVCBCRVJMSU5cbipcbiogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlIFwiTGljZW5zZVwiKTtcbiogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLlxuKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2Ug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1wUGFyYW07XG5cbiAgICBpZiAodGhpcy5vcGVyYXRvciA9PT0gJ2luJykge1xuICAgICAgaWYgKCEoQXJyYXkuaXNBcnJheSh0aGlzLnBhcmFtcykpKSB7XG4gICAgICAgIHRlbXBQYXJhbSA9IGNvbnRleHQuZ2V0R3JvdXAodGhpcy5wYXJhbXMsIG1lc3NhZ2UudG8pO1xuICAgICAgICByZXR1cm4gdGhpcy5vcGVyYXRvcnNbdGhpcy5vcGVyYXRvcl0oW3RlbXBQYXJhbSwgdmFsdWVdKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gdGhpcy5vcGVyYXRvcnNbdGhpcy5vcGVyYXRvcl0oW3RoaXMucGFyYW1zLCB2YWx1ZV0pO1xuICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29uZGl0aW9uO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9wb2xpY3kvY29uZGl0aW9ucy9Db25kaXRpb24uanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7O0FBdUJBO0FBQ0E7Ozs7O0FBQ0E7Ozs7QUFJQTtBQUNBO0FBQ0E7Ozs7Ozs7QUFPQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBL0RBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQW1FQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///146\n")},function(module,exports){eval('var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function("return this")() || (1,eval)("this");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === "object")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it\'s\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLyh3ZWJwYWNrKS9idWlsZGluL2dsb2JhbC5qcz8zNjk4Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBnO1xyXG5cclxuLy8gVGhpcyB3b3JrcyBpbiBub24tc3RyaWN0IG1vZGVcclxuZyA9IChmdW5jdGlvbigpIHtcclxuXHRyZXR1cm4gdGhpcztcclxufSkoKTtcclxuXHJcbnRyeSB7XHJcblx0Ly8gVGhpcyB3b3JrcyBpZiBldmFsIGlzIGFsbG93ZWQgKHNlZSBDU1ApXHJcblx0ZyA9IGcgfHwgRnVuY3Rpb24oXCJyZXR1cm4gdGhpc1wiKSgpIHx8ICgxLGV2YWwpKFwidGhpc1wiKTtcclxufSBjYXRjaChlKSB7XHJcblx0Ly8gVGhpcyB3b3JrcyBpZiB0aGUgd2luZG93IHJlZmVyZW5jZSBpcyBhdmFpbGFibGVcclxuXHRpZih0eXBlb2Ygd2luZG93ID09PSBcIm9iamVjdFwiKVxyXG5cdFx0ZyA9IHdpbmRvdztcclxufVxyXG5cclxuLy8gZyBjYW4gc3RpbGwgYmUgdW5kZWZpbmVkLCBidXQgbm90aGluZyB0byBkbyBhYm91dCBpdC4uLlxyXG4vLyBXZSByZXR1cm4gdW5kZWZpbmVkLCBpbnN0ZWFkIG9mIG5vdGhpbmcgaGVyZSwgc28gaXQnc1xyXG4vLyBlYXNpZXIgdG8gaGFuZGxlIHRoaXMgY2FzZS4gaWYoIWdsb2JhbCkgeyAuLi59XHJcblxyXG5tb2R1bGUuZXhwb3J0cyA9IGc7XHJcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vICh3ZWJwYWNrKS9idWlsZGluL2dsb2JhbC5qc1xuLy8gbW9kdWxlIGlkID0gMTQ3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///147\n')},function(module,exports,__webpack_require__){eval("module.exports = !__webpack_require__(10) && !__webpack_require__(5)(function () {\n return Object.defineProperty(__webpack_require__(101)('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faWU4LWRvbS1kZWZpbmUuanM/YzU5NiJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9ICFyZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpICYmICFyZXF1aXJlKCcuL19mYWlscycpKGZ1bmN0aW9uICgpIHtcbiAgcmV0dXJuIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShyZXF1aXJlKCcuL19kb20tY3JlYXRlJykoJ2RpdicpLCAnYScsIHsgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiA3OyB9IH0pLmEgIT0gNztcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pZTgtZG9tLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMTQ4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///148\n")},function(module,exports,__webpack_require__){eval("exports.f = __webpack_require__(8);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fd2tzLWV4dC5qcz8zM2M1Il0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydHMuZiA9IHJlcXVpcmUoJy4vX3drcycpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL193a3MtZXh0LmpzXG4vLyBtb2R1bGUgaWQgPSAxNDlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///149\n")},function(module,exports,__webpack_require__){eval("var has = __webpack_require__(17);\nvar toIObject = __webpack_require__(24);\nvar arrayIndexOf = __webpack_require__(79)(false);\nvar IE_PROTO = __webpack_require__(103)('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZX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bW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///150\n")},function(module,exports,__webpack_require__){eval("var dP = __webpack_require__(11);\nvar anObject = __webpack_require__(3);\nvar getKeys = __webpack_require__(50);\n\nmodule.exports = __webpack_require__(10) ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb2JqZWN0LWRwcy5qcz9iNzBjIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBkUCA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgZ2V0S2V5cyA9IHJlcXVpcmUoJy4vX29iamVjdC1rZXlzJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKSA/IE9iamVjdC5kZWZpbmVQcm9wZXJ0aWVzIDogZnVuY3Rpb24gZGVmaW5lUHJvcGVydGllcyhPLCBQcm9wZXJ0aWVzKSB7XG4gIGFuT2JqZWN0KE8pO1xuICB2YXIga2V5cyA9IGdldEtleXMoUHJvcGVydGllcyk7XG4gIHZhciBsZW5ndGggPSBrZXlzLmxlbmd0aDtcbiAgdmFyIGkgPSAwO1xuICB2YXIgUDtcbiAgd2hpbGUgKGxlbmd0aCA+IGkpIGRQLmYoTywgUCA9IGtleXNbaSsrXSwgUHJvcGVydGllc1tQXSk7XG4gIHJldHVybiBPO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb2JqZWN0LWRwcy5qc1xuLy8gbW9kdWxlIGlkID0gMTUxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///151\n")},function(module,exports,__webpack_require__){eval("// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(24);\nvar gOPN = __webpack_require__(53).f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb2JqZWN0LWdvcG4tZXh0LmpzPzZjNmYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZmFsbGJhY2sgZm9yIElFMTEgYnVnZ3kgT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMgd2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QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///152\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = __webpack_require__(50);\nvar gOPS = __webpack_require__(80);\nvar pIE = __webpack_require__(71);\nvar toObject = __webpack_require__(15);\nvar IObject = __webpack_require__(70);\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || __webpack_require__(5)(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb2JqZWN0LWFzc2lnbi5qcz9hMTg3Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDE5LjEuMi4xIE9iamVjdC5hc3NpZ24odGFyZ2V0LCBzb3VyY2UsIC4uLilcbnZhciBnZXRLZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMnKTtcbnZhciBnT1BTID0gcmVxdWlyZSgnLi9fb2JqZW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JT2JqZWN0KGFyZ3VtZW50c1tpbmRleCsrXSk7XG4gICAgdmFyIGtleXMgPSBnZXRTeW1ib2xzID8gZ2V0S2V5cyhTKS5jb25jYXQoZ2V0U3ltYm9scyhTKSkgOiBnZXRLZXlzKFMpO1xuICAgIHZhciBsZW5ndGggPSBrZXlzLmxlbmd0aDtcbiAgICB2YXIgaiA9IDA7XG4gICAgdmFyIGtleTtcbiAgICB3aGlsZSAobGVuZ3RoID4gaikgaWYgKGlzRW51bS5jYWxsKFMsIGtleSA9IGtleXNbaisrXSkpIFRba2V5XSA9IFNba2V5XTtcbiAgfSByZXR1cm4gVDtcbn0gOiAkYXNzaWduO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19vYmplY3QtYXNzaWduLmpzXG4vLyBtb2R1bGUgaWQgPSAxNTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///153\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar aFunction = __webpack_require__(16);\nvar isObject = __webpack_require__(6);\nvar invoke = __webpack_require__(155);\nvar arraySlice = [].slice;\nvar factories = {};\n\nvar construct = function (F, len, args) {\n if (!(len in factories)) {\n for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';\n // eslint-disable-next-line no-new-func\n factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');\n } return factories[len](F, args);\n};\n\nmodule.exports = Function.bind || function bind(that /* , ...args */) {\n var fn = aFunction(this);\n var partArgs = arraySlice.call(arguments, 1);\n var bound = function (/* args... */) {\n var args = partArgs.concat(arraySlice.call(arguments));\n return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);\n };\n if (isObject(fn.prototype)) bound.prototype = fn.prototype;\n return bound;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYmluZC5qcz82NmRjIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuL19hLWZ1bmN0aW9uJyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBpbnZva2UgPSByZXF1aXJlKCcuL19pbnZva2UnKTtcbnZhciBhcnJheVNsaWNlID0gW10uc2xpY2U7XG52YXIgZmFjdG9yaWVzID0ge307XG5cbnZhciBjb25zdHJ1Y3QgPSBmdW5jdGlvbiAoRiwgbGVuLCBhcmdzKSB7XG4gIGlmICghKGxlbiBpbiBmYWN0b3JpZXMpKSB7XG4gICAgZm9yICh2YXIgbiA9IFtdLCBpID0gMDsgaSA8IGxlbjsgaSsrKSBuW2ldID0gJ2FbJyArIGkgKyAnXSc7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLW5ldy1mdW5jXG4gICAgZmFjdG9yaWVzW2xlbl0gPSBGdW5jdGlvbignRixhJywgJ3JldHVybiBuZXcgRignICsgbi5qb2luKCcsJykgKyAnKScpO1xuICB9IHJldHVybiBmYWN0b3JpZXNbbGVuXShGLCBhcmdzKTtcbn07XG5cbm1vZHVsZS5leHBvcnRzID0gRnVuY3Rpb24uYmluZCB8fCBmdW5jdGlvbiBiaW5kKHRoYXQgLyogLCAuLi5hcmdzICovKSB7XG4gIHZhciBmbiA9IGFGdW5jdGlvbih0aGlzKTtcbiAgdmFyIHBhcnRBcmdzID0gYXJyYXlTbGljZS5jYWxsKGFyZ3VtZW50cywgMSk7XG4gIHZhciBib3VuZCA9IGZ1bmN0aW9uICgvKiBhcmdzLi4uICovKSB7XG4gICAgdmFyIGFyZ3MgPSBwYXJ0QXJncy5jb25jYXQoYXJyYXlTbGljZS5jYWxsKGFyZ3VtZW50cykpO1xuICAgIHJldHVybiB0aGlzIGluc3RhbmNlb2YgYm91bmQgPyBjb25zdHJ1Y3QoZm4sIGFyZ3MubGVuZ3RoLCBhcmdzKSA6IGludm9rZShmbiwgYXJncywgdGhhdCk7XG4gIH07XG4gIGlmIChpc09iamVjdChmbi5wcm90b3R5cGUpKSBib3VuZC5wcm90b3R5cGUgPSBmbi5wcm90b3R5cGU7XG4gIHJldHVybiBib3VuZDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2JpbmQuanNcbi8vIG1vZHVsZSBpZCA9IDE1NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///154\n")},function(module,exports){eval("// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faW52b2tlLmpzPzNjNzAiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZmFzdCBhcHBseSwgaHR0cDovL2pzcGVyZi5sbmtpdC5jb20vZmFzdC1hcHBseS81XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChmbiwgYXJncywgdGhhdCkge1xuICB2YXIgdW4gPSB0aGF0ID09PSB1bmRlZmluZWQ7XG4gIHN3aXRjaCAoYXJncy5sZW5ndGgpIHtcbiAgICBjYXNlIDA6IHJldHVybiB1biA/IGZuKClcbiAgICAgICAgICAgICAgICAgICAgICA6IGZuLmNhbGwodGhhdCk7XG4gICAgY2FzZSAxOiByZXR1cm4gdW4gPyBmbihhcmdzWzBdKVxuICAgICAgICAgICAgICAgICAgICAgIDogZm4uY2FsbCh0aGF0LCBhcmdzWzBdKTtcbiAgICBjYXNlIDI6IHJldHVybiB1biA/IGZuKGFyZ3NbMF0sIGFyZ3NbMV0pXG4gICAgICAgICAgICAgICAgICAgICAgOiBmbi5jYWxsKHRoYXQsIGFyZ3NbMF0sIGFyZ3NbMV0pO1xuICAgIGNhc2UgMzogcmV0dXJuIHVuID8gZm4oYXJnc1swXSwgYXJnc1sxXSwgYXJnc1syXSlcbiAgICAgICAgICAgICAgICAgICAgICA6IGZuLmNhbGwodGhhdCwgYXJnc1swXSwgYXJnc1sxXSwgYXJnc1syXSk7XG4gICAgY2FzZSA0OiByZXR1cm4gdW4gPyBmbihhcmdzWzBdLCBhcmdzWzFdLCBhcmdzWzJdLCBhcmdzWzNdKVxuICAgICAgICAgICAgICAgICAgICAgIDogZm4uY2FsbCh0aGF0LCBhcmdzWzBdLCBhcmdzWzFdLCBhcmdzWzJdLCBhcmdzWzNdKTtcbiAgfSByZXR1cm4gZm4uYXBwbHkodGhhdCwgYXJncyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pbnZva2UuanNcbi8vIG1vZHVsZSBpZCA9IDE1NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///155\n")},function(module,exports,__webpack_require__){eval("var $parseInt = __webpack_require__(4).parseInt;\nvar $trim = __webpack_require__(62).trim;\nvar ws = __webpack_require__(107);\nvar hex = /^[-+]?0[xX]/;\n\nmodule.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {\n var string = $trim(String(str), 3);\n return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));\n} : $parseInt;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcGFyc2UtaW50LmpzPzNhMDQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRwYXJzZUludCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpLnBhcnNlSW50O1xudmFyICR0cmltID0gcmVxdWlyZSgnLi9fc3RyaW5nLXRyaW0nKS50cmltO1xudmFyIHdzID0gcmVxdWlyZSgnLi9fc3RyaW5nLXdzJyk7XG52YXIgaGV4ID0gL15bLStdPzBbeFhdLztcblxubW9kdWxlLmV4cG9ydHMgPSAkcGFyc2VJbnQod3MgKyAnMDgnKSAhPT0gOCB8fCAkcGFyc2VJbnQod3MgKyAnMHgxNicpICE9PSAyMiA/IGZ1bmN0aW9uIHBhcnNlSW50KHN0ciwgcmFkaXgpIHtcbiAgdmFyIHN0cmluZyA9ICR0cmltKFN0cmluZyhzdHIpLCAzKTtcbiAgcmV0dXJuICRwYXJzZUludChzdHJpbmcsIChyYWRpeCA+Pj4gMCkgfHwgKGhleC50ZXN0KHN0cmluZykgPyAxNiA6IDEwKSk7XG59IDogJHBhcnNlSW50O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19wYXJzZS1pbnQuanNcbi8vIG1vZHVsZSBpZCA9IDE1NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///156\n")},function(module,exports,__webpack_require__){eval("var $parseFloat = __webpack_require__(4).parseFloat;\nvar $trim = __webpack_require__(62).trim;\n\nmodule.exports = 1 / $parseFloat(__webpack_require__(107) + '-0') !== -Infinity ? function parseFloat(str) {\n var string = $trim(String(str), 3);\n var result = $parseFloat(string);\n return result === 0 && string.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcGFyc2UtZmxvYXQuanM/ZjJkZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgJHBhcnNlRmxvYXQgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5wYXJzZUZsb2F0O1xudmFyICR0cmltID0gcmVxdWlyZSgnLi9fc3RyaW5nLXRyaW0nKS50cmltO1xuXG5tb2R1bGUuZXhwb3J0cyA9IDEgLyAkcGFyc2VGbG9hdChyZXF1aXJlKCcuL19zdHJpbmctd3MnKSArICctMCcpICE9PSAtSW5maW5pdHkgPyBmdW5jdGlvbiBwYXJzZUZsb2F0KHN0cikge1xuICB2YXIgc3RyaW5nID0gJHRyaW0oU3RyaW5nKHN0ciksIDMpO1xuICB2YXIgcmVzdWx0ID0gJHBhcnNlRmxvYXQoc3RyaW5nKTtcbiAgcmV0dXJuIHJlc3VsdCA9PT0gMCAmJiBzdHJpbmcuY2hhckF0KDApID09ICctJyA/IC0wIDogcmVzdWx0O1xufSA6ICRwYXJzZUZsb2F0O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19wYXJzZS1mbG9hdC5qc1xuLy8gbW9kdWxlIGlkID0gMTU3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///157\n")},function(module,exports,__webpack_require__){eval("var cof = __webpack_require__(28);\nmodule.exports = function (it, msg) {\n if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);\n return +it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYS1udW1iZXItdmFsdWUuanM/N2QyZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY29mID0gcmVxdWlyZSgnLi9fY29mJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCwgbXNnKSB7XG4gIGlmICh0eXBlb2YgaXQgIT0gJ251bWJlcicgJiYgY29mKGl0KSAhPSAnTnVtYmVyJykgdGhyb3cgVHlwZUVycm9yKG1zZyk7XG4gIHJldHVybiAraXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hLW51bWJlci12YWx1ZS5qc1xuLy8gbW9kdWxlIGlkID0gMTU4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///158\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.3 Number.isInteger(number)\nvar isObject = __webpack_require__(6);\nvar floor = Math.floor;\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXMtaW50ZWdlci5qcz85ZmRmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjEuMi4zIE51bWJlci5pc0ludGVnZXIobnVtYmVyKVxudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgZmxvb3IgPSBNYXRoLmZsb29yO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBpc0ludGVnZXIoaXQpIHtcbiAgcmV0dXJuICFpc09iamVjdChpdCkgJiYgaXNGaW5pdGUoaXQpICYmIGZsb29yKGl0KSA9PT0gaXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19pcy1pbnRlZ2VyLmpzXG4vLyBtb2R1bGUgaWQgPSAxNTlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///159\n")},function(module,exports){eval("// 20.2.2.20 Math.log1p(x)\nmodule.exports = Math.log1p || function log1p(x) {\n return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1sb2cxcC5qcz80NzNkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4yMCBNYXRoLmxvZzFwKHgpXG5tb2R1bGUuZXhwb3J0cyA9IE1hdGgubG9nMXAgfHwgZnVuY3Rpb24gbG9nMXAoeCkge1xuICByZXR1cm4gKHggPSAreCkgPiAtMWUtOCAmJiB4IDwgMWUtOCA/IHggLSB4ICogeCAvIDIgOiBNYXRoLmxvZygxICsgeCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19tYXRoLWxvZzFwLmpzXG4vLyBtb2R1bGUgaWQgPSAxNjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///160\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.16 Math.fround(x)\nvar sign = __webpack_require__(110);\nvar pow = Math.pow;\nvar EPSILON = pow(2, -52);\nvar EPSILON32 = pow(2, -23);\nvar MAX32 = pow(2, 127) * (2 - EPSILON32);\nvar MIN32 = pow(2, -126);\n\nvar roundTiesToEven = function (n) {\n return n + 1 / EPSILON - 1 / EPSILON;\n};\n\nmodule.exports = Math.fround || function fround(x) {\n var $abs = Math.abs(x);\n var $sign = sign(x);\n var a, result;\n if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;\n a = (1 + EPSILON32 / EPSILON) * $abs;\n result = a - (a - $abs);\n // eslint-disable-next-line no-self-compare\n if (result > MAX32 || result != result) return $sign * Infinity;\n return $sign * result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1mcm91bmQuanM/ODNmOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4yLjIuMTYgTWF0aC5mcm91bmQoeClcbnZhciBzaWduID0gcmVxdWlyZSgnLi9fbWF0aC1zaWduJyk7XG52YXIgcG93ID0g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BQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///161\n")},function(module,exports,__webpack_require__){eval("// call something on iterator step with safe closing on error\nvar anObject = __webpack_require__(3);\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXRlci1jYWxsLmpzPzVlZjUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gY2FsbCBzb21ldGhpbmcgb24gaXRlcmF0b3Igc3RlcCB3aXRoIHNhZmUgY2xvc2luZyBvbiBlcnJvclxudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdGVyYXRvciwgZm4sIHZhbHVlLCBlbnRyaWVzKSB7XG4gIHRyeSB7XG4gICAgcmV0dXJuIGVudHJpZXMgPyBmbihhbk9iamVjdCh2YWx1ZSlbMF0sIHZhbHVlWzFdKSA6IGZuKHZhbHVlKTtcbiAgLy8gNy40LjYgSXRlcmF0b3JDbG9zZShpdGVyYXRvciwgY29tcGxldGlvbilcbiAgfSBjYXRjaCAoZSkge1xuICAgIHZhciByZXQgPSBpdGVyYXRvclsncmV0dXJuJ107XG4gICAgaWYgKHJldCAhPT0gdW5kZWZpbmVkKSBhbk9iamVjdChyZXQuY2FsbChpdGVyYXRvcikpO1xuICAgIHRocm93IGU7XG4gIH1cbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2l0ZXItY2FsbC5qc1xuLy8gbW9kdWxlIGlkID0gMTYyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///162\n")},function(module,exports,__webpack_require__){eval("var aFunction = __webpack_require__(16);\nvar toObject = __webpack_require__(15);\nvar IObject = __webpack_require__(70);\nvar toLength = __webpack_require__(12);\n\nmodule.exports = function (that, callbackfn, aLen, memo, isRight) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IObject(O);\n var length = toLength(O.length);\n var index = isRight ? length - 1 : 0;\n var i = isRight ? -1 : 1;\n if (aLen < 2) for (;;) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (isRight ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktcmVkdWNlLmpzPzE2NDIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGFGdW5jd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V0dXJuIG1lbW87XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hcnJheS1yZWR1Y2UuanNcbi8vIG1vZHVsZSBpZCA9IDE2M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///163\n")},function(module,exports,__webpack_require__){"use strict";eval("// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\n\nvar toObject = __webpack_require__(15);\nvar toAbsoluteIndex = __webpack_require__(51);\nvar toLength = __webpack_require__(12);\n\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxl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nQtLSA+IDApIHtcbiAgICBpZiAoZnJvbSBpbiBPKSBPW3RvXSA9IE9bZnJvbV07XG4gICAgZWxzZSBkZWxldGUgT1t0b107XG4gICAgdG8gKz0gaW5jO1xuICAgIGZyb20gKz0gaW5jO1xuICB9IHJldHVybiBPO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktY29weS13aXRoaW4uanNcbi8vIG1vZHVsZSBpZCA9IDE2NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///164\n")},function(module,exports){eval("module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9faXRlci1zdGVwLmpzPzI4MWQiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoZG9uZSwgdmFsdWUpIHtcbiAgcmV0dXJuIHsgdmFsdWU6IHZhbHVlLCBkb25lOiAhIWRvbmUgfTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2l0ZXItc3RlcC5qc1xuLy8gbW9kdWxlIGlkID0gMTY1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///165\n")},function(module,exports,__webpack_require__){eval("// 21.2.5.3 get RegExp.prototype.flags()\nif (__webpack_require__(10) && /./g.flags != 'g') __webpack_require__(11).f(RegExp.prototype, 'flags', {\n configurable: true,\n get: __webpack_require__(84)\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLmZsYWdzLmpzP2E1ZGYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjEuMi41LjMgZ2V0IFJlZ0V4cC5wcm90b3R5cGUuZmxhZ3MoKVxuaWYgKHJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgJiYgLy4vZy5mbGFncyAhPSAnZycpIHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmYoUmVnRXhwLnByb3RvdHlwZSwgJ2ZsYWdzJywge1xuICBjb25maWd1cmFibGU6IHRydWUsXG4gIGdldDogcmVxdWlyZSgnLi9fZmxhZ3MnKVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnJlZ2V4cC5mbGFncy5qc1xuLy8gbW9kdWxlIGlkID0gMTY2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///166\n")},function(module,exports){eval("module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcGVyZm9ybS5qcz80ODM1Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGV4ZWMpIHtcbiAgdHJ5IHtcbiAgICByZXR1cm4geyBlOiBmYWxzZSwgdjogZXhlYygpIH07XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICByZXR1cm4geyBlOiB0cnVlLCB2OiBlIH07XG4gIH1cbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3BlcmZvcm0uanNcbi8vIG1vZHVsZSBpZCA9IDE2N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///167\n")},function(module,exports,__webpack_require__){eval("var anObject = __webpack_require__(3);\nvar isObject = __webpack_require__(6);\nvar newPromiseCapability = __webpack_require__(125);\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcHJvbWlzZS1yZXNvbHZlLmpzPzllOTgiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBuZXdQcm9taXNlQ2FwYWJpbGl0eSA9IHJlcXVpcmUoJy4vX25ldy1wcm9taXNlLWNhcGFiaWxpdHknKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoQywgeCkge1xuICBhbk9iamVjdChDKTtcbiAgaWYgKGlzT2JqZWN0KHgpICYmIHguY29uc3RydWN0b3IgPT09IEMpIHJldHVybiB4O1xuICB2YXIgcHJvbWlzZUNhcGFiaWxpdHkgPSBuZXdQcm9taXNlQ2FwYWJpbGl0eS5mKEMpO1xuICB2YXIgcmVzb2x2ZSA9IHByb21pc2VDYXBhYmlsaXR5LnJlc29sdmU7XG4gIHJlc29sdmUoeCk7XG4gIHJldHVybiBwcm9taXNlQ2FwYWJpbGl0eS5wcm9taXNlO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcHJvbWlzZS1yZXNvbHZlLmpzXG4vLyBtb2R1bGUgaWQgPSAxNjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///168\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar strong = __webpack_require__(170);\nvar validate = __webpack_require__(64);\nvar MAP = 'Map';\n\n// 23.1 Map Objects\nmodule.exports = __webpack_require__(87)(MAP, function (get) {\n return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = strong.getEntry(validate(this, MAP), key);\n return entry && entry.v;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);\n }\n}, strong, true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTY5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWFwLmpzPzMyY2IiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIHN0cm9uZyA9IHJlcXVpcmUoJy4vX2NvbGxlY3Rpb24tc3Ryb25nJyk7XG52YXIgdmFsaWRhdGUgPSByZXF1aXJlKCcuL192YWxpZGF0ZS1jb2xsZWN0aW9uJyk7XG52YXIgTUFQID0gJ01hcCc7XG5cbi8vIDIzLjEgTWFwIE9iamVjdHNcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9fY29sbGVjdGlvbicpKE1BUCwgZnVuY3Rpb24gKGdldCkge1xuICByZXR1cm4gZnVuY3Rpb24gTWFwKCkgeyByZXR1cm4gZ2V0KHRoaXMsIGFyZ3VtZW50cy5sZW5ndGggPiAwID8gYXJndW1lbnRzWzBdIDogdW5kZWZpbmVkKTsgfTtcbn0sIHtcbiAgLy8gMjMuMS4zLjYgTWFwLnByb3RvdHlwZS5nZXQoa2V5KVxuICBnZXQ6IGZ1bmN0aW9uIGdldChrZXkpIHtcbiAgICB2YXIgZW50cnkgPSBzdHJvbmcuZ2V0RW50cnkodmFsaWRhdGUodGhpcywgTUFQKSwga2V5KTtcbiAgICByZXR1cm4gZW50cnkgJiYgZW50cnkudjtcbiAgfSxcbiAgLy8gMjMuMS4zLjkgTWFwLnByb3RvdHlwZS5zZXQoa2V5LCB2YWx1ZSlcbiAgc2V0OiBmdW5jdGlvbiBzZXQoa2V5LCB2YWx1ZSkge1xuICAgIHJldHVybiBzdHJvbmcuZGVmKHZhbGlkYXRlKHRoaXMsIE1BUCksIGtleSA9PT0gMCA/IDAgOiBrZXksIHZhbHVlKTtcbiAgfVxufSwgc3Ryb25nLCB0cnVlKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWFwLmpzXG4vLyBtb2R1bGUgaWQgPSAxNjlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///169\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar dP = __webpack_require__(11).f;\nvar create = __webpack_require__(52);\nvar redefineAll = __webpack_require__(57);\nvar ctx = __webpack_require__(27);\nvar anInstance = __webpack_require__(55);\nvar forOf = __webpack_require__(56);\nvar $iterDefine = __webpack_require__(113);\nvar step = __webpack_require__(165);\nvar setSpecies = __webpack_require__(54);\nvar DESCRIPTORS = __webpack_require__(10);\nvar fastKey = __webpack_require__(42).fastKey;\nvar validate = __webpack_require__(64);\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return that._i[index];\n // frozen object case\n for (entry = that._f; entry; entry = entry.n) {\n if (entry.k == key) return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n entry.r = true;\n if (entry.p) entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = validate(this, NAME);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.n;\n var prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if (prev) prev.n = next;\n if (next) next.p = prev;\n if (that._f == entry) that._f = next;\n if (that._l == entry) that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n validate(this, NAME);\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.n : this._f) {\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(validate(this, NAME), key);\n }\n });\n if (DESCRIPTORS) dP(C.prototype, 'size', {\n get: function () {\n return validate(this, NAME)[SIZE];\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var entry = getEntry(that, key);\n var prev, index;\n // change existing entry\n if (entry) {\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if (!that._f) that._f = entry;\n if (prev) prev.n = entry;\n that[SIZE]++;\n // add to index\n if (index !== 'F') that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function (C, NAME, IS_MAP) {\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function (iterated, kind) {\n this._t = validate(iterated, NAME); // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function () {\n var that = this;\n var kind = that._k;\n var entry = that._l;\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n // get next entry\n if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if (kind == 'keys') return step(0, entry.k);\n if (kind == 'values') return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fY29sbGVjdGlvbi1zdHJvbmcuanM/MGUwOCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgZFAgPSByZXF1aXJlKCcuL19vYmplY3QtZHAnKS5mO1xudmFyIGNyZWF0ZSA9IHJlcXVpcmUoJy4vX29iamVjdC1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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///170\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar strong = __webpack_require__(170);\nvar validate = __webpack_require__(64);\nvar SET = 'Set';\n\n// 23.2 Set Objects\nmodule.exports = __webpack_require__(87)(SET, function (get) {\n return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);\n }\n}, strong);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc2V0LmpzPzc1MjUiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIHN0cm9uZyA9IHJlcXVpcmUoJy4vX2NvbGxlY3Rpb24tc3Ryb25nJyk7XG52YXIgdmFsaWRhdGUgPSByZXF1aXJlKCcuL192YWxpZGF0ZS1jb2xsZWN0aW9uJyk7XG52YXIgU0VUID0gJ1NldCc7XG5cbi8vIDIzLjIgU2V0IE9iamVjdHNcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9fY29sbGVjdGlvbicpKFNFVCwgZnVuY3Rpb24gKGdldCkge1xuICByZXR1cm4gZnVuY3Rpb24gU2V0KCkgeyByZXR1cm4gZ2V0KHRoaXMsIGFyZ3VtZW50cy5sZW5ndGggPiAwID8gYXJndW1lbnRzWzBdIDogdW5kZWZpbmVkKTsgfTtcbn0sIHtcbiAgLy8gMjMuMi4zLjEgU2V0LnByb3RvdHlwZS5hZGQodmFsdWUpXG4gIGFkZDogZnVuY3Rpb24gYWRkKHZhbHVlKSB7XG4gICAgcmV0dXJuIHN0cm9uZy5kZWYodmFsaWRhdGUodGhpcywgU0VUKSwgdmFsdWUgPSB2YWx1ZSA9PT0gMCA/IDAgOiB2YWx1ZSwgdmFsdWUpO1xuICB9XG59LCBzdHJvbmcpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5zZXQuanNcbi8vIG1vZHVsZSBpZCA9IDE3MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///171\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar each = __webpack_require__(35)(0);\nvar redefine = __webpack_require__(19);\nvar meta = __webpack_require__(42);\nvar assign = __webpack_require__(153);\nvar weak = __webpack_require__(173);\nvar isObject = __webpack_require__(6);\nvar fails = __webpack_require__(5);\nvar validate = __webpack_require__(64);\nvar WEAK_MAP = 'WeakMap';\nvar getWeak = meta.getWeak;\nvar isExtensible = Object.isExtensible;\nvar uncaughtFrozenStore = weak.ufstore;\nvar tmp = {};\nvar InternalMap;\n\nvar wrapper = function (get) {\n return function WeakMap() {\n return get(this, arguments.length > 0 ? arguments[0] : undefined);\n };\n};\n\nvar methods = {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n if (isObject(key)) {\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);\n return data ? data[this._i] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return weak.def(validate(this, WEAK_MAP), key, value);\n }\n};\n\n// 23.3 WeakMap Objects\nvar $WeakMap = module.exports = __webpack_require__(87)(WEAK_MAP, wrapper, methods, weak, true, true);\n\n// IE11 WeakMap frozen keys fix\nif (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {\n InternalMap = weak.getConstructor(wrapper, WEAK_MAP);\n assign(InternalMap.prototype, methods);\n meta.NEED = true;\n each(['delete', 'has', 'get', 'set'], function (key) {\n var proto = $WeakMap.prototype;\n var method = proto[key];\n redefine(proto, key, function (a, b) {\n // store frozen objects on internal weakmap shim\n if (isObject(a) && !isExtensible(a)) {\n if (!this._f) this._f = new InternalMap();\n var result = this._f[key](a, b);\n return key == 'set' ? this : result;\n // store all the rest on native weakmap\n } return method.call(this, a, b);\n });\n });\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYud2Vhay1tYXAuanM/NjQzNSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgZWFjaCA9IHJlcXVpcmUoJy4vX2FycmF5LW1ldGhvZHMnKSgwKTtcbnZhciByZWRlZmluZSA9IHJlcXVpcmUoJy4vX3JlZGVmaW5lJyk7XG52YXIgbWV0YSA9IHJlcXVpcmUoJ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ineAll = __webpack_require__(57);\nvar getWeak = __webpack_require__(42).getWeak;\nvar anObject = __webpack_require__(3);\nvar isObject = __webpack_require__(6);\nvar anInstance = __webpack_require__(55);\nvar forOf = __webpack_require__(56);\nvar createArrayMethod = __webpack_require__(35);\nvar $has = __webpack_require__(17);\nvar validate = __webpack_require__(64);\nvar arrayFind = createArrayMethod(5);\nvar arrayFindIndex = createArrayMethod(6);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (that) {\n return that._l || (that._l = new UncaughtFrozenStore());\n};\nvar UncaughtFrozenStore = function () {\n this.a = [];\n};\nvar findUncaughtFrozen = function (store, key) {\n return arrayFind(store.a, function (it) {\n return it[0] === key;\n });\n};\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.a.push([key, value]);\n },\n 'delete': function (key) {\n var index = arrayFindIndex(this.a, function (it) {\n return it[0] === key;\n });\n if (~index) this.a.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = id++; // collection id\n that._l = undefined; // leak store for uncaught frozen objects\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);\n return data && $has(data, this._i) && delete data[this._i];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);\n return data && $has(data, this._i);\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var data = getWeak(anObject(key), true);\n if (data === true) uncaughtFrozenStore(that).set(key, value);\n else data[that._i] = value;\n return that;\n },\n ufstore: uncaughtFrozenStore\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTczLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fY29sbGVjdGlvbi13ZWFrLmpzPzdjOTQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIHJlZGVmaW5lQWxsID0gcmVxdWlyZSgnLi9fcmVkZWZpbmUtYWxsJyk7XG52YXIgZ2V0V2VhayA9IHJlcXVpcmUoJy4vX21ldGEnKS5nZXRXZWFrO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBhbkluc3RhbmNlID0gcmVxdWlyZSgnLi9fYW4taW5zdGFuY2UnKTtcbnZhciBmb3JPZiA9IHJlcXVpcmUoJy4vX2Zvci1vZicpO1xudmFyIGNyZWF0ZUFycmF5TWV0aG9kID0gcmVxdWlyZSgnLi9fYXJyYXktbWV0aG9kcycpO1xudmFyICRoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciB2YWxpZGF0ZSA9IHJlcXVpcmUoJy4vX3ZhbGlkYXRlLWNvbGxlY3Rpb24nKTtcbnZhciBhcnJheUZpbmQgPSBjcmVhdGVBcnJheU1ldGhvZCg1KTtcbnZhciBhcnJheUZpbmRJbmRleCA9IGNyZWF0ZUFycmF5TWV0aG9kKDYpO1xudmFyIGlkID0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ZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX2NvbGxlY3Rpb24td2Vhay5qc1xuLy8gbW9kdWxlIGlkID0gMTczXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///173\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/ecma262/#sec-toindex\nvar toInteger = __webpack_require__(33);\nvar toLength = __webpack_require__(12);\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length!');\n return length;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fdG8taW5kZXguanM/ZjAzZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy10b2luZGV4XG52YXIgdG9JbnRlZ2VyID0gcmVxdWlyZSgnLi9fdG8taW50ZWdlcicpO1xudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi9fdG8tbGVuZ3RoJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICBpZiAoaXQgPT09IHVuZGVmaW5lZCkgcmV0dXJuIDA7XG4gIHZhciBudW1iZXIgPSB0b0ludGVnZXIoaXQpO1xuICB2YXIgbGVuZ3RoID0gdG9MZW5ndGgobnVtYmVyKTtcbiAgaWYgKG51bWJlciAhPT0gbGVuZ3RoKSB0aHJvdyBSYW5nZUVycm9yKCdXcm9uZyBsZW5ndGghJyk7XG4gIHJldHVybiBsZW5ndGg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL190by1pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gMTc0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///174\n")},function(module,exports,__webpack_require__){eval("// all object keys, includes non-enumerable and symbols\nvar gOPN = __webpack_require__(53);\nvar gOPS = __webpack_require__(80);\nvar anObject = __webpack_require__(3);\nvar Reflect = __webpack_require__(4).Reflect;\nmodule.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {\n var keys = gOPN.f(anObject(it));\n var getSymbols = gOPS.f;\n return getSymbols ? keys.concat(getSymbols(it)) : keys;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb3duLWtleXMuanM/NjE0YSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBhbGwgb2JqZWN0IGtleXMsIGluY2x1ZGVzIG5vbi1lbnVtZXJhYmxlIGFuZCBzeW1ib2xzXG52YXIgZ09QTiA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BuJyk7XG52YXIgZ09QUyA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BzJyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBSZWZsZWN0ID0gcmVxdWlyZSgnLi9fZ2xvYmFsJykuUmVmbGVjdDtcbm1vZHVsZS5leHBvcnRzID0gUmVmbGVjdCAmJiBSZWZsZWN0Lm93bktleXMgfHwgZnVuY3Rpb24gb3duS2V5cyhpdCkge1xuICB2YXIga2V5cyA9IGdPUE4uZihhbk9iamVjdChpdCkpO1xuICB2YXIgZ2V0U3ltYm9scyA9IGdPUFMuZjtcbiAgcmV0dXJuIGdldFN5bWJvbHMgPyBrZXlzLmNvbmNhdChnZXRTeW1ib2xzKGl0KSkgOiBrZXlzO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb3duLWtleXMuanNcbi8vIG1vZHVsZSBpZCA9IDE3NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///175\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar isArray = __webpack_require__(81);\nvar isObject = __webpack_require__(6);\nvar toLength = __webpack_require__(12);\nvar ctx = __webpack_require__(27);\nvar IS_CONCAT_SPREADABLE = __webpack_require__(8)('isConcatSpreadable');\n\nfunction flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;\n var element, spreadable;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n spreadable = false;\n if (isObject(element)) {\n spreadable = element[IS_CONCAT_SPREADABLE];\n spreadable = spreadable !== undefined ? !!spreadable : isArray(element);\n }\n\n if (spreadable && depth > 0) {\n targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1fffffffffffff) throw TypeError();\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n}\n\nmodule.exports = flattenIntoArray;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZmxhdHRlbi1pbnRvLWFycmF5LmpzPzIwNWEiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9wcm9wb3NhbC1mbGF0TWFwLyNzZWMtRmxhdHRlbkludG9BcnJheVxudmFyIGlzQXJyYXkgPSByZXF1aXJ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internal:///176\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = __webpack_require__(12);\nvar repeat = __webpack_require__(109);\nvar defined = __webpack_require__(32);\n\nmodule.exports = function (that, maxLength, fillString, left) {\n var S = String(defined(that));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n if (intMaxLength <= stringLength || fillStr == '') return S;\n var fillLen = intMaxLength - stringLength;\n var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return left ? stringFiller + S : S + stringFiller;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc3RyaW5nLXBhZC5qcz9kOTU0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS90YzM5L3Byb3Bvc2FsLXN0cmluZy1wYWQtc3RhcnQtZW5kXG52YXIgdG9MZW5ndGggPSByZXF1aXJlKCcuL190by1sZW5ndGgnKTtcbnZhciByZXBlYXQgPSByZXF1aXJlKCcuL19zdHJpbmctcmVwZWF0Jyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAodGhhdCwgbWF4TGVuZ3RoLCBmaWxsU3RyaW5nLCBsZWZ0KSB7XG4gIHZhciBTID0gU3RyaW5nKGRlZmluZWQodGhhdCkpO1xuICB2YXIgc3RyaW5nTGVuZ3RoID0gUy5sZW5ndGg7XG4gIHZhciBmaWxsU3RyID0gZmlsbFN0cmluZyA9PT0gdW5kZWZpbmVkID8gJyAnIDogU3RyaW5nKGZpbGxTdHJpbmcpO1xuICB2YXIgaW50TWF4TGVuZ3RoID0gdG9MZW5ndGgobWF4TGVuZ3RoKTtcbiAgaWYgKGludE1heExlbmd0aCA8PSBzdHJpbmdMZW5ndGggfHwgZmlsbFN0ciA9PSAnJykgcmV0dXJuIFM7XG4gIHZhciBmaWxsTGVuID0gaW50TWF4TGVuZ3RoIC0gc3RyaW5nTGVuZ3RoO1xuICB2YXIgc3RyaW5nRmlsbGVyID0gcmVwZWF0LmNhbGwoZmlsbFN0ciwgTWF0aC5jZWlsKGZpbGxMZW4gLyBmaWxsU3RyLmxlbmd0aCkpO1xuICBpZiAoc3RyaW5nRmlsbGVyLmxlbmd0aCA+IGZpbGxMZW4pIHN0cmluZ0ZpbGxlciA9IHN0cmluZ0ZpbGxlci5zbGljZSgwLCBmaWxsTGVuKTtcbiAgcmV0dXJuIGxlZnQgPyBzdHJpbmdGaWxsZXIgKyBTIDogUyArIHN0cmluZ0ZpbGxlcjtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvX3N0cmluZy1wYWQuanNcbi8vIG1vZHVsZSBpZCA9IDE3N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///177\n")},function(module,exports,__webpack_require__){eval("var getKeys = __webpack_require__(50);\nvar toIObject = __webpack_require__(24);\nvar isEnum = __webpack_require__(71).f;\nmodule.exports = function (isEntries) {\n return function (it) {\n var O = toIObject(it);\n var keys = getKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) if (isEnum.call(O, key = keys[i++])) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n } return result;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb2JqZWN0LXRvLWFycmF5LmpzPzk0YTEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdldEtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cycpO1xudmFyIHRvSU9iamVjdCA9IHJlcXVpcmUoJy4vX3RvLWlvYmplY3QnKTtcbnZhciBpc0VudW0gPSByZXF1aXJlKCcuL19vYmplY3QtcGllJykuZjtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGlzRW50cmllcykge1xuICByZXR1cm4gZnVuY3Rpb24gKGl0KSB7XG4gICAgdmFyIE8gPSB0b0lPYmplY3QoaXQpO1xuICAgIHZhciBrZXlzID0gZ2V0S2V5cyhPKTtcbiAgICB2YXIgbGVuZ3RoID0ga2V5cy5sZW5ndGg7XG4gICAgdmFyIGkgPSAwO1xuICAgIHZhciByZXN1bHQgPSBbXTtcbiAgICB2YXIga2V5O1xuICAgIHdoaWxlIChsZW5ndGggPiBpKSBpZiAoaXNFbnVtLmNhbGwoTywga2V5ID0ga2V5c1tpKytdKSkge1xuICAgICAgcmVzdWx0LnB1c2goaXNFbnRyaWVzID8gW2tleSwgT1trZXldXSA6IE9ba2V5XSk7XG4gICAgfSByZXR1cm4gcmVzdWx0O1xuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fb2JqZWN0LXRvLWFycmF5LmpzXG4vLyBtb2R1bGUgaWQgPSAxNzhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///178\n")},function(module,exports,__webpack_require__){eval('// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar classof = __webpack_require__(72);\nvar from = __webpack_require__(180);\nmodule.exports = function (NAME) {\n return function toJSON() {\n if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn\'t generic");\n return from(this);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fY29sbGVjdGlvbi10by1qc29uLmpzPzVkNzAiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9naXRodWIuY29tL0RhdmlkQnJ1YW50L01hcC1TZXQucHJvdG90eXBlLnRvSlNPTlxudmFyIGNsYXNzb2YgPSByZXF1aXJlKCcuL19jbGFzc29mJyk7XG52YXIgZnJvbSA9IHJlcXVpcmUoJy4vX2FycmF5LWZyb20taXRlcmFibGUnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKE5BTUUpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHRvSlNPTigpIHtcbiAgICBpZiAoY2xhc3NvZih0aGlzKSAhPSBOQU1FKSB0aHJvdyBUeXBlRXJyb3IoTkFNRSArIFwiI3RvSlNPTiBpc24ndCBnZW5lcmljXCIpO1xuICAgIHJldHVybiBmcm9tKHRoaXMpO1xuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fY29sbGVjdGlvbi10by1qc29uLmpzXG4vLyBtb2R1bGUgaWQgPSAxNzlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///179\n')},function(module,exports,__webpack_require__){eval("var forOf = __webpack_require__(56);\n\nmodule.exports = function (iter, ITERATOR) {\n var result = [];\n forOf(iter, false, result.push, result, ITERATOR);\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTgwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktZnJvbS1pdGVyYWJsZS5qcz80MDZlIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBmb3JPZiA9IHJlcXVpcmUoJy4vX2Zvci1vZicpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdGVyLCBJVEVSQVRPUikge1xuICB2YXIgcmVzdWx0ID0gW107XG4gIGZvck9mKGl0ZXIsIGZhbHNlLCByZXN1bHQucHVzaCwgcmVzdWx0LCBJVEVSQVRPUik7XG4gIHJldHVybiByZXN1bHQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hcnJheS1mcm9tLWl0ZXJhYmxlLmpzXG4vLyBtb2R1bGUgaWQgPSAxODBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///180\n")},function(module,exports){eval("// https://rwaldron.github.io/proposal-math-extensions/\nmodule.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {\n if (\n arguments.length === 0\n // eslint-disable-next-line no-self-compare\n || x != x\n // eslint-disable-next-line no-self-compare\n || inLow != inLow\n // eslint-disable-next-line no-self-compare\n || inHigh != inHigh\n // eslint-disable-next-line no-self-compare\n || outLow != outLow\n // eslint-disable-next-line no-self-compare\n || outHigh != outHigh\n ) return NaN;\n if (x === Infinity || x === -Infinity) return x;\n return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTgxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1zY2FsZS5qcz81OThmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vcndhbGRyb24uZ2l0aHViLmlvL3Byb3Bvc2FsLW1hdGgtZXh0ZW5zaW9ucy9cbm1vZHVsZS5leHBvcnRzID0gTWF0aC5zY2FsZSB8fCBmdW5jdGlvbiBzY2FsZSh4LCBpbkxvdywgaW5IaWdoLCBvdXRMb3csIG91dEhpZ2gpIHtcbiAgaWYgKFxuICAgIGFyZ3VtZW50cy5sZW5ndGggPT09IDBcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICAgIHx8IHggIT0geFxuICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXNlbGYtY29tcGFyZVxuICAgICAgfHwgaW5Mb3cgIT0gaW5Mb3dcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICAgIHx8IGluSGlnaCAhPSBpbkhpZ2hcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICAgIHx8IG91dExvdyAhPSBvdXRMb3dcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICAgIHx8IG91dEhpZ2ggIT0gb3V0SGlnaFxuICApIHJldHVybiBOYU47XG4gIGlmICh4ID09PSBJbmZpbml0eSB8fCB4ID09PSAtSW5maW5pdHkpIHJldHVybiB4O1xuICByZXR1cm4gKHggLSBpbkxvdykgKiAob3V0SGlnaCAtIG91dExvdykgLyAoaW5IaWdoIC0gaW5Mb3cpICsgb3V0TG93O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fbWF0aC1zY2FsZS5qc1xuLy8gbW9kdWxlIGlkID0gMTgxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///181\n")},function(module,exports){eval("//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTgyLmpzIiwic291cmNlcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///182\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar LIBRARY = __webpack_require__(92);\nvar $export = __webpack_require__(21);\nvar redefine = __webpack_require__(185);\nvar hide = __webpack_require__(58);\nvar has = __webpack_require__(59);\nvar Iterators = __webpack_require__(74);\nvar $iterCreate = __webpack_require__(418);\nvar setToStringTag = __webpack_require__(95);\nvar getPrototypeOf = __webpack_require__(189);\nvar ITERATOR = __webpack_require__(23)('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = (!BUGGY && $native) || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTgzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLWRlZmluZS5qcz9iYzgwIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBMSUJSQVJZID0gcmVxdWlyZSgnLi9fbGlicmFyeScpO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciByZWRlZmluZSA9IHJlcXVpcmUoJy4vX3JlZGVmaW5lJyk7XG52YXIgaGlkZSA9IHJlcXVpcmUoJy4vX2hpZGUnKTtcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciBJdGVyYXRvcnMgPSByZXF1aXJlKCcuL19pdGVyYXRvcnMnKTtcbnZhciAkaXRlckNyZWF0ZSA9IHJlcXVpcmUoJy4vX2l0ZXItY3JlYXRlJyk7XG52YXIgc2V0VG9TdHJpbmdUYWcgPSByZXF1aXJlKCcuL19zZXQtdG8tc3RyaW5nLXRhZycpO1xudmFyIGdldFByb3RvdHlwZU9mID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdwbycpO1xudmFyIElURVJBVE9SID0gcmVxdWlyZSgnLi9fd2tzJykoJ2l0ZXJhdG9yJyk7XG52YXIgQlVHR1kgPSAhKFtdLmtleXMgJi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Ly8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXRlci1kZWZpbmUuanNcbi8vIG1vZHVsZSBpZCA9IDE4M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///183\n")},function(module,exports,__webpack_require__){eval("module.exports = !__webpack_require__(44) && !__webpack_require__(66)(function () {\n return Object.defineProperty(__webpack_require__(131)('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pZTgtZG9tLWRlZmluZS5qcz80OWYwIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gIXJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgJiYgIXJlcXVpcmUoJy4vX2ZhaWxzJykoZnVuY3Rpb24gKCkge1xuICByZXR1cm4gT2JqZWN0LmRlZmluZVByb3BlcnR5KHJlcXVpcmUoJy4vX2RvbS1jcmVhdGUnKSgnZGl2JyksICdhJywgeyBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIDc7IH0gfSkuYSAhPSA3O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faWU4LWRvbS1kZWZpbmUuanNcbi8vIG1vZHVsZSBpZCA9IDE4NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///184\n")},function(module,exports,__webpack_require__){eval("module.exports = __webpack_require__(58);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19yZWRlZmluZS5qcz9mM2NkIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9faGlkZScpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3JlZGVmaW5lLmpzXG4vLyBtb2R1bGUgaWQgPSAxODVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///185\n")},function(module,exports,__webpack_require__){eval("var has = __webpack_require__(59);\nvar toIObject = __webpack_require__(45);\nvar arrayIndexOf = __webpack_require__(420)(false);\nvar IE_PROTO = __webpack_require__(135)('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3Qta2V5cy1pbnRlcm5hbC5qcz8yMWI4Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgYXJyYXlJbmRleE9mID0gcmVxdWlyZSgnLi9fYXJyYXktaW5jbHVkZXMnKShmYWxzZSk7XG52YXIgSUVfUFJPVE8gPSByZXF1aXJlKCcuL19zaGFyZWQta2V5JykoJ0lFX1BST1RPJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKG9iamVjdCwgbmFtZXMpIHtcbiAgdmFyIE8gPSB0b0lPYmplY3Qob2JqZWN0KTtcbiAgdmFyIGkgPSAwO1xuICB2YXIgcmVzdWx0ID0gW107XG4gIHZhciBrZXk7XG4gIGZvciAoa2V5IGluIE8pIGlmIChrZXkgIT0gSUVfUFJPVE8pIGhhcyhPLCBrZXkpICYmIHJlc3VsdC5wdXNoKGtleSk7XG4gIC8vIERvbid0IGVudW0gYnVnICYgaGlkZGVuIGtleXNcbiAgd2hpbGUgKG5hbWVzLmxlbmd0aCA+IGkpIGlmIChoYXMoTywga2V5ID0gbmFtZXNbaSsrXSkpIHtcbiAgICB+YXJyYXlJbmRleE9mKHJlc3VsdCwga2V5KSB8fCByZXN1bHQucHVzaChrZXkpO1xuICB9XG4gIHJldHVybiByZXN1bHQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1rZXlzLWludGVybmFsLmpzXG4vLyBtb2R1bGUgaWQgPSAxODZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///186\n")},function(module,exports,__webpack_require__){eval("// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = __webpack_require__(75);\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pb2JqZWN0LmpzPzMxNGUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZmFsbGJhY2sgZm9yIG5vbi1hcnJheS1saWtlIEVTMyBhbmQgbm9uLWVudW1lcmFibGUgb2xkIFY4IHN0cmluZ3NcbnZhciBjb2YgPSByZXF1aXJlKCcuL19jb2YnKTtcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1wcm90b3R5cGUtYnVpbHRpbnNcbm1vZHVsZS5leHBvcnRzID0gT2JqZWN0KCd6JykucHJvcGVydHlJc0VudW1lcmFibGUoMCkgPyBPYmplY3QgOiBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIGNvZihpdCkgPT0gJ1N0cmluZycgPyBpdC5zcGxpdCgnJykgOiBPYmplY3QoaXQpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pb2JqZWN0LmpzXG4vLyBtb2R1bGUgaWQgPSAxODdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///187\n")},function(module,exports,__webpack_require__){eval("var document = __webpack_require__(22).document;\nmodule.exports = document && document.documentElement;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19odG1sLmpzPzQ0ZjIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGRvY3VtZW50ID0gcmVxdWlyZSgnLi9fZ2xvYmFsJykuZG9jdW1lbnQ7XG5tb2R1bGUuZXhwb3J0cyA9IGRvY3VtZW50ICYmIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19odG1sLmpzXG4vLyBtb2R1bGUgaWQgPSAxODhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///188\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = __webpack_require__(59);\nvar toObject = __webpack_require__(76);\nvar IE_PROTO = __webpack_require__(135)('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTg5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ3BvLmpzPzNmM2MiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjkgLyAxNS4yLjMuMiBPYmplY3QuZ2V0UHJvdG90eXBlT2YoTylcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIElFX1BST1RPID0gcmVxdWlyZSgnLi9fc2hhcmVkLWtleScpKCdJRV9QUk9UTycpO1xudmFyIE9iamVjdFByb3RvID0gT2JqZWN0LnByb3RvdHlwZTtcblxubW9kdWxlLmV4cG9ydHMgPSBPYmplY3QuZ2V0UHJvdG90eXBlT2YgfHwgZnVuY3Rpb24gKE8pIHtcbiAgTyA9IHRvT2JqZWN0KE8pO1xuICBpZiAoaGFzKE8sIElFX1BST1RPKSkgcmV0dXJuIE9bSUVfUFJPVE9dO1xuICBpZiAodHlwZW9mIE8uY29uc3RydWN0b3IgPT0gJ2Z1bmN0aW9uJyAmJiBPIGluc3RhbmNlb2YgTy5jb25zdHJ1Y3Rvcikge1xuICAgIHJldHVybiBPLmNvbnN0cnVjdG9yLnByb3RvdHlwZTtcbiAgfSByZXR1cm4gTyBpbnN0YW5jZW9mIE9iamVjdCA/IE9iamVjdFByb3RvIDogbnVsbDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWdwby5qc1xuLy8gbW9kdWxlIGlkID0gMTg5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///189\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(422);\nvar global = __webpack_require__(22);\nvar hide = __webpack_require__(58);\nvar Iterators = __webpack_require__(74);\nvar TO_STRING_TAG = __webpack_require__(23)('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL3dlYi5kb20uaXRlcmFibGUuanM/ZmFkMyJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuL2VzNi5hcnJheS5pdGVyYXRvcicpO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIGhpZGUgPSByZXF1aXJlKCcuL19oaWRlJyk7XG52YXIgSXRlcmF0b3JzID0gcmVxdWlyZSgnLi9faXRlcmF0b3JzJyk7XG52YXIgVE9fU1RSSU5HX1RBRyA9IHJlcXVpcmUoJy4vX3drcycpKCd0b1N0cmluZ1RhZycpO1xuXG52YXIgRE9NSXRlcmFibGVzID0gKCdDU1NSdWxlTGlzdCxDU1NTdHlsZURlY2xhcmF0aW9uLENTU1ZhbHVlTGlzdCxDbGllbnRSZWN0TGlzdCxET01SZWN0TGlzdCxET01TdHJpbmdMaXN0LCcgK1xuICAnRE9NVG9rZW5MaXN0LERhdGFUcmFuc2Zlckl0ZW1MaXN0LEZpbGVMaXN0LEhUTUxBbGxDb2xsZWN0aW9uLEhUTUxDb2xsZWN0aW9uLEhUTUxGb3JtRWxlbWVudCxIVE1MU2VsZWN0RWxlbWVudCwnICtcbiAgJ01lZGlhTGlzdCxNaW1lVHlwZUFycmF5LE5hbWVkTm9kZU1hcCxOb2RlTGlzdCxQYWludFJlcXVlc3RMaXN0LFBsdWdpbixQbHVnaW5BcnJheSxTVkdMZW5ndGhMaXN0LFNWR051bWJlckxpc3QsJyArXG4gICdTVkdQYXRoU2VnTGlzdCxTVkdQb2ludExpc3QsU1ZHU3RyaW5nTGlzdCxTVkdUcmFuc2Zvcm1MaXN0LFNvdXJjZUJ1ZmZlckxpc3QsU3R5bGVTaGVldExpc3QsVGV4dFRyYWNrQ3VlTGlzdCwnICtcbiAgJ1RleHRUcmFja0xpc3QsVG91Y2hMaXN0Jykuc3BsaXQoJywnKTtcblxuZm9yICh2YXIgaSA9IDA7IGkgPCBET01JdGVyYWJsZXMubGVuZ3RoOyBpKyspIHtcbiAgdmFyIE5BTUUgPSBET01JdGVyYWJsZXNbaV07XG4gIHZhciBDb2xsZWN0aW9uID0gZ2xvYmFsW05BTUVdO1xuICB2YXIgcHJvdG8gPSBDb2xsZWN0aW9uICYmIENvbGxlY3Rpb24ucHJvdG90eXBlO1xuICBpZiAocHJvdG8gJiYgIXByb3RvW1RPX1NUUklOR19UQUddKSBoaWRlKHByb3RvLCBUT19TVFJJTkdfVEFHLCBOQU1FKTtcbiAgSXRlcmF0b3JzW05BTUVdID0gSXRlcmF0b3JzLkFycmF5O1xufVxuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvd2ViLmRvbS5pdGVyYWJsZS5qc1xuLy8gbW9kdWxlIGlkID0gMTkwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///190\n")},function(module,exports,__webpack_require__){eval("// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = __webpack_require__(75);\nvar TAG = __webpack_require__(23)('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19jbGFzc29mLmpzPzQ1OGYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZ2V0dGluZyB0YWcgZnJvbSAxOS4xLjMuNiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nKClcbnZhciBjb2YgPSByZXF1aXJlKCcuL19jb2YnKTtcbnZhciBUQUcgPSByZXF1aXJlKCcuL193a3MnKSgndG9TdHJpbmdUYWcnKTtcbi8vIEVTMyB3cm9uZyBoZXJlXG52YXIgQVJHID0gY29mKGZ1bmN0aW9uICgpIHsgcmV0dXJuIGFyZ3VtZW50czsgfSgpKSA9PSAnQXJndW1lbnRzJztcblxuLy8gZmFsbGJhY2sgZm9yIElFMTEgU2NyaXB0IEFjY2VzcyBEZW5pZWQgZXJyb3JcbnZhciB0cnlHZXQgPSBmdW5jdGlvbiAoaXQsIGtleSkge1xuICB0cnkge1xuICAgIHJldHVybiBpdFtrZXldO1xuICB9IGNhdGNoIChlKSB7IC8qIGVtcHR5ICovIH1cbn07XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHZhciBPLCBULCBCO1xuICByZXR1cm4gaXQgPT09IHVuZGVmaW5lZCA/ICdVbmRlZmluZWQnIDogaXQgPT09IG51bGwgPyAnTnVsbCdcbiAgICAvLyBAQHRvU3RyaW5nVGFnIGNhc2VcbiAgICA6IHR5cGVvZiAoVCA9IHRyeUdldChPID0gT2JqZWN0KGl0KSwgVEFHKSkgPT0gJ3N0cmluZycgPyBUXG4gICAgLy8gYnVpbHRpblRhZyBjYXNlXG4gICAgOiBBUkcgPyBjb2YoTylcbiAgICAvLyBFUzMgYXJndW1lbnRzIGZhbGxiYWNrXG4gICAgOiAoQiA9IGNvZihPKSkgPT0gJ09iamVjdCcgJiYgdHlwZW9mIE8uY2FsbGVlID09ICdmdW5jdGlvbicgPyAnQXJndW1lbnRzJyA6IEI7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NsYXNzb2YuanNcbi8vIG1vZHVsZSBpZCA9IDE5MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///191\n")},function(module,exports,__webpack_require__){eval("// call something on iterator step with safe closing on error\nvar anObject = __webpack_require__(41);\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLWNhbGwuanM/OWFjNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBjYWxsIHNvbWV0aGluZyBvbiBpdGVyYXRvciBzdGVwIHdpdGggc2FmZSBjbG9zaW5nIG9uIGVycm9yXG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0ZXJhdG9yLCBmbiwgdmFsdWUsIGVudHJpZXMpIHtcbiAgdHJ5IHtcbiAgICByZXR1cm4gZW50cmllcyA/IGZuKGFuT2JqZWN0KHZhbHVlKVswXSwgdmFsdWVbMV0pIDogZm4odmFsdWUpO1xuICAvLyA3LjQuNiBJdGVyYXRvckNsb3NlKGl0ZXJhdG9yLCBjb21wbGV0aW9uKVxuICB9IGNhdGNoIChlKSB7XG4gICAgdmFyIHJldCA9IGl0ZXJhdG9yWydyZXR1cm4nXTtcbiAgICBpZiAocmV0ICE9PSB1bmRlZmluZWQpIGFuT2JqZWN0KHJldC5jYWxsKGl0ZXJhdG9yKSk7XG4gICAgdGhyb3cgZTtcbiAgfVxufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLWNhbGwuanNcbi8vIG1vZHVsZSBpZCA9IDE5MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///192\n")},function(module,exports,__webpack_require__){eval("// check on default Array iterator\nvar Iterators = __webpack_require__(74);\nvar ITERATOR = __webpack_require__(23)('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pcy1hcnJheS1pdGVyLmpzPzMyMWMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gY2hlY2sgb24gZGVmYXVsdCBBcnJheSBpdGVyYXRvclxudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4vX2l0ZXJhdG9ycycpO1xudmFyIElURVJBVE9SID0gcmVxdWlyZSgnLi9fd2tzJykoJ2l0ZXJhdG9yJyk7XG52YXIgQXJyYXlQcm90byA9IEFycmF5LnByb3RvdHlwZTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIGl0ICE9PSB1bmRlZmluZWQgJiYgKEl0ZXJhdG9ycy5BcnJheSA9PT0gaXQgfHwgQXJyYXlQcm90b1tJVEVSQVRPUl0gPT09IGl0KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXMtYXJyYXktaXRlci5qc1xuLy8gbW9kdWxlIGlkID0gMTkzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///193\n")},function(module,exports,__webpack_require__){eval("var classof = __webpack_require__(191);\nvar ITERATOR = __webpack_require__(23)('iterator');\nvar Iterators = __webpack_require__(74);\nmodule.exports = __webpack_require__(13).getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2NvcmUuZ2V0LWl0ZXJhdG9yLW1ldGhvZC5qcz9kZGZiIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBjbGFzc29mID0gcmVxdWlyZSgnLi9fY2xhc3NvZicpO1xudmFyIElURVJBVE9SID0gcmVxdWlyZSgnLi9fd2tzJykoJ2l0ZXJhdG9yJyk7XG52YXIgSXRlcmF0b3JzID0gcmVxdWlyZSgnLi9faXRlcmF0b3JzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vX2NvcmUnKS5nZXRJdGVyYXRvck1ldGhvZCA9IGZ1bmN0aW9uIChpdCkge1xuICBpZiAoaXQgIT0gdW5kZWZpbmVkKSByZXR1cm4gaXRbSVRFUkFUT1JdXG4gICAgfHwgaXRbJ0BAaXRlcmF0b3InXVxuICAgIHx8IEl0ZXJhdG9yc1tjbGFzc29mKGl0KV07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvY29yZS5nZXQtaXRlcmF0b3ItbWV0aG9kLmpzXG4vLyBtb2R1bGUgaWQgPSAxOTRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///194\n")},function(module,exports,__webpack_require__){eval("// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = __webpack_require__(41);\nvar aFunction = __webpack_require__(93);\nvar SPECIES = __webpack_require__(23)('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zcGVjaWVzLWNvbnN0cnVjdG9yLmpzP2I3Y2MiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4zLjIwIFNwZWNpZXNDb25zdHJ1Y3RvcihPLCBkZWZhdWx0Q29uc3RydWN0b3IpXG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuL19hLWZ1bmN0aW9uJyk7XG52YXIgU1BFQ0lFUyA9IHJlcXVpcmUoJy4vX3drcycpKCdzcGVjaWVzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChPLCBEKSB7XG4gIHZhciBDID0gYW5PYmplY3QoTykuY29uc3RydWN0b3I7XG4gIHZhciBTO1xuICByZXR1cm4gQyA9PT0gdW5kZWZpbmVkIHx8IChTID0gYW5PYmplY3QoQylbU1BFQ0lFU10pID09IHVuZGVmaW5lZCA/IEQgOiBhRnVuY3Rpb24oUyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NwZWNpZXMtY29uc3RydWN0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDE5NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///195\n")},function(module,exports,__webpack_require__){eval("var ctx = __webpack_require__(65);\nvar invoke = __webpack_require__(428);\nvar html = __webpack_require__(188);\nvar cel = __webpack_require__(131);\nvar global = __webpack_require__(22);\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (__webpack_require__(75)(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190YXNrLmpzPzJmOGQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGN0eCA9IHJlcXVpcmUoJy4vX2N0eCcpO1xudmFyIGludm9rZSA9IHJlcXVpcmUoJy4vX2ludm9rZScpO1xudmFyIGh0bWwgPSByZXF1aXJlKCcuL19odG1sJyk7XG52YXIgY2VsID0gcmVxdWlyZSgnLi9fZG9tLWNyZWF0ZScpO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIHByb2Nlc3MgPSBnbG9iYWwucHJvY2VzcztcbnZhciBzZXRUYXNrID0gZ2xvYmFsLnNldEltbWVkaWF0ZTtcbnZhciBjbGVhclRhc2sgPSBnbG9iYWwuY2xlYXJJbW1lZGlhdGU7XG52YXIgTWVzc2FnZUNoYW5uZ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wcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///196\n")},function(module,exports){eval("module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19wZXJmb3JtLmpzPzc0ZDAiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoZXhlYykge1xuICB0cnkge1xuICAgIHJldHVybiB7IGU6IGZhbHNlLCB2OiBleGVjKCkgfTtcbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiB7IGU6IHRydWUsIHY6IGUgfTtcbiAgfVxufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19wZXJmb3JtLmpzXG4vLyBtb2R1bGUgaWQgPSAxOTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///197\n")},function(module,exports,__webpack_require__){eval("var anObject = __webpack_require__(41);\nvar isObject = __webpack_require__(36);\nvar newPromiseCapability = __webpack_require__(138);\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19wcm9taXNlLXJlc29sdmUuanM/N2M5NSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIG5ld1Byb21pc2VDYXBhYmlsaXR5ID0gcmVxdWlyZSgnLi9fbmV3LXByb21pc2UtY2FwYWJpbGl0eScpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChDLCB4KSB7XG4gIGFuT2JqZWN0KEMpO1xuICBpZiAoaXNPYmplY3QoeCkgJiYgeC5jb25zdHJ1Y3RvciA9PT0gQykgcmV0dXJuIHg7XG4gIHZhciBwcm9taXNlQ2FwYWJpbGl0eSA9IG5ld1Byb21pc2VDYXBhYmlsaXR5LmYoQyk7XG4gIHZhciByZXNvbHZlID0gcHJvbWlzZUNhcGFiaWxpdHkucmVzb2x2ZTtcbiAgcmVzb2x2ZSh4KTtcbiAgcmV0dXJuIHByb21pc2VDYXBhYmlsaXR5LnByb21pc2U7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3Byb21pc2UtcmVzb2x2ZS5qc1xuLy8gbW9kdWxlIGlkID0gMTk4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///198\n")},function(module,exports,__webpack_require__){eval("var ITERATOR = __webpack_require__(23)('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk5LmpzIiwic291cmNlcyI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LyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXRlci1kZXRlY3QuanNcbi8vIG1vZHVsZSBpZCA9IDE5OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///199\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(437), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvZGVmaW5lLXByb3BlcnR5LmpzPzBiODMiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9kZWZpbmUtcHJvcGVydHlcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvb2JqZWN0L2RlZmluZS1wcm9wZXJ0eS5qc1xuLy8gbW9kdWxlIGlkID0gMjAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///200\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.log = undefined;\n\nvar _loglevel = __webpack_require__(7);\n\nvar _loglevel2 = _interopRequireDefault(_loglevel);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar a = _loglevel2.default.getLogger('address-allocation');\nvar b = _loglevel2.default.getLogger('Bus');\nvar c = _loglevel2.default.getLogger('MessageBus');\nvar d = _loglevel2.default.getLogger('CoreDiscovery');\nvar e = _loglevel2.default.getLogger('GraphConnector');\nvar f = _loglevel2.default.getLogger('HypertyResourcesStorage');\nvar g = _loglevel2.default.getLogger('IdentityModule');\nvar h = _loglevel2.default.getLogger('PEP');\nvar i = _loglevel2.default.getLogger('P2PConnectionResolve');\nvar j = _loglevel2.default.getLogger('Registry');\nvar k = _loglevel2.default.getLogger('RuntimeUA');\nvar l = _loglevel2.default.getLogger('Loader');\nvar m = _loglevel2.default.getLogger('Descriptors');\nvar n = _loglevel2.default.getLogger('DataObjectsStorage');\nvar o = _loglevel2.default.getLogger('Subscription');\nvar p = _loglevel2.default.getLogger('SubscriptionManager');\nvar q = _loglevel2.default.getLogger('ObserverObject');\nvar r = _loglevel2.default.getLogger('ReporterObject');\nvar s = _loglevel2.default.getLogger('SynSubscription');\nvar t = _loglevel2.default.getLogger('SyncherManager');\nvar u = _loglevel2.default.getLogger('IdentityManager');\nvar v = _loglevel2.default.getLogger('CryptoManager');\nvar x = _loglevel2.default.getLogger('Pipeline');\n\nexports.log = _loglevel2.default;\n\n/**\n 0 actual logging methods, ordered and available as:\n\n 0 - log.trace(msg)\n 1 - log.debug(msg)\n 2 - log.info(msg)\n 3 - log.warn(msg)\n 4 - log.error(msg)\n\n log.log(msg) is also available, as an alias for log.debug(msg), to improve compatibility with console, and make migration easier.\n\n Exact output formatting of these will depend on the console available in the current context of your application. For example, many environments will include a full stack trace with all trace() calls, and icons or similar to highlight other calls.\n\n These methods should never fail in any environment, even if no console object is currently available, and should always fall back to an available log method even if the specific method called (e.g. warn) isn't available.\n\n Be aware that all this means that these method won't necessarily always produce exactly the output you expect in every environment; loglevel only guarantees that these methods will never explode on you, and that it will call the most relevant method it can find, with your argument. Firefox is a notable example here: due to a current Firefox bug log.trace(msg) calls in Firefox will print only the stacktrace, and won't include any passed message arguments.\n\n*/\n\n// address-allocation\n\na.setLevel(3);\n\n// Bus\nb.setLevel(3);\n\n// MessageBus\nc.setLevel(0);\n\n// CoreDiscovery\nd.setLevel(5);\n\n// GraphConnector\ne.setLevel(5);\n\n// HypertyResourcesStorage\nf.setLevel(3);\n\n// IdentityModule\ng.setLevel(0);\n\n// PEP\nh.setLevel(3);\n\n// P2PConnectionResolve\ni.setLevel(3);\n\n// Registry\nj.setLevel(3);\n\n// RuntimeUA\nk.setLevel(3);\n\n// Loader\nl.setLevel(3);\n\n// Descriptors\nm.setLevel(3);\n\n// DataObjectsStorage\nn.setLevel(3);\n\n// Subscription\no.setLevel(3);\n\n// SubscriptionManager\np.setLevel(3);\n\n// ObserverObject\nq.setLevel(3);\n\n// ReporterObject\nr.setLevel(3);\n\n// SynSubscription\ns.setLevel(3);\n\n// SyncherManager\nt.setLevel(3);\n\n// IdentityManager\nu.setLevel(3);\n\n// CryptoManager\nv.setLevel(3);\n\n// Pipeline\nx.setLevel(3);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9sb2dMZXZlbHMuanM/ZjM5MSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgbG9nIGZyb20gJ2xvZ2xldmVsJztcblxuY29uc3QgYSA9IGxvZy5nZXRMb2dnZXIoJ2FkZHJlc3MtYWxsb2NhdGlvbicpO1xuY29uc3QgYiA9IGxvZy5nZXRMb2dnZXIoJ0J1cycpO1xuY29uc3QgYyA9IGxvZy5nZXRMb2dnZXIoJ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DQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFvQkE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///201\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = __webpack_require__(186);\nvar hiddenKeys = __webpack_require__(137).concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wbi5qcz85ZjQ0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi43IC8gMTUuMi4zLjQgT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMoTylcbnZhciAka2V5cyA9IHJlcXVpcmUoJy4vX29iamVjdC1rZXlzLWludGVybmFsJyk7XG52YXIgaGlkZGVuS2V5cyA9IHJlcXVpcmUoJy4vX2VudW0tYnVnLWtleXMnKS5jb25jYXQoJ2xlbmd0aCcsICdwcm90b3R5cGUnKTtcblxuZXhwb3J0cy5mID0gT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMgfHwgZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlOYW1lcyhPKSB7XG4gIHJldHVybiAka2V5cyhPLCBoaWRkZW5LZXlzKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWdvcG4uanNcbi8vIG1vZHVsZSBpZCA9IDIwMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///202\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(460), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvY3JlYXRlLmpzPzNhZjQiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9jcmVhdGVcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvb2JqZWN0L2NyZWF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///203\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('Bus');\n\n/**\n* @author micaelpedrosa@gmail.com\n* Minimal interface and implementation to send and receive messages. It can be reused in many type of components.\n* Components that need a message system should receive this class as a dependency or extend it.\n* Extensions should implement the following private methods: _onPostMessage and _registerExternalListener\n*/\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n// Log system\n\nvar Bus = function () {\n /* private\n _msgId: number;\n _subscriptions: \n _responseTimeOut: number\n _responseCallbacks: void>\n */\n\n function Bus() {\n (0, _classCallCheck3.default)(this, Bus);\n\n var _this = this;\n _this._msgId = 0;\n _this._subscriptions = {};\n\n _this._responseTimeOut = 15000; //default to 3s\n _this._responseCallbacks = {};\n\n _this._registerExternalListener();\n }\n\n /**\n * Register listener to receive message when \"msg.to === url\".\n * Special url \"*\" for default listener is accepted to intercept all messages.\n * @param {URL} url Address to intercept, tha is in the message \"to\"\n * @param {Listener} listener listener\n * @return {MsgListener} instance of MsgListener\n */\n\n\n (0, _createClass3.default)(Bus, [{\n key: 'addListener',\n value: function addListener(url, listener) {\n var _this = this;\n\n var item = new MsgListener(_this._subscriptions, url, listener);\n var itemList = _this._subscriptions[url];\n if (!itemList) {\n itemList = [];\n _this._subscriptions[url] = itemList;\n }\n\n itemList.push(item);\n return item;\n }\n\n /**\n * Manually add a response listener. Only one listener per message ID should exist.\n * ATENTION, there is no timeout for this listener.\n * The listener should be removed with a removeResponseListener, failing to do this will result in a unreleased memory problem.\n * @param {URL} url Origin address of the message sent, \"msg.from\".\n * @param {number} msgId Message ID that is returned from the postMessage.\n * @param {Function} responseListener Callback function for the response\n */\n\n }, {\n key: 'addResponseListener',\n value: function addResponseListener(url, msgId, responseListener) {\n this._responseCallbacks[url + msgId] = responseListener;\n }\n\n /**\n * Remove the response listener.\n * @param {URL} url Origin address of the message sent, \"msg.from\".\n * @param {number} msgId Message ID that is returned from the postMessage\n */\n\n }, {\n key: 'removeResponseListener',\n value: function removeResponseListener(url, msgId) {\n delete this._responseCallbacks[url + msgId];\n }\n\n /**\n * Remove all existent listeners for the URL\n * @param {URL} url Address registered\n */\n\n }, {\n key: 'removeAllListenersOf',\n value: function removeAllListenersOf(url) {\n delete this._subscriptions[url];\n }\n\n /**\n * Helper method to bind listeners (in both directions) into other MiniBus target.\n * @param {URL} outUrl Outbound URL, register listener for url in direction \"this -> target\"\n * @param {URL} inUrl Inbound URL, register listener for url in direction \"target -> this\"\n * @param {MiniBus} target The other target MiniBus\n * @return {Bound} an object that contains the properties [thisListener, targetListener] and the unbind method.\n */\n\n }, {\n key: 'bind',\n value: function bind(outUrl, inUrl, target) {\n var _this2 = this;\n\n var _this = this;\n\n var thisListn = _this.addListener(outUrl, function (msg) {\n target.postMessage(msg);\n });\n\n var targetListn = target.addListener(inUrl, function (msg) {\n _this.postMessage(msg);\n });\n\n return {\n thisListener: thisListn,\n targetListener: targetListn,\n unbind: function unbind() {\n _this2.thisListener.remove();\n _this2.targetListener.remove();\n }\n };\n }\n\n //publish on default listeners\n\n }, {\n key: '_publishOnDefault',\n value: function _publishOnDefault(msg) {\n //is there any \"*\" (default) listeners?\n var itemList = this._subscriptions['*'];\n if (itemList) {\n this._publishOn(itemList, msg);\n }\n }\n\n //publish on a subscription list.\n\n }, {\n key: '_publishOn',\n value: function _publishOn(itemList, msg) {\n itemList.forEach(function (sub) {\n sub._callback(msg);\n });\n }\n }, {\n key: '_responseCallback',\n value: function _responseCallback(inMsg, responseCallback) {\n var timeout = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n var _this = this;\n\n //automatic management of response handlers\n if (responseCallback) {\n var responseId = inMsg.from + inMsg.id;\n _this._responseCallbacks[responseId] = responseCallback;\n\n if (timeout) {\n setTimeout(function () {\n var responseFun = _this._responseCallbacks[responseId];\n delete _this._responseCallbacks[responseId];\n\n if (responseFun) {\n var errorMsg = {\n id: inMsg.id, type: 'response',\n body: { code: 408, desc: 'Response timeout!', value: inMsg }\n };\n\n responseFun(errorMsg);\n }\n }, _this._responseTimeOut);\n }\n }\n }\n\n //TODO: provisional responses should reset timeout\n\n }, {\n key: '_onResponse',\n value: function _onResponse(msg) {\n var _this = this;\n\n if (msg.type === 'response') {\n var responseId = msg.to + msg.id;\n var responseFun = _this._responseCallbacks[responseId];\n\n if (msg.body.code >= 200) {\n //if it's a provisional response, don't delete response listener\n delete _this._responseCallbacks[responseId];\n }\n\n if (responseFun) {\n responseFun(msg);\n return true;\n }\n }\n\n return false;\n }\n\n //receive messages from external interface\n\n }, {\n key: '_onMessage',\n value: function _onMessage(msg) {\n var _this = this;\n\n if (!_this._onResponse(msg)) {\n var itemList = _this._subscriptions[msg.to];\n if (itemList) {\n _this._publishOn(itemList, msg);\n } else {\n _this._publishOnDefault(msg);\n }\n }\n }\n }, {\n key: '_genId',\n value: function _genId(inMsg) {\n //TODO: how do we manage message ID's? Should it be a global runtime counter, or per URL address?\n //Global counter will not work, because there will be multiple MiniBus instances!\n //Per URL, can be a lot of data to maintain!\n //Maybe a counter per MiniBus instance. This is the assumed solution for now.\n if (!inMsg.id || inMsg.id === 0) {\n this._msgId++;\n inMsg.id = this._msgId;\n }\n }\n\n /**\n * Send messages to local listeners, or if not exists to external listeners.\n * It's has an optional mechanism for automatic management of response handlers.\n * The response handler will be unregistered after receiving the response, or after response timeout (default to 3s).\n * @param {Message} msg Message to send. Message ID is automatically added to the message.\n * @param {Function} responseCallback Optional parameter, if the developer what's automatic response management.\n * @return {number} Returns the message ID, in case it should be needed for manual management of the response handler.\n */\n\n }, {\n key: 'postMessage',\n value: function postMessage(inMsg, responseCallback) {}\n\n /**\n * Function to post messages with a number of retries in case timeouts occur.\n * @param {Message} msg Message to send. Message ID is automatically added to the message.\n * @param {Function} responseCallback Optional parameter, if the developer what's automatic response management.\n * @param {integer} retries number of retries when timeouts occur\n * @return {boolean} message delivery result;\n */\n\n }, {\n key: 'postMessageWithRetries',\n value: function postMessageWithRetries(msg, retries, callback) {\n\n var _this = this;\n\n var retry = 0;\n //let timeout = true;\n\n var sendMsg = function sendMsg() {\n\n return new _promise2.default(function (resolve, reject) {\n _this.postMessage(msg, function (reply) {\n if (reply.body.code === 408 || reply.body.code === 500) reject();else {\n log.info('[Bus.postMessageWithRetries] msg delivered: ', msg);\n callback(reply);\n resolve();\n }\n });\n });\n };\n\n var tryAgain = function tryAgain() {\n sendMsg().then(function () {\n //timeout = false;\n return;\n }, function () {\n log.warn('[Bus.postMessageWithRetries] Message Bounced (retry ' + retry + '): \\'', msg);\n if (retry++ < retries) {\n tryAgain();\n // setTimeout(() => { tryAgain(); }, 1000);\n } else {\n var error = '[Error] Message Bounced (delivery attempts ' + retries + '): \\'';\n throw new Error(error + msg);\n }\n });\n };\n tryAgain();\n }\n\n /**\n * Not public available, used by the class extension implementation, to process messages from the public \"postMessage\" without a registered listener.\n * Used to send the message to an external interface, like a WebWorker, IFrame, etc.\n * @param {Message.Message} msg Message\n */\n\n }, {\n key: '_onPostMessage',\n value: function _onPostMessage(msg) {} /*implementation will send message to external system*/\n\n /**\n * Not public available, used by the class extension implementation, to process all messages that enter the MiniBus from an external interface, like a WebWorker, IFrame, etc.\n * This method is called one time in the constructor to register external listeners.\n * The implementation will probably call the \"_onMessage\" method to publish in the local listeners.\n * DO NOT call \"postMessage\", there is a danger that the message enters in a cycle!\n */\n\n }, {\n key: '_registerExternalListener',\n value: function _registerExternalListener() {/*implementation will register external listener and call \"this._onMessage(msg)\" */}\n }]);\n return Bus;\n}();\n\nvar MsgListener = function () {\n /* private\n _subscriptions: ;\n _url: string;\n _callback: (msg) => void;\n */\n\n function MsgListener(subscriptions, url, callback) {\n (0, _classCallCheck3.default)(this, MsgListener);\n\n var _this = this;\n\n _this._subscriptions = subscriptions;\n _this._url = url;\n _this._callback = callback;\n }\n\n (0, _createClass3.default)(MsgListener, [{\n key: 'remove',\n\n\n /**\n * Remove this listener from the Bus\n */\n value: function remove() {\n var _this = this;\n\n var subs = _this._subscriptions[_this._url];\n if (subs) {\n var index = subs.indexOf(_this);\n subs.splice(index, 1);\n\n //if there are no listeners, remove the subscription entirely.\n if (subs.length === 0) {\n delete _this._subscriptions[_this._url];\n }\n }\n }\n }, {\n key: 'url',\n get: function get() {\n return this._url;\n }\n }]);\n return MsgListener;\n}();\n\nexports.default = Bus;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjA0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9idXMvQnVzLmpzPzZkMTciXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4qIENvcHlyaWdodCAyMDE2IFBUIElub3Zhw6fDo28gZSBTaXN0ZW1hcyBTQVxuKiBDb3B5cmlnaHQgMjAxNiBJTkVTQy1JRFxuKiBDb3B5cmlnaHQgMjAxNiBRVU9CSVMgTkVUV09SS1MgU0xcbiogQ29weXJpZ2h0IDIwMTYgRlJBVU5IT0ZFUi1HRVNFTExTQ0hBRlQgWlVSIEZPRVJERVJVTkcgREVSIEFOR0VXQU5EVEVOIEZPUlNDSFVORyBFLlZcbiogQ29weXJpZ2h0IDIwMTYgT1JBTkdFIFNBXG4qIENvcHlyaWdodCAyMDE2IERldXRzY2hlIFRlbGVrb20gQUdcbiogQ29weXJpZ2h0IDIwMTYgQXBpemVlXG4qIENvcHlyaWdodCAyMDE2IFRFQ0hOSVNDSEUgVU5JVkVSU0lUQVQgQkVSTElOXG4qXG4qIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSBcIkxpY2Vuc2VcIik7XG4qIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS5cbiogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0XG4qXG4qICAgaHR0c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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7Ozs7Ozs7QUFRQTtBQUNBO0FBQ0E7Ozs7Ozs7Ozs7QUFTQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7O0FBS0E7QUFDQTtBQUNBOzs7Ozs7Ozs7QUFNQTs7Ozs7QUFJQTtBQUNBOzs7Ozs7QUFNQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFHQTs7O0FBR0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBbEJBO0FBQUE7QUFBQTs7Ozs7QUFxQkE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///204\n")},function(module,exports,__webpack_require__){eval('// version: 0.8.0\n// date: Tue Jan 09 2018 17:01:37 GMT+0000 (WET)\n// licence: \n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the "License");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an "AS IS" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n\n!function(e,t){ true?module.exports=t():"function"==typeof define&&define.amd?define("Utils",[],t):"object"==typeof exports?exports.Utils=t():(e[""]=e[""]||{},e[""].Utils=t())}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=196)}({0:function(e,t){var n=e.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},1:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},10:function(e,t,n){var r=n(8),o=n(15);e.exports=n(3)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},12:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},121:function(e,t){!function(){"use strict";if(!Object.observe&&"function"==typeof Proxy){function e(e,t,n,r,o,i){var u,c=this;function s(e,r){if(s.delay=r,!s.pause&&c.changeset.length>0){if(!e){var o=c.changeset.filter(function(e){return!n||n.indexOf(e.type)>=0});o.length>0&&t(o)}c.changeset=[]}}return s.pause=o,s.delay=i,c.get=function(e,t){return"__observer__"===t?c:"unobserve"===t?function(){return Object.unobserve(e),e}:"deliver"===t?s:e[t]},c.target=e,c.changeset=[],c.target.__observerCallbacks__||(Object.defineProperty(e,"__observerCallbacks__",{enumerable:!1,configurable:!0,writable:!1,value:[]}),Object.defineProperty(e,"__observers__",{enumerable:!1,configurable:!0,writable:!1,value:[]})),c.target.__observerCallbacks__.push(t),c.target.__observers__.push(this),u=new Proxy(e,c),s(!1,i),u}e.prototype.deliver=function(){return this.get(null,"deliver")},e.prototype.set=function(e,t,n){var r=e[t],o=void 0===r?"add":"update";if(e[t]=n,e.__observers__.indexOf(this)>=0&&(!this.acceptlist||this.acceptlist.indexOf(o)>=0)){var i={object:e,name:t,type:o},u=0===this.changeset.length,c=this.deliver();"update"===o&&(i.oldValue=r),this.changeset.push(i),u&&c(!1,"number"==typeof c.delay?c.delay:10)}return!0},e.prototype.deleteProperty=function(e,t){var n=e[t];if(delete e[t],e.__observers__.indexOf(this)>=0&&!this.acceptlist||this.acceptlist.indexOf("delete")>=0){var r={object:e,name:t,type:"delete",oldValue:n},o=0===this.changeset.length,i=this.deliver();this.changeset.push(r),o&&i(!1,"number"==typeof i.delay?i.delay:10)}return!0},e.prototype.defineProperty=function(e,t,n){if(Object.defineProperty(e,t,n),e.__observers__.indexOf(this)>=0&&!this.acceptlist||this.acceptlist.indexOf("reconfigure")>=0){var r={object:e,name:t,type:"reconfigure"},o=0===this.changeset.length,i=this.deliver();this.changeset.push(r),o&&i(!1,"number"==typeof i.delay?i.delay:10)}return!0},e.prototype.setPrototypeOf=function(e,t){var n=Object.getPrototypeOf(e);if(Object.setPrototypeOf(e,t),e.__observers__.indexOf(this)>=0&&!this.acceptlist||this.acceptlist.indexOf("setPrototype")>=0){var r={object:e,name:"__proto__",type:"setPrototype",oldValue:n},o=0===this.changeset.length,i=this.deliver();this.changeset.push(r),o&&i(!1,"number"==typeof i.delay?i.delay:10)}return!0},e.prototype.preventExtensions=function(e){if(Object.preventExtensions(e),e.__observers__.indexOf(this)>=0&&!this.acceptlist||this.acceptlist.indexOf("preventExtensions")>=0){var t={object:e,type:"preventExtensions"},n=0===this.changeset.length,r=this.deliver();this.changeset.push(t),n&&r(!1,"number"==typeof r.delay?r.delay:10)}return!0},Object.observe=function(t,n,r,o,i,u){return new e(t,n,r,o,i,u)},Object.unobserve=function(e,t){if(e.__observerCallbacks__){if(!t)return e.__observerCallbacks__.splice(0,e.__observerCallbacks__.length),void e.__observers__.splice(0,e.__observers__.length);e.__observerCallbacks__.forEach(function(n,r){t===n&&(e.__observerCallbacks__.splice(r,1),delete e.__observers__[r].callback,e.__observers__.splice(r,1))})}},Array.observe=function(e,t,n,r,o,i){if(!(e instanceof Array||Array.isArray(e)))throw new TypeError("First argument to Array.observer is not an Array");n=n||["add","update","delete","splice"];var u=new Proxy(e,{get:function(t,r){return"unobserve"===r?function(e){return e?Object.unobserve(t,e):t.unobserve()}:"splice"===r?function(r,o){if("number"!=typeof r||"number"!=typeof o)throw new TypeError("First two arguments to Array splice are not number, number");var i=this.slice(r,r+o),u=arguments.length>1?arguments.length-2:0,s={object:e,type:"splice",index:r,removed:i,addedCount:u};if(t.splice.apply(t,arguments),n.indexOf("splice")>=0){r=0===c.__observer__.changeset.length;var a=c.__observer__.deliver();c.__observer__.changeset.push(s),r&&a(!1,"number"==typeof a.delay?a.delay:10)}}:"push"===r?function(e){return this.splice(this.length,0,e)}:"pop"===r?function(){return this.splice(this.length-1,1)}:"unshift"===r?function(e){return this.splice(0,0,e)}:"shift"===r?function(){return this.splice(0,1)}:t[r]}}),c=Object.observe(u,function(e){var r=e.filter(function(e){return"length"!==e.name&&"add"!==e.name&&(!n||n.indexOf(e.type)>=0)});r.length>0&&t(r)},n,r,o,i);return c},Array.unobserve=function(e,t){return e.unobserve(t)}}Object.deepObserve=function(e,t,n){var r=function(e){return{}.toString.call(e).match(/\\s([a-zA-Z]+)/)[1].toLowerCase()};function o(e,n){Object.keys(e).forEach(function(o){if(("object"===r(e[o])||"array"===r(e[o]))&&!e[o].hasOwnProperty("__observers__")){var i=n.slice(0);i.push(o),e[o]=Object.deepObserve(e[o],t,i)}})}return o(e,n=n||[]),Object.observe(e,function(e){var r=[];e.forEach(function(e){var t=(n.length>0?n.join(".")+".":"")+e.name;"update"!==e.type&&"add"!==e.type||o(e.object,n),r.push({name:e.name,object:e.object,type:e.type,oldValue:e.oldValue,newValue:e.object[e.name],keypath:t}),function e(t,n,o,i,u){i instanceof Object?Object.keys(i).forEach(function(c){if(!o||o[c]!==i[c]){var s=o&&void 0!==o[c]?o[c]:void 0,a=void 0===s?"add":"update",f=u+"."+c;r.push({name:t,object:n,type:a,oldValue:s,newValue:i[c],keypath:f}),e(t,n,s,i[c],f)}}):o instanceof Object&&Object.keys(o).forEach(function(c){var s=null===i?"update":"delete",a=u+"."+c;r.push({name:t,object:n,type:s,oldValue:o[c],newValue:i,keypath:a}),e(t,n,o[c],void 0,a)})}(e.name,e.object,e.oldValue,e.object[e.name],t)}),t(r)})}}()},14:function(e,t,n){var r=n(22);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},15:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},196:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatchingYou=void 0;var r,o=n(197),i=(r=o)&&r.__esModule?r:{default:r};t.WatchingYou=i.default},197:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(4)),o=i(n(7));function i(e){return e&&e.__esModule?e:{default:e}}n(121);var u=function(){function e(){(0,r.default)(this,e),this._watching={},this._observers=[]}return(0,o.default)(e,[{key:"watch",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this._watching[e]=r?Object.deepObserve(t,function(t){t.every(function(t){n._fireEvent(e,t)})}):Object.observe(t,function(t){t.every(function(t){n._fireEvent(e,t)})}),this._watching[e]}},{key:"observe",value:function(e,t){this._observers.push({key:e,callback:t})}},{key:"_fireEvent",value:function(e,t){this._observers.filter(function(t){return t.key===e}).forEach(function(e){e.callback(t)})}}]),e}();t.default=u,e.exports=t.default},22:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},24:function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can\'t convert object to primitive value")}},26:function(e,t,n){var r=n(6),o=n(1).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},3:function(e,t,n){e.exports=!n(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},38:function(e,t,n){e.exports=!n(3)&&!n(12)(function(){return 7!=Object.defineProperty(n(26)("div"),"a",{get:function(){return 7}}).a})},4:function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},5:function(e,t,n){var r=n(1),o=n(0),i=n(14),u=n(10),c="prototype",s=function(e,t,n){var a,f,l,p=e&s.F,d=e&s.G,v=e&s.S,b=e&s.P,h=e&s.B,_=e&s.W,y=d?o:o[t]||(o[t]={}),g=y[c],j=d?r:v?r[t]:(r[t]||{})[c];d&&(n=t);for(a in n)(f=!p&&j&&void 0!==j[a])&&a in y||(l=f?j[a]:n[a],y[a]=d&&"function"!=typeof j[a]?n[a]:h&&f?i(l,r):_&&j[a]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[c]=e[c],t}(l):b&&"function"==typeof l?i(Function.call,l):l,b&&((y.virtual||(y.virtual={}))[a]=l,e&s.R&&g&&!g[a]&&u(g,a,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},55:function(e,t,n){e.exports={default:n(60),__esModule:!0}},6:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},60:function(e,t,n){n(61);var r=n(0).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},61:function(e,t,n){var r=n(5);r(r.S+r.F*!n(3),"Object",{defineProperty:n(8).f})},7:function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(55),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n\n* @classdesc Class to combine the authorization decisions that result from rules evaluation.\n*/\nvar AllowOverrides = function () {\n function AllowOverrides() {\n (0, _classCallCheck3.default)(this, AllowOverrides);\n }\n\n (0, _createClass3.default)(AllowOverrides, [{\n key: 'combine',\n\n\n /**\n * Given an array of individual authorization decisions, prioritizes a positive one.\n * @param {boolean[]} decisions\n * @returns {boolean}\n */\n value: function combine(decisions) {\n if (decisions.indexOf(true) !== -1) {\n return true;\n } else {\n if (decisions.indexOf(false) !== -1) {\n return false;\n } else {\n return 'Not Applicable';\n }\n }\n }\n }]);\n return AllowOverrides;\n}();\n\nexports.default = AllowOverrides;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjA2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29tYmluaW5nQWxnb3JpdGhtcy9BbGxvd092ZXJyaWRlcy5qcz80YzQ3Il0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXM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Ozs7Ozs7Ozs7Ozs7Ozs7QUF1QkE7Ozs7QUFJQTs7Ozs7Ozs7O0FBRUE7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///206\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n/**\n* @author Ana Caldeira \n* @classdesc Class to combine the authorization decisions that result from rules evaluation.\n*/\nvar BlockOverrides = function () {\n function BlockOverrides() {\n (0, _classCallCheck3.default)(this, BlockOverrides);\n }\n\n (0, _createClass3.default)(BlockOverrides, [{\n key: 'combine',\n\n\n /**\n * Given an array of individual authorisation decisions, prioritises a negative one.\n * @param {boolean[]} decisions\n * @returns {boolean}\n */\n value: function combine(decisions) {\n if (decisions.indexOf(false) !== -1) {\n return false;\n } else {\n if (decisions.indexOf(true) !== -1) {\n return true;\n } else {\n return 'Not Applicable';\n }\n }\n }\n }]);\n return BlockOverrides;\n}();\n\nexports.default = BlockOverrides;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjA3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29tYmluaW5nQWxnb3JpdGhtcy9CbG9ja092ZXJyaWRlcy5qcz82MWM3Il0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1JTQ0hVTkcgRS5WXG4qIENvcHlyaWdodCAyMDE2IE9SQU5HRSBTQVxuKiBDb3B5cmlnaHQgMjAxNiBEZXV0c2NoZSBUZWxla29tIEFHXG4qIENvcHlyaWdodCAyMDE2IEFwaXplZVxuKiBDb3B5cmlnaHQgMjAxNiBURUNITklTQ0hFIFVOSVZFUlNJVEFUIEJFUkxJTlxuKlxuKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgXCJMaWNlbnNlXCIpO1xuKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuXG4qIFlvdS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c2lvbnMuaW5kZXhPZihmYWxzZSkgIT09IC0xKSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfSBlbHNlIHtcbiAgICAgIGlmIChkZWNpc2lvbnMuaW5kZXhPZih0cnVlKSAhPT0gLTEpIHtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gJ05vdCBBcHBsaWNhYmxlJztcbiAgICAgIH1cbiAgICB9XG4gIH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCBCbG9ja092ZXJyaWRlcztcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvcG9saWN5L2NvbWJpbmluZ0FsZ29yaXRobXMvQmxvY2tPdmVycmlkZXMuanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUF1QkE7Ozs7QUFJQTs7Ozs7Ozs7O0FBRUE7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///207\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n/**\n* @author Ana Caldeira \n* @classdesc Class to combine the authorization decisions that result from rules evaluation.\n*/\nvar FirstApplicable = function () {\n function FirstApplicable() {\n (0, _classCallCheck3.default)(this, FirstApplicable);\n }\n\n (0, _createClass3.default)(FirstApplicable, [{\n key: 'combine',\n\n\n /**\n * Given an array of individual authorisation decisions, returns the first one different from 'Not Applicable', either positive or negative.\n * @param {boolean[]} decisions\n * @returns {boolean}\n */\n value: function combine(decisions) {\n for (var i in decisions) {\n if (decisions[i] !== 'Not Applicable') {\n return decisions[i];\n }\n }\n return 'Not Applicable';\n }\n }]);\n return FirstApplicable;\n}();\n\nexports.default = FirstApplicable;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjA4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29tYmluaW5nQWxnb3JpdGhtcy9GaXJzdEFwcGxpY2FibGUuanM/MzNkZSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE2IFFVT0JJUyBORVRXT1JLUyBTTFxuKiBDb3B5cmlnaHQgMjA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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///208\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(500), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjA5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9hcnJheS9mcm9tLmpzPzczZjQiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL2FycmF5L2Zyb21cIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvYXJyYXkvZnJvbS5qc1xuLy8gbW9kdWxlIGlkID0gMjA5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///209\n')},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(507), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjEwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvdmFsdWVzLmpzPzgxMTEiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC92YWx1ZXNcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvb2JqZWN0L3ZhbHVlcy5qc1xuLy8gbW9kdWxlIGlkID0gMjEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///210\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('SynSubscription'); // Log System\n\nvar Subscription = function () {\n function Subscription(bus, owner, url, childrens, isReporter) {\n (0, _classCallCheck3.default)(this, Subscription);\n\n var _this = this;\n var childBaseURL = url + '/children/';\n var changeURL = url + '/changes';\n\n //process delete message\n _this._deleteListener = bus.addListener(changeURL, function (msg) {\n if (msg.type === 'delete') {\n log.log('Subscription-DELETE: ', msg);\n\n //FLOW-OUT: message sent to all subscribers\n var deleteMessageToHyperty = {\n type: 'delete', from: msg.from, to: owner,\n body: { identity: msg.body.identity, resource: url }\n };\n\n //send delete to hyperty\n bus.postMessage(deleteMessageToHyperty, function (reply) {\n log.log('Subscription-DELETE-REPLY: ', reply);\n if (reply.body.code === 200) {\n _this._releaseListeners();\n }\n });\n }\n });\n\n //add change publish address or forward\n if (isReporter) {\n _this._changeListener = bus.addPublish(changeURL);\n } else {\n _this._changeListener = bus.addForward(changeURL, owner);\n }\n\n _this._childrenListeners = [];\n log.log('[Subscription] - childID', childrens);\n childrens.forEach(function (child) {\n var childId = childBaseURL + child;\n\n log.log('[Subscription] - childID', childBaseURL, childId, child);\n\n //add children publish address\n var childrenForward = bus.addPublish(childId);\n _this._childrenListeners.push(childrenForward);\n\n //add self forward if an observer\n if (!isReporter) {\n var selfForward = bus.addForward(childId, owner);\n _this._childrenListeners.push(selfForward);\n }\n });\n }\n\n (0, _createClass3.default)(Subscription, [{\n key: '_releaseListeners',\n value: function _releaseListeners() {\n var _this = this;\n\n _this._deleteListener.remove();\n\n _this._changeListener.remove();\n\n _this._childrenListeners.forEach(function (forward) {\n forward.remove();\n });\n }\n }]);\n return Subscription;\n}();\n\nexports.default = Subscription;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjExLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zeW5jaGVyL1N1YnNjcmlwdGlvbi5qcz8yZTg1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIExvZyBTeXN0ZW1cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignU3luU3Vic2NyaXB0aW9uJyk7XG5cbmNsYXNzIFN1YnNjcmlwdGlvbiB7XG5cbiAgY29uc3RydWN0b3IoYnVzLCBvd25lciwgdXJsLCBjaGlsZHJlbnMsIGlzUmVwb3J0ZXIpIHtcbiAgICBsZXQgX3RoaXMgPSB0aGlzO1xuICAgIGxldCBjaGlsZEJ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GVMaXN0ZW5lci5yZW1vdmUoKTtcblxuICAgIF90aGlzLl9jaGFuZ2VMaXN0ZW5lci5yZW1vdmUoKTtcblxuICAgIF90aGlzLl9jaGlsZHJlbkxpc3RlbmVycy5mb3JFYWNoKChmb3J3YXJkKSA9PiB7XG4gICAgICBmb3J3YXJkLnJlbW92ZSgpO1xuICAgIH0pO1xuICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgU3Vic2NyaXB0aW9uO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9zeW5jaGVyL1N1YnNjcmlwdGlvbi5qcyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFDQTtBQUNBO0FBREE7QUFDQTs7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFFQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBQ0E7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///211\n")},function(e,n,t){t(213),e.exports=t(415)},function(module,exports,__webpack_require__){"use strict";eval('/* WEBPACK VAR INJECTION */(function(global) {\n\n__webpack_require__(214);\n\n__webpack_require__(411);\n\n__webpack_require__(412);\n\nif (global._babelPolyfill) {\n throw new Error("only one instance of babel-polyfill is allowed");\n}\nglobal._babelPolyfill = true;\n\nvar DEFINE_PROPERTY = "defineProperty";\nfunction define(O, key, value) {\n O[key] || Object[DEFINE_PROPERTY](O, key, {\n writable: true,\n configurable: true,\n value: value\n });\n}\n\ndefine(String.prototype, "padLeft", "".padStart);\ndefine(String.prototype, "padRight", "".padEnd);\n\n"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) {\n [][key] && define(Array, key, Function.call.bind([][key]));\n});\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(147)))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjEzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXBvbHlmaWxsL2xpYi9pbmRleC5qcz84ZjU4Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5yZXF1aXJlKFwiY29yZS1qcy9zaGltXCIpO1xuXG5yZXF1aXJlKFwicmVnZW5lcmF0b3ItcnVudGltZS9ydW50aW1lXCIpO1xuXG5yZXF1aXJlKFwiY29yZS1qcy9mbi9yZWdleHAvZXNjYXBlXCIpO1xuXG5pZiAoZ2xvYmFsLl9iYWJlbFBvbHlmaWxsKSB7XG4gIHRocm93IG5ldyBFcnJvcihcIm9ubHkgb25lIGluc3RhbmNlIG9mIGJhYmVsLXBvbHlmaWxsIGlzIGFsbG93ZWRcIik7XG59XG5nbG9iYWwuX2JhYmVsUG9seWZpbGwgPSB0cnVlO1xuXG52YXIgREVGSU5FX1BST1BFUlRZID0gXCJkZWZpbmVQcm9wZXJ0eVwiO1xuZnVuY3Rpb24gZGVmaW5lKE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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///213\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(215);\n__webpack_require__(217);\n__webpack_require__(218);\n__webpack_require__(219);\n__webpack_require__(220);\n__webpack_require__(221);\n__webpack_require__(222);\n__webpack_require__(223);\n__webpack_require__(224);\n__webpack_require__(225);\n__webpack_require__(226);\n__webpack_require__(227);\n__webpack_require__(228);\n__webpack_require__(229);\n__webpack_require__(230);\n__webpack_require__(231);\n__webpack_require__(233);\n__webpack_require__(234);\n__webpack_require__(235);\n__webpack_require__(236);\n__webpack_require__(237);\n__webpack_require__(238);\n__webpack_require__(239);\n__webpack_require__(240);\n__webpack_require__(241);\n__webpack_require__(242);\n__webpack_require__(243);\n__webpack_require__(244);\n__webpack_require__(245);\n__webpack_require__(246);\n__webpack_require__(247);\n__webpack_require__(248);\n__webpack_require__(249);\n__webpack_require__(250);\n__webpack_require__(251);\n__webpack_require__(252);\n__webpack_require__(253);\n__webpack_require__(254);\n__webpack_require__(255);\n__webpack_require__(256);\n__webpack_require__(257);\n__webpack_require__(258);\n__webpack_require__(259);\n__webpack_require__(260);\n__webpack_require__(261);\n__webpack_require__(262);\n__webpack_require__(263);\n__webpack_require__(264);\n__webpack_require__(265);\n__webpack_require__(266);\n__webpack_require__(267);\n__webpack_require__(268);\n__webpack_require__(269);\n__webpack_require__(270);\n__webpack_require__(271);\n__webpack_require__(272);\n__webpack_require__(273);\n__webpack_require__(274);\n__webpack_require__(275);\n__webpack_require__(276);\n__webpack_require__(277);\n__webpack_require__(278);\n__webpack_require__(279);\n__webpack_require__(280);\n__webpack_require__(281);\n__webpack_require__(282);\n__webpack_require__(283);\n__webpack_require__(284);\n__webpack_require__(285);\n__webpack_require__(286);\n__webpack_require__(287);\n__webpack_require__(288);\n__webpack_require__(289);\n__webpack_require__(290);\n__webpack_require__(291);\n__webpack_require__(292);\n__webpack_require__(293);\n__webpack_require__(295);\n__webpack_require__(296);\n__webpack_require__(298);\n__webpack_require__(299);\n__webpack_require__(300);\n__webpack_require__(301);\n__webpack_require__(302);\n__webpack_require__(303);\n__webpack_require__(304);\n__webpack_require__(306);\n__webpack_require__(307);\n__webpack_require__(308);\n__webpack_require__(309);\n__webpack_require__(310);\n__webpack_require__(311);\n__webpack_require__(312);\n__webpack_require__(313);\n__webpack_require__(314);\n__webpack_require__(315);\n__webpack_require__(316);\n__webpack_require__(317);\n__webpack_require__(318);\n__webpack_require__(122);\n__webpack_require__(319);\n__webpack_require__(320);\n__webpack_require__(166);\n__webpack_require__(321);\n__webpack_require__(322);\n__webpack_require__(323);\n__webpack_require__(324);\n__webpack_require__(325);\n__webpack_require__(169);\n__webpack_require__(171);\n__webpack_require__(172);\n__webpack_require__(326);\n__webpack_require__(327);\n__webpack_require__(328);\n__webpack_require__(329);\n__webpack_require__(330);\n__webpack_require__(331);\n__webpack_require__(332);\n__webpack_require__(333);\n__webpack_require__(334);\n__webpack_require__(335);\n__webpack_require__(336);\n__webpack_require__(337);\n__webpack_require__(338);\n__webpack_require__(339);\n__webpack_require__(340);\n__webpack_require__(341);\n__webpack_require__(342);\n__webpack_require__(343);\n__webpack_require__(344);\n__webpack_require__(345);\n__webpack_require__(346);\n__webpack_require__(347);\n__webpack_require__(348);\n__webpack_require__(349);\n__webpack_require__(350);\n__webpack_require__(351);\n__webpack_require__(352);\n__webpack_require__(353);\n__webpack_require__(354);\n__webpack_require__(355);\n__webpack_require__(356);\n__webpack_require__(357);\n__webpack_require__(358);\n__webpack_require__(359);\n__webpack_require__(360);\n__webpack_require__(361);\n__webpack_require__(362);\n__webpack_require__(363);\n__webpack_require__(364);\n__webpack_require__(365);\n__webpack_require__(366);\n__webpack_require__(367);\n__webpack_require__(368);\n__webpack_require__(369);\n__webpack_require__(370);\n__webpack_require__(371);\n__webpack_require__(372);\n__webpack_require__(373);\n__webpack_require__(374);\n__webpack_require__(375);\n__webpack_require__(376);\n__webpack_require__(377);\n__webpack_require__(378);\n__webpack_require__(379);\n__webpack_require__(380);\n__webpack_require__(381);\n__webpack_require__(382);\n__webpack_require__(383);\n__webpack_require__(384);\n__webpack_require__(385);\n__webpack_require__(386);\n__webpack_require__(387);\n__webpack_require__(388);\n__webpack_require__(389);\n__webpack_require__(390);\n__webpack_require__(391);\n__webpack_require__(392);\n__webpack_require__(393);\n__webpack_require__(394);\n__webpack_require__(395);\n__webpack_require__(396);\n__webpack_require__(397);\n__webpack_require__(398);\n__webpack_require__(399);\n__webpack_require__(400);\n__webpack_require__(401);\n__webpack_require__(402);\n__webpack_require__(403);\n__webpack_require__(404);\n__webpack_require__(405);\n__webpack_require__(406);\n__webpack_require__(407);\n__webpack_require__(408);\n__webpack_require__(409);\n__webpack_require__(410);\nmodule.exports = __webpack_require__(30);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvc2hpbS5qcz9lMGNkIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vbW9kdWxlcy9lczYuc3ltYm9sJyk7XG5yZXF1aXJlKCcuL21vZHVsZXMvZXM2Lm9iamVjdC5jcmVhdGUnKTtcbnJlcXVpcmUoJy4vbW9kdWxlcy9lczYub2JqZWN0LmRlZmluZS1wcm9wZXJ0eScpO1xucmVxdWlyZSgnLi9tb2R1bGVzL2VzNi5vYmplY3QuZGVmaW5lLXByb3BlcnRpZXMnKTtcbnJlcXVpcmUoJy4vbW9kdWxlcy9lczYub2JqZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvcicpO1xucmVxdWlyZSgnLi9tb2R1bGVzL2VzNi5vYmplY3QuZ2V0LXByb3RvdHlwZS1vZicpO1xucmVxdWlyZSgnLi9tb2R1bGVzL2VzNi5vYmpl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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///214\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// ECMAScript 6 symbols shim\nvar global = __webpack_require__(4);\nvar has = __webpack_require__(17);\nvar DESCRIPTORS = __webpack_require__(10);\nvar $export = __webpack_require__(0);\nvar redefine = __webpack_require__(19);\nvar META = __webpack_require__(42).KEY;\nvar $fails = __webpack_require__(5);\nvar shared = __webpack_require__(78);\nvar setToStringTag = __webpack_require__(61);\nvar uid = __webpack_require__(48);\nvar wks = __webpack_require__(8);\nvar wksExt = __webpack_require__(149);\nvar wksDefine = __webpack_require__(102);\nvar enumKeys = __webpack_require__(216);\nvar isArray = __webpack_require__(81);\nvar anObject = __webpack_require__(3);\nvar isObject = __webpack_require__(6);\nvar toIObject = __webpack_require__(24);\nvar toPrimitive = __webpack_require__(31);\nvar createDesc = __webpack_require__(47);\nvar _create = __webpack_require__(52);\nvar gOPNExt = __webpack_require__(152);\nvar $GOPD = __webpack_require__(25);\nvar $DP = __webpack_require__(11);\nvar $keys = __webpack_require__(50);\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(53).f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(71).f = $propertyIsEnumerable;\n __webpack_require__(80).f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !__webpack_require__(49)) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(18)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3ltYm9sLmpzPzAzNDkiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gRUNNQVNjcmlwdCA2IHN5bWJvbHMgc2hpbVxudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIGhhcyA9IHJlcXVpcmUoJy4vX2hhcycpO1xudmFyIERFU0NSSVBUT1JTID0gcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKTtcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgcmVkZWZpbmUgPSByZXF1aXJlKCcuL19yZWRlZmluZScpO1xudmFyIE1FVEEgPSByZXF1aXJlKCcuL19tZXRhJykuS0VZO1xudmFyICRmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG52YXIgc2hhcmVkID0gcmVxdWlyZSgnLi9fc2hhcmVkJyk7XG52YXIgc2V0VG9TdHJpbmdUYWcgPSByZXF1aXJlKCcuL19zZXQtdG8tc3RyaW5nLXRhZycpO1xudmFyIHVpZCA9IHJlcXVpcmUoJy4vX3VpZCcpO1xudmFyIHdrcyA9IHJlcXVpcmUoJy4vX3drcycpO1xudmFyIHdrc0V4dCA9IHJlcXVpcmUoJy4vX3drcy1leHQnKTtcbnZhciB3a3NEZWZpbmUgPSByZXF1aXJlKCcuL193a3MtZGVmaW5lJyk7XG52YXIgZW51bUtleXMgPSByZXF1aXJlKCc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7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///215\n")},function(module,exports,__webpack_require__){eval("// all enumerable object keys, includes symbols\nvar getKeys = __webpack_require__(50);\nvar gOPS = __webpack_require__(80);\nvar pIE = __webpack_require__(71);\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZW51bS1rZXlzLmpzPzBiZTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gYWxsIGVudW1lcmFibGUgb2JqZWN0IGtleXMsIGluY2x1ZGVzIHN5bWJvbHNcbnZhciBnZXRLZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMnKTtcbnZhciBnT1BTID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcHMnKTtcbnZhciBwSUUgPSByZXF1aXJlKCcuL19vYmplY3QtcGllJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICB2YXIgcmVzdWx0ID0gZ2V0S2V5cyhpdCk7XG4gIHZhciBnZXRTeW1ib2xzID0gZ09QUy5mO1xuICBpZiAoZ2V0U3ltYm9scykge1xuICAgIHZhciBzeW1ib2xzID0gZ2V0U3ltYm9scyhpdCk7XG4gICAgdmFyIGlzRW51bSA9IHBJRS5mO1xuICAgIHZhciBpID0gMDtcbiAgICB2YXIga2V5O1xuICAgIHdoaWxlIChzeW1ib2xzLmxlbmd0aCA+IGkpIGlmIChpc0VudW0uY2FsbChpdCwga2V5ID0gc3ltYm9sc1tpKytdKSkgcmVzdWx0LnB1c2goa2V5KTtcbiAgfSByZXR1cm4gcmVzdWx0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZW51bS1rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSAyMTZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///216\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: __webpack_require__(52) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmNyZWF0ZS5qcz84YmFmIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG4vLyAxOS4xLjIuMiAvIDE1LjIuMy41IE9iamVjdC5jcmVhdGUoTyBbLCBQcm9wZXJ0aWVzXSlcbiRleHBvcnQoJGV4cG9ydC5TLCAnT2JqZWN0JywgeyBjcmVhdGU6IHJlcXVpcmUoJy4vX29iamVjdC1jcmVhdGUnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmNyZWF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjE3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///217\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !__webpack_require__(10), 'Object', { defineProperty: __webpack_require__(11).f });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmRlZmluZS1wcm9wZXJ0eS5qcz80MzMyIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG4vLyAxOS4xLjIuNCAvIDE1LjIuMy42IE9iamVjdC5kZWZpbmVQcm9wZXJ0eShPLCBQLCBBdHRyaWJ1dGVzKVxuJGV4cG9ydCgkZXhwb3J0LlMgKyAkZXhwb3J0LkYgKiAhcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKSwgJ09iamVjdCcsIHsgZGVmaW5lUHJvcGVydHk6IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmYgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC5kZWZpbmUtcHJvcGVydHkuanNcbi8vIG1vZHVsZSBpZCA9IDIxOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///218\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\n// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)\n$export($export.S + $export.F * !__webpack_require__(10), 'Object', { defineProperties: __webpack_require__(151) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmRlZmluZS1wcm9wZXJ0aWVzLmpzPzFlMTkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbi8vIDE5LjEuMi4zIC8gMTUuMi4zLjcgT2JqZWN0LmRlZmluZVByb3BlcnRpZXMoTywgUHJvcGVydGllcylcbiRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJyksICdPYmplY3QnLCB7IGRlZmluZVByb3BlcnRpZXM6IHJlcXVpcmUoJy4vX29iamVjdC1kcHMnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmRlZmluZS1wcm9wZXJ0aWVzLmpzXG4vLyBtb2R1bGUgaWQgPSAyMTlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///219\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\nvar toIObject = __webpack_require__(24);\nvar $getOwnPropertyDescriptor = __webpack_require__(25).f;\n\n__webpack_require__(34)('getOwnPropertyDescriptor', function () {\n return function getOwnPropertyDescriptor(it, key) {\n return $getOwnPropertyDescriptor(toIObject(it), key);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvci5qcz8wYmVlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi42IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoTywgUClcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgJGdldE93blByb3BlcnR5RGVzY3JpcHRvciA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BkJykuZjtcblxucmVxdWlyZSgnLi9fb2JqZWN0LXNhcCcpKCdnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3InLCBmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBmdW5jdGlvbiBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoaXQsIGtleSkge1xuICAgIHJldHVybiAkZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKHRvSU9iamVjdChpdCksIGtleSk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvci5qc1xuLy8gbW9kdWxlIGlkID0gMjIwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///220\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = __webpack_require__(15);\nvar $getPrototypeOf = __webpack_require__(26);\n\n__webpack_require__(34)('getPrototypeOf', function () {\n return function getPrototypeOf(it) {\n return $getPrototypeOf(toObject(it));\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmdldC1wcm90b3R5cGUtb2YuanM/NWI4NiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuOSBPYmplY3QuZ2V0UHJvdG90eXBlT2YoTylcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyICRnZXRQcm90b3R5cGVPZiA9IHJlcXVpcmUoJy4vX29iamVjdC1ncG8nKTtcblxucmVxdWlyZSgnLi9fb2JqZWN0LXNhcCcpKCdnZXRQcm90b3R5cGVPZicsIGZ1bmN0aW9uICgpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGdldFByb3RvdHlwZU9mKGl0KSB7XG4gICAgcmV0dXJuICRnZXRQcm90b3R5cGVPZih0b09iamVjdChpdCkpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC5nZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSAyMjFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///221\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.14 Object.keys(O)\nvar toObject = __webpack_require__(15);\nvar $keys = __webpack_require__(50);\n\n__webpack_require__(34)('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmtleXMuanM/YjQ5YyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuMTQgT2JqZWN0LmtleXMoTylcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyICRrZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMnKTtcblxucmVxdWlyZSgnLi9fb2JqZWN0LXNhcCcpKCdrZXlzJywgZnVuY3Rpb24gKCkge1xuICByZXR1cm4gZnVuY3Rpb24ga2V5cyhpdCkge1xuICAgIHJldHVybiAka2V5cyh0b09iamVjdChpdCkpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC5rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSAyMjJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///222\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.7 Object.getOwnPropertyNames(O)\n__webpack_require__(34)('getOwnPropertyNames', function () {\n return __webpack_require__(152).f;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmdldC1vd24tcHJvcGVydHktbmFtZXMuanM/NzgyZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuNyBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyhPKVxucmVxdWlyZSgnLi9fb2JqZWN0LXNhcCcpKCdnZXRPd25Qcm9wZXJ0eU5hbWVzJywgZnVuY3Rpb24gKCkge1xuICByZXR1cm4gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcG4tZXh0JykuZjtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5vYmplY3QuZ2V0LW93bi1wcm9wZXJ0eS1uYW1lcy5qc1xuLy8gbW9kdWxlIGlkID0gMjIzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///223\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.5 Object.freeze(O)\nvar isObject = __webpack_require__(6);\nvar meta = __webpack_require__(42).onFreeze;\n\n__webpack_require__(34)('freeze', function ($freeze) {\n return function freeze(it) {\n return $freeze && isObject(it) ? $freeze(meta(it)) : it;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmZyZWV6ZS5qcz81NTM5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi41IE9iamVjdC5mcmVlemUoTylcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIG1ldGEgPSByZXF1aXJlKCcuL19tZXRhJykub25GcmVlemU7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgnZnJlZXplJywgZnVuY3Rpb24gKCRmcmVlemUpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGZyZWV6ZShpdCkge1xuICAgIHJldHVybiAkZnJlZXplICYmIGlzT2JqZWN0KGl0KSA/ICRmcmVlemUobWV0YShpdCkpIDogaXQ7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmZyZWV6ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjI0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///224\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.17 Object.seal(O)\nvar isObject = __webpack_require__(6);\nvar meta = __webpack_require__(42).onFreeze;\n\n__webpack_require__(34)('seal', function ($seal) {\n return function seal(it) {\n return $seal && isObject(it) ? $seal(meta(it)) : it;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LnNlYWwuanM/NWJmMiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuMTcgT2JqZWN0LnNlYWwoTylcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIG1ldGEgPSByZXF1aXJlKCcuL19tZXRhJykub25GcmVlemU7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgnc2VhbCcsIGZ1bmN0aW9uICgkc2VhbCkge1xuICByZXR1cm4gZnVuY3Rpb24gc2VhbChpdCkge1xuICAgIHJldHVybiAkc2VhbCAmJiBpc09iamVjdChpdCkgPyAkc2VhbChtZXRhKGl0KSkgOiBpdDtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5vYmplY3Quc2VhbC5qc1xuLy8gbW9kdWxlIGlkID0gMjI1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///225\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.15 Object.preventExtensions(O)\nvar isObject = __webpack_require__(6);\nvar meta = __webpack_require__(42).onFreeze;\n\n__webpack_require__(34)('preventExtensions', function ($preventExtensions) {\n return function preventExtensions(it) {\n return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LnByZXZlbnQtZXh0ZW5zaW9ucy5qcz82Mzk3Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi4xNSBPYmplY3QucHJldmVudEV4dGVuc2lvbnMoTylcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIG1ldGEgPSByZXF1aXJlKCcuL19tZXRhJykub25GcmVlemU7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgncHJldmVudEV4dGVuc2lvbnMnLCBmdW5jdGlvbiAoJHByZXZlbnRFeHRlbnNpb25zKSB7XG4gIHJldHVybiBmdW5jdGlvbiBwcmV2ZW50RXh0ZW5zaW9ucyhpdCkge1xuICAgIHJldHVybiAkcHJldmVudEV4dGVuc2lvbnMgJiYgaXNPYmplY3QoaXQpID8gJHByZXZlbnRFeHRlbnNpb25zKG1ldGEoaXQpKSA6IGl0O1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC5wcmV2ZW50LWV4dGVuc2lvbnMuanNcbi8vIG1vZHVsZSBpZCA9IDIyNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///226\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.12 Object.isFrozen(O)\nvar isObject = __webpack_require__(6);\n\n__webpack_require__(34)('isFrozen', function ($isFrozen) {\n return function isFrozen(it) {\n return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLWZyb3plbi5qcz81YTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi4xMiBPYmplY3QuaXNGcm96ZW4oTylcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xuXG5yZXF1aXJlKCcuL19vYmplY3Qtc2FwJykoJ2lzRnJvemVuJywgZnVuY3Rpb24gKCRpc0Zyb3plbikge1xuICByZXR1cm4gZnVuY3Rpb24gaXNGcm96ZW4oaXQpIHtcbiAgICByZXR1cm4gaXNPYmplY3QoaXQpID8gJGlzRnJvemVuID8gJGlzRnJvemVuKGl0KSA6IGZhbHNlIDogdHJ1ZTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5vYmplY3QuaXMtZnJvemVuLmpzXG4vLyBtb2R1bGUgaWQgPSAyMjdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///227\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.13 Object.isSealed(O)\nvar isObject = __webpack_require__(6);\n\n__webpack_require__(34)('isSealed', function ($isSealed) {\n return function isSealed(it) {\n return isObject(it) ? $isSealed ? $isSealed(it) : false : true;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLXNlYWxlZC5qcz9mYjI4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi4xMyBPYmplY3QuaXNTZWFsZWQoTylcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xuXG5yZXF1aXJlKCcuL19vYmplY3Qtc2FwJykoJ2lzU2VhbGVkJywgZnVuY3Rpb24gKCRpc1NlYWxlZCkge1xuICByZXR1cm4gZnVuY3Rpb24gaXNTZWFsZWQoaXQpIHtcbiAgICByZXR1cm4gaXNPYmplY3QoaXQpID8gJGlzU2VhbGVkID8gJGlzU2VhbGVkKGl0KSA6IGZhbHNlIDogdHJ1ZTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5vYmplY3QuaXMtc2VhbGVkLmpzXG4vLyBtb2R1bGUgaWQgPSAyMjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///228\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.11 Object.isExtensible(O)\nvar isObject = __webpack_require__(6);\n\n__webpack_require__(34)('isExtensible', function ($isExtensible) {\n return function isExtensible(it) {\n return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjI5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLWV4dGVuc2libGUuanM/ODBmYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuMTEgT2JqZWN0LmlzRXh0ZW5zaWJsZShPKVxudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgnaXNFeHRlbnNpYmxlJywgZnVuY3Rpb24gKCRpc0V4dGVuc2libGUpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGlzRXh0ZW5zaWJsZShpdCkge1xuICAgIHJldHVybiBpc09iamVjdChpdCkgPyAkaXNFeHRlbnNpYmxlID8gJGlzRXh0ZW5zaWJsZShpdCkgOiB0cnVlIDogZmFsc2U7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLWV4dGVuc2libGUuanNcbi8vIG1vZHVsZSBpZCA9IDIyOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///229\n")},function(module,exports,__webpack_require__){eval("// 19.1.3.1 Object.assign(target, source)\nvar $export = __webpack_require__(0);\n\n$export($export.S + $export.F, 'Object', { assign: __webpack_require__(153) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmFzc2lnbi5qcz85ZjVkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMy4xIE9iamVjdC5hc3NpZ24odGFyZ2V0LCBzb3VyY2UpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiwgJ09iamVjdCcsIHsgYXNzaWduOiByZXF1aXJlKCcuL19vYmplY3QtYXNzaWduJykgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC5hc3NpZ24uanNcbi8vIG1vZHVsZSBpZCA9IDIzMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///230\n")},function(module,exports,__webpack_require__){eval("// 19.1.3.10 Object.is(value1, value2)\nvar $export = __webpack_require__(0);\n$export($export.S, 'Object', { is: __webpack_require__(232) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLmpzPzlkMWIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4zLjEwIE9iamVjdC5pcyh2YWx1ZTEsIHZhbHVlMilcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG4kZXhwb3J0KCRleHBvcnQuUywgJ09iamVjdCcsIHsgaXM6IHJlcXVpcmUoJy4vX3NhbWUtdmFsdWUnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LmlzLmpzXG4vLyBtb2R1bGUgaWQgPSAyMzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///231\n")},function(module,exports){eval("// 7.2.9 SameValue(x, y)\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc2FtZS12YWx1ZS5qcz9lMDg2Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMi45IFNhbWVWYWx1ZSh4LCB5KVxubW9kdWxlLmV4cG9ydHMgPSBPYmplY3QuaXMgfHwgZnVuY3Rpb24gaXMoeCwgeSkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tc2VsZi1jb21wYXJlXG4gIHJldHVybiB4ID09PSB5ID8geCAhPT0gMCB8fCAxIC8geCA9PT0gMSAvIHkgOiB4ICE9IHggJiYgeSAhPSB5O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fc2FtZS12YWx1ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjMyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///232\n")},function(module,exports,__webpack_require__){eval("// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = __webpack_require__(0);\n$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(106).set });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LnNldC1wcm90b3R5cGUtb2YuanM/OGViMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjMuMTkgT2JqZWN0LnNldFByb3RvdHlwZU9mKE8sIHByb3RvKVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbiRleHBvcnQoJGV4cG9ydC5TLCAnT2JqZWN0JywgeyBzZXRQcm90b3R5cGVPZjogcmVxdWlyZSgnLi9fc2V0LXByb3RvJykuc2V0IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5vYmplY3Quc2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gMjMzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///233\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 19.1.3.6 Object.prototype.toString()\nvar classof = __webpack_require__(72);\nvar test = {};\ntest[__webpack_require__(8)('toStringTag')] = 'z';\nif (test + '' != '[object z]') {\n __webpack_require__(19)(Object.prototype, 'toString', function toString() {\n return '[object ' + classof(this) + ']';\n }, true);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYub2JqZWN0LnRvLXN0cmluZy5qcz84MTg2Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDE5LjEuMy42IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcoKVxudmFyIGNsYXNzb2YgPSByZXF1aXJlKCcuL19jbGFzc29mJyk7XG52YXIgdGVzdCA9IHt9O1xudGVzdFtyZXF1aXJlKCcuL193a3MnKSgndG9TdHJpbmdUYWcnKV0gPSAneic7XG5pZiAodGVzdCArICcnICE9ICdbb2JqZWN0IHpdJykge1xuICByZXF1aXJlKCcuL19yZWRlZmluZScpKE9iamVjdC5wcm90b3R5cGUsICd0b1N0cmluZycsIGZ1bmN0aW9uIHRvU3RyaW5nKCkge1xuICAgIHJldHVybiAnW29iamVjdCAnICsgY2xhc3NvZih0aGlzKSArICddJztcbiAgfSwgdHJ1ZSk7XG59XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm9iamVjdC50by1zdHJpbmcuanNcbi8vIG1vZHVsZSBpZCA9IDIzNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///234\n")},function(module,exports,__webpack_require__){eval("// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)\nvar $export = __webpack_require__(0);\n\n$export($export.P, 'Function', { bind: __webpack_require__(154) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZnVuY3Rpb24uYmluZC5qcz9kZDBhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjIuMy4yIC8gMTUuMy40LjUgRnVuY3Rpb24ucHJvdG90eXBlLmJpbmQodGhpc0FyZywgYXJncy4uLilcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QLCAnRnVuY3Rpb24nLCB7IGJpbmQ6IHJlcXVpcmUoJy4vX2JpbmQnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZnVuY3Rpb24uYmluZC5qc1xuLy8gbW9kdWxlIGlkID0gMjM1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///235\n")},function(module,exports,__webpack_require__){eval("var dP = __webpack_require__(11).f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || __webpack_require__(10) && dP(FProto, NAME, {\n configurable: true,\n get: function () {\n try {\n return ('' + this).match(nameRE)[1];\n } catch (e) {\n return '';\n }\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZnVuY3Rpb24ubmFtZS5qcz8xMmU1Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBkUCA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmY7XG52YXIgRlByb3RvID0gRnVuY3Rpb24ucHJvdG90eXBlO1xudmFyIG5hbWVSRSA9IC9eXFxzKmZ1bmN0aW9uIChbXiAoXSopLztcbnZhciBOQU1FID0gJ25hbWUnO1xuXG4vLyAxOS4yLjQuMiBuYW1lXG5OQU1FIGluIEZQcm90byB8fCByZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpICYmIGRQKEZQcm90bywgTkFNRSwge1xuICBjb25maWd1cmFibGU6IHRydWUsXG4gIGdldDogZnVuY3Rpb24gKCkge1xuICAgIHRyeSB7XG4gICAgICByZXR1cm4gKCcnICsgdGhpcykubWF0Y2gobmFtZVJFKVsxXTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZXR1cm4gJyc7XG4gICAgfVxuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZnVuY3Rpb24ubmFtZS5qc1xuLy8gbW9kdWxlIGlkID0gMjM2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///236\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar isObject = __webpack_require__(6);\nvar getPrototypeOf = __webpack_require__(26);\nvar HAS_INSTANCE = __webpack_require__(8)('hasInstance');\nvar FunctionProto = Function.prototype;\n// 19.2.3.6 Function.prototype[@@hasInstance](V)\nif (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(11).f(FunctionProto, HAS_INSTANCE, { value: function (O) {\n if (typeof this != 'function' || !isObject(O)) return false;\n if (!isObject(this.prototype)) return O instanceof this;\n // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:\n while (O = getPrototypeOf(O)) if (this.prototype === O) return true;\n return false;\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZnVuY3Rpb24uaGFzLWluc3RhbmNlLmpzPzNkYjMiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgZ2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKCcuL19vYmplY3QtZ3BvJyk7XG52YXIgSEFTX0lOU1RBTkNFID0gcmVxdWlyZSgnLi9fd2tzJykoJ2hhc0luc3RhbmNlJyk7XG52YXIgRnVuY3Rpb25Qcm90byA9IEZ1bmN0aW9uLnByb3RvdHlwZTtcbi8vIDE5LjIuMy42IEZ1bmN0aW9uLnByb3RvdHlwZVtAQGhhc0luc3RhbmNlXShWKVxuaWYgKCEoSEFTX0lOU1RBTkNFIGluIEZ1bmN0aW9uUHJvdG8pKSByZXF1aXJlKCcuL19vYmplY3QtZHAnKS5mKEZ1bmN0aW9uUHJvdG8sIEhBU19JTlNUQU5DRSwgeyB2YWx1ZTogZnVuY3Rpb24gKE8pIHtcbiAgaWYgKHR5cGVvZiB0aGlzICE9ICdmdW5jdGlvbicgfHwgIWlzT2JqZWN0KE8pKSByZXR1cm4gZmFsc2U7XG4gIGlmICghaXNPYmplY3QodGhpcy5wcm90b3R5cGUpKSByZXR1cm4gTyBpbnN0YW5jZW9mIHRoaXM7XG4gIC8vIGZvciBlbnZpcm9ubWVudCB3L28gbmF0aXZlIGBAQGhhc0luc3RhbmNlYCBsb2dpYyBlbm91Z2ggYGluc3RhbmNlb2ZgLCBidXQgYWRkIHRoaXM6XG4gIHdoaWxlIChPID0gZ2V0UHJvdG90eXBlT2YoTykpIGlmICh0aGlzLnByb3RvdHlwZSA9PT0gTykgcmV0dXJuIHRydWU7XG4gIHJldHVybiBmYWxzZTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmZ1bmN0aW9uLmhhcy1pbnN0YW5jZS5qc1xuLy8gbW9kdWxlIGlkID0gMjM3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///237\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar $parseInt = __webpack_require__(156);\n// 18.2.5 parseInt(string, radix)\n$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucGFyc2UtaW50LmpzPzRiZTEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkcGFyc2VJbnQgPSByZXF1aXJlKCcuL19wYXJzZS1pbnQnKTtcbi8vIDE4LjIuNSBwYXJzZUludChzdHJpbmcsIHJhZGl4KVxuJGV4cG9ydCgkZXhwb3J0LkcgKyAkZXhwb3J0LkYgKiAocGFyc2VJbnQgIT0gJHBhcnNlSW50KSwgeyBwYXJzZUludDogJHBhcnNlSW50IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5wYXJzZS1pbnQuanNcbi8vIG1vZHVsZSBpZCA9IDIzOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///238\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar $parseFloat = __webpack_require__(157);\n// 18.2.4 parseFloat(string)\n$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjM5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucGFyc2UtZmxvYXQuanM/MTJmMSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRwYXJzZUZsb2F0ID0gcmVxdWlyZSgnLi9fcGFyc2UtZmxvYXQnKTtcbi8vIDE4LjIuNCBwYXJzZUZsb2F0KHN0cmluZylcbiRleHBvcnQoJGV4cG9ydC5HICsgJGV4cG9ydC5GICogKHBhcnNlRmxvYXQgIT0gJHBhcnNlRmxvYXQpLCB7IHBhcnNlRmxvYXQ6ICRwYXJzZUZsb2F0IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5wYXJzZS1mbG9hdC5qc1xuLy8gbW9kdWxlIGlkID0gMjM5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///239\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar global = __webpack_require__(4);\nvar has = __webpack_require__(17);\nvar cof = __webpack_require__(28);\nvar inheritIfRequired = __webpack_require__(108);\nvar toPrimitive = __webpack_require__(31);\nvar fails = __webpack_require__(5);\nvar gOPN = __webpack_require__(53).f;\nvar gOPD = __webpack_require__(25).f;\nvar dP = __webpack_require__(11).f;\nvar $trim = __webpack_require__(62).trim;\nvar NUMBER = 'Number';\nvar $Number = global[NUMBER];\nvar Base = $Number;\nvar proto = $Number.prototype;\n// Opera ~12 has broken Object#toString\nvar BROKEN_COF = cof(__webpack_require__(52)(proto)) == NUMBER;\nvar TRIM = 'trim' in String.prototype;\n\n// 7.1.3 ToNumber(argument)\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n if (typeof it == 'string' && it.length > 2) {\n it = TRIM ? it.trim() : $trim(it, 3);\n var first = it.charCodeAt(0);\n var third, radix, maxCode;\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i\n default: return +it;\n }\n for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {\n code = digits.charCodeAt(i);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\nif (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {\n $Number = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var that = this;\n return that instanceof $Number\n // check on 1..constructor(foo) case\n && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)\n ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);\n };\n for (var keys = __webpack_require__(10) ? gOPN(Base) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES6 (in case, if modules with ES6 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(Base, key = keys[j]) && !has($Number, key)) {\n dP($Number, key, gOPD(Base, key));\n }\n }\n $Number.prototype = proto;\n proto.constructor = $Number;\n __webpack_require__(19)(global, NUMBER, $Number);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4v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QUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///240\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toInteger = __webpack_require__(33);\nvar aNumberValue = __webpack_require__(158);\nvar repeat = __webpack_require__(109);\nvar $toFixed = 1.0.toFixed;\nvar floor = Math.floor;\nvar data = [0, 0, 0, 0, 0, 0];\nvar ERROR = 'Number.toFixed: incorrect invocation!';\nvar ZERO = '0';\n\nvar multiply = function (n, c) {\n var i = -1;\n var c2 = c;\n while (++i < 6) {\n c2 += n * data[i];\n data[i] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n};\nvar divide = function (n) {\n var i = 6;\n var c = 0;\n while (--i >= 0) {\n c += data[i];\n data[i] = floor(c / n);\n c = (c % n) * 1e7;\n }\n};\nvar numToString = function () {\n var i = 6;\n var s = '';\n while (--i >= 0) {\n if (s !== '' || i === 0 || data[i] !== 0) {\n var t = String(data[i]);\n s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;\n }\n } return s;\n};\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\n$export($export.P + $export.F * (!!$toFixed && (\n 0.00008.toFixed(3) !== '0.000' ||\n 0.9.toFixed(0) !== '1' ||\n 1.255.toFixed(2) !== '1.25' ||\n 1000000000000000128.0.toFixed(0) !== '1000000000000000128'\n) || !__webpack_require__(5)(function () {\n // V8 ~ Android 4.3-\n $toFixed.call({});\n})), 'Number', {\n toFixed: function toFixed(fractionDigits) {\n var x = aNumberValue(this, ERROR);\n var f = toInteger(fractionDigits);\n var s = '';\n var m = ZERO;\n var e, z, j, k;\n if (f < 0 || f > 20) throw RangeError(ERROR);\n // eslint-disable-next-line no-self-compare\n if (x != x) return 'NaN';\n if (x <= -1e21 || x >= 1e21) return String(x);\n if (x < 0) {\n s = '-';\n x = -x;\n }\n if (x > 1e-21) {\n e = log(x * pow(2, 69, 1)) - 69;\n z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(0, z);\n j = f;\n while (j >= 7) {\n multiply(1e7, 0);\n j -= 7;\n }\n multiply(pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(1 << 23);\n j -= 23;\n }\n divide(1 << j);\n multiply(1, 1);\n divide(2);\n m = numToString();\n } else {\n multiply(0, z);\n multiply(1 << -e, 0);\n m = numToString() + repeat.call(ZERO, f);\n }\n }\n if (f > 0) {\n k = m.length;\n m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));\n } else {\n m = s + m;\n } return m;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnRvLWZpeGVkLmpzPzQxNjIiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aX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aW9uRGlnaXRzKTtcbiAgICB2YXIgcyA9ICcnO1xuICAgIHZhciBtID0gWkVSTztcbiAgICB2YXIgZSwgeiwgaiwgaztcbiAgICBpZiAoZiA8IDAgfHwgZiA+IDIwKSB0aHJvdyBSYW5nZUVycm9yKEVSUk9SKTtcbiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tc2VsZi1jb21wYXJlXG4gICAgaWYgKHggIT0geCkgcmV0dXJuICdOYU4nO1xuICAgIGlmICh4IDw9IC0xZTIxIHx8IHggPj0gMWUyMSkgcmV0dXJuIFN0cmluZyh4KTtcbiAgICBpZiAoeCA8IDApIHtcbiAgICAgIHMgPSAnLSc7XG4gICAgICB4ID0gLXg7XG4gICAgfVxuICAgIGlmICh4ID4gMWUtMjEpIHtcbiAgICAgIGUgPSBsb2coeCAqIHBvdygyLCA2OSwgMSkpIC0gNjk7XG4gICAgICB6ID0gZSA8IDAgPyB4ICogcG93KDIsIC1lLCAxKSA6IHggLyBwb3coMiwgZSwgMSk7XG4gICAgICB6ICo9IDB4MTAwMDAwMDAwMDAwMDA7XG4gICAgICBlID0gNTIgLSBlO1xuICAgICAgaWYgKGUgPiAwKSB7XG4gICAgICAgIG11bHRpcGx5KDAsIHopO1xuICAgICAgICBqID0gZjtcbiAgICAgICAgd2hpbGUgKGogPj0gNykge1xuICAgICAgICAgIG11bHRpcGx5KDFlNywgMCk7XG4gICAgICAgICAgaiAtPSA3O1xuICAgICAgICB9XG4gICAgICAgIG11bHRpcGx5KHBvdygxMCwgaiwgMSksIDApO1xuICAgICAgICBqID0gZSAtIDE7XG4gICAgICAgIHdoaWxlIChqID49IDIzKSB7XG4gICAgICAgICAgZGl2aWRlKDEgPDwgMjMpO1xuICAgICAgICAgIGogLT0gMjM7XG4gICAgICAgIH1cbiAgICAgICAgZGl2aWRlKDEgPDwgaik7XG4gICAgICAgIG11bHRpcGx5KDEsIDEpO1xuICAgICAgICBkaXZpZGUoMik7XG4gICAgICAgIG0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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///241\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $fails = __webpack_require__(5);\nvar aNumberValue = __webpack_require__(158);\nvar $toPrecision = 1.0.toPrecision;\n\n$export($export.P + $export.F * ($fails(function () {\n // IE7-\n return $toPrecision.call(1, undefined) !== '1';\n}) || !$fails(function () {\n // V8 ~ Android 4.3-\n $toPrecision.call({});\n})), 'Number', {\n toPrecision: function toPrecision(precision) {\n var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');\n return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnRvLXByZWNpc2lvbi5qcz82NTEyIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmV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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///242\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.1 Number.EPSILON\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmVwc2lsb24uanM/NGFkYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4xLjIuMSBOdW1iZXIuRVBTSUxPTlxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdOdW1iZXInLCB7IEVQU0lMT046IE1hdGgucG93KDIsIC01MikgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm51bWJlci5lcHNpbG9uLmpzXG4vLyBtb2R1bGUgaWQgPSAyNDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///243\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.2 Number.isFinite(number)\nvar $export = __webpack_require__(0);\nvar _isFinite = __webpack_require__(4).isFinite;\n\n$export($export.S, 'Number', {\n isFinite: function isFinite(it) {\n return typeof it == 'number' && _isFinite(it);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLWZpbml0ZS5qcz9jYWU1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjEuMi4yIE51bWJlci5pc0Zpbml0ZShudW1iZXIpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIF9pc0Zpbml0ZSA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpLmlzRmluaXRlO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ051bWJlcicsIHtcbiAgaXNGaW5pdGU6IGZ1bmN0aW9uIGlzRmluaXRlKGl0KSB7XG4gICAgcmV0dXJuIHR5cGVvZiBpdCA9PSAnbnVtYmVyJyAmJiBfaXNGaW5pdGUoaXQpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLWZpbml0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjQ0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///244\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.3 Number.isInteger(number)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Number', { isInteger: __webpack_require__(159) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLWludGVnZXIuanM/NWVkOCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4xLjIuMyBOdW1iZXIuaXNJbnRlZ2VyKG51bWJlcilcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTnVtYmVyJywgeyBpc0ludGVnZXI6IHJlcXVpcmUoJy4vX2lzLWludGVnZXInKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLWludGVnZXIuanNcbi8vIG1vZHVsZSBpZCA9IDI0NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///245\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.4 Number.isNaN(number)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Number', {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare\n return number != number;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLW5hbi5qcz8yYzZlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjEuMi40IE51bWJlci5pc05hTihudW1iZXIpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ051bWJlcicsIHtcbiAgaXNOYU46IGZ1bmN0aW9uIGlzTmFOKG51bWJlcikge1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICByZXR1cm4gbnVtYmVyICE9IG51bWJlcjtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm51bWJlci5pcy1uYW4uanNcbi8vIG1vZHVsZSBpZCA9IDI0NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///246\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.5 Number.isSafeInteger(number)\nvar $export = __webpack_require__(0);\nvar isInteger = __webpack_require__(159);\nvar abs = Math.abs;\n\n$export($export.S, 'Number', {\n isSafeInteger: function isSafeInteger(number) {\n return isInteger(number) && abs(number) <= 0x1fffffffffffff;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLmlzLXNhZmUtaW50ZWdlci5qcz8wMzU5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjEuMi41IE51bWJlci5pc1NhZmVJbnRlZ2VyKG51bWJlcilcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgaXNJbnRlZ2VyID0gcmVxdWlyZSgnLi9faXMtaW50ZWdlcicpO1xudmFyIGFicyA9IE1hdGguYWJzO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ051bWJlcicsIHtcbiAgaXNTYWZlSW50ZWdlcjogZnVuY3Rpb24gaXNTYWZlSW50ZWdlcihudW1iZXIpIHtcbiAgICByZXR1cm4gaXNJbnRlZ2VyKG51bWJlcikgJiYgYWJzKG51bWJlcikgPD0gMHgxZmZmZmZmZmZmZmZmZjtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm51bWJlci5pcy1zYWZlLWludGVnZXIuanNcbi8vIG1vZHVsZSBpZCA9IDI0N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///247\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.6 Number.MAX_SAFE_INTEGER\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLm1heC1zYWZlLWludGVnZXIuanM/NWEyMiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4xLjIuNiBOdW1iZXIuTUFYX1NBRkVfSU5URUdFUlxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdOdW1iZXInLCB7IE1BWF9TQUZFX0lOVEVHRVI6IDB4MWZmZmZmZmZmZmZmZmYgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm51bWJlci5tYXgtc2FmZS1pbnRlZ2VyLmpzXG4vLyBtb2R1bGUgaWQgPSAyNDhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///248\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.10 Number.MIN_SAFE_INTEGER\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQ5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLm1pbi1zYWZlLWludGVnZXIuanM/Njg5ZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4xLjIuMTAgTnVtYmVyLk1JTl9TQUZFX0lOVEVHRVJcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTnVtYmVyJywgeyBNSU5fU0FGRV9JTlRFR0VSOiAtMHgxZmZmZmZmZmZmZmZmZiB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLm1pbi1zYWZlLWludGVnZXIuanNcbi8vIG1vZHVsZSBpZCA9IDI0OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///249\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar $parseFloat = __webpack_require__(157);\n// 20.1.2.12 Number.parseFloat(string)\n$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnBhcnNlLWZsb2F0LmpzPzZhNWIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkcGFyc2VGbG9hdCA9IHJlcXVpcmUoJy4vX3BhcnNlLWZsb2F0Jyk7XG4vLyAyMC4xLjIuMTIgTnVtYmVyLnBhcnNlRmxvYXQoc3RyaW5nKVxuJGV4cG9ydCgkZXhwb3J0LlMgKyAkZXhwb3J0LkYgKiAoTnVtYmVyLnBhcnNlRmxvYXQgIT0gJHBhcnNlRmxvYXQpLCAnTnVtYmVyJywgeyBwYXJzZUZsb2F0OiAkcGFyc2VGbG9hdCB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnBhcnNlLWZsb2F0LmpzXG4vLyBtb2R1bGUgaWQgPSAyNTBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///250\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar $parseInt = __webpack_require__(156);\n// 20.1.2.13 Number.parseInt(string, radix)\n$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnBhcnNlLWludC5qcz83NTQyIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJHBhcnNlSW50ID0gcmVxdWlyZSgnLi9fcGFyc2UtaW50Jyk7XG4vLyAyMC4xLjIuMTMgTnVtYmVyLnBhcnNlSW50KHN0cmluZywgcmFkaXgpXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqIChOdW1iZXIucGFyc2VJbnQgIT0gJHBhcnNlSW50KSwgJ051bWJlcicsIHsgcGFyc2VJbnQ6ICRwYXJzZUludCB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubnVtYmVyLnBhcnNlLWludC5qc1xuLy8gbW9kdWxlIGlkID0gMjUxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///251\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.3 Math.acosh(x)\nvar $export = __webpack_require__(0);\nvar log1p = __webpack_require__(160);\nvar sqrt = Math.sqrt;\nvar $acosh = Math.acosh;\n\n$export($export.S + $export.F * !($acosh\n // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509\n && Math.floor($acosh(Number.MAX_VALUE)) == 710\n // Tor Browser bug: Math.acosh(Infinity) -> NaN\n && $acosh(Infinity) == Infinity\n), 'Math', {\n acosh: function acosh(x) {\n return (x = +x) < 1 ? NaN : x > 94906265.62425156\n ? Math.log(x) + Math.LN2\n : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5hY29zaC5qcz9iZjY5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4zIE1hdGguYWNvc2goeClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgbG9nMXAgPSByZXF1aXJlKCcuL19tYXRoLWxvZzFwJyk7XG52YXIgc3FydCA9IE1hdGguc3FydDtcbnZhciAkYWNvc2ggPSBNYXRoLmFjb3NoO1xuXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqICEoJGFjb3NoXG4gIC8vIFY4IGJ1ZzogaHR0cHM6Ly9jb2RlLmdvb2dsZS5jb20vcC92OC9pc3N1ZXMvZGV0YWlsP2lkPTM1MDlcbiAgJiYgTWF0aC5mbG9vcigkYWNvc2goTnVtYmVyLk1BWF9WQUxVRSkpID09IDcxMFxuICAvLyBUb3IgQnJvd3NlciBidWc6IE1hdGguYWNvc2goSW5maW5pdHkpIC0+IE5hTlxuICAmJiAkYWNvc2goSW5maW5pdHkpID09IEluZmluaXR5XG4pLCAnTWF0aCcsIHtcbiAgYWNvc2g6IGZ1bmN0aW9uIGFjb3NoKHgpIHtcbiAgICByZXR1cm4gKHggPSAreCkgPCAxID8gTmFOIDogeCA+IDk0OTA2MjY1LjYyNDI1MTU2XG4gICAgICA/IE1hdGgubG9nKHgpICsgTWF0aC5MTjJcbiAgICAgIDogbG9nMXAoeCAtIDEgKyBzcXJ0KHggLSAxKSAqIHNxcnQoeCArIDEpKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGguYWNvc2guanNcbi8vIG1vZHVsZSBpZCA9IDI1MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///252\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.5 Math.asinh(x)\nvar $export = __webpack_require__(0);\nvar $asinh = Math.asinh;\n\nfunction asinh(x) {\n return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));\n}\n\n// Tor Browser bug: Math.asinh(0) -> -0\n$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5hc2luaC5qcz9lYzliIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi41IE1hdGguYXNpbmgoeClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJGFzaW5oID0gTWF0aC5hc2luaDtcblxuZnVuY3Rpb24gYXNpbmgoeCkge1xuICByZXR1cm4gIWlzRmluaXRlKHggPSAreCkgfHwgeCA9PSAwID8geCA6IHggPCAwID8gLWFzaW5oKC14KSA6IE1hdGgubG9nKHggKyBNYXRoLnNxcnQoeCAqIHggKyAxKSk7XG59XG5cbi8vIFRvciBCcm93c2VyIGJ1ZzogTWF0aC5hc2luaCgwKSAtPiAtMFxuJGV4cG9ydCgkZXhwb3J0LlMgKyAkZXhwb3J0LkYgKiAhKCRhc2luaCAmJiAxIC8gJGFzaW5oKDApID4gMCksICdNYXRoJywgeyBhc2luaDogYXNpbmggfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGguYXNpbmguanNcbi8vIG1vZHVsZSBpZCA9IDI1M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///253\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.7 Math.atanh(x)\nvar $export = __webpack_require__(0);\nvar $atanh = Math.atanh;\n\n// Tor Browser bug: Math.atanh(-0) -> 0\n$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {\n atanh: function atanh(x) {\n return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5hdGFuaC5qcz85NzI4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi43IE1hdGguYXRhbmgoeClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJGF0YW5oID0gTWF0aC5hdGFuaDtcblxuLy8gVG9yIEJyb3dzZXIgYnVnOiBNYXRoLmF0YW5oKC0wKSAtPiAwXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqICEoJGF0YW5oICYmIDEgLyAkYXRhbmgoLTApIDwgMCksICdNYXRoJywge1xuICBhdGFuaDogZnVuY3Rpb24gYXRhbmgoeCkge1xuICAgIHJldHVybiAoeCA9ICt4KSA9PSAwID8geCA6IE1hdGgubG9nKCgxICsgeCkgLyAoMSAtIHgpKSAvIDI7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5tYXRoLmF0YW5oLmpzXG4vLyBtb2R1bGUgaWQgPSAyNTRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///254\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.9 Math.cbrt(x)\nvar $export = __webpack_require__(0);\nvar sign = __webpack_require__(110);\n\n$export($export.S, 'Math', {\n cbrt: function cbrt(x) {\n return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5jYnJ0LmpzPzkwMTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjkgTWF0aC5jYnJ0KHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHNpZ24gPSByZXF1aXJlKCcuL19tYXRoLXNpZ24nKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywge1xuICBjYnJ0OiBmdW5jdGlvbiBjYnJ0KHgpIHtcbiAgICByZXR1cm4gc2lnbih4ID0gK3gpICogTWF0aC5wb3coTWF0aC5hYnMoeCksIDEgLyAzKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGguY2JydC5qc1xuLy8gbW9kdWxlIGlkID0gMjU1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///255\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.11 Math.clz32(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n clz32: function clz32(x) {\n return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5jbHozMi5qcz9jNGUzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4xMSBNYXRoLmNsejMyKHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIGNsejMyOiBmdW5jdGlvbiBjbHozMih4KSB7XG4gICAgcmV0dXJuICh4ID4+Pj0gMCkgPyAzMSAtIE1hdGguZmxvb3IoTWF0aC5sb2coeCArIDAuNSkgKiBNYXRoLkxPRzJFKSA6IDMyO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5jbHozMi5qc1xuLy8gbW9kdWxlIGlkID0gMjU2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///256\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.12 Math.cosh(x)\nvar $export = __webpack_require__(0);\nvar exp = Math.exp;\n\n$export($export.S, 'Math', {\n cosh: function cosh(x) {\n return (exp(x = +x) + exp(-x)) / 2;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5jb3NoLmpzPzJlNTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjEyIE1hdGguY29zaCh4KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBleHAgPSBNYXRoLmV4cDtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywge1xuICBjb3NoOiBmdW5jdGlvbiBjb3NoKHgpIHtcbiAgICByZXR1cm4gKGV4cCh4ID0gK3gpICsgZXhwKC14KSkgLyAyO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5jb3NoLmpzXG4vLyBtb2R1bGUgaWQgPSAyNTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///257\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.14 Math.expm1(x)\nvar $export = __webpack_require__(0);\nvar $expm1 = __webpack_require__(111);\n\n$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5leHBtMS5qcz9mNzEyIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4xNCBNYXRoLmV4cG0xKHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRleHBtMSA9IHJlcXVpcmUoJy4vX21hdGgtZXhwbTEnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMgKyAkZXhwb3J0LkYgKiAoJGV4cG0xICE9IE1hdGguZXhwbTEpLCAnTWF0aCcsIHsgZXhwbTE6ICRleHBtMSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5leHBtMS5qc1xuLy8gbW9kdWxlIGlkID0gMjU4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///258\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.16 Math.fround(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { fround: __webpack_require__(161) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjU5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5mcm91bmQuanM/OWJhNiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4yLjIuMTYgTWF0aC5mcm91bmQoeClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHsgZnJvdW5kOiByZXF1aXJlKCcuL19tYXRoLWZyb3VuZCcpIH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5tYXRoLmZyb3VuZC5qc1xuLy8gbW9kdWxlIGlkID0gMjU5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///259\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])\nvar $export = __webpack_require__(0);\nvar abs = Math.abs;\n\n$export($export.S, 'Math', {\n hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars\n var sum = 0;\n var i = 0;\n var aLen = arguments.length;\n var larg = 0;\n var arg, div;\n while (i < aLen) {\n arg = abs(arguments[i++]);\n if (larg < arg) {\n div = larg / arg;\n sum = sum * div * div + 1;\n larg = arg;\n } else if (arg > 0) {\n div = arg / larg;\n sum += div * div;\n } else sum += arg;\n }\n return larg === Infinity ? Infinity : larg * Math.sqrt(sum);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5oeXBvdC5qcz9jMmJiIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4xNyBNYXRoLmh5cG90KFt2YWx1ZTFbLCB2YWx1ZTJbLCDigKYgXV1dKVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBhYnMgPSBNYXRoLmFicztcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywge1xuICBoeXBvdDogZnVuY3Rpb24gaHlwb3QodmFsdWUxLCB2YWx1ZTIpIHsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby11bnVzZWQtdmFyc1xuICAgIHZhciBzdW0gPSAwO1xuICAgIHZhciBpID0gMDtcbiAgICB2YXIgYUxlbiA9IGFyZ3VtZW50cy5sZW5ndGg7XG4gICAgdmFyIGxhcmcgPSAwO1xuICAgIHZhciBhcmcsIGRpdjtcbiAgICB3aGlsZSAoaSA8IGFMZW4pIHtcbiAgICAgIGFyZyA9IGFicyhhcmd1bWVudHNbaSsrXSk7XG4gICAgICBpZiAobGFyZyA8IGFyZykge1xuICAgICAgICBkaXYgPSBsYXJnIC8gYXJnO1xuICAgICAgICBzdW0gPSBzdW0gKiBkaXYgKiBkaXYgKyAxO1xuICAgICAgICBsYXJnID0gYXJnO1xuICAgICAgfSBlbHNlIGlmIChhcmcgPiAwKSB7XG4gICAgICAgIGRpdiA9IGFyZyAvIGxhcmc7XG4gICAgICAgIHN1bSArPSBkaXYgKiBkaXY7XG4gICAgICB9IGVsc2Ugc3VtICs9IGFyZztcbiAgICB9XG4gICAgcmV0dXJuIGxhcmcgPT09IEluZmluaXR5ID8gSW5maW5pdHkgOiBsYXJnICogTWF0aC5zcXJ0KHN1bSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5tYXRoLmh5cG90LmpzXG4vLyBtb2R1bGUgaWQgPSAyNjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///260\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.18 Math.imul(x, y)\nvar $export = __webpack_require__(0);\nvar $imul = Math.imul;\n\n// some WebKit versions fails with big numbers, some has wrong arity\n$export($export.S + $export.F * __webpack_require__(5)(function () {\n return $imul(0xffffffff, 5) != -5 || $imul.length != 2;\n}), 'Math', {\n imul: function imul(x, y) {\n var UINT16 = 0xffff;\n var xn = +x;\n var yn = +y;\n var xl = UINT16 & xn;\n var yl = UINT16 & yn;\n return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5pbXVsLmpzPzJlYTgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjE4IE1hdGguaW11bCh4LCB5KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkaW11bCA9IE1hdGguaW11bDtcblxuLy8gc29tZSBXZWJLaXQgdmVyc2lvbnMgZmFpbHMgd2l0aCBiaWcgbnVtYmVycywgc29tZSBoYXMgd3JvbmcgYXJpdHlcbiRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GICogcmVxdWlyZSgnLi9fZmFpbHMnKShmdW5jdGlvbiAoKSB7XG4gIHJldHVybiAkaW11bCgweGZmZmZmZmZmLCA1KSAhPSAtNSB8fCAkaW11bC5sZW5ndGggIT0gMjtcbn0pLCAnTWF0aCcsIHtcbiAgaW11bDogZnVuY3Rpb24gaW11bCh4LCB5KSB7XG4gICAgdmFyIFVJTlQxNiA9IDB4ZmZmZjtcbiAgICB2YXIgeG4gPSAreDtcbiAgICB2YXIgeW4gPSAreTtcbiAgICB2YXIgeGwgPSBVSU5UMTYgJiB4bjtcbiAgICB2YXIgeWwgPSBVSU5UMTYgJiB5bjtcbiAgICByZXR1cm4gMCB8IHhsICogeWwgKyAoKFVJTlQxNiAmIHhuID4+PiAxNikgKiB5bCArIHhsICogKFVJTlQxNiAmIHluID4+PiAxNikgPDwgMTYgPj4+IDApO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5pbXVsLmpzXG4vLyBtb2R1bGUgaWQgPSAyNjFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///261\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.21 Math.log10(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n log10: function log10(x) {\n return Math.log(x) * Math.LOG10E;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5sb2cxMC5qcz9kNjJhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4yMSBNYXRoLmxvZzEwKHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIGxvZzEwOiBmdW5jdGlvbiBsb2cxMCh4KSB7XG4gICAgcmV0dXJuIE1hdGgubG9nKHgpICogTWF0aC5MT0cxMEU7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5tYXRoLmxvZzEwLmpzXG4vLyBtb2R1bGUgaWQgPSAyNjJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///262\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.20 Math.log1p(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { log1p: __webpack_require__(160) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5sb2cxcC5qcz9hNTYxIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4yMCBNYXRoLmxvZzFwKHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7IGxvZzFwOiByZXF1aXJlKCcuL19tYXRoLWxvZzFwJykgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGgubG9nMXAuanNcbi8vIG1vZHVsZSBpZCA9IDI2M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///263\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.22 Math.log2(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n log2: function log2(x) {\n return Math.log(x) / Math.LN2;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5sb2cyLmpzPzM3ODIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjIyIE1hdGgubG9nMih4KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywge1xuICBsb2cyOiBmdW5jdGlvbiBsb2cyKHgpIHtcbiAgICByZXR1cm4gTWF0aC5sb2coeCkgLyBNYXRoLkxOMjtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGgubG9nMi5qc1xuLy8gbW9kdWxlIGlkID0gMjY0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///264\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.28 Math.sign(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { sign: __webpack_require__(110) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5zaWduLmpzPzFlNWYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjI4IE1hdGguc2lnbih4KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywgeyBzaWduOiByZXF1aXJlKCcuL19tYXRoLXNpZ24nKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5zaWduLmpzXG4vLyBtb2R1bGUgaWQgPSAyNjVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///265\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.30 Math.sinh(x)\nvar $export = __webpack_require__(0);\nvar expm1 = __webpack_require__(111);\nvar exp = Math.exp;\n\n// V8 near Chromium 38 has a problem with very small numbers\n$export($export.S + $export.F * __webpack_require__(5)(function () {\n return !Math.sinh(-2e-17) != -2e-17;\n}), 'Math', {\n sinh: function sinh(x) {\n return Math.abs(x = +x) < 1\n ? (expm1(x) - expm1(-x)) / 2\n : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5zaW5oLmpzPzMyMzEiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjMwIE1hdGguc2luaCh4KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBleHBtMSA9IHJlcXVpcmUoJy4vX21hdGgtZXhwbTEnKTtcbnZhciBleHAgPSBNYXRoLmV4cDtcblxuLy8gVjggbmVhciBDaHJvbWl1bSAzOCBoYXMgYSBwcm9ibGVtIHdpdGggdmVyeSBzbWFsbCBudW1iZXJzXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqIHJlcXVpcmUoJy4vX2ZhaWxzJykoZnVuY3Rpb24gKCkge1xuICByZXR1cm4gIU1hdGguc2luaCgtMmUtMTcpICE9IC0yZS0xNztcbn0pLCAnTWF0aCcsIHtcbiAgc2luaDogZnVuY3Rpb24gc2luaCh4KSB7XG4gICAgcmV0dXJuIE1hdGguYWJzKHggPSAreCkgPCAxXG4gICAgICA/IChleHBtMSh4KSAtIGV4cG0xKC14KSkgLyAyXG4gICAgICA6IChleHAoeCAtIDEpIC0gZXhwKC14IC0gMSkpICogKE1hdGguRSAvIDIpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC5zaW5oLmpzXG4vLyBtb2R1bGUgaWQgPSAyNjZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///266\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.33 Math.tanh(x)\nvar $export = __webpack_require__(0);\nvar expm1 = __webpack_require__(111);\nvar exp = Math.exp;\n\n$export($export.S, 'Math', {\n tanh: function tanh(x) {\n var a = expm1(x = +x);\n var b = expm1(-x);\n return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC50YW5oLmpzPzQ5MTAiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMi4yLjMzIE1hdGgudGFuaCh4KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBleHBtMSA9IHJlcXVpcmUoJy4vX21hdGgtZXhwbTEnKTtcbnZhciBleHAgPSBNYXRoLmV4cDtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdNYXRoJywge1xuICB0YW5oOiBmdW5jdGlvbiB0YW5oKHgpIHtcbiAgICB2YXIgYSA9IGV4cG0xKHggPSAreCk7XG4gICAgdmFyIGIgPSBleHBtMSgteCk7XG4gICAgcmV0dXJuIGEgPT0gSW5maW5pdHkgPyAxIDogYiA9PSBJbmZpbml0eSA/IC0xIDogKGEgLSBiKSAvIChleHAoeCkgKyBleHAoLXgpKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2Lm1hdGgudGFuaC5qc1xuLy8gbW9kdWxlIGlkID0gMjY3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///267\n")},function(module,exports,__webpack_require__){eval("// 20.2.2.34 Math.trunc(x)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n trunc: function trunc(it) {\n return (it > 0 ? Math.floor : Math.ceil)(it);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC50cnVuYy5qcz8xZjQ5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjIuMi4zNCBNYXRoLnRydW5jKHgpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIHRydW5jOiBmdW5jdGlvbiB0cnVuYyhpdCkge1xuICAgIHJldHVybiAoaXQgPiAwID8gTWF0aC5mbG9vciA6IE1hdGguY2VpbCkoaXQpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYubWF0aC50cnVuYy5qc1xuLy8gbW9kdWxlIGlkID0gMjY4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///268\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar toAbsoluteIndex = __webpack_require__(51);\nvar fromCharCode = String.fromCharCode;\nvar $fromCodePoint = String.fromCodePoint;\n\n// length should be 1, old FF problem\n$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {\n // 21.1.2.2 String.fromCodePoint(...codePoints)\n fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars\n var res = [];\n var aLen = arguments.length;\n var i = 0;\n var code;\n while (aLen > i) {\n code = +arguments[i++];\n if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');\n res.push(code < 0x10000\n ? fromCharCode(code)\n : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)\n );\n } return res.join('');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjY5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZyb20tY29kZS1wb2ludC5qcz82ZWEzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgdG9BYnNvbHV0ZUluZGV4ID0gcmVxdWlyZSgnLi9fdG8tYWJzb2x1dGUtaW5kZXgnKTtcbnZhciBmcm9tQ2hhckNvZGUgPSBTdHJpbmcuZnJvbUNoYXJDb2RlO1xudmFyICRmcm9tQ29kZVBvaW50ID0gU3RyaW5nLmZyb21Db2RlUG9pbnQ7XG5cbi8vIGxlbmd0aCBzaG91bGQgYmUgMSwgb2xkIEZGIHByb2JsZW1cbiRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GICogKCEhJGZyb21Db2RlUG9pbnQgJiYgJGZyb21Db2RlUG9pbnQubGVuZ3RoICE9IDEpLCAnU3RyaW5nJywge1xuICAvLyAyMS4xLjIuMiBTdHJpbmcuZnJvbUNvZGVQb2ludCguLi5jb2RlUG9pbnRzKVxuICBmcm9tQ29kZVBvaW50OiBmdW5jdGlvbiBmcm9tQ29kZVBvaW50KHgpIHsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby11bnVzZWQtdmFyc1xuICAgIHZhciByZXMgPSBbXTtcbiAgICB2YXIgYUxlbiA9IGFyZ3VtZW50cy5sZW5ndGg7XG4gICAgdmFyIGkgPSAwO1xuICAgIHZhciBjb2RlO1xuICAgIHdoaWxlIChhTGVuID4gaSkge1xuICAgICAgY29kZSA9ICthcmd1bWVudHNbaSsrXTtcbiAgICAgIGlmICh0b0Fic29sdXRlSW5kZXgoY29kZSwgMHgxMGZmZmYpICE9PSBjb2RlKSB0aHJvdyBSYW5nZUVycm9yKGNvZGUgKyAnIGlzIG5vdCBhIHZhbGlkIGNvZGUgcG9pbnQnKTtcbiAgICAgIHJlcy5wdXNoKGNvZGUgPCAweDEwMDAwXG4gICAgICAgID8gZnJvbUNoYXJDb2RlKGNvZGUpXG4gICAgICAgIDogZnJvbUNoYXJDb2RlKCgoY29kZSAtPSAweDEwMDAwKSA+PiAxMCkgKyAweGQ4MDAsIGNvZGUgJSAweDQwMCArIDB4ZGMwMClcbiAgICAgICk7XG4gICAgfSByZXR1cm4gcmVzLmpvaW4oJycpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZyb20tY29kZS1wb2ludC5qc1xuLy8gbW9kdWxlIGlkID0gMjY5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///269\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar toIObject = __webpack_require__(24);\nvar toLength = __webpack_require__(12);\n\n$export($export.S, 'String', {\n // 21.1.2.4 String.raw(callSite, ...substitutions)\n raw: function raw(callSite) {\n var tpl = toIObject(callSite.raw);\n var len = toLength(tpl.length);\n var aLen = arguments.length;\n var res = [];\n var i = 0;\n while (len > i) {\n res.push(String(tpl[i++]));\n if (i < aLen) res.push(String(arguments[i]));\n } return res.join('');\n }\n});\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lkID0gMjcwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///270\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 21.1.3.25 String.prototype.trim()\n__webpack_require__(62)('trim', function ($trim) {\n return function trim() {\n return $trim(this, 3);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjcxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnRyaW0uanM/OWExOSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyAyMS4xLjMuMjUgU3RyaW5nLnByb3RvdHlwZS50cmltKClcbnJlcXVpcmUoJy4vX3N0cmluZy10cmltJykoJ3RyaW0nLCBmdW5jdGlvbiAoJHRyaW0pIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHRyaW0oKSB7XG4gICAgcmV0dXJuICR0cmltKHRoaXMsIDMpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy50cmltLmpzXG4vLyBtb2R1bGUgaWQgPSAyNzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///271\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $at = __webpack_require__(112)(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\n__webpack_require__(113)(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjcyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLml0ZXJhdG9yLmpzP2Q0MGQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRhdCA9IHJlcXVpcmUoJy4vX3N0cmluZy1hdCcpKHRydWUpO1xuXG4vLyAyMS4xLjMuMjcgU3RyaW5nLnByb3RvdHlwZVtAQGl0ZXJhdG9yXSgpXG5yZXF1aXJlKCcuL19pdGVyLWRlZmluZScpKFN0cmluZywgJ1N0cmluZycsIGZ1bmN0aW9uIChpdGVyYXRlZCkge1xuICB0aGlzLl90ID0gU3RyaW5nKGl0ZXJhdGVkKTsgLy8gdGFyZ2V0XG4gIHRoaXMuX2kgPSAwOyAgICAgICAgICAgICAgICAvLyBuZXh0IGluZGV4XG4vLyAyMS4xLjUuMi4xICVTdHJpbmdJdGVyYXRvclByb3RvdHlwZSUubmV4dCgpXG59LCBmdW5jdGlvbiAoKSB7XG4gIHZhciBPID0gdGhpcy5fdDtcbiAgdmFyIGluZGV4ID0gdGhpcy5faTtcbiAgdmFyIHBvaW50O1xuICBpZiAoaW5kZXggPj0gTy5sZW5ndGgpIHJldHVybiB7IHZhbHVlOiB1bmRlZmluZWQsIGRvbmU6IHRydWUgfTtcbiAgcG9pbnQgPSAkYXQoTywgaW5kZXgpO1xuICB0aGlzLl9pICs9IHBvaW50Lmxlbmd0aDtcbiAgcmV0dXJuIHsgdmFsdWU6IHBvaW50LCBkb25lOiBmYWxzZSB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gMjcyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///272\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $at = __webpack_require__(112)(false);\n$export($export.P, 'String', {\n // 21.1.3.3 String.prototype.codePointAt(pos)\n codePointAt: function codePointAt(pos) {\n return $at(this, pos);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjczLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmNvZGUtcG9pbnQtYXQuanM/NDVhNyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRhdCA9IHJlcXVpcmUoJy4vX3N0cmluZy1hdCcpKGZhbHNlKTtcbiRleHBvcnQoJGV4cG9ydC5QLCAnU3RyaW5nJywge1xuICAvLyAyMS4xLjMuMyBTdHJpbmcucHJvdG90eXBlLmNvZGVQb2ludEF0KHBvcylcbiAgY29kZVBvaW50QXQ6IGZ1bmN0aW9uIGNvZGVQb2ludEF0KHBvcykge1xuICAgIHJldHVybiAkYXQodGhpcywgcG9zKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5jb2RlLXBvaW50LWF0LmpzXG4vLyBtb2R1bGUgaWQgPSAyNzNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///273\n")},function(module,exports,__webpack_require__){"use strict";eval("// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])\n\nvar $export = __webpack_require__(0);\nvar toLength = __webpack_require__(12);\nvar context = __webpack_require__(115);\nvar ENDS_WITH = 'endsWith';\nvar $endsWith = ''[ENDS_WITH];\n\n$export($export.P + $export.F * __webpack_require__(116)(ENDS_WITH), 'String', {\n endsWith: function endsWith(searchString /* , endPosition = @length */) {\n var that = context(this, searchString, ENDS_WITH);\n var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n var len = toLength(that.length);\n var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);\n var search = String(searchString);\n return $endsWith\n ? $endsWith.call(that, search, end)\n : that.slice(end - search.length, end) === search;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYu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pdGguY2FsbCh0aGF0LCBzZWFyY2gsIGVuZClcbiAgICAgIDogdGhhdC5zbGljZShlbmQgLSBzZWFyY2gubGVuZ3RoLCBlbmQpID09PSBzZWFyY2g7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5zdHJpbmcuZW5kcy13aXRoLmpzXG4vLyBtb2R1bGUgaWQgPSAyNzRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///274\n")},function(module,exports,__webpack_require__){"use strict";eval("// 21.1.3.7 String.prototype.includes(searchString, position = 0)\n\nvar $export = __webpack_require__(0);\nvar context = __webpack_require__(115);\nvar INCLUDES = 'includes';\n\n$export($export.P + $export.F * __webpack_require__(116)(INCLUDES), 'String', {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~context(this, searchString, INCLUDES)\n .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmluY2x1ZGVzLmpzPzFhMWUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjEuMS4zLjcgU3RyaW5nLnByb3RvdHlwZS5pbmNsdWRlcyhzZWFyY2hTdHJpbmcsIHBvc2l0aW9uID0gMClcbid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgY29udGV4dCA9IHJlcXVpcmUoJy4vX3N0cmluZy1jb250ZXh0Jyk7XG52YXIgSU5DTFVERVMgPSAnaW5jbHVkZXMnO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqIHJlcXVpcmUoJy4vX2ZhaWxzLWlzLXJlZ2V4cCcpKElOQ0xVREVTKSwgJ1N0cmluZycsIHtcbiAgaW5jbHVkZXM6IGZ1bmN0aW9uIGluY2x1ZGVzKHNlYXJjaFN0cmluZyAvKiAsIHBvc2l0aW9uID0gMCAqLykge1xuICAgIHJldHVybiAhIX5jb250ZXh0KHRoaXMsIHNlYXJjaFN0cmluZywgSU5DTFVERVMpXG4gICAgICAuaW5kZXhPZihzZWFyY2hTdHJpbmcsIGFyZ3VtZW50cy5sZW5ndGggPiAxID8gYXJndW1lbnRzWzFdIDogdW5kZWZpbmVkKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5pbmNsdWRlcy5qc1xuLy8gbW9kdWxlIGlkID0gMjc1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///275\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\n\n$export($export.P, 'String', {\n // 21.1.3.13 String.prototype.repeat(count)\n repeat: __webpack_require__(109)\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnJlcGVhdC5qcz9iNmE0Il0sInNvdXJjZXNDb250ZW50IjpbInZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QLCAnU3RyaW5nJywge1xuICAvLyAyMS4xLjMuMTMgU3RyaW5nLnByb3RvdHlwZS5yZXBlYXQoY291bnQpXG4gIHJlcGVhdDogcmVxdWlyZSgnLi9fc3RyaW5nLXJlcGVhdCcpXG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnJlcGVhdC5qc1xuLy8gbW9kdWxlIGlkID0gMjc2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///276\n")},function(module,exports,__webpack_require__){"use strict";eval("// 21.1.3.18 String.prototype.startsWith(searchString [, position ])\n\nvar $export = __webpack_require__(0);\nvar toLength = __webpack_require__(12);\nvar context = __webpack_require__(115);\nvar STARTS_WITH = 'startsWith';\nvar $startsWith = ''[STARTS_WITH];\n\n$export($export.P + $export.F * __webpack_require__(116)(STARTS_WITH), 'String', {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = context(this, searchString, STARTS_WITH);\n var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = String(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n//# sourceURL=[module]\n//# sourceMapp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0c1dpdGhcbiAgICAgID8gJHN0YXJ0c1dpdGguY2FsbCh0aGF0LCBzZWFyY2gsIGluZGV4KVxuICAgICAgOiB0aGF0LnNsaWNlKGluZGV4LCBpbmRleCArIHNlYXJjaC5sZW5ndGgpID09PSBzZWFyY2g7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5zdHJpbmcuc3RhcnRzLXdpdGguanNcbi8vIG1vZHVsZSBpZCA9IDI3N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///277\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.2 String.prototype.anchor(name)\n__webpack_require__(20)('anchor', function (createHTML) {\n return function anchor(name) {\n return createHTML(this, 'a', 'name', name);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmFuY2hvci5qcz9mMGRhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjIgU3RyaW5nLnByb3RvdHlwZS5hbmNob3IobmFtZSlcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ2FuY2hvcicsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBhbmNob3IobmFtZSkge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICdhJywgJ25hbWUnLCBuYW1lKTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5zdHJpbmcuYW5jaG9yLmpzXG4vLyBtb2R1bGUgaWQgPSAyNzhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///278\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.3 String.prototype.big()\n__webpack_require__(20)('big', function (createHTML) {\n return function big() {\n return createHTML(this, 'big', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmJpZy5qcz80NzhhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjMgU3RyaW5nLnByb3RvdHlwZS5iaWcoKVxucmVxdWlyZSgnLi9fc3RyaW5nLWh0bWwnKSgnYmlnJywgZnVuY3Rpb24gKGNyZWF0ZUhUTUwpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGJpZygpIHtcbiAgICByZXR1cm4gY3JlYXRlSFRNTCh0aGlzLCAnYmlnJywgJycsICcnKTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5zdHJpbmcuYmlnLmpzXG4vLyBtb2R1bGUgaWQgPSAyNzlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///279\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.4 String.prototype.blink()\n__webpack_require__(20)('blink', function (createHTML) {\n return function blink() {\n return createHTML(this, 'blink', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjgwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmJsaW5rLmpzP2UxMTkiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gQi4yLjMuNCBTdHJpbmcucHJvdG90eXBlLmJsaW5rKClcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ2JsaW5rJywgZnVuY3Rpb24gKGNyZWF0ZUhUTUwpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGJsaW5rKCkge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICdibGluaycsICcnLCAnJyk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmJsaW5rLmpzXG4vLyBtb2R1bGUgaWQgPSAyODBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///280\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.5 String.prototype.bold()\n__webpack_require__(20)('bold', function (createHTML) {\n return function bold() {\n return createHTML(this, 'b', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjgxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmJvbGQuanM/ODhjZCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBCLjIuMy41IFN0cmluZy5wcm90b3R5cGUuYm9sZCgpXG5yZXF1aXJlKCcuL19zdHJpbmctaHRtbCcpKCdib2xkJywgZnVuY3Rpb24gKGNyZWF0ZUhUTUwpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGJvbGQoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2InLCAnJywgJycpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5ib2xkLmpzXG4vLyBtb2R1bGUgaWQgPSAyODFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///281\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.6 String.prototype.fixed()\n__webpack_require__(20)('fixed', function (createHTML) {\n return function fixed() {\n return createHTML(this, 'tt', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjgyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZpeGVkLmpzPzI3ZTgiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gQi4yLjMuNiBTdHJpbmcucHJvdG90eXBlLmZpeGVkKClcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ2ZpeGVkJywgZnVuY3Rpb24gKGNyZWF0ZUhUTUwpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGZpeGVkKCkge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICd0dCcsICcnLCAnJyk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZpeGVkLmpzXG4vLyBtb2R1bGUgaWQgPSAyODJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///282\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.7 String.prototype.fontcolor(color)\n__webpack_require__(20)('fontcolor', function (createHTML) {\n return function fontcolor(color) {\n return createHTML(this, 'font', 'color', color);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjgzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZvbnRjb2xvci5qcz9mMzZhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjcgU3RyaW5nLnByb3RvdHlwZS5mb250Y29sb3IoY29sb3IpXG5yZXF1aXJlKCcuL19zdHJpbmctaHRtbCcpKCdmb250Y29sb3InLCBmdW5jdGlvbiAoY3JlYXRlSFRNTCkge1xuICByZXR1cm4gZnVuY3Rpb24gZm9udGNvbG9yKGNvbG9yKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2ZvbnQnLCAnY29sb3InLCBjb2xvcik7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZvbnRjb2xvci5qc1xuLy8gbW9kdWxlIGlkID0gMjgzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///283\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.8 String.prototype.fontsize(size)\n__webpack_require__(20)('fontsize', function (createHTML) {\n return function fontsize(size) {\n return createHTML(this, 'font', 'size', size);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmZvbnRzaXplLmpzPzVmZjEiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gQi4yLjMuOCBTdHJpbmcucHJvdG90eXBlLmZvbnRzaXplKHNpemUpXG5yZXF1aXJlKCcuL19zdHJpbmctaHRtbCcpKCdmb250c2l6ZScsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBmb250c2l6ZShzaXplKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2ZvbnQnLCAnc2l6ZScsIHNpemUpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5mb250c2l6ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjg0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///284\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.9 String.prototype.italics()\n__webpack_require__(20)('italics', function (createHTML) {\n return function italics() {\n return createHTML(this, 'i', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLml0YWxpY3MuanM/Nzk1MiJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBCLjIuMy45IFN0cmluZy5wcm90b3R5cGUuaXRhbGljcygpXG5yZXF1aXJlKCcuL19zdHJpbmctaHRtbCcpKCdpdGFsaWNzJywgZnVuY3Rpb24gKGNyZWF0ZUhUTUwpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGl0YWxpY3MoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2knLCAnJywgJycpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5pdGFsaWNzLmpzXG4vLyBtb2R1bGUgaWQgPSAyODVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///285\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.10 String.prototype.link(url)\n__webpack_require__(20)('link', function (createHTML) {\n return function link(url) {\n return createHTML(this, 'a', 'href', url);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLmxpbmsuanM/NTA5OCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBCLjIuMy4xMCBTdHJpbmcucHJvdG90eXBlLmxpbmsodXJsKVxucmVxdWlyZSgnLi9fc3RyaW5nLWh0bWwnKSgnbGluaycsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBsaW5rKHVybCkge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICdhJywgJ2hyZWYnLCB1cmwpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5saW5rLmpzXG4vLyBtb2R1bGUgaWQgPSAyODZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///286\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.11 String.prototype.small()\n__webpack_require__(20)('small', function (createHTML) {\n return function small() {\n return createHTML(this, 'small', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnNtYWxsLmpzPzQ5NGYiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gQi4yLjMuMTEgU3RyaW5nLnByb3RvdHlwZS5zbWFsbCgpXG5yZXF1aXJlKCcuL19zdHJpbmctaHRtbCcpKCdzbWFsbCcsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBzbWFsbCgpIHtcbiAgICByZXR1cm4gY3JlYXRlSFRNTCh0aGlzLCAnc21hbGwnLCAnJywgJycpO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnN0cmluZy5zbWFsbC5qc1xuLy8gbW9kdWxlIGlkID0gMjg3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///287\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.12 String.prototype.strike()\n__webpack_require__(20)('strike', function (createHTML) {\n return function strike() {\n return createHTML(this, 'strike', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN0cmlrZS5qcz9lNjJjIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjEyIFN0cmluZy5wcm90b3R5cGUuc3RyaWtlKClcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ3N0cmlrZScsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBzdHJpa2UoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ3N0cmlrZScsICcnLCAnJyk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN0cmlrZS5qc1xuLy8gbW9kdWxlIGlkID0gMjg4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///288\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.13 String.prototype.sub()\n__webpack_require__(20)('sub', function (createHTML) {\n return function sub() {\n return createHTML(this, 'sub', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN1Yi5qcz8xMTZhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjEzIFN0cmluZy5wcm90b3R5cGUuc3ViKClcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ3N1YicsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBzdWIoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ3N1YicsICcnLCAnJyk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN1Yi5qc1xuLy8gbW9kdWxlIGlkID0gMjg5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///289\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// B.2.3.14 String.prototype.sup()\n__webpack_require__(20)('sup', function (createHTML) {\n return function sup() {\n return createHTML(this, 'sup', '', '');\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN1cC5qcz8yNzZhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEIuMi4zLjE0IFN0cmluZy5wcm90b3R5cGUuc3VwKClcbnJlcXVpcmUoJy4vX3N0cmluZy1odG1sJykoJ3N1cCcsIGZ1bmN0aW9uIChjcmVhdGVIVE1MKSB7XG4gIHJldHVybiBmdW5jdGlvbiBzdXAoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ3N1cCcsICcnLCAnJyk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuc3RyaW5nLnN1cC5qc1xuLy8gbW9kdWxlIGlkID0gMjkwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///290\n")},function(module,exports,__webpack_require__){eval("// 20.3.3.1 / 15.9.4.4 Date.now()\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS5ub3cuanM/NDFhMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMC4zLjMuMSAvIDE1LjkuNC40IERhdGUubm93KClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnRGF0ZScsIHsgbm93OiBmdW5jdGlvbiAoKSB7IHJldHVybiBuZXcgRGF0ZSgpLmdldFRpbWUoKTsgfSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS5ub3cuanNcbi8vIG1vZHVsZSBpZCA9IDI5MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///291\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar toPrimitive = __webpack_require__(31);\n\n$export($export.P + $export.F * __webpack_require__(5)(function () {\n return new Date(NaN).toJSON() !== null\n || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;\n}), 'Date', {\n // eslint-disable-next-line no-unused-vars\n toJSON: function toJSON(key) {\n var O = toObject(this);\n var pv = toPrimitive(O);\n return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS50by1qc29uLmpzP2YxZjgiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIHRvUHJpbWl0aXZlID0gcmVxdWlyZSgnLi9fdG8tcHJpbWl0aXZlJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QICsgJGV4cG9ydC5GICogcmVxdWlyZSgnLi9fZmFpbHMnKShmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBuZXcgRGF0ZShOYU4pLnRvSlNPTigpICE9PSBudWxsXG4gICAgfHwgRGF0ZS5wcm90b3R5cGUudG9KU09OLmNhbGwoeyB0b0lTT1N0cmluZzogZnVuY3Rpb24gKCkgeyByZXR1cm4gMTsgfSB9KSAhPT0gMTtcbn0pLCAnRGF0ZScsIHtcbiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXVudXNlZC12YXJzXG4gIHRvSlNPTjogZnVuY3Rpb24gdG9KU09OKGtleSkge1xuICAgIHZhciBPID0gdG9PYmplY3QodGhpcyk7XG4gICAgdmFyIHB2ID0gdG9QcmltaXRpdmUoTyk7XG4gICAgcmV0dXJuIHR5cGVvZiBwdiA9PSAnbnVtYmVyJyAmJiAhaXNGaW5pdGUocHYpID8gbnVsbCA6IE8udG9JU09TdHJpbmcoKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmRhdGUudG8tanNvbi5qc1xuLy8gbW9kdWxlIGlkID0gMjkyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///292\n")},function(module,exports,__webpack_require__){eval("// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()\nvar $export = __webpack_require__(0);\nvar toISOString = __webpack_require__(294);\n\n// PhantomJS / old WebKit has a broken implementations\n$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {\n toISOString: toISOString\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS50by1pc28tc3RyaW5nLmpzPzUxYjUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMy40LjM2IC8gMTUuOS41LjQzIERhdGUucHJvdG90eXBlLnRvSVNPU3RyaW5nKClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgdG9JU09TdHJpbmcgPSByZXF1aXJlKCcuL19kYXRlLXRvLWlzby1zdHJpbmcnKTtcblxuLy8gUGhhbnRvbUpTIC8gb2xkIFdlYktpdCBoYXMgYSBicm9rZW4gaW1wbGVtZW50YXRpb25zXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqIChEYXRlLnByb3RvdHlwZS50b0lTT1N0cmluZyAhPT0gdG9JU09TdHJpbmcpLCAnRGF0ZScsIHtcbiAgdG9JU09TdHJpbmc6IHRvSVNPU3RyaW5nXG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS50by1pc28tc3RyaW5nLmpzXG4vLyBtb2R1bGUgaWQgPSAyOTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///293\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()\nvar fails = __webpack_require__(5);\nvar getTime = Date.prototype.getTime;\nvar $toISOString = Date.prototype.toISOString;\n\nvar lz = function (num) {\n return num > 9 ? num : '0' + num;\n};\n\n// PhantomJS / old WebKit has a broken implementations\nmodule.exports = (fails(function () {\n return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';\n}) || !fails(function () {\n $toISOString.call(new Date(NaN));\n})) ? function toISOString() {\n if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');\n var d = this;\n var y = d.getUTCFullYear();\n var m = d.getUTCMilliseconds();\n var s = y < 0 ? '-' : y > 9999 ? '+' : '';\n return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +\n '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +\n 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +\n ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';\n} : $toISOString;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZGF0ZS10by1pc28tc3RyaW5nLmpzPzYzYjQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gMjAuMy40LjM2IC8gMTUuOS41LjQzIERhdGUucHJvdG90eXBlLnRvSVNPU3RyaW5nKClcbnZhciBmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG52YXIgZ2V0VGltZSA9IERhdGUucHJvdG90eXBlLmdldFRpbWU7XG52YXIgJHRvSVNPU3RyaW5nID0gRGF0ZS5wcm90b3R5cGUudG9JU09TdHJpbmc7XG5cbnZhciBseiA9IGZ1bmN0aW9uIChudW0pIHtcbiAgcmV0dXJuIG51bSA+IDkgPyBudW0gOiAnMCcgKyBudW07XG59O1xuXG4vLyBQaGFudG9tSlMgLyBvbGQgV2ViS2l0IGhhcyBhIGJyb2tlbiBpbXBsZW1lbnRhdGlv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kdWxlIGlkID0gMjk0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///294\n")},function(module,exports,__webpack_require__){eval("var DateProto = Date.prototype;\nvar INVALID_DATE = 'Invalid Date';\nvar TO_STRING = 'toString';\nvar $toString = DateProto[TO_STRING];\nvar getTime = DateProto.getTime;\nif (new Date(NaN) + '' != INVALID_DATE) {\n __webpack_require__(19)(DateProto, TO_STRING, function toString() {\n var value = getTime.call(this);\n // eslint-disable-next-line no-self-compare\n return value === value ? $toString.call(this) : INVALID_DATE;\n });\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS50by1zdHJpbmcuanM/NDY0ZSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgRGF0ZVByb3RvID0gRGF0ZS5wcm90b3R5cGU7XG52YXIgSU5WQUxJRF9EQVRFID0gJ0ludmFsaWQgRGF0ZSc7XG52YXIgVE9fU1RSSU5HID0gJ3RvU3RyaW5nJztcbnZhciAkdG9TdHJpbmcgPSBEYXRlUHJvdG9bVE9fU1RSSU5HXTtcbnZhciBnZXRUaW1lID0gRGF0ZVByb3RvLmdldFRpbWU7XG5pZiAobmV3IERhdGUoTmFOKSArICcnICE9IElOVkFMSURfREFURSkge1xuICByZXF1aXJlKCcuL19yZWRlZmluZScpKERhdGVQcm90bywgVE9fU1RSSU5HLCBmdW5jdGlvbiB0b1N0cmluZygpIHtcbiAgICB2YXIgdmFsdWUgPSBnZXRUaW1lLmNhbGwodGhpcyk7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXNlbGYtY29tcGFyZVxuICAgIHJldHVybiB2YWx1ZSA9PT0gdmFsdWUgPyAkdG9TdHJpbmcuY2FsbCh0aGlzKSA6IElOVkFMSURfREFURTtcbiAgfSk7XG59XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmRhdGUudG8tc3RyaW5nLmpzXG4vLyBtb2R1bGUgaWQgPSAyOTVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///295\n")},function(module,exports,__webpack_require__){eval("var TO_PRIMITIVE = __webpack_require__(8)('toPrimitive');\nvar proto = Date.prototype;\n\nif (!(TO_PRIMITIVE in proto)) __webpack_require__(18)(proto, TO_PRIMITIVE, __webpack_require__(297));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuZGF0ZS50by1wcmltaXRpdmUuanM/ZTEwZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgVE9fUFJJTUlUSVZFID0gcmVxdWlyZSgnLi9fd2tzJykoJ3RvUHJpbWl0aXZlJyk7XG52YXIgcHJvdG8gPSBEYXRlLnByb3RvdHlwZTtcblxuaWYgKCEoVE9fUFJJTUlUSVZFIGluIHByb3RvKSkgcmVxdWlyZSgnLi9faGlkZScpKHByb3RvLCBUT19QUklNSVRJVkUsIHJlcXVpcmUoJy4vX2RhdGUtdG8tcHJpbWl0aXZlJykpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5kYXRlLnRvLXByaW1pdGl2ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjk2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///296\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar anObject = __webpack_require__(3);\nvar toPrimitive = __webpack_require__(31);\nvar NUMBER = 'number';\n\nmodule.exports = function (hint) {\n if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');\n return toPrimitive(anObject(this), hint != NUMBER);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZGF0ZS10by1wcmltaXRpdmUuanM/OGMxZCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciB0b1ByaW1pdGl2ZSA9IHJlcXVpcmUoJy4vX3RvLXByaW1pdGl2ZScpO1xudmFyIE5VTUJFUiA9ICdudW1iZXInO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChoaW50KSB7XG4gIGlmIChoaW50ICE9PSAnc3RyaW5nJyAmJiBoaW50ICE9PSBOVU1CRVIgJiYgaGludCAhPT0gJ2RlZmF1bHQnKSB0aHJvdyBUeXBlRXJyb3IoJ0luY29ycmVjdCBoaW50Jyk7XG4gIHJldHVybiB0b1ByaW1pdGl2ZShhbk9iamVjdCh0aGlzKSwgaGludCAhPSBOVU1CRVIpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fZGF0ZS10by1wcmltaXRpdmUuanNcbi8vIG1vZHVsZSBpZCA9IDI5N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///297\n")},function(module,exports,__webpack_require__){eval("// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Array', { isArray: __webpack_require__(81) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuaXMtYXJyYXkuanM/MjBjNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMi4xLjIuMiAvIDE1LjQuMy4yIEFycmF5LmlzQXJyYXkoYXJnKVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdBcnJheScsIHsgaXNBcnJheTogcmVxdWlyZSgnLi9faXMtYXJyYXknKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuaXMtYXJyYXkuanNcbi8vIG1vZHVsZSBpZCA9IDI5OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///298\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar ctx = __webpack_require__(27);\nvar $export = __webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar call = __webpack_require__(162);\nvar isArrayIter = __webpack_require__(117);\nvar toLength = __webpack_require__(12);\nvar createProperty = __webpack_require__(118);\nvar getIterFn = __webpack_require__(119);\n\n$export($export.S + $export.F * !__webpack_require__(83)(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9u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BpbmRleCsrKSB7XG4gICAgICAgIGNyZWF0ZVByb3BlcnR5KHJlc3VsdCwgaW5kZXgsIG1hcHBpbmcgPyBtYXBmbihPW2luZGV4XSwgaW5kZXgpIDogT1tpbmRleF0pO1xuICAgICAgfVxuICAgIH1cbiAgICByZXN1bHQubGVuZ3RoID0gaW5kZXg7XG4gICAgcmV0dXJuIHJlc3VsdDtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LmZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDI5OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///299\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar createProperty = __webpack_require__(118);\n\n// WebKit Array.of isn't generic\n$export($export.S + $export.F * __webpack_require__(5)(function () {\n function F() { /* empty */ }\n return !(Array.of.call(F) instanceof F);\n}), 'Array', {\n // 22.1.2.3 Array.of( ...items)\n of: function of(/* ...args */) {\n var index = 0;\n var aLen = arguments.length;\n var result = new (typeof this == 'function' ? this : Array)(aLen);\n while (aLen > index) createProperty(result, index, arguments[index++]);\n result.length = aLen;\n return result;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=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JQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5hcnJheS5vZi5qc1xuLy8gbW9kdWxlIGlkID0gMzAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///300\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 22.1.3.13 Array.prototype.join(separator)\nvar $export = __webpack_require__(0);\nvar toIObject = __webpack_require__(24);\nvar arrayJoin = [].join;\n\n// fallback for not array-like strings\n$export($export.P + $export.F * (__webpack_require__(70) != Object || !__webpack_require__(29)(arrayJoin)), 'Array', {\n join: function join(separator) {\n return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuam9pbi5qcz84ZjhkIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDIyLjEuMy4xMyBBcnJheS5wcm90b3R5cGUuam9pbihzZXBhcmF0b3IpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHRvSU9iamVjdCA9IHJlcXVpcmUoJy4vX3RvLWlvYmplY3QnKTtcbnZhciBhcnJheUpvaW4gPSBbXS5qb2luO1xuXG4vLyBmYWxsYmFjayBmb3Igbm90IGFycmF5LWxpa2Ugc3RyaW5nc1xuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAocmVxdWlyZSgnLi9faW9iamVjdCcpICE9IE9iamVjdCB8fCAhcmVxdWlyZSgnLi9fc3RyaWN0LW1ldGhvZCcpKGFycmF5Sm9pbikpLCAnQXJyYXknLCB7XG4gIGpvaW46IGZ1bmN0aW9uIGpvaW4oc2VwYXJhdG9yKSB7XG4gICAgcmV0dXJuIGFycmF5Sm9pbi5jYWxsKHRvSU9iamVjdCh0aGlzKSwgc2VwYXJhdG9yID09PSB1bmRlZmluZWQgPyAnLCcgOiBzZXBhcmF0b3IpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuam9pbi5qc1xuLy8gbW9kdWxlIGlkID0gMzAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///301\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar html = __webpack_require__(105);\nvar cof = __webpack_require__(28);\nvar toAbsoluteIndex = __webpack_require__(51);\nvar toLength = __webpack_require__(12);\nvar arraySlice = [].slice;\n\n// fallback for not array-like ES3 strings and DOM objects\n$export($export.P + $export.F * __webpack_require__(5)(function () {\n if (html) arraySlice.call(html);\n}), 'Array', {\n slice: function slice(begin, end) {\n var len = toLength(this.length);\n var klass = cof(this);\n end = end === undefined ? len : end;\n if (klass == 'Array') return arraySlice.call(this, begin, end);\n var start = toAbsoluteIndex(begin, len);\n var upTo = toAbsoluteIndex(end, len);\n var size = toLength(upTo - start);\n var cloned = new Array(size);\n var i = 0;\n for (; i < size; i++) cloned[i] = klass == 'String'\n ? this.charAt(start + i)\n : this[start + i];\n return cloned;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuc2xpY2UuanM/ZjM1NyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGh0bWwgPSByZXF1aXJlKCcuL19odG1sJyk7XG52YXIgY29mID0gcmVxdWlyZSgnLi9fY29mJyk7XG52YXIgdG9BYnNvbHV0ZUluZGV4ID0gcmVxdWlyZSgnLi9fdG8tYWJzb2x1dGUtaW5kZXgnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4vX3RvLWxlbmd0aCcpO1xudmFyIGFycmF5U2xpY2UgPSBbXS5zbGljZTtcblxuLy8gZmFsbGJhY2sgZm9yIG5vdCBhcnJheS1saWtlIEVTMyBzdHJpbmdzIGFuZCBET00gb2JqZWN0c1xuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiByZXF1aXJlKCcuL19mYWlscycpKGZ1bmN0aW9uICgpIHtcbiAgaWYgKGh0bWwpIGFycmF5U2xpY2UuY2FsbChodG1sKTtcbn0pLCAnQXJyYXknLCB7XG4gIHNsaWNlOiBmdW5jdGlvbiBzbGljZShiZWdpbiwgZW5kKSB7XG4gICAgdmFyIGxlbiA9IHRvTGVuZ3RoKHRoaXMubGVuZ3RoKTtcbiAgICB2YXIga2xhc3MgPSBjb2YodGhpcyk7XG4gICAgZW5kID0gZW5kID09PSB1bmRlZmluZWQgPyBsZW4gOiBlbmQ7XG4gICAgaWYgKGtsYXNzID09ICdBcnJheScpIHJldHVybiBhcnJheVNsaWNlLmNhbGwodGhpcywgYmVnaW4sIGVuZCk7XG4gICAgdmFyIHN0YXJ0ID0gdG9BYnNvbHV0ZUluZGV4KGJlZ2luLCBsZW4pO1xuICAgIHZhciB1cFRvID0gdG9BYnNvbHV0ZUluZGV4KGVuZCwgbGVuKTtcbiAgICB2YXIgc2l6ZSA9IHRvTGVuZ3RoKHVwVG8gLSBzdGFydCk7XG4gICAgdmFyIGNsb25lZCA9IG5ldyBBcnJheShzaXplKTtcbiAgICB2YXIgaSA9IDA7XG4gICAgZm9yICg7IGkgPCBzaXplOyBpKyspIGNsb25lZFtpXSA9IGtsYXNzID09ICdTdHJpbmcnXG4gICAgICA/IHRoaXMuY2hhckF0KHN0YXJ0ICsgaSlcbiAgICAgIDogdGhpc1tzdGFydCArIGldO1xuICAgIHJldHVybiBjbG9uZWQ7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5hcnJheS5zbGljZS5qc1xuLy8gbW9kdWxlIGlkID0gMzAyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///302\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar aFunction = __webpack_require__(16);\nvar toObject = __webpack_require__(15);\nvar fails = __webpack_require__(5);\nvar $sort = [].sort;\nvar test = [1, 2, 3];\n\n$export($export.P + $export.F * (fails(function () {\n // IE8-\n test.sort(undefined);\n}) || !fails(function () {\n // V8 bug\n test.sort(null);\n // Old WebKit\n}) || !__webpack_require__(29)($sort)), 'Array', {\n // 22.1.3.25 Array.prototype.sort(comparefn)\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? $sort.call(toObject(this))\n : $sort.call(toObject(this), aFunction(comparefn));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuc29ydC5qcz9iODM2Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgYUZ1bmN0aW9uID0gcmVxdWlyZSgnLi9fYS1mdW5jdGlvbicpO1xudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgZmFpbHMgPSByZXF1aXJlKCcuL19mYWlscycpO1xudmFyICRzb3J0ID0gW10uc29ydDtcbnZhciB0ZXN0ID0gWzEsIDIsIDNdO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqIChmYWlscyhmdW5jdGlvbiAoKSB7XG4gIC8vIElFOC1cbiAgdGVzdC5zb3J0KHVuZGVmaW5lZCk7XG59KSB8fCAhZmFpbHMoZnVuY3Rpb24gKCkge1xuICAvLyBWOCBidWdcbiAgdGVzdC5zb3J0KG51bGwpO1xuICAvLyBPbGQgV2ViS2l0XG59KSB8fCAhcmVxdWlyZSgnLi9fc3RyaWN0LW1ldGhvZCcpKCRzb3J0KSksICdBcnJheScsIHtcbiAgLy8gMjIuMS4zLjI1IEFycmF5LnByb3RvdHlwZS5zb3J0KGNvbXBhcmVmbilcbiAgc29ydDogZnVuY3Rpb24gc29ydChjb21wYXJlZm4pIHtcbiAgICByZXR1cm4gY29tcGFyZWZuID09PSB1bmRlZmluZWRcbiAgICAgID8gJHNvcnQuY2FsbCh0b09iamVjdCh0aGlzKSlcbiAgICAgIDogJHNvcnQuY2FsbCh0b09iamVjdCh0aGlzKSwgYUZ1bmN0aW9uKGNvbXBhcmVmbikpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuc29ydC5qc1xuLy8gbW9kdWxlIGlkID0gMzAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///303\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $forEach = __webpack_require__(35)(0);\nvar STRICT = __webpack_require__(29)([].forEach, true);\n\n$export($export.P + $export.F * !STRICT, 'Array', {\n // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])\n forEach: function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZm9yLWVhY2guanM/MDg0MyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRmb3JFYWNoID0gcmVxdWlyZSgnLi9fYXJyYXktbWV0aG9kcycpKDApO1xudmFyIFNUUklDVCA9IHJlcXVpcmUoJy4vX3N0cmljdC1tZXRob2QnKShbXS5mb3JFYWNoLCB0cnVlKTtcblxuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAhU1RSSUNULCAnQXJyYXknLCB7XG4gIC8vIDIyLjEuMy4xMCAvIDE1LjQuNC4xOCBBcnJheS5wcm90b3R5cGUuZm9yRWFjaChjYWxsYmFja2ZuIFssIHRoaXNBcmddKVxuICBmb3JFYWNoOiBmdW5jdGlvbiBmb3JFYWNoKGNhbGxiYWNrZm4gLyogLCB0aGlzQXJnICovKSB7XG4gICAgcmV0dXJuICRmb3JFYWNoKHRoaXMsIGNhbGxiYWNrZm4sIGFyZ3VtZW50c1sxXSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5hcnJheS5mb3ItZWFjaC5qc1xuLy8gbW9kdWxlIGlkID0gMzA0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///304\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(6);\nvar isArray = __webpack_require__(81);\nvar SPECIES = __webpack_require__(8)('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fYXJyYXktc3BlY2llcy1jb25zdHJ1Y3Rvci5qcz82ZThhIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIGlzQXJyYXkgPSByZXF1aXJlKCcuL19pcy1hcnJheScpO1xudmFyIFNQRUNJRVMgPSByZXF1aXJlKCcuL193a3MnKSgnc3BlY2llcycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChvcmlnaW5hbCkge1xuICB2YXIgQztcbiAgaWYgKGlzQXJyYXkob3JpZ2luYWwpKSB7XG4gICAgQyA9IG9yaWdpbmFsLmNvbnN0cnVjdG9yO1xuICAgIC8vIGNyb3NzLXJlYWxtIGZhbGxiYWNrXG4gICAgaWYgKHR5cGVvZiBDID09ICdmdW5jdGlvbicgJiYgKEMgPT09IEFycmF5IHx8IGlzQXJyYXkoQy5wcm90b3R5cGUpKSkgQyA9IHVuZGVmaW5lZDtcbiAgICBpZiAoaXNPYmplY3QoQykpIHtcbiAgICAgIEMgPSBDW1NQRUNJRVNdO1xuICAgICAgaWYgKEMgPT09IG51bGwpIEMgPSB1bmRlZmluZWQ7XG4gICAgfVxuICB9IHJldHVybiBDID09PSB1bmRlZmluZWQgPyBBcnJheSA6IEM7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL19hcnJheS1zcGVjaWVzLWNvbnN0cnVjdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSAzMDVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///305\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $map = __webpack_require__(35)(1);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].map, true), 'Array', {\n // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkubWFwLmpzP2MzYTUiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkbWFwID0gcmVxdWlyZSgnLi9fYXJyYXktbWV0aG9kcycpKDEpO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqICFyZXF1aXJlKCcuL19zdHJpY3QtbWV0aG9kJykoW10ubWFwLCB0cnVlKSwgJ0FycmF5Jywge1xuICAvLyAyMi4xLjMuMTUgLyAxNS40LjQuMTkgQXJyYXkucHJvdG90eXBlLm1hcChjYWxsYmFja2ZuIFssIHRoaXNBcmddKVxuICBtYXA6IGZ1bmN0aW9uIG1hcChjYWxsYmFja2ZuIC8qICwgdGhpc0FyZyAqLykge1xuICAgIHJldHVybiAkbWFwKHRoaXMsIGNhbGxiYWNrZm4sIGFyZ3VtZW50c1sxXSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5hcnJheS5tYXAuanNcbi8vIG1vZHVsZSBpZCA9IDMwNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///306\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $filter = __webpack_require__(35)(2);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].filter, true), 'Array', {\n // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZmlsdGVyLmpzPzdjZTciXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkZmlsdGVyID0gcmVxdWlyZSgnLi9fYXJyYXktbWV0aG9kcycpKDIpO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqICFyZXF1aXJlKCcuL19zdHJpY3QtbWV0aG9kJykoW10uZmlsdGVyLCB0cnVlKSwgJ0FycmF5Jywge1xuICAvLyAyMi4xLjMuNyAvIDE1LjQuNC4yMCBBcnJheS5wcm90b3R5cGUuZmlsdGVyKGNhbGxiYWNrZm4gWywgdGhpc0FyZ10pXG4gIGZpbHRlcjogZnVuY3Rpb24gZmlsdGVyKGNhbGxiYWNrZm4gLyogLCB0aGlzQXJnICovKSB7XG4gICAgcmV0dXJuICRmaWx0ZXIodGhpcywgY2FsbGJhY2tmbiwgYXJndW1lbnRzWzFdKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LmZpbHRlci5qc1xuLy8gbW9kdWxlIGlkID0gMzA3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///307\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $some = __webpack_require__(35)(3);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].some, true), 'Array', {\n // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])\n some: function some(callbackfn /* , thisArg */) {\n return $some(this, callbackfn, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuc29tZS5qcz9jMTU3Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJHNvbWUgPSByZXF1aXJlKCcuL19hcnJheS1tZXRob2RzJykoMyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX3N0cmljdC1tZXRob2QnKShbXS5zb21lLCB0cnVlKSwgJ0FycmF5Jywge1xuICAvLyAyMi4xLjMuMjMgLyAxNS40LjQuMTcgQXJyYXkucHJvdG90eXBlLnNvbWUoY2FsbGJhY2tmbiBbLCB0aGlzQXJnXSlcbiAgc29tZTogZnVuY3Rpb24gc29tZShjYWxsYmFja2ZuIC8qICwgdGhpc0FyZyAqLykge1xuICAgIHJldHVybiAkc29tZSh0aGlzLCBjYWxsYmFja2ZuLCBhcmd1bWVudHNbMV0pO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuc29tZS5qc1xuLy8gbW9kdWxlIGlkID0gMzA4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///308\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $every = __webpack_require__(35)(4);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].every, true), 'Array', {\n // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])\n every: function every(callbackfn /* , thisArg */) {\n return $every(this, callbackfn, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZXZlcnkuanM/MzY0YSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRldmVyeSA9IHJlcXVpcmUoJy4vX2FycmF5LW1ldGhvZHMnKSg0KTtcblxuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAhcmVxdWlyZSgnLi9fc3RyaWN0LW1ldGhvZCcpKFtdLmV2ZXJ5LCB0cnVlKSwgJ0FycmF5Jywge1xuICAvLyAyMi4xLjMuNSAvIDE1LjQuNC4xNiBBcnJheS5wcm90b3R5cGUuZXZlcnkoY2FsbGJhY2tmbiBbLCB0aGlzQXJnXSlcbiAgZXZlcnk6IGZ1bmN0aW9uIGV2ZXJ5KGNhbGxiYWNrZm4gLyogLCB0aGlzQXJnICovKSB7XG4gICAgcmV0dXJuICRldmVyeSh0aGlzLCBjYWxsYmFja2ZuLCBhcmd1bWVudHNbMV0pO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZXZlcnkuanNcbi8vIG1vZHVsZSBpZCA9IDMwOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///309\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $reduce = __webpack_require__(163);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].reduce, true), 'Array', {\n // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments[1], false);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkucmVkdWNlLmpzP2MyNzQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkcmVkdWNlID0gcmVxdWlyZSgnLi9fYXJyYXktcmVkdWNlJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX3N0cmljdC1tZXRob2QnKShbXS5yZWR1Y2UsIHRydWUpLCAnQXJyYXknLCB7XG4gIC8vIDIyLjEuMy4xOCAvIDE1LjQuNC4yMSBBcnJheS5wcm90b3R5cGUucmVkdWNlKGNhbGxiYWNrZm4gWywgaW5pdGlhbFZhbHVlXSlcbiAgcmVkdWNlOiBmdW5jdGlvbiByZWR1Y2UoY2FsbGJhY2tmbiAvKiAsIGluaXRpYWxWYWx1ZSAqLykge1xuICAgIHJldHVybiAkcmVkdWNlKHRoaXMsIGNhbGxiYWNrZm4sIGFyZ3VtZW50cy5sZW5ndGgsIGFyZ3VtZW50c1sxXSwgZmFsc2UpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkucmVkdWNlLmpzXG4vLyBtb2R1bGUgaWQgPSAzMTBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///310\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $reduce = __webpack_require__(163);\n\n$export($export.P + $export.F * !__webpack_require__(29)([].reduceRight, true), 'Array', {\n // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])\n reduceRight: function reduceRight(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments[1], true);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzExLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkucmVkdWNlLXJpZ2h0LmpzPzk2NDQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkcmVkdWNlID0gcmVxdWlyZSgnLi9fYXJyYXktcmVkdWNlJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX3N0cmljdC1tZXRob2QnKShbXS5yZWR1Y2VSaWdodCwgdHJ1ZSksICdBcnJheScsIHtcbiAgLy8gMjIuMS4zLjE5IC8gMTUuNC40LjIyIEFycmF5LnByb3RvdHlwZS5yZWR1Y2VSaWdodChjYWxsYmFja2ZuIFssIGluaXRpYWxWYWx1ZV0pXG4gIHJlZHVjZVJpZ2h0OiBmdW5jdGlvbiByZWR1Y2VSaWdodChjYWxsYmFja2ZuIC8qICwgaW5pdGlhbFZhbHVlICovKSB7XG4gICAgcmV0dXJuICRyZWR1Y2UodGhpcywgY2FsbGJhY2tmbiwgYXJndW1lbnRzLmxlbmd0aCwgYXJndW1lbnRzWzFdLCB0cnVlKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LnJlZHVjZS1yaWdodC5qc1xuLy8gbW9kdWxlIGlkID0gMzExXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///311\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $indexOf = __webpack_require__(79)(false);\nvar $native = [].indexOf;\nvar NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;\n\n$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(29)($native)), 'Array', {\n // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? $native.apply(this, arguments) || 0\n : $indexOf(this, searchElement, arguments[1]);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuaW5kZXgtb2YuanM/ZjgyMyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRpbmRleE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IiJ9\n//# sourceURL=webpack-internal:///312\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toIObject = __webpack_require__(24);\nvar toInteger = __webpack_require__(33);\nvar toLength = __webpack_require__(12);\nvar $native = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;\n\n$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(29)($native)), 'Array', {\n // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;\n var O = toIObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;\n return -1;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkubGFzdC1pbmRleC1vZi5qcz9hMDcyIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgdG9JT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8taW9iamVjdCcpO1xudmFyIHRvSW50ZWdlciA9IHJlcXVpcmUoJy4vX3RvLWludGVnZXInKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4vX3RvLWxlbmd0aCcpO1xudmFyICRuYXRpdmUgPSBbXS5sYXN0SW5kZXhPZjtcbnZhciBORUdBVElWRV9aRVJPID0gISEkbmF0aX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MvY29yZS1qcy9tb2R1bGVzL2VzNi5hcnJheS5sYXN0LWluZGV4LW9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzMTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///313\n")},function(module,exports,__webpack_require__){eval("// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\nvar $export = __webpack_require__(0);\n\n$export($export.P, 'Array', { copyWithin: __webpack_require__(164) });\n\n__webpack_require__(43)('copyWithin');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuY29weS13aXRoaW4uanM/ZjZmNyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyMi4xLjMuMyBBcnJheS5wcm90b3R5cGUuY29weVdpdGhpbih0YXJnZXQsIHN0YXJ0LCBlbmQgPSB0aGlzLmxlbmd0aClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QLCAnQXJyYXknLCB7IGNvcHlXaXRoaW46IHJlcXVpcmUoJy4vX2FycmF5LWNvcHktd2l0aGluJykgfSk7XG5cbnJlcXVpcmUoJy4vX2FkZC10by11bnNjb3BhYmxlcycpKCdjb3B5V2l0aGluJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LmNvcHktd2l0aGluLmpzXG4vLyBtb2R1bGUgaWQgPSAzMTRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///314\n")},function(module,exports,__webpack_require__){eval("// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\nvar $export = __webpack_require__(0);\n\n$export($export.P, 'Array', { fill: __webpack_require__(121) });\n\n__webpack_require__(43)('fill');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZmlsbC5qcz8zNjhlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIyLjEuMy42IEFycmF5LnByb3RvdHlwZS5maWxsKHZhbHVlLCBzdGFydCA9IDAsIGVuZCA9IHRoaXMubGVuZ3RoKVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlAsICdBcnJheScsIHsgZmlsbDogcmVxdWlyZSgnLi9fYXJyYXktZmlsbCcpIH0pO1xuXG5yZXF1aXJlKCcuL19hZGQtdG8tdW5zY29wYWJsZXMnKSgnZmlsbCcpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5hcnJheS5maWxsLmpzXG4vLyBtb2R1bGUgaWQgPSAzMTVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///315\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = __webpack_require__(0);\nvar $find = __webpack_require__(35)(5);\nvar KEY = 'find';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n__webpack_require__(43)(KEY);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZmluZC5qcz81YTk0Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIDIyLjEuMy44IEFycmF5LnByb3RvdHlwZS5maW5kKHByZWRpY2F0ZSwgdGhpc0FyZyA9IHVuZGVmaW5lZClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJGZpbmQgPSByZXF1aXJlKCcuL19hcnJheS1tZXRob2RzJykoNSk7XG52YXIgS0VZID0gJ2ZpbmQnO1xudmFyIGZvcmNlZCA9IHRydWU7XG4vLyBTaG91bGRuJ3Qgc2tpcCBob2xlc1xuaWYgKEtFWSBpbiBbXSkgQXJyYXkoMSlbS0VZXShmdW5jdGlvbiAoKSB7IGZvcmNlZCA9IGZhbHNlOyB9KTtcbiRleHBvcnQoJGV4cG9ydC5QICsgJGV4cG9ydC5GICogZm9yY2VkLCAnQXJyYXknLCB7XG4gIGZpbmQ6IGZ1bmN0aW9uIGZpbmQoY2FsbGJhY2tmbiAvKiAsIHRoYXQgPSB1bmRlZmluZWQgKi8pIHtcbiAgICByZXR1cm4gJGZpbmQodGhpcywgY2FsbGJhY2tmbiwgYXJndW1lbnRzLmxlbmd0aCA+IDEgPyBhcmd1bWVudHNbMV0gOiB1bmRlZmluZWQpO1xuICB9XG59KTtcbnJlcXVpcmUoJy4vX2FkZC10by11bnNjb3BhYmxlcycpKEtFWSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LmZpbmQuanNcbi8vIG1vZHVsZSBpZCA9IDMxNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///316\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)\nvar $export = __webpack_require__(0);\nvar $find = __webpack_require__(35)(6);\nvar KEY = 'findIndex';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n__webpack_require__(43)(KEY);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuZ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FDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///317\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(54)('Array');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYuYXJyYXkuc3BlY2llcy5qcz80M2YwIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3NldC1zcGVjaWVzJykoJ0FycmF5Jyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LmFycmF5LnNwZWNpZXMuanNcbi8vIG1vZHVsZSBpZCA9IDMxOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///318\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(4);\nvar inheritIfRequired = __webpack_require__(108);\nvar dP = __webpack_require__(11).f;\nvar gOPN = __webpack_require__(53).f;\nvar isRegExp = __webpack_require__(82);\nvar $flags = __webpack_require__(84);\nvar $RegExp = global.RegExp;\nvar Base = $RegExp;\nvar proto = $RegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n// \"new\" creates a new object, old webkit buggy here\nvar CORRECT_NEW = new $RegExp(re1) !== re1;\n\nif (__webpack_require__(10) && (!CORRECT_NEW || __webpack_require__(5)(function () {\n re2[__webpack_require__(8)('match')] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';\n}))) {\n $RegExp = function RegExp(p, f) {\n var tiRE = this instanceof $RegExp;\n var piRE = isRegExp(p);\n var fiU = f === undefined;\n return !tiRE && piRE && p.constructor === $RegExp && fiU ? p\n : inheritIfRequired(CORRECT_NEW\n ? new Base(piRE && !fiU ? p.source : p, f)\n : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)\n , tiRE ? this : proto, $RegExp);\n };\n var proxy = function (key) {\n key in $RegExp || dP($RegExp, key, {\n configurable: true,\n get: function () { return Base[key]; },\n set: function (it) { Base[key] = it; }\n });\n };\n for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);\n proto.constructor = $RegExp;\n $RegExp.prototype = proto;\n __webpack_require__(19)(global, 'RegExp', $RegExp);\n}\n\n__webpack_require__(54)('RegExp');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzE5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLmNvbnN0cnVjdG9yLmpzPzk2NzYiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIGluaGVyaXRJZlJlcXVpcmVkID0gcmVxdWlyZSgnLi9faW5oZXJpdC1pZi1yZXF1aXJlZCcpO1xudmFyIGRQID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJykuZjtcbnZhciBnT1BOID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcG4nKS5mO1xudmFyIGlzUmVnRXhwID0gcmVxdWlyZSgnLi9faXMtcmVnZXhwJyk7XG52YXIgJGZsYWdzID0gcmVxdWlyZSgnLi9fZmxhZ3MnKTtcbnZhciAkUmVnRXhwID0gZ2xvYmFsLlJlZ0V4cDtcbnZhciBCYXNlID0gJFJlZ0V4cDtcbnZhci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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///319\n")},function(module,exports,__webpack_require__){"use strict";eval("\n__webpack_require__(166);\nvar anObject = __webpack_require__(3);\nvar $flags = __webpack_require__(84);\nvar DESCRIPTORS = __webpack_require__(10);\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n __webpack_require__(19)(RegExp.prototype, TO_STRING, fn, true);\n};\n\n// 21.2.5.14 RegExp.prototype.toString()\nif (__webpack_require__(5)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {\n define(function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);\n });\n// FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLnRvLXN0cmluZy5qcz8xNWE2Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnJlcXVpcmUoJy4vZXM2LnJlZ2V4cC5mbGFncycpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgJGZsYWdzID0gcmVxdWlyZSgnLi9fZmxhZ3MnKTtcbnZhciBERVNDUklQVE9SUyA9IHJlcXVp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4vLyBtb2R1bGUgaWQgPSAzMjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///320\n")},function(module,exports,__webpack_require__){eval("// @@match logic\n__webpack_require__(85)('match', 1, function (defined, MATCH, $match) {\n // 21.1.3.11 String.prototype.match(regexp)\n return [function match(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n }, $match];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLm1hdGNoLmpzPzMxZjciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQEBtYXRjaCBsb2dpY1xucmVxdWlyZSgnLi9fZml4LXJlLXdrcycpKCdtYXRjaCcsIDEsIGZ1bmN0aW9uIChkZWZpbmVkLCBNQVRDSCwgJG1hdGNoKSB7XG4gIC8vIDIxLjEuMy4xMSBTdHJpbmcucHJvdG90eXBlLm1hdGNoKHJlZ2V4cClcbiAgcmV0dXJuIFtmdW5jdGlvbiBtYXRjaChyZWdleHApIHtcbiAgICAndXNlIHN0cmljdCc7XG4gICAgdmFyIE8gPSBkZWZpbmVkKHRoaXMpO1xuICAgIHZhciBmbiA9IHJlZ2V4cCA9PSB1bmRlZmluZWQgPyB1bmRlZmluZWQgOiByZWdleHBbTUFUQ0hdO1xuICAgIHJldHVybiBmbiAhPT0gdW5kZWZpbmVkID8gZm4uY2FsbChyZWdleHAsIE8pIDogbmV3IFJlZ0V4cChyZWdleHApW01BVENIXShTdHJpbmcoTykpO1xuICB9LCAkbWF0Y2hdO1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnJlZ2V4cC5tYXRjaC5qc1xuLy8gbW9kdWxlIGlkID0gMzIxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///321\n")},function(module,exports,__webpack_require__){eval("// @@replace logic\n__webpack_require__(85)('replace', 2, function (defined, REPLACE, $replace) {\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return [function replace(searchValue, replaceValue) {\n 'use strict';\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n }, $replace];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLnJlcGxhY2UuanM/NTYzYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAQHJlcGxhY2UgbG9naWNcbnJlcXVpcmUoJy4vX2ZpeC1yZS13a3MnKSgncmVwbGFjZScsIDIsIGZ1bmN0aW9uIChkZWZpbmVkLCBSRVBMQUNFLCAkcmVwbGFjZSkge1xuICAvLyAyMS4xLjMuMTQgU3RyaW5nLnByb3RvdHlwZS5yZXBsYWNlKHNlYXJjaFZhbHVlLCByZXBsYWNlVmFsdWUpXG4gIHJldHVybiBbZnVuY3Rpb24gcmVwbGFjZShzZWFyY2hWYWx1ZSwgcmVwbGFjZVZhbHVlKSB7XG4gICAgJ3VzZSBzdHJpY3QnO1xuICAgIHZhciBPID0gZGVmaW5lZCh0aGlzKTtcbiAgICB2YXIgZm4gPSBzZWFyY2hWYWx1ZSA9PSB1bmRlZmluZWQgPyB1bmRlZmluZWQgOiBzZWFyY2hWYWx1ZVtSRVBMQUNFXTtcbiAgICByZXR1cm4gZm4gIT09IHVuZGVmaW5lZFxuICAgICAgPyBmbi5jYWxsKHNlYXJjaFZhbHVlLCBPLCByZXBsYWNlVmFsdWUpXG4gICAgICA6ICRyZXBsYWNlLmNhbGwoU3RyaW5nKE8pLCBzZWFyY2hWYWx1ZSwgcmVwbGFjZVZhbHVlKTtcbiAgfSwgJHJlcGxhY2VdO1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnJlZ2V4cC5yZXBsYWNlLmpzXG4vLyBtb2R1bGUgaWQgPSAzMjJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///322\n")},function(module,exports,__webpack_require__){eval("// @@search logic\n__webpack_require__(85)('search', 1, function (defined, SEARCH, $search) {\n // 21.1.3.15 String.prototype.search(regexp)\n return [function search(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[SEARCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n }, $search];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLnNlYXJjaC5qcz9hYjA0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIEBAc2VhcmNoIGxvZ2ljXG5yZXF1aXJlKCcuL19maXgtcmUtd2tzJykoJ3NlYXJjaCcsIDEsIGZ1bmN0aW9uIChkZWZpbmVkLCBTRUFSQ0gsICRzZWFyY2gpIHtcbiAgLy8gMjEuMS4zLjE1IFN0cmluZy5wcm90b3R5cGUuc2VhcmNoKHJlZ2V4cClcbiAgcmV0dXJuIFtmdW5jdGlvbiBzZWFyY2gocmVnZXhwKSB7XG4gICAgJ3VzZSBzdHJpY3QnO1xuICAgIHZhciBPID0gZGVmaW5lZCh0aGlzKTtcbiAgICB2YXIgZm4gPSByZWdleHAgPT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogcmVnZXhwW1NFQVJDSF07XG4gICAgcmV0dXJuIGZuICE9PSB1bmRlZmluZWQgPyBmbi5jYWxsKHJlZ2V4cCwgTykgOiBuZXcgUmVnRXhwKHJlZ2V4cClbU0VBUkNIXShTdHJpbmcoTykpO1xuICB9LCAkc2VhcmNoXTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWdleHAuc2VhcmNoLmpzXG4vLyBtb2R1bGUgaWQgPSAzMjNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///323\n")},function(module,exports,__webpack_require__){eval("// @@split logic\n__webpack_require__(85)('split', 2, function (defined, SPLIT, $split) {\n 'use strict';\n var isRegExp = __webpack_require__(82);\n var _split = $split;\n var $push = [].push;\n var $SPLIT = 'split';\n var LENGTH = 'length';\n var LAST_INDEX = 'lastIndex';\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group\n // based on es5-shim implementation, need to rework it\n $split = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return _split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var separator2, match, lastIndex, lastLength, i;\n // Doesn't need flags gy, but they don't hurt\n if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\\\s)', flags);\n while (match = separatorCopy.exec(string)) {\n // `separatorCopy.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0][LENGTH];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG\n // eslint-disable-next-line no-loop-func\n if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {\n for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;\n });\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n $split = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);\n };\n }\n // 21.1.3.17 String.prototype.split(separator, limit)\n return [function split(separator, limit) {\n var O = defined(this);\n var fn = separator == undefined ? undefined : separator[SPLIT];\n return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);\n }, $split];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVnZXhwLnNwbGl0LmpzPzk4OWMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQEBzcGxpdCBsb2dpY1xucmVxdWlyZSgnLi9fZml4LXJlLXdrcycpKCdzcGxpdCcsIDIsIGZ1bmN0aW9uIChkZWZpbmVkLCBTUExJVCwgJHNwbGl0KSB7XG4gICd1c2Ugc3RyaWN0JztcbiAgdmFyIGlzUmVnRXhwID0gcmVxdWlyZSgnLi9faXMtcmVnZXhwJyk7XG4gIHZhciBfc3BsaXQgPSAkc3Bsa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pO1xuICB9LCAkc3BsaXRdO1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnJlZ2V4cC5zcGxpdC5qc1xuLy8gbW9kdWxlIGlkID0gMzI0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///324\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar LIBRARY = __webpack_require__(49);\nvar global = __webpack_require__(4);\nvar ctx = __webpack_require__(27);\nvar classof = __webpack_require__(72);\nvar $export = __webpack_require__(0);\nvar isObject = __webpack_require__(6);\nvar aFunction = __webpack_require__(16);\nvar anInstance = __webpack_require__(55);\nvar forOf = __webpack_require__(56);\nvar speciesConstructor = __webpack_require__(86);\nvar task = __webpack_require__(123).set;\nvar microtask = __webpack_require__(124)();\nvar newPromiseCapabilityModule = __webpack_require__(125);\nvar perform = __webpack_require__(167);\nvar promiseResolve = __webpack_require__(168);\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[__webpack_require__(8)('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value);\n if (domain) domain.exit();\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = __webpack_require__(57)($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\n__webpack_require__(61)($Promise, PROMISE);\n__webpack_require__(54)(PROMISE);\nWrapper = __webpack_require__(30)[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(83)(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucHJvbWlzZS5qcz9jYmQ5Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBMSUJSQVJZID0gcmVxdWlyZSgnLi9fbGlicmFyeScpO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIGN0eCA9IHJlcXVpcmUoJy4vX2N0eCcpO1xudmFyIGNsYXNzb2YgPSByZXF1aXJlKCcuL19jbGFzc29mJyk7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgYUZ1bmN0aW9uID0gcmVxdWlyZSg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2YXIgb2sgPSBwcm9taXNlLl9zID09IDE7XG4gICAgdmFyIGkgPSAwO1xuICAgIHZhciBydW4gPSBmdW5jdGlvbiAocmVhY3Rpb24pIHtcbiAgICAgIHZhciBoYW5kbGVyID0gb2sgPyByZWFjdGlvbi5vayA6IHJlYWN0aW9uLmZhaWw7XG4gICAgICB2YXIgcmVzb2x2ZSA9IHJlYWN0aW9uLnJlc29sdmU7XG4gICAgICB2YXIgcmVqZWN0ID0gcmVhY3Rpb24ucmVqZWN0O1xuICAgICAgdmFyIGRvbWFpbiA9IHJlYWN0aW9uLmRvbWFpbjtcbiAgICAgIHZhciByZXN1bHQsIHRoZW47XG4gICAgICB0cnkge1xuICAgICAgICBpZiAoaGFuZGxlcikge1xuICAgICAgICAgIGlmICghb2spIHtcbiAgICAgICAgICAgIGlmIChwcm9taXNlLl9oID09IDIpIG9uSGFuZGxlVW5oYW5kbGVkKHByb21pc2UpO1xuICAgICAgICAgICAgcHJvbWlzZS5faCA9IDE7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChoYW5kbGVyID09PSB0cnVlKSByZXN1bHQgPSB2YWx1ZTtcbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5lbnRlcigpO1xuICAgICAgICAgICAgcmVzdWx0ID0gaGFuZGxlcih2YWx1ZSk7XG4gICAgICAgICAgICBpZiAoZG9tYWluKSBkb21haW4uZXhpdCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAocmVzdWx0ID09PSByZWFjdGlvbi5wcm9taXNlKSB7XG4gICAgICAgICAgICByZWplY3QoVHlwZUVycm9yKCdQcm9taXNlLWNoYWluIGN5Y2xlJykpO1xuICAgICAgICAgIH0gZWxzZSBpZiAodGhlbiA9IGlzVGhlbmFibGUocmVzdWx0KSkge1xuICAgICAgICAgICAgdGhlbi5jYWxsKHJlc3VsdCwgcmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgICB9IGVsc2Ug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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///325\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar weak = __webpack_require__(173);\nvar validate = __webpack_require__(64);\nvar WEAK_SET = 'WeakSet';\n\n// 23.4 WeakSet Objects\n__webpack_require__(87)(WEAK_SET, function (get) {\n return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.4.3.1 WeakSet.prototype.add(value)\n add: function add(value) {\n return weak.def(validate(this, WEAK_SET), value, true);\n }\n}, weak, false, true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYud2Vhay1zZXQuanM/NTdmMSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgd2VhayA9IHJlcXVpcmUoJy4vX2NvbGxlY3Rpb24td2VhaycpO1xudmFyIHZhbGlkYXRlID0gcmVxdWlyZSgnLi9fdmFsaWRhdGUtY29sbGVjdGlvbicpO1xudmFyIFdFQUtfU0VUID0gJ1dlYWtTZXQnO1xuXG4vLyAyMy40IFdlYWtTZXQgT2JqZWN0c1xucmVxdWlyZSgnLi9fY29sbGVjdGlvbicpKFdFQUtfU0VULCBmdW5jdGlvbiAoZ2V0KSB7XG4gIHJldHVybiBmdW5jdGlvbiBXZWFrU2V0KCkgeyByZXR1cm4gZ2V0KHRoaXMsIGFyZ3VtZW50cy5sZW5ndGggPiAwID8gYXJndW1lbnRzWzBdIDogdW5kZWZpbmVkKTsgfTtcbn0sIHtcbiAgLy8gMjMuNC4zLjEgV2Vha1NldC5wcm90b3R5cGUuYWRkKHZhbHVlKVxuICBhZGQ6IGZ1bmN0aW9uIGFkZCh2YWx1ZSkge1xuICAgIHJldHVybiB3ZWFrLmRlZih2YWxpZGF0ZSh0aGlzLCBXRUFLX1NFVCksIHZhbHVlLCB0cnVlKTtcbiAgfVxufSwgd2VhaywgZmFsc2UsIHRydWUpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi53ZWFrLXNldC5qc1xuLy8gbW9kdWxlIGlkID0gMzI2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///326\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar $typed = __webpack_require__(88);\nvar buffer = __webpack_require__(126);\nvar anObject = __webpack_require__(3);\nvar toAbsoluteIndex = __webpack_require__(51);\nvar toLength = __webpack_require__(12);\nvar isObject = __webpack_require__(6);\nvar ArrayBuffer = __webpack_require__(4).ArrayBuffer;\nvar speciesConstructor = __webpack_require__(86);\nvar $ArrayBuffer = buffer.ArrayBuffer;\nvar $DataView = buffer.DataView;\nvar $isView = $typed.ABV && ArrayBuffer.isView;\nvar $slice = $ArrayBuffer.prototype.slice;\nvar VIEW = $typed.VIEW;\nvar ARRAY_BUFFER = 'ArrayBuffer';\n\n$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });\n\n$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {\n // 24.1.3.1 ArrayBuffer.isView(arg)\n isView: function isView(it) {\n return $isView && $isView(it) || isObject(it) && VIEW in it;\n }\n});\n\n$export($export.P + $export.U + $export.F * __webpack_require__(5)(function () {\n return !new $ArrayBuffer(2).slice(1, undefined).byteLength;\n}), ARRAY_BUFFER, {\n // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)\n slice: function slice(start, end) {\n if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix\n var len = anObject(this).byteLength;\n var first = toAbsoluteIndex(start, len);\n var final = toAbsoluteIndex(end === undefined ? len : end, len);\n var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first));\n var viewS = new $DataView(this);\n var viewT = new $DataView(result);\n var index = 0;\n while (first < final) {\n viewT.setUint8(index++, viewS.getUint8(first++));\n } return result;\n }\n});\n\n__webpack_require__(54)(ARRAY_BUFFER);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuYXJyYXktYnVmZmVyLmpzP2Y2NjkiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkdHlwZWQgPSByZXF1aXJlKCcuL190eXBlZCcpO1xudmFyIGJ1ZmZlciA9IHJlcXVpcmUoJy4vX3R5cGVkLWJ1Zm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V0VWludDgoaW5kZXgrKywgdmlld1MuZ2V0VWludDgoZmlyc3QrKykpO1xuICAgIH0gcmV0dXJuIHJlc3VsdDtcbiAgfVxufSk7XG5cbnJlcXVpcmUoJy4vX3NldC1zcGVjaWVzJykoQVJSQVlfQlVGRkVSKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuYXJyYXktYnVmZmVyLmpzXG4vLyBtb2R1bGUgaWQgPSAzMjdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///327\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\n$export($export.G + $export.W + $export.F * !__webpack_require__(88).ABV, {\n DataView: __webpack_require__(126).DataView\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuZGF0YS12aWV3LmpzP2Q2ZTIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbiRleHBvcnQoJGV4cG9ydC5HICsgJGV4cG9ydC5XICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX3R5cGVkJykuQUJWLCB7XG4gIERhdGFWaWV3OiByZXF1aXJlKCcuL190eXBlZC1idWZmZXInKS5EYXRhVmlld1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnR5cGVkLmRhdGEtdmlldy5qc1xuLy8gbW9kdWxlIGlkID0gMzI4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///328\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Int8', 1, function (init) {\n return function Int8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50OC1hcnJheS5qcz9lNzY1Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3R5cGVkLWFycmF5JykoJ0ludDgnLCAxLCBmdW5jdGlvbiAoaW5pdCkge1xuICByZXR1cm4gZnVuY3Rpb24gSW50OEFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50OC1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gMzI5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///329\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Uint8', 1, function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDgtYXJyYXkuanM/NGM1NSJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuL190eXBlZC1hcnJheScpKCdVaW50OCcsIDEsIGZ1bmN0aW9uIChpbml0KSB7XG4gIHJldHVybiBmdW5jdGlvbiBVaW50OEFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDgtYXJyYXkuanNcbi8vIG1vZHVsZSBpZCA9IDMzMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///330\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Uint8', 1, function (init) {\n return function Uint8ClampedArray(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n}, true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDgtY2xhbXBlZC1hcnJheS5qcz8zMzI4Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3R5cGVkLWFycmF5JykoJ1VpbnQ4JywgMSwgZnVuY3Rpb24gKGluaXQpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIFVpbnQ4Q2xhbXBlZEFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59LCB0cnVlKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDgtY2xhbXBlZC1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gMzMxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///331\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Int16', 2, function (init) {\n return function Int16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50MTYtYXJyYXkuanM/YWFkNCJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuL190eXBlZC1hcnJheScpKCdJbnQxNicsIDIsIGZ1bmN0aW9uIChpbml0KSB7XG4gIHJldHVybiBmdW5jdGlvbiBJbnQxNkFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50MTYtYXJyYXkuanNcbi8vIG1vZHVsZSBpZCA9IDMzMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///332\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Uint16', 2, function (init) {\n return function Uint16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDE2LWFycmF5LmpzPzRjNzkiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi9fdHlwZWQtYXJyYXknKSgnVWludDE2JywgMiwgZnVuY3Rpb24gKGluaXQpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIFVpbnQxNkFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDE2LWFycmF5LmpzXG4vLyBtb2R1bGUgaWQgPSAzMzNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///333\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Int32', 4, function (init) {\n return function Int32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzM0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50MzItYXJyYXkuanM/MmI0MiJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuL190eXBlZC1hcnJheScpKCdJbnQzMicsIDQsIGZ1bmN0aW9uIChpbml0KSB7XG4gIHJldHVybiBmdW5jdGlvbiBJbnQzMkFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuaW50MzItYXJyYXkuanNcbi8vIG1vZHVsZSBpZCA9IDMzNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///334\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Uint32', 4, function (init) {\n return function Uint32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzM1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDMyLWFycmF5LmpzPzM1ZjYiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi9fdHlwZWQtYXJyYXknKSgnVWludDMyJywgNCwgZnVuY3Rpb24gKGluaXQpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIFVpbnQzMkFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQudWludDMyLWFycmF5LmpzXG4vLyBtb2R1bGUgaWQgPSAzMzVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///335\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Float32', 4, function (init) {\n return function Float32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzM2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuZmxvYXQzMi1hcnJheS5qcz83NTNjIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3R5cGVkLWFycmF5JykoJ0Zsb2F0MzInLCA0LCBmdW5jdGlvbiAoaW5pdCkge1xuICByZXR1cm4gZnVuY3Rpb24gRmxvYXQzMkFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuZmxvYXQzMi1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gMzM2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///336\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(38)('Float64', 8, function (init) {\n return function Float64Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzM3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuZmxvYXQ2NC1hcnJheS5qcz9mYWY1Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3R5cGVkLWFycmF5JykoJ0Zsb2F0NjQnLCA4LCBmdW5jdGlvbiAoaW5pdCkge1xuICByZXR1cm4gZnVuY3Rpb24gRmxvYXQ2NEFycmF5KGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICAgIHJldHVybiBpbml0KHRoaXMsIGRhdGEsIGJ5dGVPZmZzZXQsIGxlbmd0aCk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYudHlwZWQuZmxvYXQ2NC1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gMzM3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///337\n")},function(module,exports,__webpack_require__){eval("// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)\nvar $export = __webpack_require__(0);\nvar aFunction = __webpack_require__(16);\nvar anObject = __webpack_require__(3);\nvar rApply = (__webpack_require__(4).Reflect || {}).apply;\nvar fApply = Function.apply;\n// MS Edge argumentsList argument is optional\n$export($export.S + $export.F * !__webpack_require__(5)(function () {\n rApply(function () { /* empty */ });\n}), 'Reflect', {\n apply: function apply(target, thisArgument, argumentsList) {\n var T = aFunction(target);\n var L = anObject(argumentsList);\n return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJm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8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmFwcGx5LmpzXG4vLyBtb2R1bGUgaWQgPSAzMzhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///338\n")},function(module,exports,__webpack_require__){eval("// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])\nvar $export = __webpack_require__(0);\nvar create = __webpack_require__(52);\nvar aFunction = __webpack_require__(16);\nvar anObject = __webpack_require__(3);\nvar isObject = __webpack_require__(6);\nvar fails = __webpack_require__(5);\nvar bind = __webpack_require__(154);\nvar rConstruct = (__webpack_require__(4).Reflect || {}).construct;\n\n// MS Edge supports only 2 arguments and argumentsList argument is optional\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\nvar NEW_TARGET_BUG = fails(function () {\n function F() { /* empty */ }\n return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);\n});\nvar ARGS_BUG = !fails(function () {\n rConstruct(function () { /* empty */ });\n});\n\n$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {\n construct: function construct(Target, args /* , newTarget */) {\n aFunction(Target);\n anObject(args);\n var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);\n if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);\n if (Target == newTarget) {\n // w/o altered newTarget, optimization for 0-4 arguments\n switch (args.length) {\n case 0: return new Target();\n case 1: return new Target(args[0]);\n case 2: return new Target(args[0], args[1]);\n case 3: return new Target(args[0], args[1], args[2]);\n case 4: return new Target(args[0], args[1], args[2], args[3]);\n }\n // w/o altered newTarget, lot of arguments case\n var $args = [null];\n $args.push.apply($args, args);\n return new (bind.apply(Target, $args))();\n }\n // with altered newTarget, not support built-in constructors\n var proto = newTarget.prototype;\n var instance = create(isObject(proto) ? proto : Object.prototype);\n var result = Function.apply.call(Target, instance, args);\n return isObject(result) ? result : instance;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzM5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5jb25zdHJ1Y3QuanM/YmU2NCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjIgUmVmbGVjdC5jb25zdHJ1Y3QodGFyZ2V0LCBhcmd1bWVudHNMaXN0IFssIG5ld1RhcmdldF0pXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGNyZWF0ZSA9IHJlcXVpcmUoJy4vX29iamVjdC1jcmVhdGUnKTtcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuL19hLWZ1bmN0aW9uJyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIGZhaWxzID0gcmVxdWlyZSgnLi9fZmFpbHMnKTtcbnZhciBiaW5kID0gcmVxdWlyZSgnLi9fYmluZCcpO1xudmFyIHJDb25zdHJ1Y3QgPSAocmVxdWlyZSgnLi9fZ2xvYmFsJykuUmVmbGVjdCB8fCB7fSkuY29uc3RydWN0O1xuXG4vLyBNUyBFZGdlIHN1cHBvcnRzIG9ubHkgMiBhcmd1bWVudHMgYW5kIGFyZ3VtZW50c0xpc3QgYXJndW1lbnQgaXMgb3B0aW9uYWxcbi8vIEZGIE5pZ2h0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y9jb3JlLWpzL21vZHVsZXMvZXM2LnJlZmxlY3QuY29uc3RydWN0LmpzXG4vLyBtb2R1bGUgaWQgPSAzMzlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///339\n")},function(module,exports,__webpack_require__){eval("// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)\nvar dP = __webpack_require__(11);\nvar $export = __webpack_require__(0);\nvar anObject = __webpack_require__(3);\nvar toPrimitive = __webpack_require__(31);\n\n// MS Edge has broken Reflect.defineProperty - throwing instead of returning false\n$export($export.S + $export.F * __webpack_require__(5)(function () {\n // eslint-disable-next-line no-undef\n Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });\n}), 'Reflect', {\n defineProperty: function defineProperty(target, propertyKey, attributes) {\n anObject(target);\n propertyKey = toPrimitive(propertyKey, true);\n anObject(attributes);\n try {\n dP.f(target, propertyKey, attributes);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdW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1xuICAgICAgcmV0dXJuIHRydWU7XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM2LnJlZmxlY3QuZGVmaW5lLXByb3BlcnR5LmpzXG4vLyBtb2R1bGUgaWQgPSAzNDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///340\n")},function(module,exports,__webpack_require__){eval("// 26.1.4 Reflect.deleteProperty(target, propertyKey)\nvar $export = __webpack_require__(0);\nvar gOPD = __webpack_require__(25).f;\nvar anObject = __webpack_require__(3);\n\n$export($export.S, 'Reflect', {\n deleteProperty: function deleteProperty(target, propertyKey) {\n var desc = gOPD(anObject(target), propertyKey);\n return desc && !desc.configurable ? false : delete target[propertyKey];\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5kZWxldGUtcHJvcGVydHkuanM/Y2IxZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjQgUmVmbGVjdC5kZWxldGVQcm9wZXJ0eSh0YXJnZXQsIHByb3BlcnR5S2V5KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBnT1BEID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcGQnKS5mO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnUmVmbGVjdCcsIHtcbiAgZGVsZXRlUHJvcGVydHk6IGZ1bmN0aW9uIGRlbGV0ZVByb3BlcnR5KHRhcmdldCwgcHJvcGVydHlLZXkpIHtcbiAgICB2YXIgZGVzYyA9IGdPUEQoYW5PYmplY3QodGFyZ2V0KSwgcHJvcGVydHlLZXkpO1xuICAgIHJldHVybiBkZXNjICYmICFkZXNjLmNvbmZpZ3VyYWJsZSA/IGZhbHNlIDogZGVsZXRlIHRhcmdldFtwcm9wZXJ0eUtleV07XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmRlbGV0ZS1wcm9wZXJ0eS5qc1xuLy8gbW9kdWxlIGlkID0gMzQxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///341\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 26.1.5 Reflect.enumerate(target)\nvar $export = __webpack_require__(0);\nvar anObject = __webpack_require__(3);\nvar Enumerate = function (iterated) {\n this._t = anObject(iterated); // target\n this._i = 0; // next index\n var keys = this._k = []; // keys\n var key;\n for (key in iterated) keys.push(key);\n};\n__webpack_require__(114)(Enumerate, 'Object', function () {\n var that = this;\n var keys = that._k;\n var key;\n do {\n if (that._i >= keys.length) return { value: undefined, done: true };\n } while (!((key = keys[that._i++]) in that._t));\n return { value: key, done: false };\n});\n\n$export($export.S, 'Reflect', {\n enumerate: function enumerate(target) {\n return new Enumerate(target);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5lbnVtZXJhdGUuanM/NWZiNiJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyAyNi4xLjUgUmVmbGVjdC5lbnVtZXJhdGUodGFyZ2V0KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIEVudW1lcmF0ZSA9IGZ1bmN0aW9uIChpdGVyYXRlZCkge1xuICB0aGlzLl90ID0gYW5PYmplY3QoaXRlcmF0ZWQpOyAvLyB0YXJnZXRcbiAgdGhpcy5faSA9IDA7ICAgICAgICAgICAgICAgICAgLy8gbmV4dCBpbmRleFxuICB2YXIga2V5cyA9IHRoaXMuX2sgPSBbXTsgICAgICAvLyBrZXlzXG4gIHZhciBrZXk7XG4gIGZvciAoa2V5IGluIGl0ZXJhdGVkKSBrZXlzLnB1c2goa2V5KTtcbn07XG5yZXF1aXJlKCcuL19pdGVyLWNyZWF0ZScpKEVudW1lcmF0ZSwgJ09iamVjdCcsIGZ1bmN0aW9uICgpIHtcbiAgdmFyIHRoYXQgPSB0aGlzO1xuICB2YXIga2V5cyA9IHRoYXQuX2s7XG4gIHZhciBrZXk7XG4gIGRvIHtcbiAgICBpZiAodGhhdC5faSA+PSBrZXlzLmxlbmd0aCkgcmV0dXJuIHsgdmFsdWU6IHVuZGVmaW5lZCwgZG9uZTogdHJ1ZSB9O1xuICB9IHdoaWxlICghKChrZXkgPSBrZXlzW3RoYXQuX2krK10pIGluIHRoYXQuX3QpKTtcbiAgcmV0dXJuIHsgdmFsdWU6IGtleSwgZG9uZTogZmFsc2UgfTtcbn0pO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ1JlZmxlY3QnLCB7XG4gIGVudW1lcmF0ZTogZnVuY3Rpb24gZW51bWVyYXRlKHRhcmdldCkge1xuICAgIHJldHVybiBuZXcgRW51bWVyYXRlKHRhcmdldCk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmVudW1lcmF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMzQyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///342\n")},function(module,exports,__webpack_require__){eval("// 26.1.6 Reflect.get(target, propertyKey [, receiver])\nvar gOPD = __webpack_require__(25);\nvar getPrototypeOf = __webpack_require__(26);\nvar has = __webpack_require__(17);\nvar $export = __webpack_require__(0);\nvar isObject = __webpack_require__(6);\nvar anObject = __webpack_require__(3);\n\nfunction get(target, propertyKey /* , receiver */) {\n var receiver = arguments.length < 3 ? target : arguments[2];\n var desc, proto;\n if (anObject(target) === receiver) return target[propertyKey];\n if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')\n ? desc.value\n : desc.get !== undefined\n ? desc.get.call(receiver)\n : undefined;\n if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);\n}\n\n$export($export.S, 'Reflect', { get: get });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5nZXQuanM/NDhmYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjYgUmVmbGVjdC5nZXQodGFyZ2V0LCBwcm9wZXJ0eUtleSBbLCByZWNlaXZlcl0pXG52YXIgZ09QRCA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BkJyk7XG52YXIgZ2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKCcuL19vYmplY3QtZ3BvJyk7XG52YXIgaGFzID0gcmVxdWlyZSgnLi9faGFzJyk7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcblxuZnVuY3Rpb24gZ2V0KHRhcmdldCwgcHJvcGVydHlLZXkgLyogLCByZWNlaXZlciAqLykge1xuICB2YXIgcmVjZWl2ZXIgPSBhcmd1bWVudHMubGVuZ3RoIDwgMyA/IHRhcmdldCA6IGFyZ3VtZW50c1syXTtcbiAgdmFyIGRlc2MsIHByb3RvO1xuICBpZiAoYW5PYmplY3QodGFyZ2V0KSA9PT0gcmVjZWl2ZXIpIHJldHVybiB0YXJnZXRbcHJvcGVydHlLZXldO1xuICBpZiAoZGVzYyA9IGdPUEQuZih0YXJnZXQsIHByb3BlcnR5S2V5KSkgcmV0dXJuIGhhcyhkZXNjLCAndmFsdWUnKVxuICAgID8gZGVzYy52YWx1ZVxuICAgIDogZGVzYy5nZXQgIT09IHVuZGVmaW5lZFxuICAgICAgPyBkZXNjLmdldC5jYWxsKHJlY2VpdmVyKVxuICAgICAgOiB1bmRlZmluZWQ7XG4gIGlmIChpc09iamVjdChwcm90byA9IGdldFByb3RvdHlwZU9mKHRhcmdldCkpKSByZXR1cm4gZ2V0KHByb3RvLCBwcm9wZXJ0eUtleSwgcmVjZWl2ZXIpO1xufVxuXG4kZXhwb3J0KCRleHBvcnQuUywgJ1JlZmxlY3QnLCB7IGdldDogZ2V0IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmdldC5qc1xuLy8gbW9kdWxlIGlkID0gMzQzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///343\n")},function(module,exports,__webpack_require__){eval("// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)\nvar gOPD = __webpack_require__(25);\nvar $export = __webpack_require__(0);\nvar anObject = __webpack_require__(3);\n\n$export($export.S, 'Reflect', {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {\n return gOPD.f(anObject(target), propertyKey);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5nZXQtb3duLXByb3BlcnR5LWRlc2NyaXB0b3IuanM/MDM5ZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjcgUmVmbGVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IodGFyZ2V0LCBwcm9wZXJ0eUtleSlcbnZhciBnT1BEID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcGQnKTtcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdSZWZsZWN0Jywge1xuICBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3I6IGZ1bmN0aW9uIGdldE93blByb3BlcnR5RGVzY3JpcHRvcih0YXJnZXQsIHByb3BlcnR5S2V5KSB7XG4gICAgcmV0dXJuIGdPUEQuZihhbk9iamVjdCh0YXJnZXQpLCBwcm9wZXJ0eUtleSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvci5qc1xuLy8gbW9kdWxlIGlkID0gMzQ0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///344\n")},function(module,exports,__webpack_require__){eval("// 26.1.8 Reflect.getPrototypeOf(target)\nvar $export = __webpack_require__(0);\nvar getProto = __webpack_require__(26);\nvar anObject = __webpack_require__(3);\n\n$export($export.S, 'Reflect', {\n getPrototypeOf: function getPrototypeOf(target) {\n return getProto(anObject(target));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5nZXQtcHJvdG90eXBlLW9mLmpzPzNlZTQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjYuMS44IFJlZmxlY3QuZ2V0UHJvdG90eXBlT2YodGFyZ2V0KVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBnZXRQcm90byA9IHJlcXVpcmUoJy4vX29iamVjdC1ncG8nKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ1JlZmxlY3QnLCB7XG4gIGdldFByb3RvdHlwZU9mOiBmdW5jdGlvbiBnZXRQcm90b3R5cGVPZih0YXJnZXQpIHtcbiAgICByZXR1cm4gZ2V0UHJvdG8oYW5PYmplY3QodGFyZ2V0KSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmdldC1wcm90b3R5cGUtb2YuanNcbi8vIG1vZHVsZSBpZCA9IDM0NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///345\n")},function(module,exports,__webpack_require__){eval("// 26.1.9 Reflect.has(target, propertyKey)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Reflect', {\n has: function has(target, propertyKey) {\n return propertyKey in target;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5oYXMuanM/NzY2ZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjkgUmVmbGVjdC5oYXModGFyZ2V0LCBwcm9wZXJ0eUtleSlcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnUmVmbGVjdCcsIHtcbiAgaGFzOiBmdW5jdGlvbiBoYXModGFyZ2V0LCBwcm9wZXJ0eUtleSkge1xuICAgIHJldHVybiBwcm9wZXJ0eUtleSBpbiB0YXJnZXQ7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0Lmhhcy5qc1xuLy8gbW9kdWxlIGlkID0gMzQ2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///346\n")},function(module,exports,__webpack_require__){eval("// 26.1.10 Reflect.isExtensible(target)\nvar $export = __webpack_require__(0);\nvar anObject = __webpack_require__(3);\nvar $isExtensible = Object.isExtensible;\n\n$export($export.S, 'Reflect', {\n isExtensible: function isExtensible(target) {\n anObject(target);\n return $isExtensible ? $isExtensible(target) : true;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5pcy1leHRlbnNpYmxlLmpzPzI0NmQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjYuMS4xMCBSZWZsZWN0LmlzRXh0ZW5zaWJsZSh0YXJnZXQpXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgJGlzRXh0ZW5zaWJsZSA9IE9iamVjdC5pc0V4dGVuc2libGU7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnUmVmbGVjdCcsIHtcbiAgaXNFeHRlbnNpYmxlOiBmdW5jdGlvbiBpc0V4dGVuc2libGUodGFyZ2V0KSB7XG4gICAgYW5PYmplY3QodGFyZ2V0KTtcbiAgICByZXR1cm4gJGlzRXh0ZW5zaWJsZSA/ICRpc0V4dGVuc2libGUodGFyZ2V0KSA6IHRydWU7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LmlzLWV4dGVuc2libGUuanNcbi8vIG1vZHVsZSBpZCA9IDM0N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///347\n")},function(module,exports,__webpack_require__){eval("// 26.1.11 Reflect.ownKeys(target)\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Reflect', { ownKeys: __webpack_require__(175) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5vd24ta2V5cy5qcz80NzBlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDI2LjEuMTEgUmVmbGVjdC5vd25LZXlzKHRhcmdldClcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnUmVmbGVjdCcsIHsgb3duS2V5czogcmVxdWlyZSgnLi9fb3duLWtleXMnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5vd24ta2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gMzQ4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///348\n")},function(module,exports,__webpack_require__){eval("// 26.1.12 Reflect.preventExtensions(target)\nvar $export = __webpack_require__(0);\nvar anObject = __webpack_require__(3);\nvar $preventExtensions = Object.preventExtensions;\n\n$export($export.S, 'Reflect', {\n preventExtensions: function preventExtensions(target) {\n anObject(target);\n try {\n if ($preventExtensions) $preventExtensions(target);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQ5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2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},function(module,exports,__webpack_require__){eval("// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])\nvar dP = __webpack_require__(11);\nvar gOPD = __webpack_require__(25);\nvar getPrototypeOf = __webpack_require__(26);\nvar has = __webpack_require__(17);\nvar $export = __webpack_require__(0);\nvar createDesc = __webpack_require__(47);\nvar anObject = __webpack_require__(3);\nvar isObject = __webpack_require__(6);\n\nfunction set(target, propertyKey, V /* , receiver */) {\n var receiver = arguments.length < 4 ? target : arguments[3];\n var ownDesc = gOPD.f(anObject(target), propertyKey);\n var existingDescriptor, proto;\n if (!ownDesc) {\n if (isObject(proto = getPrototypeOf(target))) {\n return set(proto, propertyKey, V, receiver);\n }\n ownDesc = createDesc(0);\n }\n if (has(ownDesc, 'value')) {\n if (ownDesc.writable === false || !isObject(receiver)) return false;\n existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);\n existingDescriptor.value = V;\n dP.f(receiver, propertyKey, existingDescriptor);\n return true;\n }\n return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);\n}\n\n$export($export.S, 'Reflect', { set: set });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5zZXQuanM/NmQ0NiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAyNi4xLjEzIFJlZmxlY3Quc2V0KHRhcmdldCwgcHJvcGVydHlLZXksIFYgWywgcmVjZWl2ZXJdKVxudmFyIGRQID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJyk7XG52YXIgZ09QRCA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BkJyk7XG52YXIgZ2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKCcuL19vYmplY3QtZ3BvJyk7XG52YXIgaGFzID0gcmVxdWlyZSgn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aXB0b3IpO1xuICAgIHJldHVybiB0cnVlO1xuICB9XG4gIHJldHVybiBvd25EZXNjLnNldCA9PT0gdW5kZWZpbmVkID8gZmFsc2UgOiAob3duRGVzYy5zZXQuY2FsbChyZWNlaXZlciwgViksIHRydWUpO1xufVxuXG4kZXhwb3J0KCRleHBvcnQuUywgJ1JlZmxlY3QnLCB7IHNldDogc2V0IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNi5yZWZsZWN0LnNldC5qc1xuLy8gbW9kdWxlIGlkID0gMzUwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///350\n")},function(module,exports,__webpack_require__){eval("// 26.1.14 Reflect.setPrototypeOf(target, proto)\nvar $export = __webpack_require__(0);\nvar setProto = __webpack_require__(106);\n\nif (setProto) $export($export.S, 'Reflect', {\n setPrototypeOf: function setPrototypeOf(target, proto) {\n setProto.check(target, proto);\n try {\n setProto.set(target, proto);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5zZXQtcHJvdG90eXBlLW9mLmpzPzk5M2EiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjYuMS4xNCBSZWZsZWN0LnNldFByb3RvdHlwZU9mKHRhcmdldCwgcHJvdG8pXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHNldFByb3RvID0gcmVxdWlyZSgnLi9fc2V0LXByb3RvJyk7XG5cbmlmIChzZXRQcm90bykgJGV4cG9ydCgkZXhwb3J0LlMsICdSZWZsZWN0Jywge1xuICBzZXRQcm90b3R5cGVPZjogZnVuY3Rpb24gc2V0UHJvdG90eXBlT2YodGFyZ2V0LCBwcm90bykge1xuICAgIHNldFByb3RvLmNoZWNrKHRhcmdldCwgcHJvdG8pO1xuICAgIHRyeSB7XG4gICAgICBzZXRQcm90by5zZXQodGFyZ2V0LCBwcm90byk7XG4gICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczYucmVmbGVjdC5zZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzNTFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///351\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/tc39/Array.prototype.includes\nvar $export = __webpack_require__(0);\nvar $includes = __webpack_require__(79)(true);\n\n$export($export.P, 'Array', {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n__webpack_require__(43)('includes');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuYXJyYXkuaW5jbHVkZXMuanM/ODFiYyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9BcnJheS5wcm90b3R5cGUuaW5jbHVkZXNcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJGluY2x1ZGVzID0gcmVxdWlyZSgnLi9fYXJyYXktaW5jbHVkZXMnKSh0cnVlKTtcblxuJGV4cG9ydCgkZXhwb3J0LlAsICdBcnJheScsIHtcbiAgaW5jbHVkZXM6IGZ1bmN0aW9uIGluY2x1ZGVzKGVsIC8qICwgZnJvbUluZGV4ID0gMCAqLykge1xuICAgIHJldHVybiAkaW5jbHVkZXModGhpcywgZWwsIGFyZ3VtZW50cy5sZW5ndGggPiAxID8gYXJndW1lbnRzWzFdIDogdW5kZWZpbmVkKTtcbiAgfVxufSk7XG5cbnJlcXVpcmUoJy4vX2FkZC10by11bnNjb3BhYmxlcycpKCdpbmNsdWRlcycpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5hcnJheS5pbmNsdWRlcy5qc1xuLy8gbW9kdWxlIGlkID0gMzUyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///352\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap\nvar $export = __webpack_require__(0);\nvar flattenIntoArray = __webpack_require__(176);\nvar toObject = __webpack_require__(15);\nvar toLength = __webpack_require__(12);\nvar aFunction = __webpack_require__(16);\nvar arraySpeciesCreate = __webpack_require__(120);\n\n$export($export.P, 'Array', {\n flatMap: function flatMap(callbackfn /* , thisArg */) {\n var O = toObject(this);\n var sourceLen, A;\n aFunction(callbackfn);\n sourceLen = toLength(O.length);\n A = arraySpeciesCreate(O, 0);\n flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);\n return A;\n }\n});\n\n__webpack_require__(43)('flatMap');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuYXJyYXkuZmxhdC1tYXAuanM/YTA1ZCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL3Byb3Bvc2FsLWZsYXRNYXAvI3NlYy1BcnJheS5wcm90b3R5cGUuZmxhdE1hcFxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBmbGF0dGVuSW50b0FycmF5ID0gcmVxdWlyZSgnLi9fZmxhdHRlbi1pbnRvLWFycmF5Jyk7XG52YXIgdG9PYmplY3QgPSByZXF1aXJlKCcuL190by1vYmplY3QnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4vX3RvLWxlbmd0aCcpO1xudmFyIGFGdW5jdGlvbiA9IHJlcXVpcmUoJ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n// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten\nvar $export = __webpack_require__(0);\nvar flattenIntoArray = __webpack_require__(176);\nvar toObject = __webpack_require__(15);\nvar toLength = __webpack_require__(12);\nvar toInteger = __webpack_require__(33);\nvar arraySpeciesCreate = __webpack_require__(120);\n\n$export($export.P, 'Array', {\n flatten: function flatten(/* depthArg = 1 */) {\n var depthArg = arguments[0];\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A = arraySpeciesCreate(O, 0);\n flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));\n return A;\n }\n});\n\n__webpack_require__(43)('flatten');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuYXJyYXkuZmxhdHRlbi5qcz9iZmRkIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vcHJvcG9zYWwtZmxhdE1hcC8jc2VjLUFycmF5LnByb3RvdHlwZS5mbGF0dGVuXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGZsYXR0ZW5JbnRvQXJyYXkgPSByZXF1aXJlKCcuL19mbGF0dGVuLWludG8tYXJyYXknKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi9fdG8tbGVuZ3RoJyk7XG52YXIgdG9JbnRlZ2VyID0gcmVxdWlyZSgnLi9fdG8taW50ZWdlcicpO1xudmFyIGFycmF5U3BlY2llc0NyZWF0ZSA9IHJlcXVpcmUoJy4vX2FycmF5LXNwZWNpZXMtY3JlYXRlJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5QLCAnQXJyYXknLCB7XG4gIGZsYXR0ZW46IGZ1bmN0aW9uIGZsYXR0ZW4oLyogZGVwdGhBcmcgPSAxICovKSB7XG4gICAgdmFyIGRlcHRoQXJnID0gYXJndW1lbnRzWzBdO1xuICAgIHZhciBPID0gdG9PYmplY3QodGhpcyk7XG4gICAgdmFyIHNvdXJjZUxlbiA9IHRvTGVuZ3RoKE8ubGVuZ3RoKTtcbiAgICB2YXIgQSA9IGFycmF5U3BlY2llc0NyZWF0ZShPLCAwKTtcbiAgICBmbGF0dGVuSW50b0FycmF5KEEsIE8sIE8sIHNvdXJjZUxlbiwgMCwgZGVwdGhBcmcgPT09IHVuZGVmaW5lZCA/IDEgOiB0b0ludGVnZXIoZGVwdGhBcmcpKTtcbiAgICByZXR1cm4gQTtcbiAgfVxufSk7XG5cbnJlcXVpcmUoJy4vX2FkZC10by11bnNjb3BhYmxlcycpKCdmbGF0dGVuJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LmFycmF5LmZsYXR0ZW4uanNcbi8vIG1vZHVsZSBpZCA9IDM1NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///354\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/mathiasbynens/String.prototype.at\nvar $export = __webpack_require__(0);\nvar $at = __webpack_require__(112)(true);\n\n$export($export.P, 'String', {\n at: function at(pos) {\n return $at(this, pos);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3RyaW5nLmF0LmpzP2ZiNmYiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gaHR0cHM6Ly9naXRodWIuY29tL21hdGhpYXNieW5lbnMvU3RyaW5nLnByb3RvdHlwZS5hdFxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkYXQgPSByZXF1aXJlKCcuL19zdHJpbmctYXQnKSh0cnVlKTtcblxuJGV4cG9ydCgkZXhwb3J0LlAsICdTdHJpbmcnLCB7XG4gIGF0OiBmdW5jdGlvbiBhdChwb3MpIHtcbiAgICByZXR1cm4gJGF0KHRoaXMsIHBvcyk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5zdHJpbmcuYXQuanNcbi8vIG1vZHVsZSBpZCA9IDM1NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///355\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = __webpack_require__(0);\nvar $pad = __webpack_require__(177);\nvar userAgent = __webpack_require__(127);\n\n// https://github.com/zloirock/core-js/issues/280\n$export($export.P + $export.F * /Version\\/10\\.\\d+(\\.\\d+)? Safari\\//.test(userAgent), 'String', {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3RyaW5nLnBhZC1zdGFydC5qcz9iMjY0Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS90YzM5L3Byb3Bvc2FsLXN0cmluZy1wYWQtc3RhcnQtZW5kXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRwYWQgPSByZXF1aXJlKCcuL19zdHJpbmctcGFkJyk7XG52YXIgdXNlckFnZW50ID0gcmVxdWlyZSgnLi9fdXNlci1hZ2VudCcpO1xuXG4vLyBodHRwczovL2dpdGh1Yi5jb20vemxvaXJvY2svY29yZS1qcy9pc3N1ZXMvMjgwXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuRiAqIC9WZXJzaW9uXFwvMTBcXC5cXGQrKFxcLlxcZCspPyBTYWZhcmlcXC8vLnRlc3QodXNlckFnZW50KSwgJ1N0cmluZycsIHtcbiAgcGFkU3RhcnQ6IGZ1bmN0aW9uIHBhZFN0YXJ0KG1heExlbmd0aCAvKiAsIGZpbGxTdHJpbmcgPSAnICcgKi8pIHtcbiAgICByZXR1cm4gJHBhZCh0aGlzLCBtYXhMZW5ndGgsIGFyZ3VtZW50cy5sZW5ndGggPiAxID8gYXJndW1lbnRzWzFdIDogdW5kZWZpbmVkLCB0cnVlKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnN0cmluZy5wYWQtc3RhcnQuanNcbi8vIG1vZHVsZSBpZCA9IDM1NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///356\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = __webpack_require__(0);\nvar $pad = __webpack_require__(177);\nvar userAgent = __webpack_require__(127);\n\n// https://github.com/zloirock/core-js/issues/280\n$export($export.P + $export.F * /Version\\/10\\.\\d+(\\.\\d+)? Safari\\//.test(userAgent), 'String', {\n padEnd: function padEnd(maxLength /* , fillString = ' ' */) {\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3RyaW5nLnBhZC1lbmQuanM/OWJjMSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9wcm9wb3NhbC1zdHJpbmctcGFkLXN0YXJ0LWVuZFxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkcGFkID0gcmVxdWlyZSgnLi9fc3RyaW5nLXBhZCcpO1xudmFyIHVzZXJBZ2VudCA9IHJlcXVpcmUoJy4vX3VzZXItYWdlbnQnKTtcblxuLy8gaHR0cHM6Ly9naXRodWIuY29tL3psb2lyb2NrL2NvcmUtanMvaXNzdWVzLzI4MFxuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAvVmVyc2lvblxcLzEwXFwuXFxkKyhcXC5cXGQrKT8gU2FmYXJpXFwvLy50ZXN0KHVzZXJBZ2VudCksICdTdHJpbmcnLCB7XG4gIHBhZEVuZDogZnVuY3Rpb24gcGFkRW5kKG1heExlbmd0aCAvKiAsIGZpbGxTdHJpbmcgPSAnICcgKi8pIHtcbiAgICByZXR1cm4gJHBhZCh0aGlzLCBtYXhMZW5ndGgsIGFyZ3VtZW50cy5sZW5ndGggPiAxID8gYXJndW1lbnRzWzFdIDogdW5kZWZpbmVkLCBmYWxzZSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5zdHJpbmcucGFkLWVuZC5qc1xuLy8gbW9kdWxlIGlkID0gMzU3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///357\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/sebmarkbage/ecmascript-string-left-right-trim\n__webpack_require__(62)('trimLeft', function ($trim) {\n return function trimLeft() {\n return $trim(this, 1);\n };\n}, 'trimStart');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3RyaW5nLnRyaW0tbGVmdC5qcz9jNjdmIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9zZWJtYXJrYmFnZS9lY21hc2NyaXB0LXN0cmluZy1sZWZ0LXJpZ2h0LXRyaW1cbnJlcXVpcmUoJy4vX3N0cmluZy10cmltJykoJ3RyaW1MZWZ0JywgZnVuY3Rpb24gKCR0cmltKSB7XG4gIHJldHVybiBmdW5jdGlvbiB0cmltTGVmdCgpIHtcbiAgICByZXR1cm4gJHRyaW0odGhpcywgMSk7XG4gIH07XG59LCAndHJpbVN0YXJ0Jyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnN0cmluZy50cmltLWxlZnQuanNcbi8vIG1vZHVsZSBpZCA9IDM1OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///358\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/sebmarkbage/ecmascript-string-left-right-trim\n__webpack_require__(62)('trimRight', function ($trim) {\n return function trimRight() {\n return $trim(this, 2);\n };\n}, 'trimEnd');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzU5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3RyaW5nLnRyaW0tcmlnaHQuanM/MmQxMiJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBodHRwczovL2dpdGh1Yi5jb20vc2VibWFya2JhZ2UvZWNtYXNjcmlwdC1zdHJpbmctbGVmdC1yaWdodC10cmltXG5yZXF1aXJlKCcuL19zdHJpbmctdHJpbScpKCd0cmltUmlnaHQnLCBmdW5jdGlvbiAoJHRyaW0pIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHRyaW1SaWdodCgpIHtcbiAgICByZXR1cm4gJHRyaW0odGhpcywgMik7XG4gIH07XG59LCAndHJpbUVuZCcpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5zdHJpbmcudHJpbS1yaWdodC5qc1xuLy8gbW9kdWxlIGlkID0gMzU5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///359\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://tc39.github.io/String.prototype.matchAll/\nvar $export = __webpack_require__(0);\nvar defined = __webpack_require__(32);\nvar toLength = __webpack_require__(12);\nvar isRegExp = __webpack_require__(82);\nvar getFlags = __webpack_require__(84);\nvar RegExpProto = RegExp.prototype;\n\nvar $RegExpStringIterator = function (regexp, string) {\n this._r = regexp;\n this._s = string;\n};\n\n__webpack_require__(114)($RegExpStringIterator, 'RegExp String', function next() {\n var match = this._r.exec(this._s);\n return { value: match, done: match === null };\n});\n\n$export($export.P, 'String', {\n matchAll: function matchAll(regexp) {\n defined(this);\n if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!');\n var S = String(this);\n var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp);\n var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);\n rx.lastIndex = toLength(regexp.lastIndex);\n return new $RegExpStringIterator(rx, S);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJza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mICghaXNSZWdFeHAocmVnZXhwKSkgdGhyb3cgVHlwZUVycm9yKHJlZ2V4cCArICcgaXMgbm90IGEgcmVnZXhwIScpO1xuICAgIHZhciBTID0gU3RyaW5nKHRoaXMpO1xuICAgIHZhciBmbGFncyA9ICdmbGFncycgaW4gUmVnRXhwUHJvdG8gPyBTdHJpbmcocmVnZXhwLmZsYWdzKSA6IGdldEZsYWdzLmNhbGwocmVnZXhwKTtcbiAgICB2YXIgcnggPSBuZXcgUmVnRXhwKHJlZ2V4cC5zb3VyY2UsIH5mbGFncy5pbmRleE9mKCdnJykgPyBmbGFncyA6ICdnJyArIGZsYWdzKTtcbiAgICByeC5sYXN0SW5kZXggPSB0b0xlbmd0aChyZWdleHAubGFzdEluZGV4KTtcbiAgICByZXR1cm4gbmV3ICRSZWdFeHBTdHJpbmdJdGVyYXRvcihyeCwgUyk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5zdHJpbmcubWF0Y2gtYWxsLmpzXG4vLyBtb2R1bGUgaWQgPSAzNjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///360\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(102)('asyncIterator');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3ltYm9sLmFzeW5jLWl0ZXJhdG9yLmpzP2Y1ODgiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi9fd2tzLWRlZmluZScpKCdhc3luY0l0ZXJhdG9yJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnN5bWJvbC5hc3luYy1pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gMzYxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///361\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(102)('observable');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3ltYm9sLm9ic2VydmFibGUuanM/YmVlZiJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuL193a3MtZGVmaW5lJykoJ29ic2VydmFibGUnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3ltYm9sLm9ic2VydmFibGUuanNcbi8vIG1vZHVsZSBpZCA9IDM2MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///362\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-object-getownpropertydescriptors\nvar $export = __webpack_require__(0);\nvar ownKeys = __webpack_require__(175);\nvar toIObject = __webpack_require__(24);\nvar gOPD = __webpack_require__(25);\nvar createProperty = __webpack_require__(118);\n\n$export($export.S, 'Object', {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIObject(object);\n var getDesc = gOPD.f;\n var keys = ownKeys(O);\n var result = {};\n var i = 0;\n var key, desc;\n while (keys.length > i) {\n desc = getDesc(O, key = keys[i++]);\n if (desc !== undefined) createProperty(result, key, desc);\n }\n return result;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvcnMuanM/Y2U2YyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9wcm9wb3NhbC1vYmplY3QtZ2V0b3ducHJvcGVydHlkZXNjcmlwdG9yc1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBvd25LZXlzID0gcmVxdWlyZSgnLi9fb3duLWtleXMnKTtcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgZ09QRCA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BkJyk7XG52YXIgY3JlYXRlUHJvcGVydHkgPSByZXF1aXJlKCcuL19jcmVhdGUtcHJvcGVydHknKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdPYmplY3QnLCB7XG4gIGdldE93blByb3BlcnR5RGVzY3JpcHRvcnM6IGZ1bmN0aW9uIGdldE93blByb3BlcnR5RGVzY3JpcHRvcnMob2JqZWN0KSB7XG4gICAgdmFyIE8gPSB0b0lPYmplY3Qob2JqZWN0KTtcbiAgICB2YXIgZ2V0RGVzYyA9IGdPUEQuZjtcbiAgICB2YXIga2V5cyA9IG93bktleXMoTyk7XG4gICAgdmFyIHJlc3VsdCA9IHt9O1xuICAgIHZhciBpID0gMDtcbiAgICB2YXIga2V5LCBkZXNjO1xuICAgIHdoaWxlIChrZXlzLmxlbmd0aCA+IGkpIHtcbiAgICAgIGRlc2MgPSBnZXREZXNjKE8sIGtleSA9IGtleXNbaSsrXSk7XG4gICAgICBpZiAoZGVzYyAhPT0gdW5kZWZpbmVkKSBjcmVhdGVQcm9wZXJ0eShyZXN1bHQsIGtleSwgZGVzYyk7XG4gICAgfVxuICAgIHJldHVybiByZXN1bHQ7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5vYmplY3QuZ2V0LW93bi1wcm9wZXJ0eS1kZXNjcmlwdG9ycy5qc1xuLy8gbW9kdWxlIGlkID0gMzYzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///363\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-object-values-entries\nvar $export = __webpack_require__(0);\nvar $values = __webpack_require__(178)(false);\n\n$export($export.S, 'Object', {\n values: function values(it) {\n return $values(it);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0LnZhbHVlcy5qcz82MTU5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS90YzM5L3Byb3Bvc2FsLW9iamVjdC12YWx1ZXMtZW50cmllc1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkdmFsdWVzID0gcmVxdWlyZSgnLi9fb2JqZWN0LXRvLWFycmF5JykoZmFsc2UpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ09iamVjdCcsIHtcbiAgdmFsdWVzOiBmdW5jdGlvbiB2YWx1ZXMoaXQpIHtcbiAgICByZXR1cm4gJHZhbHVlcyhpdCk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5vYmplY3QudmFsdWVzLmpzXG4vLyBtb2R1bGUgaWQgPSAzNjRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///364\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-object-values-entries\nvar $export = __webpack_require__(0);\nvar $entries = __webpack_require__(178)(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it) {\n return $entries(it);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0LmVudHJpZXMuanM/MTRhNyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9wcm9wb3NhbC1vYmplY3QtdmFsdWVzLWVudHJpZXNcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgJGVudHJpZXMgPSByZXF1aXJlKCcuL19vYmplY3QtdG8tYXJyYXknKSh0cnVlKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdPYmplY3QnLCB7XG4gIGVudHJpZXM6IGZ1bmN0aW9uIGVudHJpZXMoaXQpIHtcbiAgICByZXR1cm4gJGVudHJpZXMoaXQpO1xuICB9XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0LmVudHJpZXMuanNcbi8vIG1vZHVsZSBpZCA9IDM2NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///365\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar aFunction = __webpack_require__(16);\nvar $defineProperty = __webpack_require__(11);\n\n// B.2.2.2 Object.prototype.__defineGetter__(P, getter)\n__webpack_require__(10) && $export($export.P + __webpack_require__(89), 'Object', {\n __defineGetter__: function __defineGetter__(P, getter) {\n $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZX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JdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///366\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar aFunction = __webpack_require__(16);\nvar $defineProperty = __webpack_require__(11);\n\n// B.2.2.3 Object.prototype.__defineSetter__(P, setter)\n__webpack_require__(10) && $export($export.P + __webpack_require__(89), 'Object', {\n __defineSetter__: function __defineSetter__(P, setter) {\n $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0LmRlZmluZS1zZXR0ZXIuanM/NzcxNCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgYUZ1bmN0aW9uID0gcmVxdWlyZSgnLi9fYS1mdW5jdGlvbicpO1xudmFyICRkZWZpbmVQcm9wZXJ0eSA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpO1xuXG4vLyBCLjIuMi4zIE9iamVjdC5wcm90b3R5cGUuX19kZWZpbmVTZXR0ZXJfXyhQLCBzZXR0ZXIpXG5yZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpICYmICRleHBvcnQoJGV4cG9ydC5QICsgcmVxdWlyZSgnLi9fb2JqZWN0LWZvcmNlZC1wYW0nKSwgJ09iamVjdCcsIHtcbiAgX19kZWZpbmVTZXR0ZXJfXzogZnVuY3Rpb24gX19kZWZpbmVTZXR0ZXJfXyhQLCBzZXR0ZXIpIHtcbiAgICAkZGVmaW5lUHJvcGVydHkuZih0b09iamVjdCh0aGlzKSwgUCwgeyBzZXQ6IGFGdW5jdGlvbihzZXR0ZXIpLCBlbnVtZXJhYmxlOiB0cnVlLCBjb25maWd1cmFibGU6IHRydWUgfSk7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5vYmplY3QuZGVmaW5lLXNldHRlci5qc1xuLy8gbW9kdWxlIGlkID0gMzY3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///367\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar toPrimitive = __webpack_require__(31);\nvar getPrototypeOf = __webpack_require__(26);\nvar getOwnPropertyDescriptor = __webpack_require__(25).f;\n\n// B.2.2.4 Object.prototype.__lookupGetter__(P)\n__webpack_require__(10) && $export($export.P + __webpack_require__(89), 'Object', {\n __lookupGetter__: function __lookupGetter__(P) {\n var O = toObject(this);\n var K = toPrimitive(P, true);\n var D;\n do {\n if (D = getOwnPropertyDescriptor(O, K)) return D.get;\n } while (O = getPrototypeOf(O));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9k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VjdC5sb29rdXAtZ2V0dGVyLmpzXG4vLyBtb2R1bGUgaWQgPSAzNjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///368\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $export = __webpack_require__(0);\nvar toObject = __webpack_require__(15);\nvar toPrimitive = __webpack_require__(31);\nvar getPrototypeOf = __webpack_require__(26);\nvar getOwnPropertyDescriptor = __webpack_require__(25).f;\n\n// B.2.2.5 Object.prototype.__lookupSetter__(P)\n__webpack_require__(10) && $export($export.P + __webpack_require__(89), 'Object', {\n __lookupSetter__: function __lookupSetter__(P) {\n var O = toObject(this);\n var K = toPrimitive(P, true);\n var D;\n do {\n if (D = getOwnPropertyDescriptor(O, K)) return D.set;\n } while (O = getPrototypeOf(O));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcub2JqZWN0Lmxvb2t1cC1zZXR0ZXIuanM/MDI0NCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgdG9QcmltaXRpdmUgPSByZXF1aXJlKCcuL190by1wcmltaXRpdmUnKTtcbnZhciBnZXRQcm90b3R5cGVPZiA9IHJlcXVpcmUoJy4vX29iamVjdC1ncG8nKTtcbnZhciBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IgPSByZXF1aXJlKCcuL19vYmplY3QtZ29wZCcpLmY7XG5cbi8vIEIuMi4yLjUgT2JqZWN0LnByb3RvdHlwZS5fX2xvb2t1cFNldHRlcl9fKFApXG5yZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpICYmICRleHBvcnQoJGV4cG9ydC5QICsgcmVxdWlyZSgnLi9fb2JqZWN0LWZvcmNlZC1wYW0nKSwgJ09iamVjdCcsIHtcbiAgX19sb29rdXBTZXR0ZXJfXzogZnVuY3Rpb24gX19sb29rdXBTZXR0ZXJfXyhQKSB7XG4gICAgdmFyIE8gPSB0b09iamVjdCh0aGlzKTtcbiAgICB2YXIgSyA9IHRvUHJpbWl0aXZlKFAsIHRydWUpO1xuICAgIHZhciBEO1xuICAgIGRvIHtcbiAgICAgIGlmIChEID0gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKE8sIEspKSByZXR1cm4gRC5zZXQ7XG4gICAgfSB3aGlsZSAoTyA9IGdldFByb3RvdHlwZU9mKE8pKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm9iamVjdC5sb29rdXAtc2V0dGVyLmpzXG4vLyBtb2R1bGUgaWQgPSAzNjlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///369\n")},function(module,exports,__webpack_require__){eval("// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = __webpack_require__(0);\n\n$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(179)('Map') });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzcwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWFwLnRvLWpzb24uanM/ODdiNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vRGF2aWRCcnVhbnQvTWFwLVNldC5wcm90b3R5cGUudG9KU09OXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuUiwgJ01hcCcsIHsgdG9KU09OOiByZXF1aXJlKCcuL19jb2xsZWN0aW9uLXRvLWpzb24nKSgnTWFwJykgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hcC50by1qc29uLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///370\n")},function(module,exports,__webpack_require__){eval("// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = __webpack_require__(0);\n\n$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(179)('Set') });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzcxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc2V0LnRvLWpzb24uanM/NmFiMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vRGF2aWRCcnVhbnQvTWFwLVNldC5wcm90b3R5cGUudG9KU09OXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUCArICRleHBvcnQuUiwgJ1NldCcsIHsgdG9KU09OOiByZXF1aXJlKCcuL19jb2xsZWN0aW9uLXRvLWpzb24nKSgnU2V0JykgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnNldC50by1qc29uLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///371\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of\n__webpack_require__(90)('Map');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzcyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWFwLm9mLmpzPzI0OWQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9wcm9wb3NhbC1zZXRtYXAtb2Zmcm9tLyNzZWMtbWFwLm9mXG5yZXF1aXJlKCcuL19zZXQtY29sbGVjdGlvbi1vZicpKCdNYXAnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWFwLm9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///372\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of\n__webpack_require__(90)('Set');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzczLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc2V0Lm9mLmpzP2E5OTYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9wcm9wb3NhbC1zZXRtYXAtb2Zmcm9tLyNzZWMtc2V0Lm9mXG5yZXF1aXJlKCcuL19zZXQtY29sbGVjdGlvbi1vZicpKCdTZXQnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc2V0Lm9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///373\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of\n__webpack_require__(90)('WeakMap');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcud2Vhay1tYXAub2YuanM/MmRhZSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL3Byb3Bvc2FsLXNldG1hcC1vZmZyb20vI3NlYy13ZWFrbWFwLm9mXG5yZXF1aXJlKCcuL19zZXQtY29sbGVjdGlvbi1vZicpKCdXZWFrTWFwJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LndlYWstbWFwLm9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///374\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of\n__webpack_require__(90)('WeakSet');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcud2Vhay1zZXQub2YuanM/MDRlNiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL3Byb3Bvc2FsLXNldG1hcC1vZmZyb20vI3NlYy13ZWFrc2V0Lm9mXG5yZXF1aXJlKCcuL19zZXQtY29sbGVjdGlvbi1vZicpKCdXZWFrU2V0Jyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LndlYWstc2V0Lm9mLmpzXG4vLyBtb2R1bGUgaWQgPSAzNzVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///375\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from\n__webpack_require__(91)('Map');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWFwLmZyb20uanM/ZTJiOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL3Byb3Bvc2FsLXNldG1hcC1vZmZyb20vI3NlYy1tYXAuZnJvbVxucmVxdWlyZSgnLi9fc2V0LWNvbGxlY3Rpb24tZnJvbScpKCdNYXAnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWFwLmZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDM3NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///376\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from\n__webpack_require__(91)('Set');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc2V0LmZyb20uanM/NjIwOCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL3Byb3Bvc2FsLXNldG1hcC1vZmZyb20vI3NlYy1zZXQuZnJvbVxucmVxdWlyZSgnLi9fc2V0LWNvbGxlY3Rpb24tZnJvbScpKCdTZXQnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc2V0LmZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDM3N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///377\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from\n__webpack_require__(91)('WeakMap');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcud2Vhay1tYXAuZnJvbS5qcz9lOTdjIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vcHJvcG9zYWwtc2V0bWFwLW9mZnJvbS8jc2VjLXdlYWttYXAuZnJvbVxucmVxdWlyZSgnLi9fc2V0LWNvbGxlY3Rpb24tZnJvbScpKCdXZWFrTWFwJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LndlYWstbWFwLmZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDM3OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///378\n")},function(module,exports,__webpack_require__){eval("// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from\n__webpack_require__(91)('WeakSet');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcud2Vhay1zZXQuZnJvbS5qcz9hOWQxIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vcHJvcG9zYWwtc2V0bWFwLW9mZnJvbS8jc2VjLXdlYWtzZXQuZnJvbVxucmVxdWlyZSgnLi9fc2V0LWNvbGxlY3Rpb24tZnJvbScpKCdXZWFrU2V0Jyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LndlYWstc2V0LmZyb20uanNcbi8vIG1vZHVsZSBpZCA9IDM3OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///379\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-global\nvar $export = __webpack_require__(0);\n\n$export($export.G, { global: __webpack_require__(4) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzgwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuZ2xvYmFsLmpzPzBkMDciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9naXRodWIuY29tL3RjMzkvcHJvcG9zYWwtZ2xvYmFsXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuRywgeyBnbG9iYWw6IHJlcXVpcmUoJy4vX2dsb2JhbCcpIH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5nbG9iYWwuanNcbi8vIG1vZHVsZSBpZCA9IDM4MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///380\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-global\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'System', { global: __webpack_require__(4) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzgxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuc3lzdGVtLmdsb2JhbC5qcz84ZmYyIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS90YzM5L3Byb3Bvc2FsLWdsb2JhbFxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdTeXN0ZW0nLCB7IGdsb2JhbDogcmVxdWlyZSgnLi9fZ2xvYmFsJykgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnN5c3RlbS5nbG9iYWwuanNcbi8vIG1vZHVsZSBpZCA9IDM4MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///381\n")},function(module,exports,__webpack_require__){eval("// https://github.com/ljharb/proposal-is-error\nvar $export = __webpack_require__(0);\nvar cof = __webpack_require__(28);\n\n$export($export.S, 'Error', {\n isError: function isError(it) {\n return cof(it) === 'Error';\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzgyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuZXJyb3IuaXMtZXJyb3IuanM/NTNlNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vbGpoYXJiL3Byb3Bvc2FsLWlzLWVycm9yXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIGNvZiA9IHJlcXVpcmUoJy4vX2NvZicpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ0Vycm9yJywge1xuICBpc0Vycm9yOiBmdW5jdGlvbiBpc0Vycm9yKGl0KSB7XG4gICAgcmV0dXJuIGNvZihpdCkgPT09ICdFcnJvcic7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5lcnJvci5pcy1lcnJvci5qc1xuLy8gbW9kdWxlIGlkID0gMzgyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///382\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n clamp: function clamp(x, lower, upper) {\n return Math.min(upper, Math.max(lower, x));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzgzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5jbGFtcC5qcz81ZmEzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vcndhbGRyb24uZ2l0aHViLmlvL3Byb3Bvc2FsLW1hdGgtZXh0ZW5zaW9ucy9cbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHtcbiAgY2xhbXA6IGZ1bmN0aW9uIGNsYW1wKHgsIGxvd2VyLCB1cHBlcikge1xuICAgIHJldHVybiBNYXRoLm1pbih1cHBlciwgTWF0aC5tYXgobG93ZXIsIHgpKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguY2xhbXAuanNcbi8vIG1vZHVsZSBpZCA9IDM4M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///383\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5kZWctcGVyLXJhZC5qcz81YjRhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vcndhbGRyb24uZ2l0aHViLmlvL3Byb3Bvc2FsLW1hdGgtZXh0ZW5zaW9ucy9cbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHsgREVHX1BFUl9SQUQ6IE1hdGguUEkgLyAxODAgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguZGVnLXBlci1yYWQuanNcbi8vIG1vZHVsZSBpZCA9IDM4NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///384\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\nvar RAD_PER_DEG = 180 / Math.PI;\n\n$export($export.S, 'Math', {\n degrees: function degrees(radians) {\n return radians * RAD_PER_DEG;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5kZWdyZWVzLmpzP2I1YTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9yd2FsZHJvbi5naXRodWIuaW8vcHJvcG9zYWwtbWF0aC1leHRlbnNpb25zL1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBSQURfUEVSX0RFRyA9IDE4MCAvIE1hdGguUEk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHtcbiAgZGVncmVlczogZnVuY3Rpb24gZGVncmVlcyhyYWRpYW5zKSB7XG4gICAgcmV0dXJuIHJhZGlhbnMgKiBSQURfUEVSX0RFRztcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguZGVncmVlcy5qc1xuLy8gbW9kdWxlIGlkID0gMzg1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///385\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\nvar scale = __webpack_require__(181);\nvar fround = __webpack_require__(161);\n\n$export($export.S, 'Math', {\n fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {\n return fround(scale(x, inLow, inHigh, outLow, outHigh));\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5mc2NhbGUuanM/YmU3NSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL3J3YWxkcm9uLmdpdGh1Yi5pby9wcm9wb3NhbC1tYXRoLWV4dGVuc2lvbnMvXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHNjYWxlID0gcmVxdWlyZSgnLi9fbWF0aC1zY2FsZScpO1xudmFyIGZyb3VuZCA9IHJlcXVpcmUoJy4vX21hdGgtZnJvdW5kJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHtcbiAgZnNjYWxlOiBmdW5jdGlvbiBmc2NhbGUoeCwgaW5Mb3csIGluSGlnaCwgb3V0TG93LCBvdXRIaWdoKSB7XG4gICAgcmV0dXJuIGZyb3VuZChzY2FsZSh4LCBpbkxvdywgaW5IaWdoLCBvdXRMb3csIG91dEhpZ2gpKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguZnNjYWxlLmpzXG4vLyBtb2R1bGUgaWQgPSAzODZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///386\n")},function(module,exports,__webpack_require__){eval("// https://gist.github.com/BrendanEich/4294d5c212a6d2254703\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n iaddh: function iaddh(x0, x1, y0, y1) {\n var $x0 = x0 >>> 0;\n var $x1 = x1 >>> 0;\n var $y0 = y0 >>> 0;\n return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5pYWRkaC5qcz80NzcyIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2lzdC5naXRodWIuY29tL0JyZW5kYW5FaWNoLzQyOTRkNWMyMTJhNmQyMjU0NzAzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIGlhZGRoOiBmdW5jdGlvbiBpYWRkaCh4MCwgeDEsIHkwLCB5MSkge1xuICAgIHZhciAkeDAgPSB4MCA+Pj4gMDtcbiAgICB2YXIgJHgxID0geDEgPj4+IDA7XG4gICAgdmFyICR5MCA9IHkwID4+PiAwO1xuICAgIHJldHVybiAkeDEgKyAoeTEgPj4+IDApICsgKCgkeDAgJiAkeTAgfCAoJHgwIHwgJHkwKSAmIH4oJHgwICsgJHkwID4+PiAwKSkgPj4+IDMxKSB8IDA7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5tYXRoLmlhZGRoLmpzXG4vLyBtb2R1bGUgaWQgPSAzODdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///387\n")},function(module,exports,__webpack_require__){eval("// https://gist.github.com/BrendanEich/4294d5c212a6d2254703\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n isubh: function isubh(x0, x1, y0, y1) {\n var $x0 = x0 >>> 0;\n var $x1 = x1 >>> 0;\n var $y0 = y0 >>> 0;\n return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5pc3ViaC5qcz9lYTIzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2lzdC5naXRodWIuY29tL0JyZW5kYW5FaWNoLzQyOTRkNWMyMTJhNmQyMjU0NzAzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIGlzdWJoOiBmdW5jdGlvbiBpc3ViaCh4MCwgeDEsIHkwLCB5MSkge1xuICAgIHZhciAkeDAgPSB4MCA+Pj4gMDtcbiAgICB2YXIgJHgxID0geDEgPj4+IDA7XG4gICAgdmFyICR5MCA9IHkwID4+PiAwO1xuICAgIHJldHVybiAkeDEgLSAoeTEgPj4+IDApIC0gKCh+JHgwICYgJHkwIHwgfigkeDAgXiAkeTApICYgJHgwIC0gJHkwID4+PiAwKSA+Pj4gMzEpIHwgMDtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguaXN1YmguanNcbi8vIG1vZHVsZSBpZCA9IDM4OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///388\n")},function(module,exports,__webpack_require__){eval("// https://gist.github.com/BrendanEich/4294d5c212a6d2254703\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n imulh: function imulh(u, v) {\n var UINT16 = 0xffff;\n var $u = +u;\n var $v = +v;\n var u0 = $u & UINT16;\n var v0 = $v & UINT16;\n var u1 = $u >> 16;\n var v1 = $v >> 16;\n var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);\n return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzg5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5pbXVsaC5qcz8wNzc1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2lzdC5naXRodWIuY29tL0JyZW5kYW5FaWNoLzQyOTRkNWMyMTJhNmQyMjU0NzAzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIGltdWxoOiBmdW5jdGlvbiBpbXVsaCh1LCB2KSB7XG4gICAgdmFyIFVJTlQxNiA9IDB4ZmZmZjtcbiAgICB2YXIgJHUgPSArdTtcbiAgICB2YXIgJHYgPSArdjtcbiAgICB2YXIgdTAgPSAkdSAmIFVJTlQxNjtcbiAgICB2YXIgdjAgPSAkdiAmIFVJTlQxNjtcbiAgICB2YXIgdTEgPSAkdSA+PiAxNjtcbiAgICB2YXIgdjEgPSAkdiA+PiAxNjtcbiAgICB2YXIgdCA9ICh1MSAqIHYwID4+PiAwKSArICh1MCAqIHYwID4+PiAxNik7XG4gICAgcmV0dXJuIHUxICogdjEgKyAodCA+PiAxNikgKyAoKHUwICogdjEgPj4+IDApICsgKHQgJiBVSU5UMTYpID4+IDE2KTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGguaW11bGguanNcbi8vIG1vZHVsZSBpZCA9IDM4OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///389\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5yYWQtcGVyLWRlZy5qcz9kZWNmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vcndhbGRyb24uZ2l0aHViLmlvL3Byb3Bvc2FsLW1hdGgtZXh0ZW5zaW9ucy9cbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHsgUkFEX1BFUl9ERUc6IDE4MCAvIE1hdGguUEkgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGgucmFkLXBlci1kZWcuanNcbi8vIG1vZHVsZSBpZCA9IDM5MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///390\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\nvar DEG_PER_RAD = Math.PI / 180;\n\n$export($export.S, 'Math', {\n radians: function radians(degrees) {\n return degrees * DEG_PER_RAD;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5yYWRpYW5zLmpzPzE3NWIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9yd2FsZHJvbi5naXRodWIuaW8vcHJvcG9zYWwtbWF0aC1leHRlbnNpb25zL1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBERUdfUEVSX1JBRCA9IE1hdGguUEkgLyAxODA7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHtcbiAgcmFkaWFuczogZnVuY3Rpb24gcmFkaWFucyhkZWdyZWVzKSB7XG4gICAgcmV0dXJuIGRlZ3JlZXMgKiBERUdfUEVSX1JBRDtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3Lm1hdGgucmFkaWFucy5qc1xuLy8gbW9kdWxlIGlkID0gMzkxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///391\n")},function(module,exports,__webpack_require__){eval("// https://rwaldron.github.io/proposal-math-extensions/\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { scale: __webpack_require__(181) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5zY2FsZS5qcz9iODQxIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vcndhbGRyb24uZ2l0aHViLmlvL3Byb3Bvc2FsLW1hdGgtZXh0ZW5zaW9ucy9cbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnTWF0aCcsIHsgc2NhbGU6IHJlcXVpcmUoJy4vX21hdGgtc2NhbGUnKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5zY2FsZS5qc1xuLy8gbW9kdWxlIGlkID0gMzkyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///392\n")},function(module,exports,__webpack_require__){eval("// https://gist.github.com/BrendanEich/4294d5c212a6d2254703\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', {\n umulh: function umulh(u, v) {\n var UINT16 = 0xffff;\n var $u = +u;\n var $v = +v;\n var u0 = $u & UINT16;\n var v0 = $v & UINT16;\n var u1 = $u >>> 16;\n var v1 = $v >>> 16;\n var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);\n return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC51bXVsaC5qcz84YjRkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2lzdC5naXRodWIuY29tL0JyZW5kYW5FaWNoLzQyOTRkNWMyMTJhNmQyMjU0NzAzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7XG4gIHVtdWxoOiBmdW5jdGlvbiB1bXVsaCh1LCB2KSB7XG4gICAgdmFyIFVJTlQxNiA9IDB4ZmZmZjtcbiAgICB2YXIgJHUgPSArdTtcbiAgICB2YXIgJHYgPSArdjtcbiAgICB2YXIgdTAgPSAkdSAmIFVJTlQxNjtcbiAgICB2YXIgdjAgPSAkdiAmIFVJTlQxNjtcbiAgICB2YXIgdTEgPSAkdSA+Pj4gMTY7XG4gICAgdmFyIHYxID0gJHYgPj4+IDE2O1xuICAgIHZhciB0ID0gKHUxICogdjAgPj4+IDApICsgKHUwICogdjAgPj4+IDE2KTtcbiAgICByZXR1cm4gdTEgKiB2MSArICh0ID4+PiAxNikgKyAoKHUwICogdjEgPj4+IDApICsgKHQgJiBVSU5UMTYpID4+PiAxNik7XG4gIH1cbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5tYXRoLnVtdWxoLmpzXG4vLyBtb2R1bGUgaWQgPSAzOTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///393\n")},function(module,exports,__webpack_require__){eval("// http://jfbastien.github.io/papers/Math.signbit.html\nvar $export = __webpack_require__(0);\n\n$export($export.S, 'Math', { signbit: function signbit(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzk0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcubWF0aC5zaWduYml0LmpzPzFmYmMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cDovL2pmYmFzdGllbi5naXRodWIuaW8vcGFwZXJzL01hdGguc2lnbmJpdC5odG1sXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ01hdGgnLCB7IHNpZ25iaXQ6IGZ1bmN0aW9uIHNpZ25iaXQoeCkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tc2VsZi1jb21wYXJlXG4gIHJldHVybiAoeCA9ICt4KSAhPSB4ID8geCA6IHggPT0gMCA/IDEgLyB4ID09IEluZmluaXR5IDogeCA+IDA7XG59IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5tYXRoLnNpZ25iaXQuanNcbi8vIG1vZHVsZSBpZCA9IDM5NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///394\n")},function(module,exports,__webpack_require__){"use strict";eval("// https://github.com/tc39/proposal-promise-finally\n\nvar $export = __webpack_require__(0);\nvar core = __webpack_require__(30);\nvar global = __webpack_require__(4);\nvar speciesConstructor = __webpack_require__(86);\nvar promiseResolve = __webpack_require__(168);\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzk1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucHJvbWlzZS5maW5hbGx5LmpzP2Y4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5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5wcm9taXNlLmZpbmFsbHkuanNcbi8vIG1vZHVsZSBpZCA9IDM5NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///395\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/tc39/proposal-promise-try\nvar $export = __webpack_require__(0);\nvar newPromiseCapability = __webpack_require__(125);\nvar perform = __webpack_require__(167);\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapability.f(this);\n var result = perform(callbackfn);\n (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n return promiseCapability.promise;\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzk2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucHJvbWlzZS50cnkuanM/NDFjNSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG4vLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9wcm9wb3NhbC1wcm9taXNlLXRyeVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBuZXdQcm9taXNlQ2FwYWJpbGl0eSA9IHJlcXVpcmUoJy4vX25ldy1wcm9taXNlLWNhcGFiaWxpdHknKTtcbnZhciBwZXJmb3JtID0gcmVxdWlyZSgnLi9fcGVyZm9ybScpO1xuXG4kZXhwb3J0KCRleHBvcnQuUywgJ1Byb21pc2UnLCB7ICd0cnknOiBmdW5jdGlvbiAoY2FsbGJhY2tmbikge1xuICB2YXIgcHJvbWlzZUNhcGFiaWxpdHkgPSBuZXdQcm9taXNlQ2FwYWJpbGl0eS5mKHRoaXMpO1xuICB2YXIgcmVzdWx0ID0gcGVyZm9ybShjYWxsYmFja2ZuKTtcbiAgKHJlc3VsdC5lID8gcHJvbWlzZUNhcGFiaWxpdHkucmVqZWN0IDogcHJvbWlzZUNhcGFiaWxpdHkucmVzb2x2ZSkocmVzdWx0LnYpO1xuICByZXR1cm4gcHJvbWlzZUNhcGFiaWxpdHkucHJvbWlzZTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnByb21pc2UudHJ5LmpzXG4vLyBtb2R1bGUgaWQgPSAzOTZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///396\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar toMetaKey = metadata.key;\nvar ordinaryDefineOwnMetadata = metadata.set;\n\nmetadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {\n ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzk3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5kZWZpbmUtbWV0YWRhdGEuanM/Yzg5ZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgbWV0YWRhdGEgPSByZXF1aXJlKCcuL19tZXRhZGF0YScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgdG9NZXRhS2V5ID0gbWV0YWRhdGEua2V5O1xudmFyIG9yZGluYXJ5RGVmaW5lT3duTWV0YWRhdGEgPSBtZXRhZGF0YS5zZXQ7XG5cbm1ldGFkYXRhLmV4cCh7IGRlZmluZU1ldGFkYXRhOiBmdW5jdGlvbiBkZWZpbmVNZXRhZGF0YShtZXRhZGF0YUtleSwgbWV0YWRhdGFWYWx1ZSwgdGFyZ2V0LCB0YXJnZXRLZXkpIHtcbiAgb3JkaW5hcnlEZWZpbmVPd25NZXRhZGF0YShtZXRhZGF0YUtleSwgbWV0YWRhdGFWYWx1ZSwgYW5PYmplY3QodGFyZ2V0KSwgdG9NZXRhS2V5KHRhcmdldEtleSkpO1xufSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5kZWZpbmUtbWV0YWRhdGEuanNcbi8vIG1vZHVsZSBpZCA9IDM5N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///397\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar toMetaKey = metadata.key;\nvar getOrCreateMetadataMap = metadata.map;\nvar store = metadata.store;\n\nmetadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {\n var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);\n var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);\n if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;\n if (metadataMap.size) return true;\n var targetMetadata = store.get(target);\n targetMetadata['delete'](targetKey);\n return !!targetMetadata.size || store['delete'](target);\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzk4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5kZWxldGUtbWV0YWRhdGEuanM/ZGVhZSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgbWV0YWRhdGEgPSByZXF1aXJlKCcuL19tZXRhZGF0YScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgdG9NZXRhS2V5ID0gbWV0YWRhdGEua2V5O1xudmFyIGdldE9yQ3JlYXRlTWV0YWRhdGFNYXAgPSBtZXRhZGF0YS5tYXA7XG52YXIgc3RvcmUgPSBtZXRhZGF0YS5zdG9yZTtcblxubWV0YWRhdGEuZXhwKHsgZGVsZXRlTWV0YWRhdGE6IGZ1bmN0aW9uIGRlbGV0ZU1ldGFkYXRhKG1ldGFkYXRhS2V5LCB0YXJnZXQgLyogLCB0YXJnZXRLZXkgKi8pIHtcbiAgdmFyIHRhcmdldEtleSA9IGFyZ3VtZW50cy5sZW5ndGggPCAzID8gdW5kZWZpbmVkIDogdG9NZXRhS2V5KGFyZ3VtZW50c1syXSk7XG4gIHZhciBtZXRhZGF0YU1hcCA9IGdldE9yQ3JlYXRlTWV0YWRhdGFNYXAoYW5PYmplY3QodGFyZ2V0KSwgdGFyZ2V0S2V5LCBmYWxzZSk7XG4gIGlmIChtZXRhZGF0YU1hcCA9PT0gdW5kZWZpbmVkIHx8ICFtZXRhZGF0YU1hcFsnZGVsZXRlJ10obWV0YWRhdGFLZXkpKSByZXR1cm4gZmFsc2U7XG4gIGlmIChtZXRhZGF0YU1hcC5zaXplKSByZXR1cm4gdHJ1ZTtcbiAgdmFyIHRhcmdldE1ldGFkYXRhID0gc3RvcmUuZ2V0KHRhcmdldCk7XG4gIHRhcmdldE1ldGFkYXRhWydkZWxldGUnXSh0YXJnZXRLZXkpO1xuICByZXR1cm4gISF0YXJnZXRNZXRhZGF0YS5zaXplIHx8IHN0b3JlWydkZWxldGUnXSh0YXJnZXQpO1xufSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5kZWxldGUtbWV0YWRhdGEuanNcbi8vIG1vZHVsZSBpZCA9IDM5OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///398\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar getPrototypeOf = __webpack_require__(26);\nvar ordinaryHasOwnMetadata = metadata.has;\nvar ordinaryGetOwnMetadata = metadata.get;\nvar toMetaKey = metadata.key;\n\nvar ordinaryGetMetadata = function (MetadataKey, O, P) {\n var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);\n var parent = getPrototypeOf(O);\n return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;\n};\n\nmetadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzk5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5nZXQtbWV0YWRhdGEuanM/MzQ3NiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgbWV0YWRhdGEgPSByZXF1aXJlKCcuL19tZXRhZGF0YScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgZ2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKCcuL19vYmplY3QtZ3BvJyk7XG52YXIgb3JkaW5hcnlIYXNPd25NZXRhZGF0YSA9IG1ldGFkYXRhLmhhcztcbnZhciBvcmRpbmFyeUdldE93bk1ldGFkYXRhID0gbWV0YWRhdGEuZ2V0O1xudmFyIHRvTWV0YUtleSA9IG1ldGFkYXRhLmtleTtcblxudmFyIG9yZGluYXJ5R2V0TWV0YWRhdGEgPSBmdW5jdGlvbiAoTWV0YWRhdGFLZXksIE8sIFApIHtcbiAgdmFyIGhhc093biA9IG9yZGluYXJ5SGFzT3duTWV0YWRhdGEoTWV0YWRhdGFLZXksIE8sIFApO1xuICBpZiAoaGFzT3duKSByZXR1cm4gb3JkaW5hcnlHZXRPd25NZXRhZGF0YShNZXRhZGF0YUtleSwgTywgUCk7XG4gIHZhciBwYXJlbnQgPSBnZXRQcm90b3R5cGVPZihPKTtcbiAgcmV0dXJuIHBhcmVudCAhPT0gbnVsbCA/IG9yZGluYXJ5R2V0TWV0YWRhdGEoTWV0YWRhdGFLZXksIHBhcmVudCwgUCkgOiB1bmRlZmluZWQ7XG59O1xuXG5tZXRhZGF0YS5leHAoeyBnZXRNZXRhZGF0YTogZnVuY3Rpb24gZ2V0TWV0YWRhdGEobWV0YWRhdGFLZXksIHRhcmdldCAvKiAsIHRhcmdldEtleSAqLykge1xuICByZXR1cm4gb3JkaW5hcnlHZXRNZXRhZGF0YShtZXRhZGF0YUtleSwgYW5PYmplY3QodGFyZ2V0KSwgYXJndW1lbnRzLmxlbmd0aCA8IDMgPyB1bmRlZmluZWQgOiB0b01ldGFLZXkoYXJndW1lbnRzWzJdKSk7XG59IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5yZWZsZWN0LmdldC1tZXRhZGF0YS5qc1xuLy8gbW9kdWxlIGlkID0gMzk5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///399\n")},function(module,exports,__webpack_require__){eval("var Set = __webpack_require__(171);\nvar from = __webpack_require__(180);\nvar metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar getPrototypeOf = __webpack_require__(26);\nvar ordinaryOwnMetadataKeys = metadata.keys;\nvar toMetaKey = metadata.key;\n\nvar ordinaryMetadataKeys = function (O, P) {\n var oKeys = ordinaryOwnMetadataKeys(O, P);\n var parent = getPrototypeOf(O);\n if (parent === null) return oKeys;\n var pKeys = ordinaryMetadataKeys(parent, P);\n return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;\n};\n\nmetadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {\n return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5nZXQtbWV0YWRhdGEta2V5cy5qcz9iZjc4Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBTZXQgPSByZXF1aXJlKCcuL2VzNi5zZXQnKTtcbnZhciBmcm9tID0gcmVxdWlyZSgnLi9fYXJyYXktZnJvbS1pdGVyYWJsZScpO1xudmFyIG1ldGFkYXRhID0gcmVxdWlyZSgnLi9fbWV0YWRhdGEnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIGdldFByb3RvdHlwZU9mID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdwbycpO1xudmFyIG9yZGluYXJ5T3duTWV0YWRhdGFLZXlzID0gbWV0YWRhdGEua2V5cztcbnZhciB0b01ldGFLZXkgPSBtZXRhZGF0YS5rZXk7XG5cbnZhciBvcmRpbmFyeU1ldGFkYXRhS2V5cyA9IGZ1bmN0aW9uIChPLCBQKSB7XG4gIHZhciBvS2V5cyA9IG9yZGluYXJ5T3duTWV0YWRhdGFLZXlzKE8sIFApO1xuICB2YXIgcGFyZW50ID0gZ2V0UHJvdG90eXBlT2YoTyk7XG4gIGlmIChwYXJlbnQgPT09IG51bGwpIHJldHVybiBvS2V5cztcbiAgdmFyIHBLZXlzID0gb3JkaW5hcnlNZXRhZGF0YUtleXMocGFyZW50LCBQKTtcbiAgcmV0dXJuIHBLZXlzLmxlbmd0aCA/IG9LZXlzLmxlbmd0aCA/IGZyb20obmV3IFNldChvS2V5cy5jb25jYXQocEtleXMpKSkgOiBwS2V5cyA6IG9LZXlzO1xufTtcblxubWV0YWRhdGEuZXhwKHsgZ2V0TWV0YWRhdGFLZXlzOiBmdW5jdGlvbiBnZXRNZXRhZGF0YUtleXModGFyZ2V0IC8qICwgdGFyZ2V0S2V5ICovKSB7XG4gIHJldHVybiBvcmRpbmFyeU1ldGFkYXRhS2V5cyhhbk9iamVjdCh0YXJnZXQpLCBhcmd1bWVudHMubGVuZ3RoIDwgMiA/IHVuZGVmaW5lZCA6IHRvTWV0YUtleShhcmd1bWVudHNbMV0pKTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnJlZmxlY3QuZ2V0LW1ldGFkYXRhLWtleXMuanNcbi8vIG1vZHVsZSBpZCA9IDQwMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///400\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar ordinaryGetOwnMetadata = metadata.get;\nvar toMetaKey = metadata.key;\n\nmetadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryGetOwnMetadata(metadataKey, anObject(target)\n , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5nZXQtb3duLW1ldGFkYXRhLmpzP2NkOTEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIG1ldGFkYXRhID0gcmVxdWlyZSgnLi9fbWV0YWRhdGEnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIG9yZGluYXJ5R2V0T3duTWV0YWRhdGEgPSBtZXRhZGF0YS5nZXQ7XG52YXIgdG9NZXRhS2V5ID0gbWV0YWRhdGEua2V5O1xuXG5tZXRhZGF0YS5leHAoeyBnZXRPd25NZXRhZGF0YTogZnVuY3Rpb24gZ2V0T3duTWV0YWRhdGEobWV0YWRhdGFLZXksIHRhcmdldCAvKiAsIHRhcmdldEtleSAqLykge1xuICByZXR1cm4gb3JkaW5hcnlHZXRPd25NZXRhZGF0YShtZXRhZGF0YUtleSwgYW5PYmplY3QodGFyZ2V0KVxuICAgICwgYXJndW1lbnRzLmxlbmd0aCA8IDMgPyB1bmRlZmluZWQgOiB0b01ldGFLZXkoYXJndW1lbnRzWzJdKSk7XG59IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5yZWZsZWN0LmdldC1vd24tbWV0YWRhdGEuanNcbi8vIG1vZHVsZSBpZCA9IDQwMVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///401\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar ordinaryOwnMetadataKeys = metadata.keys;\nvar toMetaKey = metadata.key;\n\nmetadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {\n return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5nZXQtb3duLW1ldGFkYXRhLWtleXMuanM/YmVjOCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgbWV0YWRhdGEgPSByZXF1aXJlKCcuL19tZXRhZGF0YScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgb3JkaW5hcnlPd25NZXRhZGF0YUtleXMgPSBtZXRhZGF0YS5rZXlzO1xudmFyIHRvTWV0YUtleSA9IG1ldGFkYXRhLmtleTtcblxubWV0YWRhdGEuZXhwKHsgZ2V0T3duTWV0YWRhdGFLZXlzOiBmdW5jdGlvbiBnZXRPd25NZXRhZGF0YUtleXModGFyZ2V0IC8qICwgdGFyZ2V0S2V5ICovKSB7XG4gIHJldHVybiBvcmRpbmFyeU93bk1ldGFkYXRhS2V5cyhhbk9iamVjdCh0YXJnZXQpLCBhcmd1bWVudHMubGVuZ3RoIDwgMiA/IHVuZGVmaW5lZCA6IHRvTWV0YUtleShhcmd1bWVudHNbMV0pKTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnJlZmxlY3QuZ2V0LW93bi1tZXRhZGF0YS1rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSA0MDJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///402\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar getPrototypeOf = __webpack_require__(26);\nvar ordinaryHasOwnMetadata = metadata.has;\nvar toMetaKey = metadata.key;\n\nvar ordinaryHasMetadata = function (MetadataKey, O, P) {\n var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn) return true;\n var parent = getPrototypeOf(O);\n return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;\n};\n\nmetadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5oYXMtbWV0YWRhdGEuanM/ZjE2NiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgbWV0YWRhdGEgPSByZXF1aXJlKCcuL19tZXRhZGF0YScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgZ2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKCcuL19vYmplY3QtZ3BvJyk7XG52YXIgb3JkaW5hcnlIYXNPd25NZXRhZGF0YSA9IG1ldGFkYXRhLmhhcztcbnZhciB0b01ldGFLZXkgPSBtZXRhZGF0YS5rZXk7XG5cbnZhciBvcmRpbmFyeUhhc01ldGFkYXRhID0gZnVuY3Rpb24gKE1ldGFkYXRhS2V5LCBPLCBQKSB7XG4gIHZhciBoYXNPd24gPSBvcmRpbmFyeUhhc093bk1ldGFkYXRhKE1ldGFkYXRhS2V5LCBPLCBQKTtcbiAgaWYgKGhhc093bikgcmV0dXJuIHRydWU7XG4gIHZhciBwYXJlbnQgPSBnZXRQcm90b3R5cGVPZihPKTtcbiAgcmV0dXJuIHBhcmVudCAhPT0gbnVsbCA/IG9yZGluYXJ5SGFzTWV0YWRhdGEoTWV0YWRhdGFLZXksIHBhcmVudCwgUCkgOiBmYWxzZTtcbn07XG5cbm1ldGFkYXRhLmV4cCh7IGhhc01ldGFkYXRhOiBmdW5jdGlvbiBoYXNNZXRhZGF0YShtZXRhZGF0YUtleSwgdGFyZ2V0IC8qICwgdGFyZ2V0S2V5ICovKSB7XG4gIHJldHVybiBvcmRpbmFyeUhhc01ldGFkYXRhKG1ldGFkYXRhS2V5LCBhbk9iamVjdCh0YXJnZXQpLCBhcmd1bWVudHMubGVuZ3RoIDwgMyA/IHVuZGVmaW5lZCA6IHRvTWV0YUtleShhcmd1bWVudHNbMl0pKTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LnJlZmxlY3QuaGFzLW1ldGFkYXRhLmpzXG4vLyBtb2R1bGUgaWQgPSA0MDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///403\n")},function(module,exports,__webpack_require__){eval("var metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar ordinaryHasOwnMetadata = metadata.has;\nvar toMetaKey = metadata.key;\n\nmetadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryHasOwnMetadata(metadataKey, anObject(target)\n , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5oYXMtb3duLW1ldGFkYXRhLmpzP2M4ZWIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIG1ldGFkYXRhID0gcmVxdWlyZSgnLi9fbWV0YWRhdGEnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIG9yZGluYXJ5SGFzT3duTWV0YWRhdGEgPSBtZXRhZGF0YS5oYXM7XG52YXIgdG9NZXRhS2V5ID0gbWV0YWRhdGEua2V5O1xuXG5tZXRhZGF0YS5leHAoeyBoYXNPd25NZXRhZGF0YTogZnVuY3Rpb24gaGFzT3duTWV0YWRhdGEobWV0YWRhdGFLZXksIHRhcmdldCAvKiAsIHRhcmdldEtleSAqLykge1xuICByZXR1cm4gb3JkaW5hcnlIYXNPd25NZXRhZGF0YShtZXRhZGF0YUtleSwgYW5PYmplY3QodGFyZ2V0KVxuICAgICwgYXJndW1lbnRzLmxlbmd0aCA8IDMgPyB1bmRlZmluZWQgOiB0b01ldGFLZXkoYXJndW1lbnRzWzJdKSk7XG59IH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzNy5yZWZsZWN0Lmhhcy1vd24tbWV0YWRhdGEuanNcbi8vIG1vZHVsZSBpZCA9IDQwNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///404\n")},function(module,exports,__webpack_require__){eval("var $metadata = __webpack_require__(39);\nvar anObject = __webpack_require__(3);\nvar aFunction = __webpack_require__(16);\nvar toMetaKey = $metadata.key;\nvar ordinaryDefineOwnMetadata = $metadata.set;\n\n$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {\n return function decorator(target, targetKey) {\n ordinaryDefineOwnMetadata(\n metadataKey, metadataValue,\n (targetKey !== undefined ? anObject : aFunction)(target),\n toMetaKey(targetKey)\n );\n };\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5tZXRhZGF0YS5qcz8xMTlmIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkbWV0YWRhdGEgPSByZXF1aXJlKCcuL19tZXRhZGF0YScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgYUZ1bmN0aW9uID0gcmVxdWlyZSgnLi9fYS1mdW5jdGlvbicpO1xudmFyIHRvTWV0YUtleSA9ICRtZXRhZGF0YS5rZXk7XG52YXIgb3JkaW5hcnlEZWZpbmVPd25NZXRhZGF0YSA9ICRtZXRhZGF0YS5zZXQ7XG5cbiRtZXRhZGF0YS5leHAoeyBtZXRhZGF0YTogZnVuY3Rpb24gbWV0YWRhdGEobWV0YWRhdGFLZXksIG1ldGFkYXRhVmFsdWUpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGRlY29yYXRvcih0YXJnZXQsIHRhcmdldEtleSkge1xuICAgIG9yZGluYXJ5RGVmaW5lT3duTWV0YWRhdGEoXG4gICAgICBtZXRhZGF0YUtleSwgbWV0YWRhdGFWYWx1ZSxcbiAgICAgICh0YXJnZXRLZXkgIT09IHVuZGVmaW5lZCA/IGFuT2JqZWN0IDogYUZ1bmN0aW9uKSh0YXJnZXQpLFxuICAgICAgdG9NZXRhS2V5KHRhcmdldEtleSlcbiAgICApO1xuICB9O1xufSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcucmVmbGVjdC5tZXRhZGF0YS5qc1xuLy8gbW9kdWxlIGlkID0gNDA1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///405\n")},function(module,exports,__webpack_require__){eval("// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask\nvar $export = __webpack_require__(0);\nvar microtask = __webpack_require__(124)();\nvar process = __webpack_require__(4).process;\nvar isNode = __webpack_require__(28)(process) == 'process';\n\n$export($export.G, {\n asap: function asap(fn) {\n var domain = isNode && process.domain;\n microtask(domain ? domain.bind(fn) : fn);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lczcuYXNhcC5qcz82OGNkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9yd2FsZHJvbi90YzM5LW5vdGVzL2Jsb2IvbWFzdGVyL2VzNi8yMDE0LTA5L3NlcHQtMjUubWQjNTEwLWdsb2JhbGFzYXAtZm9yLWVucXVldWluZy1hLW1pY3JvdGFza1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciBtaWNyb3Rhc2sgPSByZXF1aXJlKCcuL19taWNyb3Rhc2snKSgpO1xudmFyIHByb2Nlc3MgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5wcm9jZXNzO1xudmFyIGlzTm9kZSA9IHJlcXVpcmUoJy4vX2NvZicpKHByb2Nlc3MpID09ICdwcm9jZXNzJztcblxuJGV4cG9ydCgkZXhwb3J0LkcsIHtcbiAgYXNhcDogZnVuY3Rpb24gYXNhcChmbikge1xuICAgIHZhciBkb21haW4gPSBpc05vZGUgJiYgcHJvY2Vzcy5kb21haW47XG4gICAgbWljcm90YXNrKGRvbWFpbiA/IGRvbWFpbi5iaW5kKGZuKSA6IGZuKTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXM3LmFzYXAuanNcbi8vIG1vZHVsZSBpZCA9IDQwNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///406\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/zenparsing/es-observable\nvar $export = __webpack_require__(0);\nvar global = __webpack_require__(4);\nvar core = __webpack_require__(30);\nvar microtask = __webpack_require__(124)();\nvar OBSERVABLE = __webpack_require__(8)('observable');\nvar aFunction = __webpack_require__(16);\nvar anObject = __webpack_require__(3);\nvar anInstance = __webpack_require__(55);\nvar redefineAll = __webpack_require__(57);\nvar hide = __webpack_require__(18);\nvar forOf = __webpack_require__(56);\nvar RETURN = forOf.RETURN;\n\nvar getMethod = function (fn) {\n return fn == null ? undefined : aFunction(fn);\n};\n\nvar cleanupSubscription = function (subscription) {\n var cleanup = subscription._c;\n if (cleanup) {\n subscription._c = undefined;\n cleanup();\n }\n};\n\nvar subscriptionClosed = function (subscription) {\n return subscription._o === undefined;\n};\n\nvar closeSubscription = function (subscription) {\n if (!subscriptionClosed(subscription)) {\n subscription._o = undefined;\n cleanupSubscription(subscription);\n }\n};\n\nvar Subscription = function (observer, subscriber) {\n anObject(observer);\n this._c = undefined;\n this._o = observer;\n observer = new SubscriptionObserver(this);\n try {\n var cleanup = subscriber(observer);\n var subscription = cleanup;\n if (cleanup != null) {\n if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); };\n else aFunction(cleanup);\n this._c = cleanup;\n }\n } catch (e) {\n observer.error(e);\n return;\n } if (subscriptionClosed(this)) cleanupSubscription(this);\n};\n\nSubscription.prototype = redefineAll({}, {\n unsubscribe: function unsubscribe() { closeSubscription(this); }\n});\n\nvar SubscriptionObserver = function (subscription) {\n this._s = subscription;\n};\n\nSubscriptionObserver.prototype = redefineAll({}, {\n next: function next(value) {\n var subscription = this._s;\n if (!subscriptionClosed(subscription)) {\n var observer = subscription._o;\n try {\n var m = getMethod(observer.next);\n if (m) return m.call(observer, value);\n } catch (e) {\n try {\n closeSubscription(subscription);\n } finally {\n throw e;\n }\n }\n }\n },\n error: function error(value) {\n var subscription = this._s;\n if (subscriptionClosed(subscription)) throw value;\n var observer = subscription._o;\n subscription._o = undefined;\n try {\n var m = getMethod(observer.error);\n if (!m) throw value;\n value = m.call(observer, value);\n } catch (e) {\n try {\n cleanupSubscription(subscription);\n } finally {\n throw e;\n }\n } cleanupSubscription(subscription);\n return value;\n },\n complete: function complete(value) {\n var subscription = this._s;\n if (!subscriptionClosed(subscription)) {\n var observer = subscription._o;\n subscription._o = undefined;\n try {\n var m = getMethod(observer.complete);\n value = m ? m.call(observer, value) : undefined;\n } catch (e) {\n try {\n cleanupSubscription(subscription);\n } finally {\n throw e;\n }\n } cleanupSubscription(subscription);\n return value;\n }\n }\n});\n\nvar $Observable = function Observable(subscriber) {\n anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);\n};\n\nredefineAll($Observable.prototype, {\n subscribe: function subscribe(observer) {\n return new Subscription(observer, this._f);\n },\n forEach: function forEach(fn) {\n var that = this;\n return new (core.Promise || global.Promise)(function (resolve, reject) {\n aFunction(fn);\n var subscription = that.subscribe({\n next: function (value) {\n try {\n return fn(value);\n } catch (e) {\n reject(e);\n subscription.unsubscribe();\n }\n },\n error: reject,\n complete: resolve\n });\n });\n }\n});\n\nredefineAll($Observable, {\n from: function from(x) {\n var C = typeof this === 'function' ? this : $Observable;\n var method = getMethod(anObject(x)[OBSERVABLE]);\n if (method) {\n var observable = anObject(method.call(x));\n return observable.constructor === C ? observable : new C(function (observer) {\n return observable.subscribe(observer);\n });\n }\n return new C(function (observer) {\n var done = false;\n microtask(function () {\n if (!done) {\n try {\n if (forOf(x, false, function (it) {\n observer.next(it);\n if (done) return RETURN;\n }) === RETURN) return;\n } catch (e) {\n if (done) throw e;\n observer.error(e);\n return;\n } observer.complete();\n }\n });\n return function () { done = true; };\n });\n },\n of: function of() {\n for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++];\n return new (typeof this === 'function' ? this : $Observable)(function (observer) {\n var done = false;\n microtask(function () {\n if (!done) {\n for (var j = 0; j < items.length; ++j) {\n observer.next(items[j]);\n if (done) return;\n } observer.complete();\n }\n });\n return function () { done = true; };\n });\n }\n});\n\nhide($Observable.prototype, OBSERVABLE, function () { return this; });\n\n$export($export.G, { Observable: $Observable });\n\n__webpack_require__(54)('Observable');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA3Lmp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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///407\n")},function(module,exports,__webpack_require__){eval("// ie9- setTimeout & setInterval additional parameters fix\nvar global = __webpack_require__(4);\nvar $export = __webpack_require__(0);\nvar userAgent = __webpack_require__(127);\nvar slice = [].slice;\nvar MSIE = /MSIE .\\./.test(userAgent); // <- dirty ie9- check\nvar wrap = function (set) {\n return function (fn, time /* , ...args */) {\n var boundArgs = arguments.length > 2;\n var args = boundArgs ? slice.call(arguments, 2) : false;\n return set(boundArgs ? function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);\n } : fn, time);\n };\n};\n$export($export.G + $export.B + $export.F * MSIE, {\n setTimeout: wrap(global.setTimeout),\n setInterval: wrap(global.setInterval)\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy93ZWIudGltZXJzLmpzP2JmYzUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaWU5LSBzZXRUaW1lb3V0ICYgc2V0SW50ZXJ2YWwgYWRkaXRpb25hbCBwYXJhbWV0ZXJzIGZpeFxudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciB1c2VyQWdlbnQgPSByZXF1aXJlKCcuL191c2VyLWFnZW50Jyk7XG52YXIgc2xpY2UgPSBbXS5zbGljZTtcbnZhciBNU0lFID0gL01TSUUgLlxcLi8udGVzdCh1c2VyQWdlbnQpOyAvLyA8LSBkaXJ0eSBpZTktIGNoZWNrXG52YXIgd3JhcCA9IGZ1bmN0aW9uIChzZXQpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIChmbiwgdGltZSAvKiAsIC4uLmFyZ3MgKi8pIHtcbiAgICB2YXIgYm91bmRBcmdzID0gYXJndW1lbnRzLmxlbmd0aCA+IDI7XG4gICAgdmFyIGFyZ3MgPSBib3VuZEFyZ3MgPyBzbGljZS5jYWxsKGFyZ3VtZW50cywgMikgOiBmYWxzZTtcbiAgICByZXR1cm4gc2V0KGJvdW5kQXJncyA/IGZ1bmN0aW9uICgpIHtcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1uZXctZnVuY1xuICAgICAgKHR5cGVvZiBmbiA9PSAnZnVuY3Rpb24nID8gZm4gOiBGdW5jdGlvbihmbikpLmFwcGx5KHRoaXMsIGFyZ3MpO1xuICAgIH0gOiBmbiwgdGltZSk7XG4gIH07XG59O1xuJGV4cG9ydCgkZXhwb3J0LkcgKyAkZXhwb3J0LkIgKyAkZXhwb3J0LkYgKiBNU0lFLCB7XG4gIHNldFRpbWVvdXQ6IHdyYXAoZ2xvYmFsLnNldFRpbWVvdXQpLFxuICBzZXRJbnRlcnZhbDogd3JhcChnbG9iYWwuc2V0SW50ZXJ2YWwpXG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy93ZWIudGltZXJzLmpzXG4vLyBtb2R1bGUgaWQgPSA0MDhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///408\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(0);\nvar $task = __webpack_require__(123);\n$export($export.G + $export.B, {\n setImmediate: $task.set,\n clearImmediate: $task.clear\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDA5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy93ZWIuaW1tZWRpYXRlLmpzPzc2MjciXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciAkdGFzayA9IHJlcXVpcmUoJy4vX3Rhc2snKTtcbiRleHBvcnQoJGV4cG9ydC5HICsgJGV4cG9ydC5CLCB7XG4gIHNldEltbWVkaWF0ZTogJHRhc2suc2V0LFxuICBjbGVhckltbWVkaWF0ZTogJHRhc2suY2xlYXJcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL3dlYi5pbW1lZGlhdGUuanNcbi8vIG1vZHVsZSBpZCA9IDQwOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///409\n")},function(module,exports,__webpack_require__){eval("var $iterators = __webpack_require__(122);\nvar getKeys = __webpack_require__(50);\nvar redefine = __webpack_require__(19);\nvar global = __webpack_require__(4);\nvar hide = __webpack_require__(18);\nvar Iterators = __webpack_require__(63);\nvar wks = __webpack_require__(8);\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy93ZWIuZG9tLml0ZXJhYmxlLmpzPzdmMWQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRpdGVyYXRvcnMgPSByZXF1aXJlKCcuL2VzNi5hcnJheS5pdGVyYXRvcicpO1xudmFyIGdldEtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cycpO1xudmFyIHJlZGVmaW5lID0gcmVxdWlyZSgnLi9fcmVkZWZpbmUnKTtcbnZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBoaWRlID0gcmVxdWlyZSgnLi9faGlkZScpO1xudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4vX2l0ZXJhdG9ycycpO1xudmFyIHdrcyA9IHJlcXVpcmUoJy4vX3drcycpO1xudmFyIElURVJBVE9SID0gd2tzKCdpdGVyYXRvcicpO1xudmFyIFRPX1NUUklOR19UQUcgPSB3a3MoJ3RvU3RyaW5nVGFnJyk7XG52YXIgQXJyYXlWYWx1ZXMgPSBJdGVyYXRvcnMuQXJyYXk7XG5cbnZhciBET01JdGVyYWJsZXMgPSB7XG4gIENTU1J1bGVMaXN0OiB0cnVlLCAvLyBUT0RPOiBOb3Qgc3BlYyBjb21wbGlhbnQsIHNob3VsZCBiZSBmYWxzZS5cbiAgQ1N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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///410\n")},function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {/**\n * Copyright (c) 2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * https://raw.github.com/facebook/regenerator/master/LICENSE file. An\n * additional grant of patent rights can be found in the PATENTS file in\n * the same directory.\n */\n\n!(function(global) {\n "use strict";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === "function" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || "@@iterator";\n var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";\n var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";\n\n var inModule = typeof module === "object";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we\'re in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don\'t bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we\'re in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there\'s no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don\'t have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: "normal", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: "throw", arg: err };\n }\n }\n\n var GenStateSuspendedStart = "suspendedStart";\n var GenStateSuspendedYield = "suspendedYield";\n var GenStateExecuting = "executing";\n var GenStateCompleted = "completed";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don\'t natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = "GeneratorFunction";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n ["next", "throw", "return"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === "function" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === "GeneratorFunction"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = "GeneratorFunction";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, "__await")` to determine if the yielded value is\n // meant to be awaited.\n runtime.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === "throw") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === "object" &&\n hasOwn.call(value, "__await")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke("next", value, resolve, reject);\n }, function(err) {\n invoke("throw", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration. If the Promise is rejected, however, the\n // result for this iteration will be rejected with the same\n // reason. Note that rejections of yielded Promises are not\n // thrown back into the generator function, as is the case\n // when an awaited Promise is rejected. This difference in\n // behavior between yield and await is important, because it\n // allows the consumer to decide what to do with the yielded\n // rejection (swallow it and continue, manually .throw it back\n // into the generator, abandon iteration, whatever). With\n // await, by contrast, there is no opportunity to examine the\n // rejection reason outside the generator function, so the\n // only option is to throw it from the await expression, and\n // let the generator function handle the exception.\n result.value = unwrapped;\n resolve(result);\n }, reject);\n }\n }\n\n if (typeof global.process === "object" && global.process.domain) {\n invoke = global.process.domain.bind(invoke);\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n runtime.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error("Generator is already running");\n }\n\n if (state === GenStateCompleted) {\n if (method === "throw") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === "next") {\n // Setting context._sent for legacy support of Babel\'s\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === "throw") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === "return") {\n context.abrupt("return", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === "normal") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === "throw") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = "throw";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === "throw") {\n if (delegate.iterator.return) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = "return";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === "throw") {\n // If maybeInvokeDelegate(context) changed context.method from\n // "return" to "throw", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = "throw";\n context.arg = new TypeError(\n "The iterator does not provide a \'throw\' method");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === "throw") {\n context.method = "throw";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = "throw";\n context.arg = new TypeError("iterator result is not an object");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was "throw" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was "next", forget context.arg since it has been\n // "consumed" by the delegate iterator. If context.method was\n // "return", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== "return") {\n context.method = "next";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = "Generator";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers\' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn\'t happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return "[object Generator]";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = "normal";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: "root" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === "function") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel\'s\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = "next";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === "t" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === "throw") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = "throw";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = "next";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === "root") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle("end");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, "catchLoc");\n var hasFinally = hasOwn.call(entry, "finallyLoc");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error("try statement without catch or finally");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, "finallyLoc") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === "break" ||\n type === "continue") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = "next";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === "throw") {\n throw record.arg;\n }\n\n if (record.type === "break" ||\n record.type === "continue") {\n this.next = record.arg;\n } else if (record.type === "return") {\n this.rval = this.arg = record.arg;\n this.method = "return";\n this.next = "end";\n } else if (record.type === "normal" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n "catch": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === "throw") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error("illegal catch attempt");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === "next") {\n // Deliberately forget the last sent value so that we don\'t\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n})(\n // Among the various tricks for obtaining a reference to the global\n // object, this seems to be the most reliable technique that does not\n // use indirect eval (which violates Content Security Policy).\n typeof global === "object" ? global :\n typeof window === "object" ? window :\n typeof self === "object" ? self : this\n);\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(147)))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDExLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXBvbHlmaWxsL25vZGVfbW9kdWxlcy9yZWdlbmVyYXRvci1ydW50aW1lL3J1bnRpbWUuanM/Y2U0NSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAxNCwgRmFjZWJvb2ssIEluYy5cbiAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgQlNELXN0eWxlIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBodHRwczovL3Jhdy5naXRodWIuY29tL2ZhY2Vib29rL3JlZ2VuZXJhdG9yL21hc3Rlci9MSUNFTlNFIGZpbGUuIEFuXG4gKiBhZGRpdGlvbmFsIGdyYW50IG9mIHBhdGVudCByaWdodHMgY2FuIGJlIGZvdW5kIGluIHRoZSBQQVRFTlRTIGZpbGUgaW5cbiAqIHRoZSBzYW1lIGRpcmVjdG9yeS5cbiAqL1xuXG4hKGZ1bmN0aW9uKGdsb2JhbCkge1xuICBcInVzZSBzdHJpY3RcIjtcblxuICB2YXIgT3AgPSBPYmplY3QucHJvdG90eXBlO1xuICB2YXIgaGFzT3duID0gT3AuaGFzT3duUHJvcGVydHk7XG4gIHZhciB1bmRlZmluZWQ7IC8vIE1vcmUgY29tcHJlc3NpYmxlIHRoYW4gdm9pZCAwLlxuICB2YXIgJFN5bWJvbCA9IHR5cGVvZiBTeW1ib2wgPT09IFwiZnVuY3Rp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gfSBlbHNlIGlmIChjb250ZXh0Lm1ldGhvZCA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgIGNvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIGNvbnRleHQuYXJnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRlID0gR2VuU3RhdGVFeGVjdXRpbmc7XG5cbiAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0L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0aW9uIHZhbHVlIG9mIHRoZSBlbnRpcmUgZnVuY3Rpb24gdG9cbiAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgfSxcblxuICAgIGNvbXBsZXRlOiBmdW5jdGlvbihyZWNvcmQsIGFmdGVyTG9jKSB7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICB0aHJvdyByZWNvcmQuYXJnO1xuICAgICAgfVxuXG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgIHJlY29yZC50eXBlID09PSBcImNvbnRpbnVlXCIpIHtcbiAgICAgICAgdGhpcy5uZXh0ID0gcmVjb3JkLmFyZztcbiAgICAgIH0gZWxzZSBpZiAocmVjb3JkLnR5cGUgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgdGhpcy5ydmFsID0gdGhpcy5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgIHRoaXMubmV4dCA9IFwiZW5kXCI7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiICYmIGFmdGVyTG9jKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9LFxuXG4gICAgZmluaXNoOiBmdW5jdGlvbihmaW5hbGx5TG9jKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB0aGlzLmNvbXBsZXRlKGVudHJ5LmNvbXBsZXRpb24sIGVudHJ5LmFmdGVyTG9jKTtcbiAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBcImNhdGNoXCI6IGZ1bmN0aW9uKHRyeUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuICAgICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgICB2YXIgdGhyb3duID0gcmVjb3JkLmFyZztcbiAgICAgICAgICAgIHJlc2V0VHJ5RW50cnkoZW50cnkpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gdGhyb3duO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIC8vIFRoZSBjb250ZXh0LmNhdGNoIG1ldGhvZCBtdXN0IG9ubHkgYmUgY2FsbGVkIHdpdGggYSBsb2NhdGlvblxuICAgICAgLy8gYXJndW1lbnQgdGhhdCBjb3JyZXN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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///411\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(413);\nmodule.exports = __webpack_require__(30).RegExp.escape;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvZm4vcmVnZXhwL2VzY2FwZS5qcz81YjA5Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvY29yZS5yZWdleHAuZXNjYXBlJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5SZWdFeHAuZXNjYXBlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9mbi9yZWdleHAvZXNjYXBlLmpzXG4vLyBtb2R1bGUgaWQgPSA0MTJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///412\n")},function(module,exports,__webpack_require__){eval("// https://github.com/benjamingr/RexExp.escape\nvar $export = __webpack_require__(0);\nvar $re = __webpack_require__(414)(/[\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n\n$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9jb3JlLnJlZ2V4cC5lc2NhcGUuanM/YWY2MSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vYmVuamFtaW5nci9SZXhFeHAuZXNjYXBlXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICRyZSA9IHJlcXVpcmUoJy4vX3JlcGxhY2VyJykoL1tcXFxcXiQqKz8uKCl8W1xcXXt9XS9nLCAnXFxcXCQmJyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnUmVnRXhwJywgeyBlc2NhcGU6IGZ1bmN0aW9uIGVzY2FwZShpdCkgeyByZXR1cm4gJHJlKGl0KTsgfSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9jb3JlLnJlZ2V4cC5lc2NhcGUuanNcbi8vIG1vZHVsZSBpZCA9IDQxM1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///413\n")},function(module,exports){eval("module.exports = function (regExp, replace) {\n var replacer = replace === Object(replace) ? function (part) {\n return replace[part];\n } : replace;\n return function (it) {\n return String(it).replace(regExp, replacer);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcmVwbGFjZXIuanM/OWVhMyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChyZWdFeHAsIHJlcGxhY2UpIHtcbiAgdmFyIHJlcGxhY2VyID0gcmVwbGFjZSA9PT0gT2JqZWN0KHJlcGxhY2UpID8gZnVuY3Rpb24gKHBhcnQpIHtcbiAgICByZXR1cm4gcmVwbGFjZVtwYXJ0XTtcbiAgfSA6IHJlcGxhY2U7XG4gIHJldHVybiBmdW5jdGlvbiAoaXQpIHtcbiAgICByZXR1cm4gU3RyaW5nKGl0KS5yZXBsYWNlKHJlZ0V4cCwgcmVwbGFjZXIpO1xuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9fcmVwbGFjZXIuanNcbi8vIG1vZHVsZSBpZCA9IDQxNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///414\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _assign = __webpack_require__(96);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _logLevels = __webpack_require__(201);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _Registry = __webpack_require__(439);\n\nvar _Registry2 = _interopRequireDefault(_Registry);\n\nvar _IdentityModule = __webpack_require__(469);\n\nvar _IdentityModule2 = _interopRequireDefault(_IdentityModule);\n\nvar _IdentityManager = __webpack_require__(476);\n\nvar _IdentityManager2 = _interopRequireDefault(_IdentityManager);\n\nvar _PEP = __webpack_require__(477);\n\nvar _PEP2 = _interopRequireDefault(_PEP);\n\nvar _MessageBus = __webpack_require__(488);\n\nvar _MessageBus2 = _interopRequireDefault(_MessageBus);\n\nvar _utils = __webpack_require__(14);\n\nvar _AddressAllocation = __webpack_require__(99);\n\nvar _AddressAllocation2 = _interopRequireDefault(_AddressAllocation);\n\nvar _CryptoManager = __webpack_require__(100);\n\nvar _CryptoManager2 = _interopRequireDefault(_CryptoManager);\n\nvar _Loader = __webpack_require__(492);\n\nvar _Loader2 = _interopRequireDefault(_Loader);\n\nvar _Storage = __webpack_require__(493);\n\nvar _Descriptors = __webpack_require__(494);\n\nvar _Descriptors2 = _interopRequireDefault(_Descriptors);\n\nvar _runtimeConfiguration = __webpack_require__(144);\n\nvar _MsgBusHandlers = __webpack_require__(495);\n\nvar _MsgBusHandlers2 = _interopRequireDefault(_MsgBusHandlers);\n\nvar _runtimeUtils = __webpack_require__(140);\n\nvar _GraphConnector = __webpack_require__(496);\n\nvar _GraphConnector2 = _interopRequireDefault(_GraphConnector);\n\nvar _CoreDiscovery = __webpack_require__(498);\n\nvar _CoreDiscovery2 = _interopRequireDefault(_CoreDiscovery);\n\nvar _DataObjectsStorage = __webpack_require__(499);\n\nvar _DataObjectsStorage2 = _interopRequireDefault(_DataObjectsStorage);\n\nvar _HypertyResourcesStorage = __webpack_require__(503);\n\nvar _HypertyResourcesStorage2 = _interopRequireDefault(_HypertyResourcesStorage);\n\nvar _SyncherManager = __webpack_require__(506);\n\nvar _SyncherManager2 = _interopRequireDefault(_SyncherManager);\n\nvar _SubscriptionManager = __webpack_require__(517);\n\nvar _SubscriptionManager2 = _interopRequireDefault(_SubscriptionManager);\n\nvar _RuntimeCoreCtx = __webpack_require__(519);\n\nvar _RuntimeCoreCtx2 = _interopRequireDefault(_RuntimeCoreCtx);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n// import 'babel-polyfill';\n\nvar log = logger.getLogger('RuntimeUA');\n\n//Main dependecies\n\n\n// Log System\n\n/**\n * Runtime User Agent Interface will process all the dependecies of the core runtime;\n * @author Vitor Silva [vitor-t-silva@telecom.pt]\n * @version 0.4.0\n *\n * @property {runtimeFactory} runtimeFactory - Specific implementation for all environments;\n * @property {RuntimeCatalogue} runtimeCatalogue - Catalogue of components can be installed;\n * @property {runtimeURL} runtimeURL - This identify the core runtime, should be unique;\n * @property {IdentityModule} identityModule - Identity Module;\n * @property {PEP} policyEngine - Policy Engine Module;\n * @property {Registry} registry - Registry Module;\n * @property {MessageBus} messageBus - Message Bus is used like a router to redirect the messages from one component to other(s)\n * @property {GraphConnector} graphConnector - Graph Connector handling GUID and contacts\n * @property {CoreDiscovery} coreDiscovery - Discovery for discovery hyperties/dataObjects\n */\nvar RuntimeUA = function () {\n\n /**\n * Create a new instance of Runtime User Agent\n * @param {descriptor} runtimeDescriptor - pass all the hyperty runtime descriptor\n * @param {runtimeFactory} runtimeFactory - Specific implementation for the environment where the core runtime will run;\n * @param {domain} domainURL - specify the domain base for the runtime;\n */\n function RuntimeUA(runtimeDescriptor, runtimeFactory, domain) {\n (0, _classCallCheck3.default)(this, RuntimeUA);\n\n if (!runtimeDescriptor) throw new Error('The runtime descriptor is a needed parameter');\n if (!runtimeFactory) throw new Error('The sandbox factory is a needed parameter');\n if (!domain) throw new Error('You need the domain of runtime');\n\n // Configuration object with information related with servers\n this.runtimeConfiguration = (0, _assign2.default)({ domain: domain }, _runtimeConfiguration.runtimeConfiguration);\n this.runtimeFactory = runtimeFactory;\n\n this.log = log;\n this.logLevels = _logLevels.log;\n\n if (runtimeDescriptor.p2pHandlerStub && typeof runtimeDescriptor.p2pHandlerStub === 'string' && runtimeDescriptor.p2pHandlerStub.includes('://')) {\n this.p2p = true;\n } else {\n this.p2p = false;\n }\n\n _runtimeUtils.runtimeUtils.runtimeDescriptor = runtimeDescriptor;\n this.runtimeUtils = _runtimeUtils.runtimeUtils;\n\n this.storages = {};\n\n if (typeof runtimeFactory.createRuntimeCatalogue === 'function') {\n this.runtimeCatalogue = runtimeFactory.createRuntimeCatalogue();\n } else {\n throw new Error('Check your Runtime Factory because it needs the Runtime Catalogue implementation');\n }\n\n if (typeof runtimeFactory.persistenceManager === 'function') {\n this.persistenceManager = runtimeFactory.persistenceManager();\n } else {\n throw new Error('Check your Runtime Factory because it needs the Persistence Manager implementation');\n }\n\n if (typeof runtimeFactory.storageManager === 'function') {\n\n this.storages = (0, _Storage.storage)(runtimeFactory);\n } else {\n throw new Error('Check your Runtime Factory because it needs the Storage Manager implementation');\n }\n\n if (typeof runtimeFactory.runtimeCapabilities === 'function') {\n this.runtimeCapabilities = runtimeFactory.runtimeCapabilities(this.storages.capabilities);\n } else {\n log.info('Check your RuntimeFactory because it needs the Runtime Capabilities implementation');\n }\n }\n\n /**\n * Intialize the installation of runtime\n *\n * @access public\n * @return {Promise} this is Promise and if the installation process happened without any problems returns true otherwise the error.\n *\n * @memberOf RuntimeUA\n */\n\n\n (0, _createClass3.default)(RuntimeUA, [{\n key: 'init',\n value: function init() {\n var _this2 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this2.domain = _this2.runtimeConfiguration.domain;\n\n try {\n var getCapabilities = _this2.runtimeCapabilities.getRuntimeCapabilities();\n var getRuntimeURL = _this2.storages.runtime.get('runtime:URL');\n var getStoredDataObjects = _this2.storages.syncherManager.get('syncherManager:ObjectURLs');\n var getHypertyStorageObjects = _this2.storages.hypertyResources.get();\n var getP2PHandlerURL = _this2.storages.runtime.get('p2pHandler:URL');\n\n _promise2.default.all([getRuntimeURL, getCapabilities, getStoredDataObjects, getHypertyStorageObjects, getP2PHandlerURL]).then(function (results) {\n\n _this2.runtimeURL = results[0] ? results[0].runtimeURL : results[0];\n if (!_this2.runtimeURL) {\n _this2.runtimeURL = 'runtime://' + _this2.domain + '/' + (0, _utils.generateGUID)();\n _this2.storages.runtime.set('runtime:URL', 1, { runtimeURL: _this2.runtimeURL });\n }\n\n _this2.capabilities = results[1];\n (0, _assign2.default)(_runtimeUtils.runtimeUtils.runtimeCapabilities.constraints, results[1]);\n\n _this2._dataObjectsStorage = new _DataObjectsStorage2.default(_this2.storages.syncherManager, results[2] || {});\n\n _this2._hypertyResources = results[3] || {};\n\n _this2.p2pHandlerURL = results[4] ? results[4].p2pHandlerURL : results[4];\n if (!_this2.p2pHandlerURL) {\n _this2.p2pHandlerURL = _this2.runtimeURL + '/p2phandler/' + (0, _utils.generateGUID)();\n log.info('[RuntimeUA - init] P2PHandlerURL: ', _this2.p2pHandlerURL);\n\n _this2.storages.runtime.set('p2pHandler:URL', 1, { p2pHandlerURL: _this2.p2pHandlerURL });\n }\n\n return _this2._loadComponents();\n }).then(function (status) {\n\n _this2._hypertyResourcesStorage = new _HypertyResourcesStorage2.default(_this2.runtimeURL, _this2.messageBus, _this2.storages.hypertyResources, _this2._hypertyResources);\n\n if (_this2.p2p) {\n log.info('[RuntimeUA - init] load p2pHandler: ', status);\n return _this2._loadP2PHandler();\n } else {\n log.info('[RuntimeUA - init] P2P not supported');\n return 'P2P Not Supported';\n }\n }).then(function (result) {\n log.info('[runtime ua - init] - status: ', result);\n resolve(true);\n }, function (reason) {\n log.error('ERROR: ', reason);\n resolve(true);\n });\n } catch (e) {\n reject(e);\n }\n });\n }\n }, {\n key: '_loadP2PHandler',\n value: function _loadP2PHandler() {\n var _this3 = this;\n\n return new _promise2.default(function (resolve) {\n\n var runtimeDescriptor = _runtimeUtils.runtimeUtils.runtimeDescriptor;\n var p2pStubHandler = runtimeDescriptor.p2pHandlerStub;\n\n var p2pConfig = {\n isHandlerStub: true,\n runtimeURL: _this3.runtimeURL\n };\n\n log.log('[RuntimeUA loadP2PHandler] P2PStubHandler: ', p2pStubHandler);\n\n _this3.loader.loadStub(p2pStubHandler, p2pConfig).then(function (result) {\n\n var runtimeUAURL = _this3.runtimeURL + '/ua';\n var msg = {\n type: 'subscribe',\n from: runtimeUAURL,\n to: 'domain://msg-node.' + _this3.domain + '/sm',\n body: {\n subscribe: [result.url],\n source: _this3.runtimeURL\n }\n };\n\n _this3.messageBus.addListener(runtimeUAURL, function (msg) {\n log.log('[runtime ua - listener] - receive msg: ', msg);\n });\n\n _this3.messageBus.postMessage(msg, function (reply) {\n log.log('[runtime ua - postMessage] - reply: ', reply);\n });\n\n log.info('[runtime ua - p2p installation] - success: ', result);\n resolve(true);\n }).catch(function (reason) {\n log.info('[runtime ua - p2p installation] - fail: ', reason);\n resolve(false);\n });\n });\n }\n\n /**\n *\n * @access private\n * @return {Promise} this is Promise and returns true if all components are loaded with success or an error if someone fails.\n *\n * @memberOf RuntimeUA\n */\n\n }, {\n key: '_loadComponents',\n value: function _loadComponents() {\n var _this4 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n try {\n\n // Prepare the on instance to handle with the fallbacks and runtimeCatalogue;\n _this4.descriptorInstance = new _Descriptors2.default(_this4.runtimeURL, _this4.runtimeCatalogue, _this4.runtimeConfiguration);\n\n // Prepare the loader to load the hyperties, protostubs and idpproxy;\n _this4.loader = new _Loader2.default(_this4.runtimeURL, _this4.runtimeConfiguration, _this4.descriptorInstance);\n\n // Instantiate the identity Module\n _this4.identityModule = new _IdentityModule2.default(_this4.runtimeURL, _this4.runtimeCapabilities, _this4.storages.identity, _this4._dataObjectsStorage, _CryptoManager2.default, _this4.runtimeCatalogue);\n\n // Use the sandbox factory to create an AppSandbox;\n // In the future can be decided by policyEngine if we need\n // create a AppSandbox or not;\n var appSandbox = _this4.runtimeFactory.createAppSandbox();\n\n // Instantiate the Registry Module\n _this4.registry = new _Registry2.default(_this4.runtimeURL, appSandbox, _this4.identityModule, _this4.runtimeCatalogue, _this4.runtimeCapabilities, _this4.storages.registry, _this4.p2pHandlerURL);\n\n // Set the loader to load Hyperties, Stubs and IdpProxies\n _this4.registry.loader = _this4.loader;\n\n // Instantiate the Message Bus\n _this4.messageBus = new _MessageBus2.default(_this4.registry);\n\n // Prepare the address allocation instance;\n _this4.addressAllocation = new _AddressAllocation2.default(_this4.runtimeURL, _this4.messageBus, _this4.registry);\n\n // Instantiate the Policy Engine\n _this4.policyEngine = new _PEP2.default(new _RuntimeCoreCtx2.default(_this4.runtimeURL, _this4.identityModule, _this4.registry, _this4.storages.policy, _this4.runtimeCapabilities));\n\n // Instantiate Discovery\n _this4.coreDiscovery = new _CoreDiscovery2.default(_this4.runtimeURL, _this4.messageBus, _this4.graphConnector, _this4.runtimeFactory, _this4.registry);\n\n // Instantiate the IdentityManager\n _this4.identityManager = new _IdentityManager2.default(_this4.identityModule);\n\n // initialise the CryptoManager\n _CryptoManager2.default.init(_this4.runtimeURL, _this4.runtimeCapabilities, _this4.storages.cryptoManager, _this4._dataObjectsStorage, _this4.registry, _this4.coreDiscovery, _this4.identityModule, _this4.runtimeFactory);\n\n // Instantiate the Graph Connector\n _this4.graphConnector = true ? new _GraphConnector2.default(_this4.runtimeURL, _this4.messageBus, _this4.storageManager) : null;\n\n _this4.handlers = new _MsgBusHandlers2.default(_this4.policyEngine, _this4.identityManager, _CryptoManager2.default);\n\n _this4.messageBus.pipelineOut.handlers = [_this4.handlers.idmHandler, _this4.handlers.pepOutHandler, _this4.handlers.encryptHandler];\n _this4.messageBus.pipelineIn.handlers = [_this4.handlers.decryptHandler, _this4.handlers.pepInHandler];\n\n // Add to App Sandbox the listener;\n appSandbox.addListener('*', function (msg) {\n _this4.messageBus.postMessage(msg);\n });\n\n _CryptoManager2.default.messageBus = _this4.messageBus;\n\n // Register messageBus on Registry\n _this4.registry.messageBus = _this4.messageBus;\n\n // Policy Engine\n _this4.policyEngine.messageBus = _this4.messageBus;\n\n // Register messageBus on IDM\n _this4.identityModule.messageBus = _this4.messageBus;\n\n // Register registry on IdentityModule\n _this4.identityModule.registry = _this4.registry;\n\n // Register coreDiscovery on IdentityModule\n _this4.identityModule.coreDiscovery = _this4.coreDiscovery;\n\n // Use sandbox factory to use specific methods\n // and set the message bus to the factory\n _this4.runtimeFactory.messageBus = _this4.messageBus;\n\n // Instanciate the SyncherManager;\n _this4.syncherManager = new _SyncherManager2.default(_this4.runtimeURL, _this4.messageBus, _this4.registry, _this4.runtimeCatalogue, _this4.storages.syncherManager, null, _this4._dataObjectsStorage, _this4.identityModule);\n\n // Set into loader the needed components;\n _this4.loader.runtimeURL = _this4.runtimeURL;\n _this4.loader.messageBus = _this4.messageBus;\n _this4.loader.registry = _this4.registry;\n _this4.loader.runtimeCatalogue = _this4.runtimeCatalogue;\n _this4.loader.runtimeFactory = _this4.runtimeFactory;\n\n //Instantiate Discovery Lib for notification testing\n // this.discovery = new Discovery(\"hyperty://localhost/test\", this.runtimeURL, this.messageBus);\n // this.loadStub(\"localhost\");\n // setTimeout(() => {\n // this.discovery.discoverHypertiesDO(\"user://google.com/openidtest20@gmail.com\")\n // .then(hyperties => {\n // hyperties.forEach(hyperty =>{\n // hyperty.onLive(() => log.log(`Notification from ${hyperty.data.hypertyID} changed to live`));\n // hyperty.onDisconnected(() => log.log(`Notification from ${hyperty.data.hypertyID} changed to disconnected`));\n // });\n // });\n // }, 2000);\n\n // Instanciate the SubscriptionManager;\n _this4.subscriptionManager = new _SubscriptionManager2.default(_this4.runtimeURL, _this4.messageBus, _this4.storages.subscriptions);\n\n // this.subscriptionManager.init().then(()=>{\n // resolve(true);\n // });\n\n var prepareComponents = [];\n prepareComponents.push(_this4.subscriptionManager.init());\n prepareComponents.push(_this4.identityModule.init());\n prepareComponents.push(_CryptoManager2.default.loadSessionKeys());\n\n _promise2.default.all(prepareComponents).then(function (result) {\n if (result.length === 3) {\n resolve(true);\n } else {\n reject('[RuntimeUA._loadComponents] Error ] ', result);\n }\n }).catch(function (reason) {\n throw Error(reason);\n });\n } catch (e) {\n reject(e);\n }\n });\n }\n\n /**\n * Deploy Hyperty from Catalogue URL\n *\n * @see https://github.com/reTHINK-project/specs/tree/master/datamodel/core/address\n *\n * @param {URL.HypertyCatalogueURL} hypertyCatalogueURL - The Catalogue URL used to identify descriptors in the Catalogue.\n * @param {boolean|URL.HypertyURL} [reuseURL=false] reuseURL - reuseURL is used to reuse the hypertyURL previously registred, by default the reuse is disabled;\n * @param {URL} appURL - the app url address; // TODO: improve this description;\n * @returns {Promise} this is Promise and returns true if all components are loaded with success or an error if someone fails.\n *\n * @memberOf RuntimeUA\n */\n\n }, {\n key: 'loadHyperty',\n value: function loadHyperty(hypertyCatalogueURL) {\n var reuseURL = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var appURL = arguments[2];\n\n\n if (!hypertyCatalogueURL) throw new Error('Hyperty descriptor url parameter is needed');\n return this.loader.loadHyperty(hypertyCatalogueURL, reuseURL, appURL);\n }\n\n /**\n * Deploy Stub from Catalogue URL or domain url\n * @param {URL.URL} domain domain\n */\n\n }, {\n key: 'loadStub',\n value: function loadStub(protocolstubCatalogueURL) {\n\n if (!protocolstubCatalogueURL) throw new Error('ProtoStub descriptor url parameter is needed');\n return this.loader.loadStub(protocolstubCatalogueURL);\n }\n\n /**\n * Deploy idpProxy from Catalogue URL or domain url\n * @param {URL.URL} domain domain\n */\n\n }, {\n key: 'loadIdpProxy',\n value: function loadIdpProxy(ipdProxyCatalogueURL) {\n log.log('ipdProxyCatalogueURL', ipdProxyCatalogueURL);\n\n if (!ipdProxyCatalogueURL) throw new Error('The IDP Proxy URL is a needed parameter, could be a DOMAIN or a URL');\n return this.loader.loadIdpProxy(ipdProxyCatalogueURL);\n }\n\n /**\n * Used to close all the runtime; Unregister all hyperties;\n * @return {Promise} result of the close method, with true or false to the operation success;\n */\n\n }, {\n key: 'close',\n value: function close() {\n var _this = this;\n\n log.info('Unregister all hyperties');\n return new _promise2.default(function (resolve, reject) {\n\n _this.registry.unregisterAllHyperties().then(function (result) {\n log.info('All the hyperties are unregisted with Success:', result);\n resolve(true);\n }).catch(function (reason) {\n log.error('Failed to unregister the hyperties', reason);\n reject(false);\n });\n });\n }\n }]);\n return RuntimeUA;\n}();\n\nexports.default = RuntimeUA;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL1J1bnRpbWVVQS5qcz9iZmFlIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlx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RUE7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7Ozs7Ozs7OztBQVlBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBRUE7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUVBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///415\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(182);\n__webpack_require__(128);\n__webpack_require__(190);\n__webpack_require__(425);\n__webpack_require__(432);\n__webpack_require__(433);\nmodule.exports = __webpack_require__(13).Promise;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9wcm9taXNlLmpzPzUzOTgiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vbW9kdWxlcy9lczYub2JqZWN0LnRvLXN0cmluZycpO1xucmVxdWlyZSgnLi4vbW9kdWxlcy9lczYuc3RyaW5nLml0ZXJhdG9yJyk7XG5yZXF1aXJlKCcuLi9tb2R1bGVzL3dlYi5kb20uaXRlcmFibGUnKTtcbnJlcXVpcmUoJy4uL21vZHVsZXMvZXM2LnByb21pc2UnKTtcbnJlcXVpcmUoJy4uL21vZHVsZXMvZXM3LnByb21pc2UuZmluYWxseScpO1xucmVxdWlyZSgnLi4vbW9kdWxlcy9lczcucHJvbWlzZS50cnknKTtcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi4vbW9kdWxlcy9fY29yZScpLlByb21pc2U7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvZm4vcHJvbWlzZS5qc1xuLy8gbW9kdWxlIGlkID0gNDE2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///416\n")},function(module,exports,__webpack_require__){eval("var toInteger = __webpack_require__(129);\nvar defined = __webpack_require__(130);\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zdHJpbmctYXQuanM/ODdhZSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgdG9JbnRlZ2VyID0gcmVxdWlyZSgnLi9fdG8taW50ZWdlcicpO1xudmFyIGRlZmluZWQgPSByZXF1aXJlKCcuL19kZWZpbmVkJyk7XG4vLyB0cnV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oiIn0=\n//# sourceURL=webpack-internal:///417\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar create = __webpack_require__(133);\nvar descriptor = __webpack_require__(73);\nvar setToStringTag = __webpack_require__(95);\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(58)(IteratorPrototype, __webpack_require__(23)('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLWNyZWF0ZS5qcz9mNzg1Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBjcmVhdGUgPSByZXF1aXJlKCcuL19vYmplY3QtY3JlYXRlJyk7XG52YXIgZGVzY3JpcHRvciA9IHJlcXVpcmUoJy4vX3Byb3BlcnR5LWRlc2MnKTtcbnZhciBzZXRUb1N0cmluZ1RhZyA9IHJlcXVpcmUoJy4vX3NldC10by1zdHJpbmctdGFnJyk7XG52YXIgSXRlcmF0b3JQcm90b3R5cGUgPSB7fTtcblxuLy8gMjUuMS4yLjEuMSAlSXRlcmF0b3JQcm90b3R5cGUlW0BAaXRlcmF0b3JdKClcbnJlcXVpcmUoJy4vX2hpZGUnKShJdGVyYXRvclByb3RvdHlwZSwgcmVxdWlyZSgnLi9fd2tzJykoJ2l0ZXJhdG9yJyksIGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRoaXM7IH0pO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChDb25zdHJ1Y3RvciwgTkFNRSwgbmV4dCkge1xuICBDb25zdHJ1Y3Rvci5wcm90b3R5cGUgPSBjcmVhdGUoSXRlcmF0b3JQcm90b3R5cGUsIHsgbmV4dDogZGVzY3JpcHRvcigxLCBuZXh0KSB9KTtcbiAgc2V0VG9TdHJpbmdUYWcoQ29uc3RydWN0b3IsIE5BTUUgKyAnIEl0ZXJhdG9yJyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXItY3JlYXRlLmpzXG4vLyBtb2R1bGUgaWQgPSA0MThcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///418\n")},function(module,exports,__webpack_require__){eval("var dP = __webpack_require__(40);\nvar anObject = __webpack_require__(41);\nvar getKeys = __webpack_require__(67);\n\nmodule.exports = __webpack_require__(44) ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZHBzLmpzP2FhMmEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGRQID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuL19hbi1vYmplY3QnKTtcbnZhciBnZXRLZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpID8gT2JqZWN0LmRlZmluZVByb3BlcnRpZXMgOiBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0aWVzKE8sIFByb3BlcnRpZXMpIHtcbiAgYW5PYmplY3QoTyk7XG4gIHZhciBrZXlzID0gZ2V0S2V5cyhQcm9wZXJ0aWVzKTtcbiAgdmFyIGxlbmd0aCA9IGtleXMubGVuZ3RoO1xuICB2YXIgaSA9IDA7XG4gIHZhciBQO1xuICB3aGlsZSAobGVuZ3RoID4gaSkgZFAuZihPLCBQID0ga2V5c1tpKytdLCBQcm9wZXJ0aWVzW1BdKTtcbiAgcmV0dXJuIE87XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1kcHMuanNcbi8vIG1vZHVsZSBpZCA9IDQxOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///419\n")},function(module,exports,__webpack_require__){eval("// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(45);\nvar toLength = __webpack_require__(134);\nvar toAbsoluteIndex = __webpack_require__(421);\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDIwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hcnJheS1pbmNsdWRlcy5qcz9iYzU3Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGZhbHNlIC0+IEFycmF5I2luZGV4T2Zcbi8vIHRydWUgIC0+IEFycmF5I2luY2x1ZGVzXG52YXIgdG9JT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8taW9iamVjdCcpO1xudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi9fdG8tbGVuZ3RoJyk7XG52YXIgdG9BYnNvbHV0ZUluZGV4ID0gcmVxdWlyZSgnLi9fdG8tYWJzb2x1dGUtaW5kZXgnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKElTX0lOQ0xVREVTKSB7XG4gIHJldHVybiBmdW5jdGlvbiAoJHRoaXMsIGVsLCBmcm9tSW5kZXgpIHtcbiAgICB2YXIgTyA9IHRvSU9iamVjdCgkdGhpcyk7XG4gICAgdmFyIGxlbmd0aCA9IHRvTGVuZ3RoKE8ubGVuZ3RoKTtcbiAgICB2YXIgaW5kZXggPSB0b0Fic29sdXRlSW5kZXgoZnJvbUluZGV4LCBsZW5ndGgpO1xuICAgIHZhciB2YWx1ZTtcbiAgICAvLyBBcnJheSNpbmNsdWRlcyB1c2VzIFNhbWVWYWx1ZVplcm8gZXF1YWxpdHkgYWxnb3JpdGhtXG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXNlbGYtY29tcGFyZVxuICAgIGlmIChJU19JTkNMVURFUyAmJiBlbCAhPSBlbCkgd2hpbGUgKGxlbmd0aCA+IGluZGV4KSB7XG4gICAgICB2YWx1ZSA9IE9baW5kZXgrK107XG4gICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tc2VsZi1jb21wYXJlXG4gICAgICBpZiAodmFsdWUgIT0gdmFsdWUpIHJldHVybiB0cnVlO1xuICAgIC8vIEFycmF5I2luZGV4T2YgaWdub3JlcyBob2xlcywgQXJyYXkjaW5jbHVkZXMgLSBub3RcbiAgICB9IGVsc2UgZm9yICg7bGVuZ3RoID4gaW5kZXg7IGluZGV4KyspIGlmIChJU19JTkNMVURFUyB8fCBpbmRleCBpbiBPKSB7XG4gICAgICBpZiAoT1tpbmRleF0gPT09IGVsKSByZXR1cm4gSVNfSU5DTFVERVMgfHwgaW5kZXggfHwgMDtcbiAgICB9IHJldHVybiAhSVNfSU5DTFVERVMgJiYgLTE7XG4gIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FycmF5LWluY2x1ZGVzLmpzXG4vLyBtb2R1bGUgaWQgPSA0MjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///420\n")},function(module,exports,__webpack_require__){eval("var toInteger = __webpack_require__(129);\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDIxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1hYnNvbHV0ZS1pbmRleC5qcz83ZTQwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgbWF4ID0gTWF0aC5tYXg7XG52YXIgbWluID0gTWF0aC5taW47XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpbmRleCwgbGVuZ3RoKSB7XG4gIGluZGV4ID0gdG9JbnRlZ2VyKGluZGV4KTtcbiAgcmV0dXJuIGluZGV4IDwgMCA/IG1heChpbmRleCArIGxlbmd0aCwgMCkgOiBtaW4oaW5kZXgsIGxlbmd0aCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWFic29sdXRlLWluZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSA0MjFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///421\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar addToUnscopables = __webpack_require__(423);\nvar step = __webpack_require__(424);\nvar Iterators = __webpack_require__(74);\nvar toIObject = __webpack_require__(45);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(183)(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDIyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5hcnJheS5pdGVyYXRvci5qcz9jNDY5Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBhZGRUb1Vuc2NvcGFibGVzID0gcmVxdWlyZSgnLi9fYWRkLXRvLXVuc2NvcGFibGVzJyk7XG52YXIgc3RlcCA9IHJlcXVpcmUoJy4vX2l0ZXItc3RlcCcpO1xudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4vX2l0ZXJhdG9ycycpO1xudmFyIHRvSU9iamVjdCA9IHJlcXVpcmUoJy4vX3RvLWlvYmplY3QnKTtcblxuLy8gMjIuMS4zLjQgQXJyYXkucHJvdG90eXBlLmVudHJpZXMoKVxuLy8gMjIuMS4zLjEzIEFycmF5LnByb3RvdHlwZS5rZXlzKClcbi8vIDIyLjEuMy4yOSBBcnJheS5wcm90b3R5cGUudmFsdWVzKClcbi8vIDIyLjEuMy4zMCBBcnJheS5wcm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blxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczYuYXJyYXkuaXRlcmF0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDQyMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///422\n")},function(module,exports){eval("module.exports = function () { /* empty */ };\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDIzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hZGQtdG8tdW5zY29wYWJsZXMuanM/ZTI2NyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uICgpIHsgLyogZW1wdHkgKi8gfTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hZGQtdG8tdW5zY29wYWJsZXMuanNcbi8vIG1vZHVsZSBpZCA9IDQyM1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///423\n")},function(module,exports){eval("module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDI0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLXN0ZXAuanM/MTA2NiJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChkb25lLCB2YWx1ZSkge1xuICByZXR1cm4geyB2YWx1ZTogdmFsdWUsIGRvbmU6ICEhZG9uZSB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLXN0ZXAuanNcbi8vIG1vZHVsZSBpZCA9IDQyNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///424\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar LIBRARY = __webpack_require__(92);\nvar global = __webpack_require__(22);\nvar ctx = __webpack_require__(65);\nvar classof = __webpack_require__(191);\nvar $export = __webpack_require__(21);\nvar isObject = __webpack_require__(36);\nvar aFunction = __webpack_require__(93);\nvar anInstance = __webpack_require__(426);\nvar forOf = __webpack_require__(427);\nvar speciesConstructor = __webpack_require__(195);\nvar task = __webpack_require__(196).set;\nvar microtask = __webpack_require__(429)();\nvar newPromiseCapabilityModule = __webpack_require__(138);\nvar perform = __webpack_require__(197);\nvar promiseResolve = __webpack_require__(198);\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value);\n if (domain) domain.exit();\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = __webpack_require__(430)($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\n__webpack_require__(95)($Promise, PROMISE);\n__webpack_require__(431)(PROMISE);\nWrapper = __webpack_require__(13)[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(199)(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDI1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5wcm9taXNlLmpzPzA5N2MiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIExJQlJBUlkgPSByZXF1aXJlKCcuL19saWJyYXJ5Jyk7XG52YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgY3R4ID0gcmVxdWlyZSgnLi9fY3R4Jyk7XG52YXIgY2xhc3NvZiA9IHJlcXVpcmUoJy4vX2NsYXNzb2YnKTtcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuL19hLWZ1bmN0aW9uJyk7XG52YXIgYW5JbnN0YW5jZSA9IHJlcXVpcmUoJy4vX2FuLWluc3RhbmNlJ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IChyZWFjdGlvbikge1xuICAgICAgdmFyIGhhbmRsZXIgPSBvayA/IHJlYWN0aW9uLm9rIDogcmVhY3Rpb24uZmFpbDtcbiAgICAgIHZhciByZXNvbHZlID0gcmVhY3Rpb24ucmVzb2x2ZTtcbiAgICAgIHZhciByZWplY3QgPSByZWFjdGlvbi5yZWplY3Q7XG4gICAgICB2YXIgZG9tYWluID0gcmVhY3Rpb24uZG9tYWluO1xuICAgICAgdmFyIHJlc3VsdCwgdGhlbjtcbiAgICAgIHRyeSB7XG4gICAgICAgIGlmIChoYW5kbGVyKSB7XG4gICAgICAgICAgaWYgKCFvaykge1xuICAgICAgICAgICAgaWYgKHByb21pc2UuX2ggPT0gMikgb25IYW5kbGVVbmhhbmRsZWQocHJvbWlzZSk7XG4gICAgICAgICAgICBwcm9taXNlLl9oID0gMTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGhhbmRsZXIgPT09IHRydWUpIHJlc3VsdCA9IHZhbHVlO1xuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaWYgKGRvbWFpbikgZG9tYWluLmVudGVyKCk7XG4gICAgICAgICAgICByZXN1bHQgPSBoYW5kbGVyKHZhbHVlKTtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5leGl0KCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyZXN1bHQgPT09IHJlYWN0aW9uLnByb21pc2UpIHtcbiAgICAgICAgICAgIHJlamVjdChUeXBlRXJyb3IoJ1Byb21pc2UtY2hhaW4gY3ljbGUnKSk7XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGVuID0gaXNUaGVuYWJsZShyZXN1bHQpKSB7XG4gICAgICAgICAgICB0aGVuLmNhbGwocmVzdWx0LCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH0gZWxzZSByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH0gZWxzZSByZWplY3QodmFsdWUpO1xuICAgICAgfSBjYXRjaCAoZSkge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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///425\n")},function(module,exports){eval("module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDI2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hbi1pbnN0YW5jZS5qcz9kOGFjIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCBDb25zdHJ1Y3RvciwgbmFtZSwgZm9yYmlkZGVuRmllbGQpIHtcbiAgaWYgKCEoaXQgaW5zdGFuY2VvZiBDb25zdHJ1Y3RvcikgfHwgKGZvcmJpZGRlbkZpZWxkICE9PSB1bmRlZmluZWQgJiYgZm9yYmlkZGVuRmllbGQgaW4gaXQpKSB7XG4gICAgdGhyb3cgVHlwZUVycm9yKG5hbWUgKyAnOiBpbmNvcnJlY3QgaW52b2NhdGlvbiEnKTtcbiAgfSByZXR1cm4gaXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FuLWluc3RhbmNlLmpzXG4vLyBtb2R1bGUgaWQgPSA0MjZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///426\n")},function(module,exports,__webpack_require__){eval("var ctx = __webpack_require__(65);\nvar call = __webpack_require__(192);\nvar isArrayIter = __webpack_require__(193);\nvar anObject = __webpack_require__(41);\nvar toLength = __webpack_require__(134);\nvar getIterFn = __webpack_require__(194);\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDI3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19mb3Itb2YuanM/MzU2YiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY3R4ID0gcmVxdWlyZSgnLi9fY3R4Jyk7XG52YXIgY2FsbCA9IHJlcXVpcmUoJy4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SA6IGYoaXRlcmFibGVbaW5kZXhdKTtcbiAgICBpZiAocmVzdWx0ID09PSBCUkVBSyB8fCByZXN1bHQgPT09IFJFVFVSTikgcmV0dXJuIHJlc3VsdDtcbiAgfSBlbHNlIGZvciAoaXRlcmF0b3IgPSBpdGVyRm4uY2FsbChpdGVyYWJsZSk7ICEoc3RlcCA9IGl0ZXJhdG9yLm5leHQoKSkuZG9uZTspIHtcbiAgICByZXN1bHQgPSBjYWxsKGl0ZXJhdG9yLCBmLCBzdGVwLnZhbHVlLCBlbnRyaWVzKTtcbiAgICBpZiAocmVzdWx0ID09PSBCUkVBSyB8fCByZXN1bHQgPT09IFJFVFVSTikgcmV0dXJuIHJlc3VsdDtcbiAgfVxufTtcbmV4cG9ydHMuQlJFQUsgPSBCUkVBSztcbmV4cG9ydHMuUkVUVVJOID0gUkVUVVJOO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2Zvci1vZi5qc1xuLy8gbW9kdWxlIGlkID0gNDI3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///427\n")},function(module,exports){eval("// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDI4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pbnZva2UuanM/OTI3YiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBmYXN0IGFwcGx5LCBodHRwOi8vanNwZXJmLmxua2l0LmNvbS9mYXN0LWFwcGx5LzVcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGZuLCBhcmdzLCB0aGF0KSB7XG4gIHZhciB1biA9IHRoYXQgPT09IHVuZGVmaW5lZDtcbiAgc3dpdGNoIChhcmdzLmxlbmd0aCkge1xuICAgIGNhc2UgMDogcmV0dXJuIHVuID8gZm4oKVxuICAgICAgICAgICAgICAgICAgICAgIDogZm4uY2FsbCh0aGF0KTtcbiAgICBjYXNlIDE6IHJldHVybiB1biA/IGZuKGFyZ3NbMF0pXG4gICAgICAgICAgICAgICAgICAgICAgOiBmbi5jYWxsKHRoYXQsIGFyZ3NbMF0pO1xuICAgIGNhc2UgMjogcmV0dXJuIHVuID8gZm4oYXJnc1swXSwgYXJnc1sxXSlcbiAgICAgICAgICAgICAgICAgICAgICA6IGZuLmNhbGwodGhhdCwgYXJnc1swXSwgYXJnc1sxXSk7XG4gICAgY2FzZSAzOiByZXR1cm4gdW4gPyBmbihhcmdzWzBdLCBhcmdzWzFdLCBhcmdzWzJdKVxuICAgICAgICAgICAgICAgICAgICAgIDogZm4uY2FsbCh0aGF0LCBhcmdzWzBdLCBhcmdzWzFdLCBhcmdzWzJdKTtcbiAgICBjYXNlIDQ6IHJldHVybiB1biA/IGZuKGFyZ3NbMF0sIGFyZ3NbMV0sIGFyZ3NbMl0sIGFyZ3NbM10pXG4gICAgICAgICAgICAgICAgICAgICAgOiBmbi5jYWxsKHRoYXQsIGFyZ3NbMF0sIGFyZ3NbMV0sIGFyZ3NbMl0sIGFyZ3NbM10pO1xuICB9IHJldHVybiBmbi5hcHBseSh0aGF0LCBhcmdzKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faW52b2tlLmpzXG4vLyBtb2R1bGUgaWQgPSA0Mjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///428\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(22);\nvar macrotask = __webpack_require__(196).set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = __webpack_require__(75)(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n var promise = Promise.resolve();\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDI5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19taWNyb3Rhc2suanM/ZjM2MyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgbWFjcm90YXNrID0gcmVxdWlyZSgnLi9fdGFzaycpLnNldDtcbnZhciBPYnNlcnZlciA9IGdsb2JhbC5NdXRhdGlvbk9ic2VydmVyIHx8IGdsb2JhbC5XZWJLaXRNdXRhdGlvbk9ic2VydmVyO1xudmFyIHByb2Nlc3MgPSBnbG9iYWwucHJvY2VzcztcbnZhciBQcm9taXNlID0gZ2xvYmFsLlByb21pc2U7XG52YXIgaXNOb2RlID0gcmVxdWlyZSgnLi9fY29mJykocHJvY2VzcykgPT0gJ3Byb2Nlc3MnO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uICgpIHtcbiAgdmFyIGhlYWQsIGxhc3QsIG5vdGlmeTtcblxuICB2YXIgZmx1c2ggPSBmdW5jdGlvbiAoKSB7XG4gICAgdmFyIHBhcmVudCwgZm47XG4gICAgaWYgKGlzTm9kZSAmJiA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vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fbWljcm90YXNrLmpzXG4vLyBtb2R1bGUgaWQgPSA0Mjlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///429\n")},function(module,exports,__webpack_require__){eval("var hide = __webpack_require__(58);\nmodule.exports = function (target, src, safe) {\n for (var key in src) {\n if (safe && target[key]) target[key] = src[key];\n else hide(target, key, src[key]);\n } return target;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19yZWRlZmluZS1hbGwuanM/YzQ3ZiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgaGlkZSA9IHJlcXVpcmUoJy4vX2hpZGUnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKHRhcmdldCwgc3JjLCBzYWZlKSB7XG4gIGZvciAodmFyIGtleSBpbiBzcmMpIHtcbiAgICBpZiAoc2FmZSAmJiB0YXJnZXRba2V5XSkgdGFyZ2V0W2tleV0gPSBzcmNba2V5XTtcbiAgICBlbHNlIGhpZGUodGFyZ2V0LCBrZXksIHNyY1trZXldKTtcbiAgfSByZXR1cm4gdGFyZ2V0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19yZWRlZmluZS1hbGwuanNcbi8vIG1vZHVsZSBpZCA9IDQzMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///430\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar global = __webpack_require__(22);\nvar core = __webpack_require__(13);\nvar dP = __webpack_require__(40);\nvar DESCRIPTORS = __webpack_require__(44);\nvar SPECIES = __webpack_require__(23)('species');\n\nmodule.exports = function (KEY) {\n var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zZXQtc3BlY2llcy5qcz82ZDFhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBjb3JlID0gcmVxdWlyZSgnLi9fY29yZScpO1xudmFyIGRQID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJyk7XG52YXIgREVTQ1JJUFRPUlMgPSByZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpO1xudmFyIFNQRUNJRVMgPSByZXF1aXJlKCcuL193a3MnKSgnc3BlY2llcycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChLRVkpIHtcbiAgdmFyIEMgPSB0eXBlb2YgY29yZVtLRVldID09ICdmdW5jdGlvbicgPyBjb3JlW0tFWV0gOiBnbG9iYWxbS0VZXTtcbiAgaWYgKERFU0NSSVBUT1JTICYmIEMgJiYgIUNbU1BFQ0lFU10pIGRQLmYoQywgU1BFQ0lFUywge1xuICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRoaXM7IH1cbiAgfSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NldC1zcGVjaWVzLmpzXG4vLyBtb2R1bGUgaWQgPSA0MzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///431\n")},function(module,exports,__webpack_require__){"use strict";eval("// https://github.com/tc39/proposal-promise-finally\n\nvar $export = __webpack_require__(21);\nvar core = __webpack_require__(13);\nvar global = __webpack_require__(22);\nvar speciesConstructor = __webpack_require__(195);\nvar promiseResolve = __webpack_require__(198);\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5wcm9taXNlLmZpbmFsbHkuanM/MTJhMCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9wcm9wb3NhbC1wcm9taXNlLWZpbmFsbHlcbid1c2Ugc3RyaWN0JztcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgY29yZSA9IHJlcXVpcmUoJy4vX2NvcmUnKTtcbnZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iYWwnKTtcbnZhciBzcGVjaWVzQ29uc3RydWN0b3IgPSByZXF1aXJlKCcuL19zcGVjaWVzLWNvbnN0cnVjdG9yJyk7XG52YXIgcHJvbWlzZVJlc29sdmUgPSByZXF1aXJlKCcuL19wcm9taXNlLXJlc29sdmUnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LlIsICdQcm9taXNlJywgeyAnZmluYWxseSc6IGZ1bmN0aW9uIChvbkZpbmFsbHkpIHtcbiAgdmFyIEMgPSBzcGVjaWVzQ29uc3RydWN0b3IodGhpcywgY29yZS5Qcm9taXNlIHx8IGdsb2JhbC5Qcm9taXNlKTtcbiAgdmFyIGlzRnVuY3Rpb24gPSB0eXBlb2Ygb25GaW5hbGx5ID09ICdmdW5jdGlvbic7XG4gIHJldHVybiB0aGlzLnRoZW4oXG4gICAgaXNGdW5jdGlvbiA/IGZ1bmN0aW9uICh4KSB7XG4gICAgICByZXR1cm4gcHJvbWlzZVJlc29sdmUoQywgb25GaW5hbGx5KCkpLnRoZW4oZnVuY3Rpb24gKCkgeyByZXR1cm4geDsgfSk7XG4gICAgfSA6IG9uRmluYWxseSxcbiAgICBpc0Z1bmN0aW9uID8gZnVuY3Rpb24gKGUpIHtcbiAgICAgIHJldHVybiBwcm9taXNlUmVzb2x2ZShDLCBvbkZpbmFsbHkoKSkudGhlbihmdW5jdGlvbiAoKSB7IHRocm93IGU7IH0pO1xuICAgIH0gOiBvbkZpbmFsbHlcbiAgKTtcbn0gfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczcucHJvbWlzZS5maW5hbGx5LmpzXG4vLyBtb2R1bGUgaWQgPSA0MzJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///432\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// https://github.com/tc39/proposal-promise-try\nvar $export = __webpack_require__(21);\nvar newPromiseCapability = __webpack_require__(138);\nvar perform = __webpack_require__(197);\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapability.f(this);\n var result = perform(callbackfn);\n (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n return promiseCapability.promise;\n} });\n//# sour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gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///433\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(435);\nmodule.exports = __webpack_require__(13).Object.assign;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDM0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvYXNzaWduLmpzPzU3N2IiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmFzc2lnbicpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0LmFzc2lnbjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvYXNzaWduLmpzXG4vLyBtb2R1bGUgaWQgPSA0MzRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///434\n")},function(module,exports,__webpack_require__){eval("// 19.1.3.1 Object.assign(target, source)\nvar $export = __webpack_require__(21);\n\n$export($export.S + $export.F, 'Object', { assign: __webpack_require__(436) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDM1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuYXNzaWduLmpzPzQ3OGMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4zLjEgT2JqZWN0LmFzc2lnbih0YXJnZXQsIHNvdXJjZSlcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG5cbiRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GLCAnT2JqZWN0JywgeyBhc3NpZ246IHJlcXVpcmUoJy4vX29iamVjdC1hc3NpZ24nKSB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuYXNzaWduLmpzXG4vLyBtb2R1bGUgaWQgPSA0MzVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///435\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = __webpack_require__(67);\nvar gOPS = __webpack_require__(139);\nvar pIE = __webpack_require__(77);\nvar toObject = __webpack_require__(76);\nvar IObject = __webpack_require__(187);\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || __webpack_require__(66)(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDM2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtYXNzaWduLmpzPzRlOGQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuLy8gMTkuMS4yLjEgT2JqZWN0LmFzc2lnbih0YXJnZXQsIHNvdXJjZSwgLi4uKVxudmFyIGdldEtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cycpO1xudmFyIGdPUFMgPSByZXF1aXJlKCcuL19vYmplY3QtZ29wcycpO1xudmFyIHBJRSA9IHJlcXVpcmUoJy4vX29iamVjdC1waWUnKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIElPYmplY3QgPSByZXF1aXJlKCcuL19pb2JqZWN0Jyk7XG52YXIgJGFzc2lnbiA9IE9iamVjdC5hc3NpZ247XG5cbi8vIHNob3VsZCB3b3JrIHdpdGggc3ltYm9scyBhbmQgc2hvdWxkIGhhdmUgZGV0ZXJtaW5pc3RpYyBwcm9wZXJ0eSBvcmRlciAoVjggYnVnKVxubW9kdWxlLmV4cG9ydHMgPSAhJGFzc2lnbiB8fCByZXF1aXJlKCcuL19mYWlscycpKGZ1bmN0aW9uICgpIHtcbiAgdmFyIEEgPSB7fTtcbiAgdmFyIEIgPSB7fTtcbiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXVuZGVmXG4gIHZhciBTID0gU3lt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kID0gNDM2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///436\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(438);\nvar $Object = __webpack_require__(13).Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDM3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvZGVmaW5lLXByb3BlcnR5LmpzP2Y1YjAiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmRlZmluZS1wcm9wZXJ0eScpO1xudmFyICRPYmplY3QgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0O1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0eShpdCwga2V5LCBkZXNjKSB7XG4gIHJldHVybiAkT2JqZWN0LmRlZmluZVByb3BlcnR5KGl0LCBrZXksIGRlc2MpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvZGVmaW5lLXByb3BlcnR5LmpzXG4vLyBtb2R1bGUgaWQgPSA0Mzdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///437\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(21);\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !__webpack_require__(44), 'Object', { defineProperty: __webpack_require__(40).f });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDM4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuZGVmaW5lLXByb3BlcnR5LmpzPzk4MjkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbi8vIDE5LjEuMi40IC8gMTUuMi4zLjYgT2JqZWN0LmRlZmluZVByb3BlcnR5KE8sIFAsIEF0dHJpYnV0ZXMpXG4kZXhwb3J0KCRleHBvcnQuUyArICRleHBvcnQuRiAqICFyZXF1aXJlKCcuL19kZXNjcmlwdG9ycycpLCAnT2JqZWN0JywgeyBkZWZpbmVQcm9wZXJ0eTogcmVxdWlyZSgnLi9fb2JqZWN0LWRwJykuZiB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuZGVmaW5lLXByb3BlcnR5LmpzXG4vLyBtb2R1bGUgaWQgPSA0Mzhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///438\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _runtimeUtils = __webpack_require__(140);\n\nvar _Sandbox = __webpack_require__(442);\n\nvar _AddressAllocation = __webpack_require__(99);\n\nvar _AddressAllocation2 = _interopRequireDefault(_AddressAllocation);\n\nvar _HypertyInstance = __webpack_require__(465);\n\nvar _HypertyInstance2 = _interopRequireDefault(_HypertyInstance);\n\nvar _P2PConnectionResolve = __webpack_require__(467);\n\nvar _P2PConnectionResolve2 = _interopRequireDefault(_P2PConnectionResolve);\n\nvar _utils = __webpack_require__(14);\n\n__webpack_require__(468);\n\nvar _Utils = __webpack_require__(205);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('Registry'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log System\n\n\n// import DiscoveryServiceFramework from './DiscoveryServiceFramework';\n\nvar STATUS = { CREATED: 'created', LIVE: 'live', DEPLOYING: 'deploying', DEPLOYED: 'deployed', PROGRESS: 'in-progress', DISCONNECTED: 'disconnected', FAILED: 'deployment-failed', DEAD: 'dead' };\n\n/*import IdentityManager from './IdentityManager';\nimport Discovery from './Discovery';*/\n\n/**\n* Runtime Registry Interface\n*/\n\nvar Registry = function () {\n\n /**\n * To initialise the Runtime Registry with the RuntimeURL that will be the basis to derive the internal runtime addresses when allocating addresses to internal runtime component. In addition, the Registry domain back-end to be used to remotely register Runtime components, is also passed as input parameter.\n * @param {MessageBus} msgbus msgbus\n * @param {HypertyRuntimeURL} runtimeURL runtimeURL\n * @param {AppSandbox} appSandbox appSandbox\n * @param {runtimeCatalogue} runtimeCatalogue runtimeCatalogue\n * @param {DomainURL} remoteRegistry remoteRegistry\n * @param {storageManager} storageManager\n */\n function Registry(runtimeURL, appSandbox, identityModule, runtimeCatalogue, runtimeCapabilities, storageManager, p2pHandlerURL, remoteRegistry) {\n (0, _classCallCheck3.default)(this, Registry);\n\n\n // how some functions receive the parameters for example:\n // new Registry('hyperty-runtime://sp1/123', appSandbox, idModule, remoteRegistry);\n // registry.registerStub(sandbox, 'sp1');\n // registry.registerHyperty(sandBox, 'hyperty-runtime://sp1/123');\n // registry.resolve('hyperty-runtime://sp1/123');\n\n if (!runtimeURL) throw new Error('runtimeURL is missing.');\n if (!storageManager) throw new Error('storageManager is missing.');\n\n /*if (!remoteRegistry) throw new Error('remoteRegistry is missing');*/\n\n var _this = this;\n\n _this.registryURL = runtimeURL + '/registry/';\n _this.appSandbox = appSandbox;\n _this.runtimeURL = runtimeURL;\n _this.p2pHandlerURL = p2pHandlerURL;\n _this.runtimeCatalogue = runtimeCatalogue;\n _this.remoteRegistry = remoteRegistry;\n _this.idModule = identityModule;\n _this.storageManager = storageManager;\n _this.runtimeCapabilities = runtimeCapabilities;\n _this.identifier = (0, _utils.generateGUID)();\n _this.registrationRetries = 5; // number of attempts to register Hyperties and DataObjects when errors occurs\n\n // the expires in 3600, represents 1 hour\n //the expires is in seconds, unit of measure received by the domain registry\n _this.expiresTime = 3600;\n\n _this.hypertiesListToRemove = {};\n _this.hypertiesList = [];\n _this.remoteHypertyList = [];\n _this.remoteDataObjectList = [];\n _this.idpLegacyProxyList = {};\n\n _this.watchingYou = new _Utils.WatchingYou();\n _this.p2pHandlerStub = {};\n _this.p2pRequesterStub = _this.watchingYou.watch('p2pRequesterStub', {}, true);\n _this.p2pConnectionList = _this.watchingYou.watch('p2pConnectionList', {}, true);\n _this.p2pHandlerAssociation = {};\n\n _this.protostubsList = _this.watchingYou.watch('protostubsList', {}, true);\n _this.idpProxyList = _this.watchingYou.watch('idpProxyList', {}, true);\n _this.dataObjectList = {};\n _this.subscribedDataObjectList = {};\n _this.sandboxesList = { sandbox: {}, appSandbox: {} };\n _this.pepList = {};\n _this.registries = {};\n\n _this._domain = (0, _utils.divideURL)(_this.registryURL).domain;\n _this.sandboxesList.appSandbox[runtimeURL] = appSandbox;\n var p2pConnectionResolve = new _P2PConnectionResolve2.default(_this);\n\n _this._p2pConnectionResolve = p2pConnectionResolve;\n }\n\n (0, _createClass3.default)(Registry, [{\n key: '_getIdentityAssociated',\n value: function _getIdentityAssociated(type, hypertyURL) {\n var _this = this;\n\n for (var hyperty in _this.hypertiesList) {\n var value = _this.hypertiesList[hyperty];\n\n if (value._hypertyURL === hypertyURL) {\n switch (type) {\n case 'username':\n return value._user.username;\n case 'cn':\n return value._user.cn;\n case 'locale':\n return value._user.locale;\n case 'avatar':\n return value._user.avatar;\n case 'userURL':\n return value._user.userURL;\n case '.':\n return value._user;\n default:\n return '';\n }\n }\n }\n return '';\n }\n\n /**\n * This function is used to return the sandbox instance where the Application is executing. It is assumed there is just one App per Runtime instance.\n */\n\n }, {\n key: 'getAppSandbox',\n value: function getAppSandbox() {\n var _this = this;\n return _this.appSandbox;\n }\n\n /**\n * This function returns the user associated to the hyperty URL\n * @param {String} hypertyURL hyperty URL\n * @return {String} userURL user URL\n */\n\n }, {\n key: 'getHypertyOwner',\n value: function getHypertyOwner(hypertyURL) {\n\n var _this = this;\n var userURL = void 0;\n\n for (var index in _this.hypertiesList) {\n var hyperty = _this.hypertiesList[index];\n\n if (hyperty.hypertyURL === hypertyURL) {\n userURL = hyperty.user.userURL;\n }\n }\n return userURL;\n }\n\n /**\n * returns the hyperty Name from a given url. This url could be from a dataObject or hyperty\n * @param {String} url hyperty or dataObject URL\n * @return {String} hypertyName hyperty Name\n */\n\n }, {\n key: 'getHypertyName',\n value: function getHypertyName(url) {\n var _this = this;\n\n var isHypertyURL = (0, _utils.divideURL)(url).type === 'hyperty';\n\n //value to be returned in the end\n var hypertyName = void 0;\n\n //if is not an hyperty, check if is a dataObject and obtain his reporter\n var hypertyURL = isHypertyURL ? url : _this.getReporterURLSynchonous(url);\n\n for (var index in _this.hypertiesList) {\n var hyperty = _this.hypertiesList[index];\n if (hyperty.hypertyURL === hypertyURL) {\n hypertyName = hyperty.objectName;\n break;\n }\n }\n return hypertyName;\n }\n\n /**\n * function to return the reporterURL associated with the dataobject URL\n * @param {String} dataObjectURL dataObjectURL\n * @return {String} reporterURL reporterURL\n */\n\n }, {\n key: 'getReporterURL',\n value: function getReporterURL(dataObjectURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var dataObject = _this.dataObjectList[dataObjectURL];\n\n if (dataObject) {\n resolve(dataObject.reporter);\n } else {\n reject('No reporter was found');\n }\n });\n }\n\n /**\n * function to return the reporterURL associated with the dataobject URL. no promise returned\n * @param {String} dataObjectURL dataObjectURL\n * @return {String} reporterURL reporterURL\n */\n\n }, {\n key: 'getReporterURLSynchonous',\n value: function getReporterURLSynchonous(dataObjectURL) {\n var _this = this;\n\n var dataObject = _this.dataObjectList[dataObjectURL];\n\n return dataObject ? dataObject.reporter : undefined;\n }\n\n /**\n * returns the hyperty URL that subscribed the dataObject\n * @param {String} url url format\n * @return {String} Hyperty URL subscribed to the URL\n */\n\n }, {\n key: 'getDataObjectSubscriberHyperty',\n value: function getDataObjectSubscriberHyperty(url) {\n var _this = this;\n\n return _this.subscribedDataObjectList[url];\n }\n\n /**\n * register a desired dataObject to subscribe\n * @param {String} dataObjectURL dataObject URL\n */\n\n }, {\n key: 'registerSubscribedDataObject',\n value: function registerSubscribedDataObject(dataObjectURL, hypertyURL) {\n var _this = this;\n if (_this.subscribedDataObjectList[dataObjectURL] === undefined) {\n _this.subscribedDataObjectList[dataObjectURL] = hypertyURL;\n }\n }\n\n /**\n * Function to return the list of pre authorised users received in the creation of a data object\n * @param {String} dataObjectURL dataObjectURL\n * @return {Array} preAuth List of pre authorised users\n */\n\n }, {\n key: 'getPreAuthSubscribers',\n value: function getPreAuthSubscribers(dataObjectURL) {\n var _this = this;\n var dataObject = _this.dataObjectList[dataObjectURL];\n var preAuth = [];\n\n if (dataObject) {\n preAuth = dataObject.authorise;\n }\n return preAuth;\n }\n\n /**\n * send requests to unregister all hyperties registered in domain registry\n * @return {Promise} return a promise if the result of unregistration all hyperties\n */\n\n }, {\n key: 'unregisterAllHyperties',\n value: function unregisterAllHyperties() {\n var _this = this;\n\n var unregisterResults = [];\n\n return new _promise2.default(function (resolve, reject) {\n\n for (var index in _this.hypertiesList) {\n var hyperty = _this.hypertiesList[index];\n var result = _this.unregisterHypertyInstance(hyperty.hypertyURL);\n unregisterResults.push(result);\n }\n\n _promise2.default.all(unregisterResults).then(function () {\n\n resolve('successfully unregistered all hyperties');\n }, function (error) {\n reject(error);\n });\n });\n }\n\n /**\n * function to unregister an hypertyInstance in the Domain Registry\n * @param {String} hypertyInstance HypertyInsntance url\n *\n */\n\n }, {\n key: 'unregisterHypertyInstance',\n value: function unregisterHypertyInstance(hypertyInstance) {\n //TODO working but the user\n var _this = this;\n\n var closeMsg = { type: 'execute', from: _this.registryURL,\n to: hypertyInstance,\n body: { method: 'close' } };\n\n // Send message to hyperty to close\n _this._messageBus.postMessage(closeMsg, function (reply) {\n log.log('[Registry.unregisterHypertyInstance] Close Reply', reply);\n\n var message = { type: 'update', from: _this.registryURL,\n to: 'domain://registry.' + _this._domain,\n body: { resource: '/hyperty/' + hypertyInstance, value: 'disconnected', attribute: 'status' } };\n\n _this._messageBus.postMessage(message, function (reply) {\n log.log('[Registry] unregister hyperty Reply', reply);\n });\n });\n }\n\n /**\n * function to unregister an hypertyInstance in the Domain Registry\n * @param {String} hypertyInstance HypertyInsntance url\n *\n */\n\n }, {\n key: 'unregisterDataObject',\n value: function unregisterDataObject(url) {\n var _this = this;\n\n var message = { type: 'update', from: _this.registryURL,\n to: 'domain://registry.' + _this._domain,\n body: {\n resource: url,\n value: {\n status: 'disconnected'\n }\n } };\n\n _this._messageBus.postMessage(message, function (reply) {\n log.log('[Registry] unregister dataObject Reply', reply);\n });\n }\n\n /**\n * function to delete an dataObjectInstance in the Domain Registry\n * @param {String} name DataObjectName\n */\n\n }, {\n key: 'deleteDataObjectInstance',\n value: function deleteDataObjectInstance(name) {\n var _this = this;\n\n var message = { type: 'delete', from: _this.registryURL,\n to: 'domain://registry.' + _this._domain,\n body: { value: { name: name } } };\n\n _this._messageBus.postMessage(message, function (reply) {\n log.log('[Registry] unregister dataObject Reply', reply);\n });\n }\n\n /**\n * Function to update an Hyperty\n */\n\n }, {\n key: 'updateHypertyInstance',\n value: function updateHypertyInstance(resource, value) {\n var _this = this;\n\n var message = { type: 'UPDATE', from: _this.registryURL,\n to: 'domain://registry.' + _this._domain,\n body: { resource: resource, value: value } };\n\n _this._messageBus.post.postMessage(message, function (reply) {\n // log.log('[Registry] Updated hyperty reply', reply);\n });\n }\n\n /**\n * register a new subscriber in the dataObject registered\n * @param {String} dataObjectURL dataObject URL\n * @param {String} subscriberURL subscriber URL\n */\n\n }, {\n key: 'registerSubscriber',\n value: function registerSubscriber(dataObjectURL, subscriberURL) {\n var _this = this;\n var dataObject = _this.dataObjectList[dataObjectURL];\n\n if (dataObject) {\n\n if (!dataObject.subscribers) dataObject.subscribers = [];\n\n dataObject.subscribers.push(subscriberURL);\n _this.dataObjectList[dataObjectURL] = dataObject;\n }\n }\n\n /**\n * get the subscribers registered within a dataObject\n * @param {String} dataObjectURL dataObject URL\n * @param {Array} Substribers List\n */\n\n }, {\n key: 'getDataObjectSubscribers',\n value: function getDataObjectSubscribers(dataObjectURL) {\n var _this = this;\n var dataObject = _this.dataObjectList[dataObjectURL];\n\n if (dataObject) {\n return dataObject.subscribers;\n } else {\n throw 'No dataObject was found';\n }\n }\n\n /**\n * To register a new Data Object in the runtime which returns the dataObjectURL allocated to the new Data Object.\n * @param {String} identifier identifier\n * @param {String} dataObjectschema dataObjectschema\n * @param {String} dataObjectUrl dataObjectUrl\n * @param {String} dataObjectReporter dataObjectReporter\n * @param {Array} resources dataObject resources\n * @param {Array} authorise list of pre authorised authorised IDs\n */\n //registerDataObject(identifier, dataObjectschema, dataObjectUrl, dataObjectReporter, resources, addressURL, authorise) {\n\n }, {\n key: 'registerDataObject',\n value: function registerDataObject(objectRegistration) {\n var _this = this;\n\n var registration = (0, _utils.deepClone)(objectRegistration);\n\n return new _promise2.default(function (resolve, reject) {\n\n var dataScheme = [];\n var filteredDataScheme = registration.url.split(':');\n dataScheme.push(filteredDataScheme[0]);\n\n _this.storageManager.get('registry:DataObjectURLs').then(function (urlsList) {\n\n if (!urlsList) {\n urlsList = {};\n }\n\n //update the list with the new elements\n urlsList[objectRegistration.name + objectRegistration.schema + objectRegistration.resources + objectRegistration.reporter] = objectRegistration.url;\n\n var p2pHandler = void 0;\n var p2pRequester = void 0;\n\n if ((0, _keys2.default)(_this.p2pHandlerStub).length !== 0) {\n p2pHandler = _this.p2pHandlerStub[_this.runtimeURL].url;\n p2pRequester = _runtimeUtils.runtimeUtils.runtimeDescriptor.p2pRequesterStub;\n }\n\n registration.startingTime = registration.created;\n\n delete registration.authorise;\n delete registration.created;\n delete registration.mutual;\n delete registration.resume;\n\n if (!registration.expires) registration.expires = _this.expiresTime;\n\n registration.dataSchemes = dataScheme;\n\n if (p2pHandler) {\n registration.p2pHandler = p2pHandler;\n registration.p2pRequester = p2pRequester;\n }\n\n if (_this.isInterworkingProtoStub(registration.reporter)) {\n registration.interworking = true;\n }\n\n registration.status = 'live';\n\n var message = void 0;\n\n if (!objectRegistration.resume) {\n\n log.log('[Registry.registerDataObject] registering new data object URL', registration);\n\n message = { type: 'create', from: _this.registryURL, to: 'domain://registry.' + _this.registryDomain, body: { value: registration, policy: 'policy' } };\n } else {\n\n log.log('[Registry.registerDataObject] registering previously registered data object URL', registration);\n\n message = {\n type: 'update',\n to: 'domain://registry.' + _this.registryDomain,\n from: _this.registryURL,\n body: { resource: registration.url, value: { status: 'live' } }\n };\n }\n\n _this.dataObjectList[registration.url] = objectRegistration;\n\n // step to obtain the list of all URL registered to updated with the new one.\n _this.storageManager.set('registry:DataObjectURLs', 0, urlsList).then(function () {\n\n try {\n _this._messageBus.postMessageWithRetries(message, _this._registrationRetries, function (reply) {\n // log.log('[Registry.registerDataObject] ===> registerDataObject Reply: ', reply);\n if (reply.body.code === 200) {\n resolve(registration);\n } else {\n reject('error on register DataObject');\n }\n });\n } catch (e) {\n log.error(e);\n reject(e);\n }\n\n //timer to keep the registration alive\n // the time is defined by a little less than half of the expires time defined\n var keepAliveTimer = setInterval(function () {\n\n var message = {\n type: 'update',\n from: _this.registryURL,\n to: 'domain://registry.' + _this.registryDomain,\n body: { resource: registration.url, value: { status: 'live' }, method: 'refresh' }\n };\n\n _this._messageBus.postMessage(message, function (reply) {\n // log.log('[Registry.registerDataObject] KeepAlive Reply: ', reply);\n });\n }, registration.expires / 1.1 / 2 * 1000);\n }).catch(function (reason) {\n log.error('[Registry registerHyperty] Error: ', reason);\n reject(reason);\n });\n });\n });\n }\n }, {\n key: '_getResourcesAndSchemes',\n value: function _getResourcesAndSchemes(descriptor) {\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n\n var resources = void 0;\n\n // check if the hyperty resources is a vector or a string\n // TODO delete later when catalogue is fixed\n if (typeof descriptor.hypertyType === 'string') {\n resources = [];\n resources.push(descriptor.hypertyType);\n } else {\n resources = descriptor.hypertyType;\n }\n\n var objName = descriptor.objectName;\n\n var descriptorDataSchema = descriptor.dataObjects;\n var dataSchemasArray = [];\n\n //this will create a array with a Promise in each position\n for (var index in descriptorDataSchema) {\n dataSchemasArray.push(_this.runtimeCatalogue.getDataSchemaDescriptor(descriptorDataSchema[index]));\n }\n\n // as soon as the previous array is completed, this will wait for the resolve of all promises in the array\n _promise2.default.all(dataSchemasArray).then(function (dataSchemas) {\n\n var filteredDataSchemas = [];\n for (var _index in dataSchemas) {\n var dataSchema = dataSchemas[_index];\n filteredDataSchemas.push(dataSchema.sourcePackage.sourceCode.properties.scheme.constant);\n }\n\n // log.log('[Registry] Hyperty Schemas', filteredDataSchemas);\n // log.log('[Registry] Hyperty resources', resources);\n\n resolve({ resources: resources, dataSchema: filteredDataSchemas, name: objName });\n });\n });\n }\n\n /**\n * method that returns previously registered Hyperty or DataObjects URLS, for given characteristics\n * @param {JSON} info object or hyperty charateristics info\n * @return {addressURL} addressURL return the URL if there is any previousy registered URL, return undefined otherwise\n */\n\n }, {\n key: 'checkRegisteredURLs',\n value: function checkRegisteredURLs(info, reuseURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n\n var objectType = info.reporter ? 'registry:DataObjectURLs' : 'registry:HypertyURLs';\n\n if (typeof reuseURL === 'string') {\n objectType = reuseURL && (0, _utils.divideURL)(reuseURL).type !== 'hyperty' ? 'registry:DataObjectURLs' : 'registry:HypertyURLs';\n }\n\n _this.storageManager.get(objectType).then(function (urlsList) {\n\n if (!urlsList) {\n urlsList = {};\n }\n\n if (typeof reuseURL === 'string') {\n log.info('[Registry - checkRegisteredURLs] - look for ' + reuseURL + ' on ', urlsList);\n\n var searchResult = (0, _keys2.default)(urlsList).map(function (key) {\n var indexOf = urlsList[key].indexOf(reuseURL);\n return urlsList[key][indexOf];\n });\n\n log.info('[Registry - checkRegisteredURLs] - found ' + searchResult.length + ' results on ', searchResult);\n if (searchResult.length === 1) {\n return resolve(searchResult);\n } else {\n return resolve(undefined);\n }\n }\n\n if (objectType === 'registry:HypertyURLs') {\n _this._getResourcesAndSchemes(info).then(function (value) {\n if (urlsList[value.resources + value.dataSchema + value.name]) {\n // log.log('[Registry] reusage of hyperty URL');\n return resolve(urlsList[value.resources + value.dataSchema + value.name]);\n } else {\n // log.log('[Registry] no hyperty URL was previously registered ');\n return resolve(undefined);\n }\n });\n } else {\n\n var characteristics = info.name + info.schema + info.resources + info.reporter;\n\n if (urlsList[characteristics]) {\n // log.log('[Registry] reusage of dataObject URL');\n return resolve(urlsList[characteristics]);\n } else {\n // log.log('[Registry] no dataObject URL was previously registered');\n return resolve(undefined);\n }\n }\n });\n });\n }\n\n /**\n * To register a new Hyperty in the runtime which returns the HypertyURL allocated to the new Hyperty.\n * @param {Sandbox} sandbox sandbox\n * @param {HypertyCatalogueURL} HypertyCatalogueURL descriptor\n * @param {object} IdpConstraint - constraints to be used when selecting the identity to be associated with the Hyperty including origin, idp, and idHint.\n * @return {HypertyURL} HypertyURL\n */\n\n }, {\n key: 'registerHyperty',\n value: function registerHyperty(sandbox, descriptorURL, descriptor, addressURL, IdpConstraint) {\n var _this = this;\n\n var hypertyCapabilities = void 0;\n\n return new _promise2.default(function (resolve, reject) {\n\n //assuming descriptor come in this format, the service-provider-domain url is retrieved by a split instruction\n //hyperty-catalogue:///\n var domainUrl = (0, _utils.divideURL)(descriptorURL).domain;\n\n if (domainUrl.includes('catalogue')) {\n domainUrl = domainUrl.replace('catalogue.', '');\n }\n\n _this.idModule.getIdentityAssertion(IdpConstraint).then(function (result) {\n\n var userProfile = result.userProfile;\n\n // log.log('[Registry registerHyperty] userProfile', userProfile);\n var emailURL = userProfile.userURL;\n\n if (_this._messageBus === undefined) {\n reject('[Registry registerHyperty] MessageBus is undefined');\n } else {\n //call check if the protostub exist: to be removed\n /* _this.resolve(domainUrl).then(function(a) {\n // log.log('[Registry registerHyperty] stub to domain registry- ', a);*/\n\n _this.storageManager.get('registry:HypertyURLs').then(function (urlsList) {\n\n // log.log('[Registry registerHyperty] storageManager] - ', urlsList);\n\n _this._getResourcesAndSchemes(descriptor).then(function (value) {\n\n hypertyCapabilities = value;\n\n if (!urlsList) {\n urlsList = {};\n }\n\n urlsList[hypertyCapabilities.resources + hypertyCapabilities.dataSchema + hypertyCapabilities.name] = addressURL.address;\n _this.storageManager.set('registry:HypertyURLs', 0, urlsList).then(function () {\n\n _this.registryDomain = domainUrl;\n\n //check whether the received sanbox e ApplicationSandbox or a normal sandbox\n if (sandbox.type === 'app') {\n _this.sandboxesList.appSandbox[addressURL.address[0]] = sandbox;\n } else if (sandbox.type === 'normal') {\n _this.sandboxesList.sandbox[addressURL.address[0]] = sandbox;\n } else {\n reject('Wrong SandboxType');\n }\n\n var p2pHandler = void 0;\n var p2pRequester = void 0;\n\n if ((0, _keys2.default)(_this.p2pHandlerStub).length !== 0) {\n p2pHandler = _this.p2pHandlerStub[_this.runtimeURL].url;\n p2pRequester = _runtimeUtils.runtimeUtils.runtimeDescriptor.p2pRequesterStub;\n }\n\n var runtime = _this.runtimeURL;\n var status = 'live';\n\n var hyperty = new _HypertyInstance2.default(_this.identifier, _this.registryURL, descriptorURL, descriptor, addressURL.address[0], userProfile, 'guid', _this.runtimeURL, 'ctx', p2pHandler, p2pRequester, hypertyCapabilities.dataSchema, hypertyCapabilities.resources);\n\n _this.hypertiesList.push(hyperty);\n\n //message to register the new hyperty, within the domain registry\n var messageValue = void 0;\n var message = void 0;\n var registrationExpires = _this.expiresTime;\n\n // set a different expires value if configured in the Hyperty descriptor\n\n if (descriptor.configuration && descriptor.configuration.expires) registrationExpires = descriptor.configuration.expires;\n\n if (addressURL.newAddress) {\n // log.log('[Registry registerHyperty] registering new Hyperty URL', addressURL.address[0]);\n\n messageValue = {\n user: emailURL,\n descriptor: descriptorURL,\n url: addressURL.address[0],\n expires: registrationExpires,\n resources: hypertyCapabilities.resources,\n dataSchemes: hypertyCapabilities.dataSchema,\n runtime: runtime,\n status: status\n };\n\n // set a different expires if defined in the hyperty configuration\n\n if (p2pHandler) {\n messageValue.p2pHandler = p2pHandler;\n messageValue.p2pRequester = p2pRequester;\n }\n\n // log.log('[Registry registerHyperty] registering new Hyperty at domain registry ', messageValue);\n\n message = { type: 'create', from: _this.registryURL, to: 'domain://registry.' + _this.registryDomain, body: { value: messageValue, policy: 'policy' } };\n } else {\n // log.log('[Registry registerHyperty] registering previously registered Hyperty URL', addressURL.address[0]);\n\n message = {\n type: 'update',\n to: 'domain://registry.' + _this.registryDomain,\n from: _this.registryURL,\n body: { resource: addressURL.address[0], value: { status: 'live', user: emailURL } }\n };\n\n if (p2pHandler) {\n message.body.value.p2pHandler = p2pHandler;\n message.body.value.p2pRequester = p2pRequester;\n }\n }\n\n // log.log('[Registry registerHyperty] Hyperty registration at domain registry - ', message);\n\n try {\n _this._messageBus.postMessageWithRetries(message, _this.registrationRetries, function (reply) {\n // log.log('[Registry registerHyperty] Hyperty registration response: ', reply);\n\n if (reply.body.code === 200) {\n var _result = { url: addressURL.address[0] };\n if (p2pHandler) {\n _result.p2pHandler = p2pHandler;\n _result.p2pRequester = p2pRequester;\n }\n\n resolve(_result);\n } else if (reply.body.code === 404) {\n // log.log('[Registry registerHyperty] The update was not possible. Registering new Hyperty at domain registry');\n\n messageValue = {\n user: emailURL,\n descriptor: descriptorURL,\n url: addressURL.address[0],\n expires: registrationExpires,\n resources: hypertyCapabilities.resources,\n dataSchemes: hypertyCapabilities.dataSchema,\n runtime: runtime,\n status: status\n };\n\n if (p2pHandler) {\n messageValue.p2pHandler = p2pHandler;\n messageValue.p2pRequester = p2pRequester;\n }\n\n message = { type: 'create', from: _this.registryURL, to: 'domain://registry.' + _this.registryDomain, body: { value: messageValue, policy: 'policy' } };\n\n try {\n _this._messageBus.postMessageWithRetries(message, _this.registrationRetries, function (reply) {\n // log.log('[Registry registerHyperty] Hyperty registration update response: ', reply);\n\n if (reply.body.code === 200) {\n var _result2 = { url: addressURL.address[0] };\n if (p2pHandler) {\n _result2.p2pHandler = p2pHandler;\n _result2.p2pRequester = p2pRequester;\n }\n\n resolve(_result2);\n } else {\n throw new Error('Failed to register an Hyperty: ' + reply);\n }\n });\n } catch (e) {\n log.error(e);\n reject(e);\n }\n } else throw new Error('Failed to register an Hyperty: ', reply);\n });\n } catch (e) {\n log.error(e);\n reject(e);\n }\n\n //timer to keep the registration alive\n // the time is defined by a little less than half of the expires time defined\n var keepAliveTimer = setInterval(function () {\n\n var message = {\n type: 'update',\n from: _this.registryURL,\n to: 'domain://registry.' + _this.registryDomain,\n body: { resource: addressURL.address[0], value: { status: 'live' }, method: 'refresh' } };\n\n _this._messageBus.postMessage(message, function (reply) {\n // log.log('[Registry registerHyperty] KeepAlive Reply: ', reply);\n });\n }, registrationExpires / 1.1 / 2 * 1000);\n }).catch(function (reason) {\n // log.log('[Registry registerHyperty] Error: ', reason);\n reject(reason);\n });\n });\n });\n }\n }, function (err) {\n reject('[Registry registerHyperty] ', err);\n });\n });\n }\n\n /**\n * To unregister a previously registered Hyperty\n * @param {HypertyURL} HypertyURL url url\n */\n\n }, {\n key: 'unregisterHyperty',\n value: function unregisterHyperty(url) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var found = false;\n var index = 0;\n\n for (index = 0; index < _this.hypertiesList.length; index++) {\n var hyperty = _this.hypertiesList[index];\n if (hyperty !== undefined) {\n if (hyperty.hypertyURL === url) {\n found = true;\n break;\n }\n }\n }\n\n if (found === false) {\n reject('Hyperty not found');\n } else {\n delete _this.hypertiesList[index];\n resolve('Hyperty successfully deleted');\n }\n });\n }\n\n /**\n * To discover protocol stubs available in the runtime for a certain domain. If available, it returns the runtime url for the protocol stub that connects to the requested domain. Required by the runtime BUS to route messages to remote servers or peers (do we need something similar for Hyperties?).\n * @param {DomainURL} DomainURL url\n * @return {RuntimeURL} RuntimeURL\n */\n\n }, {\n key: 'discoverProtostub',\n value: function discoverProtostub(url) {\n if (!url) throw new Error('Parameter url needed');\n var _this = this;\n\n var dividedURL = (0, _utils.divideURL)(url);\n var domainURL = dividedURL.domain;\n\n if (_this.protostubsList.hasOwnProperty(domainURL) && _this.protostubsList[domainURL].status === STATUS.LIVE) {\n return _this.protostubsList[domainURL];\n } else {\n\n _this.protostubsList[domainURL] = {\n status: STATUS.DEPLOYING\n };\n\n throw new Error('[Registry - discoverProtoStub ] Message Node Protostub Not Found. Creating one');\n }\n }\n\n /**\n * To discover protocol stubs available in the runtime for a certain remote runtime URL. If available, it returns the runtime url for the protocol stub that connects to the requested domain.\n * Required by the runtime BUS to route messages to remote servers or peers (do we need something similar for Hyperties?).\n * @param {RuntimeURL} RuntimeURL url\n * @return {p2pRequester} RuntimeURL\n */\n\n }, {\n key: 'discoverP2PStub',\n value: function discoverP2PStub(runtimeURL) {\n var _this = this;\n\n if (runtimeURL) {\n\n if (_this.p2pRequesterStub.hasOwnProperty(runtimeURL) && _this.p2pRequesterStub[runtimeURL].status === STATUS.LIVE) {\n return _this.p2pRequesterStub[runtimeURL];\n } else {\n _this.p2pRequesterStub[runtimeURL] = {\n status: STATUS.CREATED\n };\n\n throw new Error('[Registry - discoverP2PStub ] P2P Requester Stub Not Found. Creating one');\n }\n } else {\n\n if (_this.p2pHandlerStub.hasOwnProperty(_this.runtimeURL)) {\n return _this.p2pHandlerStub[_this.runtimeURL];\n } else {\n _this.p2pHandlerStub[_this.runtimeURL] = {\n status: STATUS.CREATED\n };\n\n throw new Error('[Registry - discoverP2PStub ] P2P Handler Stub Not Found.');\n }\n }\n }\n\n /**\n * To register a new Protocol Stub in the runtime including as input parameters the function to postMessage, the DomainURL that is connected with the stub, which returns the RuntimeURL allocated to the new ProtocolStub.\n * @param {Sandbox} Sandbox\n * @param {stubID} Domain or hyperty runtime to register the stub\n * @param {descriptorURL} Catalogue URL of the Protostub descriptor\n * @param {descriptor} Protostub descriptor\n * @return {RuntimeProtoStubURL}\n */\n\n }, {\n key: 'registerStub',\n value: function registerStub(sandbox, stubID, p2pConfig, descriptorURL, descriptor) {\n var _this = this;\n\n var _stubDescriptor = descriptor;\n\n return new _promise2.default(function (resolve, reject) {\n\n var runtimeProtoStubURL = void 0;\n\n //check if messageBus is registered in registry or not\n if (_this._messageBus === undefined) {\n reject('MessageBus not found on registerStub');\n }\n\n log.info('[Registry - registerStub] - stubID ', stubID);\n\n /* if (!stubID.indexOf('msg-node.')) {\n stubID = stubID.substring(stubID.indexOf('.') + 1);\n }*/\n\n var P2PRequesterStub = void 0;\n\n if (p2pConfig) {\n\n if (p2pConfig.hasOwnProperty('isHandlerStub') && p2pConfig.isHandlerStub) {\n runtimeProtoStubURL = _this.p2pHandlerURL;\n\n _this.p2pHandlerStub[stubID] = {\n url: runtimeProtoStubURL,\n status: STATUS.CREATED\n };\n\n _this.p2pHandlerAssociation[_this.runtimeURL] = [];\n\n _this.sandboxesList.sandbox[runtimeProtoStubURL] = sandbox;\n log.info('[Registry - registerStub - P2PHandlerStub] - ', stubID, ' - ', runtimeProtoStubURL);\n resolve(_this.p2pHandlerStub[stubID]);\n } else {\n P2PRequesterStub = p2pConfig.p2pRequesterStub;\n runtimeProtoStubURL = 'runtime://' + (0, _utils.divideURL)(p2pConfig.remoteRuntimeURL).domain + '/p2prequester/' + (0, _utils.generateGUID)();\n log.info('[Registry - registerStub - P2PRequesterStub] - ', P2PRequesterStub, ' - ', runtimeProtoStubURL);\n\n // to be clarified what is this p2pHandlerAssociation\n _this.p2pHandlerAssociation[_this.runtimeURL].push(runtimeProtoStubURL);\n _this.p2pRequesterStub[stubID] = {\n url: runtimeProtoStubURL,\n status: STATUS.CREATED\n };\n\n _this.sandboxesList.sandbox[runtimeProtoStubURL] = sandbox;\n\n //Setup P2P Requester path into MN\n\n var msg = {\n type: 'subscribe',\n from: _this.registryURL,\n to: 'domain://msg-node.' + _this._domain + '/sm',\n body: {\n subscribe: [runtimeProtoStubURL],\n source: _this.registryURL\n }\n };\n\n _this._messageBus.postMessage(msg, function (reply) {\n // log.log('[Registry - register Stub] p2pRequester path setup: ', reply);\n });\n\n resolve(_this.p2pRequesterStub[stubID]);\n }\n } else {\n runtimeProtoStubURL = 'runtime://' + stubID + '/protostub/' + (0, _utils.generateGUID)();\n\n log.info('[Registry - registerStub - Normal Stub] - ', stubID);\n\n // TODO: Optimize this\n _this.protostubsList[stubID] = {\n url: runtimeProtoStubURL,\n status: STATUS.DEPLOYING\n };\n\n if (descriptorURL) {\n _this.protostubsList[stubID].descriptorURL = descriptorURL;\n }\n\n if (_stubDescriptor && _stubDescriptor.interworking) {\n _this.protostubsList[stubID].interworking = _stubDescriptor.interworking;\n }\n\n _this.sandboxesList.sandbox[runtimeProtoStubURL] = sandbox;\n\n resolve(_this.protostubsList[stubID]);\n }\n\n // resolve(runtimeProtoStubURL);\n\n _this._messageBus.addListener(runtimeProtoStubURL + '/status', function (msg) {\n _this._onProtostubStatusEvent(msg);\n });\n });\n }\n\n /**\n * To Process status events fired by protostubs\n * @param {Message} message Event Message\n */\n\n }, {\n key: '_onProtostubStatusEvent',\n value: function _onProtostubStatusEvent(msg) {\n\n var _this = this;\n\n // log.log('[Registry onProtostubStatusEvent]: ', msg);\n\n var runtimeProtoStubURL = msg.from;\n\n if (!msg.to.includes('/status')) {\n log.error('[Registry onProtostubStatusEvent] Not Status Event: ', msg);\n return;\n }\n\n // process status events from message node protostubs\n\n if (runtimeProtoStubURL.includes('/protostub/')) {\n\n // TODO: uncomment below when protostubs are updated with new status value \"live\"\n (0, _keys2.default)(_this.protostubsList).filter(function (key) {\n return _this.protostubsList[key].url === runtimeProtoStubURL;\n }).map(function (key) {\n _this.protostubsList[key].status = msg.body.value;\n\n // log.log('[Registry - onProtostubStatusEvent] - Protostub status: ', _this.protostubsList[key]);\n });\n } else {\n // process status events from p2p connections\n\n if (msg.body.resource) {\n var remoteRuntimeURL = msg.body.resource;\n\n if (_this.p2pConnectionList[remoteRuntimeURL]) {\n _this.p2pConnectionList[remoteRuntimeURL].status = msg.body.value;\n _this.p2pConnectionList[remoteRuntimeURL].url = runtimeProtoStubURL;\n } else {\n\n var p2pConnection = {\n status: msg.body.value,\n url: runtimeProtoStubURL\n };\n\n _this.p2pConnectionList[remoteRuntimeURL] = p2pConnection;\n }\n\n // log.log('[Registry - onProtostubStatusEvent] - P2PConnection status: ', _this.p2pConnectionList[remoteRuntimeURL]);\n\n // Update P2P Requester protostub if it is coming from there\n if (runtimeProtoStubURL.includes('/p2prequester/')) {\n _this.p2pRequesterStub[remoteRuntimeURL].status = msg.body.value;\n\n // log.log('[Registry - onProtostubStatusEvent] - P2P Requester status: ', _this.p2pRequesterStub[remoteRuntimeURL]);\n } else {\n // if from P2PHandler with status disconencted, lets remove from p2pConnectionList\n if (msg.body.value === 'disconnected') delete _this.p2pConnectionList[remoteRuntimeURL];\n }\n } else {\n if (runtimeProtoStubURL.includes('/p2prequester/')) {\n // It is an event from P2P Requester without mandatory \"resource\" field\n log.error('[Registry onProtostubStatusEvent] resource missing: ', msg);\n return;\n } else {\n // It is an event from P2P Handler\n _this.p2pHandlerStub[_this.runtimeURL].status = msg.body.value;\n\n // log.log('[Registry - onProtostubStatusEvent] - P2PHandler Stub status: ', _this.p2pHandlerStub[_this.runtimeURL]);\n }\n }\n }\n }\n\n /**\n * To unregister a previously registered protocol stub\n * @param {HypertyRuntimeURL} HypertyRuntimeURL hypertyRuntimeURL\n */\n\n }, {\n key: 'unregisterStub',\n value: function unregisterStub(hypertyRuntimeURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n if (_this.protostubsList.hasOwnProperty(hypertyRuntimeURL)) {\n delete _this.protostubsList[hypertyRuntimeURL];\n resolve('ProtostubURL removed');\n } else {\n reject('Error on unregisterStub: Hyperty not found');\n }\n });\n }\n\n /**\n * To register a new Identity Provider proxy in the runtime including as input parameters the function to postMessage, the DomainURL that is connected with the stub, which returns the RuntimeURL allocated to the new ProtocolStub.\n * @param {Sandbox} Sandbox\n * @param {DomainURL} DomainURL service provider domain\n * @return {RuntimeIdpProxyURL}\n */\n\n }, {\n key: 'registerIdpProxy',\n value: function registerIdpProxy(sandbox, domainURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var idpProxyStubURL = void 0;\n\n //check if messageBus is registered in registry or not\n if (_this._messageBus === undefined) {\n reject('MessageBus not found on registerStub');\n }\n\n idpProxyStubURL = 'domain-idp://' + domainURL + '/stub/' + (0, _utils.generateGUID)();\n\n // TODO: Optimize this\n _this.idpProxyList[domainURL] = {\n url: idpProxyStubURL,\n status: STATUS.DEPLOYING\n };\n\n _this.sandboxesList.sandbox[idpProxyStubURL] = sandbox;\n\n // sandbox.addListener('*', function(msg) {\n // _this._messageBus.postMessage(msg);\n // });\n\n resolve(idpProxyStubURL);\n\n _this._messageBus.addListener(idpProxyStubURL + '/status', function (msg) {\n _this._onIdpProxyStatusEvent(msg);\n });\n });\n }\n\n /**\n * To Process status events fired by Idp Proxies\n * @param {Message} message Event Message\n */\n\n }, {\n key: '_onIdpProxyStatusEvent',\n value: function _onIdpProxyStatusEvent(msg) {\n\n var _this = this;\n\n // log.log('[Registry onIdpProxyStatusEvent]: ', msg);\n\n var idpProxyURL = msg.from;\n\n if (!msg.to.includes('/status')) {\n log.error('[Registry onIdpProxyStatusEvent] Not Status Event: ', msg);\n return;\n }\n\n (0, _keys2.default)(_this.idpProxyList).filter(function (key) {\n return _this.idpProxyList[key].url === idpProxyURL;\n }).map(function (key) {\n _this.idpProxyList[key].status = msg.body.value;\n\n // log.log('[Registry - onIdpProxyStatusEvent] - Idp Proxy status: ', _this.idpProxyList[key]);\n });\n }\n\n /**\n * To discover idpProxy stubs available in the runtime for a certain domain. If available, it returns the runtime url for the idpProxy stub that connects to the requested domain. Required by the runtime BUS to route messages to remote servers or peers\n * @param {DomainURL} DomainURL url\n * @return {RuntimeURL} RuntimeURL idpProxyUrl\n */\n\n }, {\n key: 'discoverIdpProxy',\n value: function discoverIdpProxy(url) {\n if (!url) throw new Error('Parameter url needed');\n var _this = this;\n\n var dividedURL = (0, _utils.divideURL)(url);\n var domainURL = dividedURL.domain;\n\n if (_this.idpProxyList.hasOwnProperty(domainURL) && _this.idpProxyList[domainURL].status === STATUS.LIVE) {\n return _this.idpProxyList[domainURL];\n } else {\n\n _this.idpProxyList[domainURL] = {\n status: STATUS.PROGRESS\n };\n\n throw new Error('[Registry - discoverIdpProxy ] Idp Proxy Not Found. Creating one');\n }\n }\n\n /**\n * To register a new Policy Enforcer in the runtime including as input parameters the function to postMessage, the HypertyURL associated with the PEP, which returns the RuntimeURL allocated to the new Policy Enforcer component.\n * @param {Message.Message} postMessage postMessage\n * @param {HypertyURL} HypertyURL hyperty\n * @return {HypertyRuntimeURL} HypertyRuntimeURL\n */\n\n }, {\n key: 'registerPEP',\n value: function registerPEP(postMessage, hyperty) {\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n //TODO check what parameter in the postMessage the pep is.\n _this.pepList[hyperty] = postMessage;\n resolve('PEP registered with success');\n });\n }\n\n /**\n * To unregister a previously registered protocol stub\n * @param {HypertyRuntimeURL} HypertyRuntimeURL HypertyRuntimeURL\n */\n\n }, {\n key: 'unregisterPEP',\n value: function unregisterPEP(HypertyRuntimeURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var result = _this.pepList[HypertyRuntimeURL];\n\n if (result === undefined) {\n reject('Pep Not found.');\n } else {\n resolve('PEP successfully removed.');\n }\n });\n }\n\n /**\n * To discover sandboxes available in the runtime for a certain domain and a certain set of capabilities. Required by the runtime UA to avoid more than one sandbox for the same domain.\n * @param {DomainURL} DomainURL url\n * @return {RuntimeSandbox} RuntimeSandbox\n */\n\n }, {\n key: 'getSandbox',\n value: function getSandbox(url, constraints) {\n if (!url) throw new Error('Parameter url needed');\n\n // log.log('[Registry getSandbox] getSandbox for: ', url, ' and capabilities: ', constraints);\n\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n\n var request = void 0;\n\n //first try to find the url in the appSandbox list\n request = _this.sandboxesList.appSandbox[url];\n\n //if no appSandbox was found, try to search in the normal sandboxes list\n if (!request) {\n request = _this.sandboxesList.sandbox[url];\n\n if (!request) {\n\n var domain = void 0;\n\n if (url.includes('://')) {\n domain = (0, _utils.divideURL)(url).domain;\n } else {\n domain = url;\n }\n\n // search in the sandboxes list for a entry containing the domain given\n for (var sandbox in _this.sandboxesList.sandbox) {\n //todo: uncomment sandbox constraints match condition with runtime sharing\n if (sandbox.includes(domain) && _this.sandboxesList.sandbox[sandbox].matches(constraints)) {\n var _ret = function () {\n var current = _this.sandboxesList.sandbox[sandbox];\n var match = (0, _keys2.default)(constraints).filter(function (constraint) {\n return constraint === 'browser' && current.type === _Sandbox.SandboxType.NORMAL || constraint === 'windowSanbox' && current.type === _Sandbox.SandboxType.WINDOW;\n }).length > 0 ? true : false;\n\n if (match) {\n request = current;\n }\n return 'break';\n }();\n\n if (_ret === 'break') break;\n }\n }\n }\n }\n\n if (!request) {\n reject('no sandbox found for: ' + url);\n } else {\n resolve(request);\n }\n });\n }\n }, {\n key: 'resolveNormalStub',\n value: function resolveNormalStub(url) {\n // log.log('resolveNormalStub ' + url);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //split the url to find the domainURL. deals with the url for example as:\n //\"hyperty-runtime://sp1/protostub/123\",\n var dividedURL = (0, _utils.divideURL)(url);\n var domainUrl = dividedURL.domain;\n var type = dividedURL.type;\n\n if (url.includes(_this.runtimeURL)) {\n log.error('[Registry - resolve] URL to be resolved should have listeners ', url);\n reject('[Registry - resolve] URL to be resolved should have listeners ', url);\n }\n\n // resolve the domain protostub in case of a message to global registry\n if (url.includes('global://registry')) {\n domainUrl = _this._domain;\n } else {\n if (!domainUrl.indexOf('msg-node.') || !domainUrl.indexOf('registry.')) {\n domainUrl = domainUrl.substring(domainUrl.indexOf('.') + 1);\n }\n }\n\n _this.isLegacy(url).then(function (isLegacy) {\n\n // if legacy it should resolve for .\n if (isLegacy && type !== 'domain-idp') {\n domainUrl = type + '.' + (0, _utils.getUserIdentityDomain)(url);\n }\n\n log.info('[Registry.resolve] domainUrl:', domainUrl);\n\n var registredComponent = void 0;\n\n if (type === 'domain-idp') {\n registredComponent = _this.idpProxyList.hasOwnProperty(domainUrl) ? _this.idpProxyList[domainUrl] : false;\n } else {\n registredComponent = _this.protostubsList.hasOwnProperty(domainUrl) ? _this.protostubsList[domainUrl] : false;\n }\n\n log.info('[Registry.resolve] registred:', registredComponent);\n\n // TODO since the protostubs have other states this should be revised, because the status could change from DEPLOYED to LIVE\n // TODO and this validation will trigger a new load of IDPProxy or Protostub;\n if (registredComponent && registredComponent.hasOwnProperty('status') && (registredComponent.status === STATUS.DEPLOYED || registredComponent.status === STATUS.CREATED || registredComponent.status === STATUS.LIVE || registredComponent.status === STATUS.DISCONNECTED)) {\n log.info('[Registry.resolve] Resolved: ', registredComponent.url, registredComponent.status);\n resolve(registredComponent.url);\n } else {\n //todo: use switch-case to support other types of stubs\n if (type === 'domain-idp') {\n\n // The IdP Proxy does not exist, let's prepare its deployment by watching its status\n\n _this.watchingYou.observe('idpProxyList', function (change) {\n\n // log.log('[Registry - resolveNormalStub] idpProxyList changed ' + _this.idpProxyList);\n\n var keypath = change.keypath;\n\n if (keypath.includes('status')) keypath = keypath.replace('.status', '');\n\n if (keypath === domainUrl && change.name === 'status' && change.newValue === STATUS.CREATED) {\n // log.log('[Registry - resolveNormalStub] idpProxyList is live ' + _this.idpProxyList[domainUrl]);\n resolve(_this.idpProxyList[domainUrl].url);\n }\n });\n\n if (!registredComponent) {\n // this process will load the idp proxy, because is not yet registered;\n log.info('[Registry.resolveNormalStub] deploy new IDPProxy: ', domainUrl);\n _this.loader.loadIdpProxy(domainUrl).then(function () {\n\n log.info('[Registry.resolveNormalStub] IdP Proxy deployed: ', _this.idpProxyList[domainUrl]);\n }).catch(function (reason) {\n log.error('[Registry.resolve] Error resolving Load IDPProxy: ', reason);\n _this.idpProxyList[domainUrl].status = 'deployment-failed';\n reject(reason);\n });\n }\n } else {\n\n // The protoStub does not exist, let's prepare its deployment by watching its status\n\n _this.watchingYou.observe('protostubsList', function (change) {\n\n // log.log('[Registry - resolveNormalStub] protostubsList changed ' + _this.protostubsList);\n\n var keypath = change.keypath;\n\n if (keypath.includes('status')) keypath = keypath.replace('.status', '');\n\n if (keypath === domainUrl && change.name === 'status' && change.newValue === STATUS.CREATED) {\n // log.log('[Registry - resolve] protostub is live ' + _this.protostubsList[domainUrl]);\n resolve(_this.protostubsList[domainUrl].url);\n }\n });\n\n if (!registredComponent) {\n // lets deploy the protostub\n log.info('[Registry.resolve] trigger new ProtocolStub: ', domainUrl);\n _this.loader.loadStub(domainUrl).then(function () {\n\n // log.log('[Registry - resolveNormalStub] Stub deployed: ', _this.protostubsList[domainUrl]);\n }).catch(function (reason) {\n log.error('[Registry.resolveNormalStub] Error resolving Load ProtocolStub: ', reason);\n reject(reason);\n });\n }\n }\n }\n }).catch(function (reason) {\n log.error('[Registry.resolve] Error resolving islegacy: ', reason);\n reject(reason);\n });\n });\n }\n\n /**\n * To verify if source is valid and to resolve target runtime url address if needed (eg protostub runtime url in case the message is to be dispatched to a remote endpoint).\n * @param {URL.URL} url url\n * @return {Promise} Promise \n */\n\n }, {\n key: 'resolve',\n value: function resolve(msg) {\n log.info('[Registry - Resolve] - ', msg);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var url = msg.to ? msg.to : msg;\n\n var p2p = msg.body && msg.body.p2p ? msg.body.p2p : false;\n\n // log.log('P2P: ', p2p, url);\n // log.log('P2P - p2pHandlerStub: ', !_this.p2pHandlerStub[_this.runtimeURL], _this.p2pHandlerStub, _this.runtimeURL);\n // log.log('P2P - isBackendServiceURL: ', isBackendServiceURL(url), isBackendServiceURL, url);\n // log.log('P2P - includes runtimeURL: ', url.includes(_this.runtimeURL));\n // log.log('P2P - includes p2phandler: ', url.includes('/p2phandler/'));\n // log.log('P2P - includes p2prequester: ', url.includes('/p2prequester/'));\n\n // Skip p2p procedure when not supported by the Runtime or for backend services\n\n if (!_this.p2pHandlerStub[_this.runtimeURL] || (0, _utils.isBackendServiceURL)(url) || url.includes(_this.runtimeURL) || url.includes('/p2phandler/') || url.includes('/p2prequester/')) {\n\n log.info('[Registry - resolve] - Resolve normal stub: ', _this.p2pHandlerStub, _this.runtimeURL, (0, _utils.isBackendServiceURL)(url), p2p, url);\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n } else {\n\n log.info('[Registry - resolve] - checkP2P: ', p2p, url, _this._p2pConnectionResolve);\n _this._p2pConnectionResolve.checkP2P(msg).then(function (registeredP2P) {\n\n // log.log('[Registry - resolve] found registered P2P: ', registeredP2P);\n\n var p2pConnection = _this.p2pConnectionList[registeredP2P.runtime];\n\n if (!p2pConnection) {\n p2pConnection = registeredP2P;\n _this.p2pConnectionList[registeredP2P.runtime] = p2pConnection;\n }\n\n switch (p2pConnection.status) {\n case STATUS.LIVE:\n msg.body.peer = registeredP2P.runtime;\n resolve(p2pConnection.url, msg);\n break;\n case STATUS.CREATED: // p2p connection setup is ongoing, use MN Stub\n case STATUS.PROGRESS:\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n break;\n case STATUS.DISCONNECTED:\n // p2p connection stub was disconnected, let's ask to connect again\n log.info('[Registry - Resolve] - p2pConnection is disconnected lets try to reconnect');\n _this._p2pConnectionResolve.reconnectP2PRequester(p2pConnection).then(function (returnURL) {\n // log.log('[Registry - Resolve] - was reconnected with p2pRequesterStubt: ', returnURL);\n resolve(returnURL);\n }, function (reason) {\n log.info('[Registry - Resolve] - Reason: ', reason);\n\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n });\n break;\n default:\n\n log.info('[Registry - resolve] - P2P: ', p2p);\n if (!p2p) {\n // no p2p connection exists and the message sender does not ask one. Lets use the MN Stub\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n } else {\n _this._setupP2PRequester(registeredP2P).then(function (returnURL) {\n // no p2p connection exists but the message sender is asking one. Lets try to setup one\n resolve(returnURL);\n }, function (reason) {\n log.info('[Registry - Resolve] - Reason: ', reason);\n\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n });\n }\n break;\n }\n }, function (reason) {\n log.info('[Registry - Resolve] - Reason: ', reason);\n\n _this.resolveNormalStub(url).then(function (returnURL) {\n resolve(returnURL);\n });\n });\n }\n });\n }\n }, {\n key: '_setupP2PRequester',\n value: function _setupP2PRequester(input) {\n var _this = this;\n\n log.log('[Registry._setupP2PConnection] loadStub with p2pRequester: ', input);\n\n return new _promise2.default(function (resolve, reject) {\n\n var remoteRuntime = input.runtime;\n\n var p2pConfig = { remoteRuntimeURL: remoteRuntime, p2pHandler: input.p2pHandler, p2pRequesterStub: true };\n\n // lets prepare the p2pRequesterSTub deployment by setting an observer to its status changes\n\n _this.watchingYou.observe('p2pRequesterStub', function (change) {\n\n log.log('[Registry._setupP2PConnection] p2pRequesterStubs changed ' + _this.p2pRequesterStub);\n\n if (change.keypath.split('.')[0] === remoteRuntime && change.name === 'status' && change.newValue === STATUS.LIVE) {\n log.log('[Registry._setupP2PConnection] p2pRequester is live ' + _this.p2pRequesterStub[remoteRuntime]);\n resolve(_this.p2pRequesterStub[remoteRuntime].url);\n }\n });\n\n // stub load\n _this.loader.loadStub(input.p2pRequester, p2pConfig).then(function () {\n\n log.log('[Registry._setupP2PConnection] p2pRequester deployed: ', _this.p2pRequesterStub[remoteRuntime]);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n\n /**\n * To verify if url is for a legacy service.\n * @param {URL.URL} url url\n * @return {boolean}\n */\n\n }, {\n key: 'isLegacy',\n value: function isLegacy(url) {\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n if (url === _this._domain) {\n return resolve(false);\n }\n\n log.log('[Registry] [Registry.Registry.isLegacy] ', url);\n\n // TODO: to be defined in the runtime configuration\n var nonLegacy = ['hyperty-runtime', 'domain', 'global', 'hyperty'];\n\n var urlDivided = (0, _utils.divideURL)(url);\n\n if (nonLegacy.indexOf(urlDivided.type) !== -1 || urlDivided.domain === _this._domain) {\n return resolve(false);\n }\n\n // process User URLs\n if (url.split('@').length > 1) {\n var domain = urlDivided.domain;\n\n // log.log('[Registry] [Registry.Registry.isLegacy] domain: ', domain);\n if (_this.idpLegacyProxyList.hasOwnProperty(domain)) {\n\n var result = _this.idpLegacyProxyList[domain];\n\n if (result.interworking) {\n return resolve(result.interworking);\n } else {\n return resolve(false);\n }\n }\n\n _this._loader.descriptors.getIdpProxyDescriptor(domain).then(function (result) {\n\n // log.log('[Registry] [Registry.Registry.isLegacy] Legacy stub descriptor: ', result);\n\n if (result.interworking) {\n _this.idpLegacyProxyList[domain] = result;\n resolve(result.interworking);\n } else {\n resolve(false);\n }\n }).catch(function (reason) {\n log.warn('problem loading idp proxy descriptor for domain:', domain, ' because ', reason);\n reject(reason);\n });\n } else {\n // process protostub URLs\n resolve(_this.isInterworkingProtoStub(url));\n }\n });\n }\n\n /**\n * To verify if URL is locally registered or not.\n * @param {URL.URL} url url\n * @return {boolean}\n */\n\n }, {\n key: 'isLocal',\n value: function isLocal(url) {\n\n var runtimeScheme = ['hyperty-runtime', 'runtime'];\n var hypertyScheme = ['hyperty'];\n var urlScheme = url.split('://')[0];\n\n // Process Runtime Core URLs.\n // Messages originated from protostubs should also not include the runtimeURL in its URL.\n\n if (runtimeScheme.indexOf(urlScheme) !== -1) {\n return url.includes(this.runtimeURL);\n }\n\n // Process Hyperty URLs\n // Todo: hypertiesList should be an object not an array\n\n if (hypertyScheme.indexOf(urlScheme) !== -1) {\n\n for (var index in this.hypertiesList) {\n var hyperty = this.hypertiesList[index];\n if (hyperty.hypertyURL === url) {\n return true;\n }\n }\n\n return false;\n }\n\n // Process Data Object URLs\n\n if (url.includes('/subscription')) {\n url = url.substring(0, url.indexOf('/subscription'));\n }\n\n var dataObject = this.dataObjectList[url];\n\n if (dataObject) {\n if (dataObject.interworking) {\n return !dataObject.interworking;\n }\n return true;\n }\n\n return false;\n }\n\n /**\n * To verify if protostub is to interwork with a legacy domain.\n * @param {URL.URL} runtimeProtostubURL The runtime URL of the Protostub\n * @return {boolean}\n */\n\n }, {\n key: 'isInterworkingProtoStub',\n value: function isInterworkingProtoStub(runtimeProtostubURL) {\n\n var _this = this;\n\n if (!runtimeProtostubURL.includes('/protostub/')) {\n return false;\n }\n\n var filtered = (0, _keys2.default)(_this.protostubsList).filter(function (key) {\n return _this.protostubsList[key].url === runtimeProtostubURL;\n }).map(function (key) {\n\n if (_this.protostubsList[key].hasOwnProperty('interworking')) {\n return _this.protostubsList[key].interworking;\n } else {\n return false;\n }\n })[0];\n\n return filtered;\n }\n }, {\n key: 'loader',\n set: function set(loader) {\n var _this = this;\n _this._loader = loader;\n },\n get: function get() {\n var _this = this;\n return _this._loader;\n }\n\n /**\n * return the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n\n }, {\n key: 'messageBus',\n get: function get() {\n var _this = this;\n return _this._messageBus;\n }\n\n /**\n * Set the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n ,\n set: function set(messageBus) {\n var _this = this;\n _this._messageBus = messageBus;\n\n _this._messageBus.addListener(_this.registryURL, function (msg) {\n\n // log.log('[Registry listener] ', msg);\n\n var isHyperty = (0, _utils.isHypertyURL)(msg.from);\n var hasCriteria = msg.body.hasOwnProperty('criteria');\n var isURLResource = void 0;\n var isUserResource = void 0;\n var isHypertyResource = void 0;\n\n if (msg.body.hasOwnProperty('resource') && msg.body.resource !== '.') {\n isURLResource = (0, _utils.isURL)(msg.body.resource);\n isUserResource = (0, _utils.isUserURL)(msg.body.resource);\n isHypertyResource = (0, _utils.isHypertyURL)(msg.body.resource);\n }\n var isDelete = msg.type === 'delete';\n var hasName = void 0;\n var hasUser = void 0;\n\n if (msg.body.hasOwnProperty('value')) {\n hasName = msg.body.value.hasOwnProperty('name');\n hasUser = msg.body.value.hasOwnProperty('user');\n }\n\n if (msg.type === 'response') {\n log.error('[Register listener] skipping ', msg);\n return;\n }\n\n // msg sent by identity manager library\n var userUrl = _this._getIdentityAssociated(msg.body.resource, msg.body.criteria);\n\n var reply = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: { resource: userUrl } };\n reply.body.code = userUrl ? 200 : 404;\n\n _this._messageBus.postMessage(reply);\n });\n\n // Install AddressAllocation\n var addressAllocation = _AddressAllocation2.default.instance;\n _this.addressAllocation = addressAllocation;\n\n // log.log('[Registry - AddressAllocation] - ', addressAllocation);\n }\n }]);\n return Registry;\n}();\n\nexports.default = Registry;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDM5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9yZWdpc3RyeS9SZWdpc3RyeS5qcz82MTZlIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1JTQ0hVTkcgRS5WXG4qIENvcHlyaWdodCAyMDE2IE9SQU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SAnYXBwJykge1xuICAgICAgICAgICAgICAgICAgX3RoaXMuc2FuZGJveGVzTGlzdC5hcHBTYW5kYm94W2FkZHJlc3NVUkwuYWRkcmVzc1swXV0gPSBzYW5kYm94O1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc2FuZGJveC50eXBlID09PSAnbm9ybWFsJykge1xuICAgICAgICAgICAgICAgICAgX3RoaXMuc2FuZGJveGVzTGlzdC5zYW5kYm94W2FkZHJlc3NVUkwuYWRkcmVzc1swXV0gPSBzYW5kYm94O1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICByZWplY3QoJ1dyb25nIFNhbmRib3hUeXBlJyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGV0IHAycEhhbmRsZXI7XG4gICAgICAgICAgICAgICAgbGV0IHAycFJlcXVlc3RlcjtcblxuICAgICAgICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhfdGhpcy5wMnBIYW5kbGVyU3R1YikubGVuZ3RoICE9PSAwKSB7XG4gICAgICAgICAgICAgICAgICBwMnBIYW5kbGVyID0gX3RoaXMucDJwSGFuZGxlclN0dWJbX3RoaXMucnVudGltZVVSTF0udXJsO1xuICAgICAgICAgICAgICAgICAgcDJwUmVxdWVzdGVyID0gcnVudGltZVV0aWxzLnJ1bnRpbWVEZXNjcmlwdG9yLnAycFJlcXVlc3RlclN0dWI7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGV0IHJ1bnRpbWUgPSBfdGhpcy5ydW50aW1lVVJMO1xuICAgICAgICAgICAgICAgIGxldCBzdGF0dXMgPSAnbGl2ZSc7XG5cbiAgICAgICAgICAgICAgICBsZXQgaHlwZXJ0eSA9IG5ldyBIeXBlcnR5SW5zdGFuY2UoX3RoaXMuaWRlbnRpZmllciwgX3RoaXMucmVnaXN0cnlVUkwsIGRlc2NyaXB0b3JVUkwsIGRlc2NyaXB0b3IsIGFkZHJl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gICAgICAgICAgbWVzc2FnZVZhbHVlID0ge1xuICAgICAgICAgICAgICAgICAgICB1c2VyOiBlbWFpbFVSTCxcbiAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvcjogZGVzY3JpcHRvclVSTCxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBhZGRyZXNzVVJMLmFkZHJlc3NbMF0sXG4gICAgICAgICAgICAgICAgICAgIGV4cGlyZXM6IHJlZ2lzdHJhdGlvbkV4cGlyZXMsXG4gICAgICAgICAgICAgICAgICAgIHJlc291cmNlczogaHlwZXJ0eUNhcGFiaWxpdGllcy5yZXNvdXJjZXMsXG4gICAgICAgICAgICAgICAgICAgIGRhdGFTY2hlbWVzOiBoeXBlcnR5Q2FwYWJpbGl0aWVzLmRhdGFTY2hlbWEsXG4gICAgICAgICAgICAgICAgICAgIHJ1bnRpbWU6IHJ1bnRpbWUsXG4gICAgICAgICAgICAgICAgICAgIHN0YXR1czogc3RhdHVzXG4gICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAvLyBzZXQgYSBkaWZmZXJlbnQgZXhwaXJlcyBpZiBkZWZpbmVkIGluIHRoZSBoeXBlcnR5IGNvbmZpZ3VyYXRpb25cblxuICAgICAgICAgICAgICAgICAgaWYgKHAycEhhbmRsZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZVZhbHVlLnAycEhhbmRsZXIgPSBwMnBIYW5kbGVyO1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlVmFsdWUucDJwUmVxdWVzdGVyID0gcDJwUmVxdWVzdGVyO1xuICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAvLyBsb2cubG9nKCdbUmVnaXN0cnkgcmVnaXN0ZXJIeXBlcnR5XSByZWdpc3RlcmluZyBuZXcgSHlwZXJ0eSBhdCBkb21haW4gcmVnaXN0cnkgJywgbWVzc2FnZVZhbHVlKTtcblxuICAgICAgICAgICAgICAgICAgbWVzc2Fn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luZyBuZXcgSHlwZXJ0eSBhdCBkb21haW4gcmVnaXN0cnknKTtcblxuICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VWYWx1ZSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVzZXI6IGVtYWlsVVJMLFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvcjogZGVzY3JpcHRvclVSTCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogYWRkcmVzc1VSTC5hZGRyZXNzWzBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXhwaXJlczogcmVnaXN0cmF0aW9uRXhwaXJlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlczogaHlwZXJ0eUNhcGFiaWxpdGllcy5yZXNvdXJjZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhU2NoZW1lczogaHlwZXJ0eUNhcGFiaWxpdGllcy5kYXRhU2NoZW1hLFxuICAgICAgICAgICAgICAgICAgICAgICAgcnVudGltZTogcnVudGltZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1czogc3RhdHVzXG4gICAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAgIGlmIChwMnBIYW5kbGVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlVmFsdWUucDJwSGFuZGxlciA9IHAycEhhbmRsZXI7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlVmFsdWUucDJwUmVxdWVzdGVyID0gcDJwUmVxdWVzdGVyO1xuICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSB7dHlwZTogJ2NyZWF0ZScsIGZyb206IF90aGlzLnJlZ2lzdHJ5VVJMLCB0bzogJ2RvbWFpbjovL3JlZ2lzdHJ5LicgKyBfdGhpcy5yZWdpc3RyeURvbWFpbiwgYm9keToge3ZhbHVlOiBtZXNzYWdlVmFsdWUsIHBvbGljeTogJ3BvbGljeSd9fTtcblxuICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5fbWVzc2FnZUJ1cy5wb3N0TWVzc2FnZVdpdGhSZXRyaWVzKG1lc3NhZ2UsIF90aGlzLnJlZ2lzdHJhdGlvblJldHJpZXMsIChyZXBseSkgPT57XG4gICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZy5sb2coJ1tSZWdpc3RyeSByZWdpc3Rlckh5cGVydHldIEh5cGVydHkgcmVnaXN0cmF0aW9uIHVwZGF0ZSByZXNwb25zZTogJywgcmVwbHkpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXBseS5ib2R5LmNvZGUgPT09IDIwMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXN1bHQgPSB7IHVybDogYWRkcmVzc1VSTC5hZGRyZXNzWzBdfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocDJwSGFuZGxlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnAycEhhbmRsZXIgPSBwMnBIYW5kbGVyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnAycFJlcXVlc3RlciA9IHAycFJlcXVlc3RlcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZhaWxlZCB0byByZWdpc3RlciBhbiBIeXBlcnR5OiAnICsgcmVwbHkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZy5lcnJvcihlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlKTtcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB0aHJvdyBuZXcgRXJyb3IoJ0ZhaWxlZCB0byByZWdpc3RlciBhbiBIeXBlcnR5OiAnLCByZXBseSk7XG5cbiAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgbG9nLmVycm9yKGUpO1xuICAgICAgICAgICAgICAgICAgcmVqZWN0KGUpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vdGltZXIgdG8ga2VlcCB0aGUgcmVnaXN0cmF0aW9uIGFsaXZlXG4gICAgICAgICAgICAgICAgLy8gdGhlIHRpbWUgaXMgZGVmaW5lZCBieSBhIGxpdHRsZSBsZXNzIHRoYW4gaGFsZiBvZiB0aGUgZXhwaXJlcyB0aW1lIGRlZmluZWRcbiAgICAgICAgICAgICAgICBsZXQga2VlcEFsaXZlVGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpIHtcblxuICAgICAgICAgICAgICAgICAgbGV0IG1lc3NhZ2UgPSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICd1cGRhdGUnLFxuICAgICAgICAgICAgICAgICAgICBmcm9tOiBfdGhpcy5yZWdpc3RyeVVSTCxcbiAgICAgICAgICAgICAgICAgICAgdG86ICdkb21haW46Ly9yZWdpc3RyeS4nICsgX3RoaXMucmVnaXN0cnlEb21haW4sXG4gICAgICAgICAgICAgICAgICAgIGJvZHk6IHsgcmVzb3VyY2U6IGFkZHJlc3NVUkwuYWRkcmVzc1swXSwgdmFsdWU6IHtzdGF0dXM6ICdsaXZlJ30sIG1ldGhvZDogJ3JlZnJlc2gnIH19O1xuXG4gICAgICAgIC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GltZVByb3RvU3R1YlVSTCk7XG4gICAgICAgICAgX3RoaXMucDJwUmVxdWVzdGVyU3R1YltzdHViSURdID0ge1xuICAgICAgICAgICAgdXJsOiBydW50aW1lUHJvdG9TdHViVVJMLFxuICAgICAgICAgICAgc3RhdHVzOiBTVEFUVVMuQ1JFQVRFRFxuICAgICAgICAgIH07XG5cbiAgICAgICAgICBfdGhpcy5zYW5kYm94ZXNMaXN0LnNhbmRib3hbcnVudGltZVByb3RvU3R1YlVSTF0gPSBzYW5kYm94O1xuXG4gICAgICAgICAgLy9TZXR1cCBQMlAgUmVxdWVzdGVyIHBhdGggaW50byBNTlxuXG4gICAgICAgICAgbGV0IG1zZyA9IHtcbiAgICAgICAgICAgIHR5cGU6ICdzdWJzY3JpYmUnLFxuICAgICAgICAgICAgZnJvbTogX3RoaXMucmVnaXN0cnlVUkwsXG4gICAgICAgICAgICB0bzogJ2RvbWFpbjovL21zZy1ub2RlLicgKyBfdGhpcy5fZG9tYWluICsgJy9zbScsXG4gICAgICAgICAgICBib2R5OiB7XG4gICAgICAgICAgICAgIHN1YnNjcmliZTogW3J1bnRpbWVQcm90b1N0dWJVUkxdLFxuICAgICAgICAgICAgICBzb3VyY2U6IF90aGlzLnJlZ2lzdHJ5VVJMXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcblxuICAgICAgICAgIF90aGlzLl9tZXNzYWdlQnVzLnBvc3RNZXNzYWdlKG1zZywgKHJlcGx5KSA9PiB7XG4gICAgICAgICAgICAvLyBsb2cubG9nKCdbUmVnaXN0cnkgLSByZWdpc3RlciBTdHViXSBwMnBSZXF1ZXN0ZXIgcGF0aCBzZXR1cDogJywgcmVwbHkpO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgcmVzb2x2ZShfdGhpcy5wMnBSZXF1ZXN0ZXJTdHViW3N0dWJJRF0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBydW50aW1lUHJvdG9TdHViVVJMID0gJ3J1bn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mRib3hbc2FuZGJveF07XG4gICAgICAgICAgICAgIGNvbnN0IG1hdGNoID0gT2JqZWN0LmtleXMoY29uc3RyYWludHMpLmZpbHRlcihjb25zdHJhaW50ID0+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gKGNvbnN0cmFpbnQgPT09ICdicm93c2VyJyAmJiBjdXJyZW50LnR5cGUgPT09IFNhbmRib3hUeXBlLk5PUk1BTCkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAoY29uc3RyYWludCA9PT0gJ3dpbmRvd1NhbmJveCcgJiYgY3VycmVudC50eXBlID09PSBTYW5kYm94VHlwZS5XSU5ET1cpO1xuXG4gICAgICAgICAgICAgIH0pLmxlbmd0aCA+IDAgPyB0cnVlIDogZmFsc2U7XG5cbiAgICAgICAgICAgICAgaWYgKG1hdGNoKSB7IHJlcXVlc3QgPSBjdXJyZW50OyB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoIXJlcXVlc3QpIHtcbiAgICAgICAgcmVqZWN0KCdubyBzYW5kYm94IGZvdW5kIGZvcjogJyArIHVybCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXNvbHZlKHJlcXVlc3QpO1xuICAgICAgfVxuXG4gICAgfSk7XG4gIH1cblxuICByZXNvbHZlTm9ybWFsU3R1Yih1cmwpIHtcbiAgICAvLyBsb2cubG9nKCdyZXNvbHZlTm9ybWFsU3R1YiAnICsgdXJsKTtcbiAgICBsZXQgX3RoaXMgPSB0aGlzO1xuXG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcblxuICAgICAgLy9zcGxpdCB0aGUgdXJsIHRvIGZpbmQgdGhlIGRvbWFpblVSTC4gZGVhbHMgd2l0aCB0aGUgdXJsIGZvciBleGFtcGxlIGFzOlxuICAgICAgLy9cImh5cGVydHktcnVudGltZTovL3NwMS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RoID09PSBkb21haW5VcmwgJiYgY2hhbmdlLm5hbWUgPT09ICdzdGF0dXMnICYmIGNoYW5nZS5uZXdWYWx1ZSA9PT0gU1RBVFVTLkNSRUFURUQpIHtcbiAgICAgICAgICAgICAgICAvLyBsb2cubG9nKCdbUmVnaXN0cnkgLSByZXNvbHZlXSBwcm90b3N0dWIgaXMgbGl2ZSAnICsgX3RoaXMucHJvdG9zdHVic0xpc3RbZG9tYWluVXJsXSk7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZShfdGhpcy5wcm90b3N0dWJzTGlzdFtkb21haW5VcmxdLnVybCk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBpZiAoIXJlZ2lzdHJlZENvbXBvbmVudCkge1xuICAgICAgICAgICAgICAvLyBsZXRzIGRlcGxveSB0aGUgcHJvdG9zdHViXG4gICAgICAgICAgICAgIGxvZy5pbmZvKCdbUmVnaXN0cnkucmVzb2x2ZV0gdHJpZ2dlciBuZXcgUHJvdG9jb2xTdHViOiAnLCBkb21haW5VcmwpO1xuICAgICAgICAgICAgICBfdGhpcy5sb2FkZXIubG9hZFN0dWIoZG9tYWluVXJsKS50aGVuKCgpID0+IHtcblxuICAgICAgICAgICAgICAgIC8vIGxvZy5sb2coJ1tSZWdpc3RyeSAtIHJlc29sdmVOb3JtYWxTdHViXSBTdHViIGRlcGxveWVkOiAnLCBfdGhpcy5wcm90b3N0dWJzTGlzdFtkb21haW5VcmxdKTtcbiAgICAgICAgICAgICAgfSkuY2F0Y2goKHJlYXNvbikgPT4ge1xuICAgICAgICAgICAgICAgIGxvZy5lcnJvcignW1JlZ2lzdHJ5LnJlc29sdmVOb3JtYWxTdHViXSBFcnJvciByZXNvbHZpbmcgTG9hZCBQcm90b2NvbFN0dWI6ICcsIHJlYXNvbik7XG4gICAgICAgICAgICAgICAgcmVqZWN0KHJlYXNvbik7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuXG4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cmVhc29uKTtcblxuICAgICAgICAgICAgICAgIF90aGlzLnJlc29sdmVOb3JtYWxTdHViKHVybCkudGhlbigocmV0dXJuVVJMKSA9PiB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKHJldHVyblVSTCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG5cbiAgICAgICAgICAgICAgbG9nLmluZm8oJ1tSZWdpc3RyeSAtIHJlc29sdmVdIC0gUDJQOiAnLCBwMnApO1xuICAgICAgICAgICAgICBpZiAoIXAycCkgeyAvLyBubyBwMnAgY29ubmVjdGlvbiBleGlzdHMgYW5kIHRoZSBtZXNzYWdlIHNlbmRlciBkb2VzIG5vdCBhc2sgb25lLiBMZXRzIHVzZSB0aGUgTU4gU3R1YlxuICAgICAgICAgICAgICAgIF90aGlzLnJlc29sdmVOb3JtYWxTdHViKHVybCkudGhlbigocmV0dXJuVVJMKSA9PiB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKHJldHVyblVSTCk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5fc2V0dXBQMlBSZXF1ZXN0ZXIocmVnaXN0ZXJlZFAyUCkudGhlbigocmV0dXJuVVJMKSA9PiB7IC8vIG5vIHAycCBjb25uZWN0aW9uIGV4aXN0cyBidXQgdGhlIG1lc3NhZ2Ugc2VuZGVyIGlzIGFza2luZyBvbmUuIExldHMgdHJ5IHRvIHNldHVwIG9uZVxuICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXR1cm5VUkwpO1xuICAgICAgICAgICAgICAgIH0sIChyZWFzb24pID0+IHtcbiAgICAgICAgICAgICAgICAgIGxvZy5pbmZvKCdbUmVnaXN0cnkgLSBSZXNvbHZlXSAtIFJlYXNvbjogJywgcmVhc29uKTtcblxuICAgICAgICAgICAgICAgICAgX3RoaXMucmVzb2x2ZU5vcm1hbFN0dWIodXJsKS50aGVuKChyZXR1cm5VUkwpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXR1cm5VUkwpO1xuICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9LCAocmVhc29uKSA9PiB7XG4gICAgICAgICAgbG9nLmluZm8oJ1tSZWdpc3RyeSAtIFJlc29sdmVdIC0gUmVhc29uOiAnLCByZWFzb24pO1xuXG4gICAgICAgICAgX3RoaXMucmVzb2x2ZU5vcm1hbFN0dWIodXJsKS50aGVuKChyZXR1cm5VUkwpID0+IHtcbiAgICAgICAgICAgIHJlc29sdmUocmV0dXJuVVJMKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICB9KTtcbiAgfVxuXG4gIF9zZXR1cFAyUFJlcXVlc3RlcihpbnB1dCkge1xuICAgIGxldCBfdGhpcyA9IHRoaXM7XG5cbiAgICBsb2cubG9nKCdbUmVnaXN0cnkuX3NldHVwUDJQQ29ubmVjdGlvbl0gbG9hZFN0dWIgd2l0aCBwMnBSZXF1ZXN0ZXI6ICcsIGlucHV0KTtcblxuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG5cbiAgICAgIGxldCByZW1vdGVSdW50aW1lID0gaW5wdXQucnVudGltZTtcblxuICAgICAgbGV0IHAycENvbmZpZyA9IHsgcmVtb3RlUnVudGltZVVSTDogcmVtb3RlUnVudGltZSwgcDJwSGFuZGxlcjogaW5wdXQucDJwSGFuZGxlciwgcDJwUmVxdWVzdGVyU3R1YjogdHJ1ZSB9O1xuXG4gICAgICAvLyBsZXRzIHByZXBhcmUgdGhlIHAycFJlcXVlc3RlclNUdWIgZGVwbG95bWVudCBieS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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQXduREE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///439\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(441);\nmodule.exports = __webpack_require__(13).Object.keys;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3Qva2V5cy5qcz84YzU2Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2Lm9iamVjdC5rZXlzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5PYmplY3Qua2V5cztcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3Qva2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gNDQwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///440\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.14 Object.keys(O)\nvar toObject = __webpack_require__(76);\nvar $keys = __webpack_require__(67);\n\n__webpack_require__(97)('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3Qua2V5cy5qcz8wOWRjIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi4xNCBPYmplY3Qua2V5cyhPKVxudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgJGtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cycpO1xuXG5yZXF1aXJlKCcuL19vYmplY3Qtc2FwJykoJ2tleXMnLCBmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBmdW5jdGlvbiBrZXlzKGl0KSB7XG4gICAgcmV0dXJuICRrZXlzKHRvT2JqZWN0KGl0KSk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3Qua2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gNDQxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///441\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SandboxType = undefined;\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _SandboxRegistry = __webpack_require__(462);\n\nvar _SandboxRegistry2 = _interopRequireDefault(_SandboxRegistry);\n\nvar _MiniBus2 = __webpack_require__(463);\n\nvar _MiniBus3 = _interopRequireDefault(_MiniBus2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\nvar SandboxType = exports.SandboxType = { APP: 'app', NORMAL: 'normal', WINDOW: 'window' };\n\n/**\n * @author micaelpedrosa@gmail.com\n * Base class to implement external sandbox component\n */\n\nvar Sandbox = function (_MiniBus) {\n (0, _inherits3.default)(Sandbox, _MiniBus);\n\n function Sandbox(capabilities) {\n (0, _classCallCheck3.default)(this, Sandbox);\n\n var _this2 = (0, _possibleConstructorReturn3.default)(this, (Sandbox.__proto__ || (0, _getPrototypeOf2.default)(Sandbox)).call(this));\n\n var _this = _this2;\n\n if (capabilities) {\n _this.capabilities = capabilities;\n }\n\n return _this2;\n }\n\n /**\n * Deploy an instance of the component into the sandbox.\n * @param {string} componentSourceCode Component source code (Hyperty, ProtoStub, etc)\n * @param {URL} componentURL Hyperty, ProtoStub, or any other component address.\n * @param {Config} configuration Config parameters of the component\n * @return {Promise} return deployed if successful, or any other string with an error\n */\n\n\n (0, _createClass3.default)(Sandbox, [{\n key: 'deployComponent',\n value: function deployComponent(componentSourceCode, componentURL, configuration) {\n\n var _this = this;\n\n // let messageFactory = _this.messageFactory;\n\n return new _promise2.default(function (resolve, reject) {\n //FLOW-OUT: deploy message for the internal SandboxRegistry -> _onDeploy\n var deployMessage = {\n type: 'create', from: _SandboxRegistry2.default.ExternalDeployAddress, to: _SandboxRegistry2.default.InternalDeployAddress,\n body: { url: componentURL, sourceCode: componentSourceCode, config: configuration }\n };\n\n //send message into the sandbox internals and wait for reply\n _this.postMessage(deployMessage, function (reply) {\n if (reply.body.code === 200) {\n //is this response complaint with the spec?\n resolve('deployed');\n } else {\n reject(reply.body.desc);\n }\n });\n });\n }\n\n /**\n * Remove the instance of a previously deployed component.\n * @param {URL} componentURL Hyperty, ProtoStub, or any other component address.\n * @return {Promise} return undeployed if successful, or any other string with an error\n */\n\n }, {\n key: 'removeComponent',\n value: function removeComponent(componentURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n //FLOW-OUT: un-deploy message for the internal SandboxRegistry -> _onRemove\n var removeMessage = {\n type: 'delete', from: _SandboxRegistry2.default.ExternalDeployAddress, to: _SandboxRegistry2.default.InternalDeployAddress,\n body: { url: componentURL }\n };\n\n //send message into the sandbox internals and wait for reply\n _this.postMessage(removeMessage, function (reply) {\n if (reply.body.code === 200) {\n //is this response complaint with the spec?\n resolve('undeployed');\n } else {\n reject(reply.body.desc);\n }\n });\n });\n }\n\n /**\n * Matches Sandbox capabilities against provided capabilities. Used to check if sandbox provides all required capabilities\n * @param {RuntimeCapabilities} constraints set of RuntimeCapabilities to match with.\n * @return {boolean} return true if constraints are matched false otherwise\n */\n\n }, {\n key: 'matches',\n value: function matches(constraints) {\n var _this = this;\n\n var filtered = (0, _keys2.default)(constraints).filter(function (key) {\n return !(_this.capabilities[key] && _this.capabilities[key] === constraints[key]);\n });\n\n if (filtered.length === 0) {\n return true;\n } else {\n return !constraints[filtered];\n }\n }\n }]);\n return Sandbox;\n}(_MiniBus3.default);\n\nexports.default = Sandbox;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zYW5kYm94L1NhbmRib3guanM/MGEzMyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE2IFFVT0JJUyBORVRXT1JLUyBTTFxuKiBDb3B5cmlnaHQgMjAxNiBGUkFVTkhPRkVSLUdFU0VMTFNDSEFGVCBaVVIgRk9FUkRFUlVORyBERVIgQU5HRVdBTkRURU4gRk9SU0NIVU5HIEUuVlxuKiBDb3B5cmlnaHQgMjAxNiBPUkFOR0UgU0FcbiogQ29weXJpZ2h0IDIwMTYgRGV1dHNjaGUgVGVsZWtvbSBBR1xuKiBDb3B5cmlnaHQgMjAxNiBBcG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ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQXNCQTtBQUNBOzs7QUFBQTtBQUNBOzs7OztBQXhCQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQXlCQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7OztBQUVBO0FBQUE7QUFDQTtBQURBO0FBQ0E7QUFHQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBQ0E7QUFQQTtBQVFBO0FBQ0E7QUFDQTs7Ozs7Ozs7Ozs7QUFPQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRkE7QUFDQTtBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7OztBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFGQTtBQUNBO0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7O0FBTUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7Ozs7O0FBSUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///442\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(444);\nmodule.exports = __webpack_require__(13).Object.getPrototypeOf;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvZ2V0LXByb3RvdHlwZS1vZi5qcz83ZDJlIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2Lm9iamVjdC5nZXQtcHJvdG90eXBlLW9mJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5PYmplY3QuZ2V0UHJvdG90eXBlT2Y7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L2dldC1wcm90b3R5cGUtb2YuanNcbi8vIG1vZHVsZSBpZCA9IDQ0M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///443\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = __webpack_require__(76);\nvar $getPrototypeOf = __webpack_require__(189);\n\n__webpack_require__(97)('getPrototypeOf', function () {\n return function getPrototypeOf(it) {\n return $getPrototypeOf(toObject(it));\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuZ2V0LXByb3RvdHlwZS1vZi5qcz8yYTFlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi45IE9iamVjdC5nZXRQcm90b3R5cGVPZihPKVxudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgJGdldFByb3RvdHlwZU9mID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdwbycpO1xuXG5yZXF1aXJlKCcuL19vYmplY3Qtc2FwJykoJ2dldFByb3RvdHlwZU9mJywgZnVuY3Rpb24gKCkge1xuICByZXR1cm4gZnVuY3Rpb24gZ2V0UHJvdG90eXBlT2YoaXQpIHtcbiAgICByZXR1cm4gJGdldFByb3RvdHlwZU9mKHRvT2JqZWN0KGl0KSk7XG4gIH07XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuZ2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gNDQ0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///444\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(446), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9zeW1ib2wvaXRlcmF0b3IuanM/NjczOCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHsgXCJkZWZhdWx0XCI6IHJlcXVpcmUoXCJjb3JlLWpzL2xpYnJhcnkvZm4vc3ltYm9sL2l0ZXJhdG9yXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL3N5bWJvbC9pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gNDQ1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///445\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(128);\n__webpack_require__(190);\nmodule.exports = __webpack_require__(141).f('iterator');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9zeW1ib2wvaXRlcmF0b3IuanM/ZmU3ZSJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNi5zdHJpbmcuaXRlcmF0b3InKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvd2ViLmRvbS5pdGVyYWJsZScpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL193a3MtZXh0JykuZignaXRlcmF0b3InKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9zeW1ib2wvaXRlcmF0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDQ0NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///446\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(448), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9zeW1ib2wuanM/ZTUwNSJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHsgXCJkZWZhdWx0XCI6IHJlcXVpcmUoXCJjb3JlLWpzL2xpYnJhcnkvZm4vc3ltYm9sXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL3N5bWJvbC5qc1xuLy8gbW9kdWxlIGlkID0gNDQ3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///447\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(449);\n__webpack_require__(182);\n__webpack_require__(454);\n__webpack_require__(455);\nmodule.exports = __webpack_require__(13).Symbol;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9zeW1ib2wvaW5kZXguanM/MDcwNyJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNi5zeW1ib2wnKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2Lm9iamVjdC50by1zdHJpbmcnKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM3LnN5bWJvbC5hc3luYy1pdGVyYXRvcicpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczcuc3ltYm9sLm9ic2VydmFibGUnKTtcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9fY29yZScpLlN5bWJvbDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9zeW1ib2wvaW5kZXguanNcbi8vIG1vZHVsZSBpZCA9IDQ0OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///448\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// ECMAScript 6 symbols shim\nvar global = __webpack_require__(22);\nvar has = __webpack_require__(59);\nvar DESCRIPTORS = __webpack_require__(44);\nvar $export = __webpack_require__(21);\nvar redefine = __webpack_require__(185);\nvar META = __webpack_require__(450).KEY;\nvar $fails = __webpack_require__(66);\nvar shared = __webpack_require__(136);\nvar setToStringTag = __webpack_require__(95);\nvar uid = __webpack_require__(94);\nvar wks = __webpack_require__(23);\nvar wksExt = __webpack_require__(141);\nvar wksDefine = __webpack_require__(142);\nvar enumKeys = __webpack_require__(451);\nvar isArray = __webpack_require__(452);\nvar anObject = __webpack_require__(41);\nvar isObject = __webpack_require__(36);\nvar toIObject = __webpack_require__(45);\nvar toPrimitive = __webpack_require__(132);\nvar createDesc = __webpack_require__(73);\nvar _create = __webpack_require__(133);\nvar gOPNExt = __webpack_require__(453);\nvar $GOPD = __webpack_require__(143);\nvar $DP = __webpack_require__(40);\nvar $keys = __webpack_require__(67);\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(202).f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(77).f = $propertyIsEnumerable;\n __webpack_require__(139).f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !__webpack_require__(92)) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(58)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQ5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5zeW1ib2wuanM/N2Q2NyJdLCJzb3Vy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n//# sourceURL=webpack-internal:///449\n")},function(module,exports,__webpack_require__){eval("var META = __webpack_require__(94)('meta');\nvar isObject = __webpack_require__(36);\nvar has = __webpack_require__(59);\nvar setDesc = __webpack_require__(40).f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !__webpack_require__(66)(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19tZXRhLmpzP2QzYTMiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIE1FVEEgPSByZXF1aXJlKCcuL191aWQnKSgnbWV0YScpO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9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yYXJ5L21vZHVsZXMvX21ldGEuanNcbi8vIG1vZHVsZSBpZCA9IDQ1MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///450\n")},function(module,exports,__webpack_require__){eval("// all enumerable object keys, includes symbols\nvar getKeys = __webpack_require__(67);\nvar gOPS = __webpack_require__(139);\nvar pIE = __webpack_require__(77);\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19lbnVtLWtleXMuanM/NWRjZSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBhbGwgZW51bWVyYWJsZSBvYmplY3Qga2V5cywgaW5jbHVkZXMgc3ltYm9sc1xudmFyIGdldEtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cycpO1xudmFyIGdPUFMgPSByZXF1aXJlKCcuL19vYmplY3QtZ29wcycpO1xudmFyIHBJRSA9IHJlcXVpcmUoJy4vX29iamVjdC1waWUnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHZhciByZXN1bHQgPSBnZXRLZXlzKGl0KTtcbiAgdmFyIGdldFN5bWJvbHMgPSBnT1BTLmY7XG4gIGlmIChnZXRTeW1ib2xzKSB7XG4gICAgdmFyIHN5bWJvbHMgPSBnZXRTeW1ib2xzKGl0KTtcbiAgICB2YXIgaXNFbnVtID0gcElFLmY7XG4gICAgdmFyIGkgPSAwO1xuICAgIHZhciBrZXk7XG4gICAgd2hpbGUgKHN5bWJvbHMubGVuZ3RoID4gaSkgaWYgKGlzRW51bS5jYWxsKGl0LCBrZXkgPSBzeW1ib2xzW2krK10pKSByZXN1bHQucHVzaChrZXkpO1xuICB9IHJldHVybiByZXN1bHQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2VudW0ta2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gNDUxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///451\n")},function(module,exports,__webpack_require__){eval("// 7.2.2 IsArray(argument)\nvar cof = __webpack_require__(75);\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pcy1hcnJheS5qcz9lZDQzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMi4yIElzQXJyYXkoYXJndW1lbnQpXG52YXIgY29mID0gcmVxdWlyZSgnLi9fY29mJyk7XG5tb2R1bGUuZXhwb3J0cyA9IEFycmF5LmlzQXJyYXkgfHwgZnVuY3Rpb24gaXNBcnJheShhcmcpIHtcbiAgcmV0dXJuIGNvZihhcmcpID09ICdBcnJheSc7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lzLWFycmF5LmpzXG4vLyBtb2R1bGUgaWQgPSA0NTJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///452\n")},function(module,exports,__webpack_require__){eval("// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(45);\nvar gOPN = __webpack_require__(202).f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUzLmpzIiw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tZ29wbi1leHQuanNcbi8vIG1vZHVsZSBpZCA9IDQ1M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///453\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(142)('asyncIterator');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5zeW1ib2wuYXN5bmMtaXRlcmF0b3IuanM/Mzk4OSJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuL193a3MtZGVmaW5lJykoJ2FzeW5jSXRlcmF0b3InKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5zeW1ib2wuYXN5bmMtaXRlcmF0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDQ1NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///454\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(142)('observable');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5zeW1ib2wub2JzZXJ2YWJsZS5qcz80MTY3Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3drcy1kZWZpbmUnKSgnb2JzZXJ2YWJsZScpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM3LnN5bWJvbC5vYnNlcnZhYmxlLmpzXG4vLyBtb2R1bGUgaWQgPSA0NTVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///455\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(457), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZi5qcz85MjIwIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0geyBcImRlZmF1bHRcIjogcmVxdWlyZShcImNvcmUtanMvbGlicmFyeS9mbi9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZlwiKSwgX19lc01vZHVsZTogdHJ1ZSB9O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gNDU2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///456\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(458);\nmodule.exports = __webpack_require__(13).Object.setPrototypeOf;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZi5qcz84YmYwIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2Lm9iamVjdC5zZXQtcHJvdG90eXBlLW9mJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5PYmplY3Quc2V0UHJvdG90eXBlT2Y7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L3NldC1wcm90b3R5cGUtb2YuanNcbi8vIG1vZHVsZSBpZCA9IDQ1N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///457\n")},function(module,exports,__webpack_require__){eval("// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = __webpack_require__(21);\n$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(459).set });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3Quc2V0LXByb3RvdHlwZS1vZi5qcz83YjE4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMy4xOSBPYmplY3Quc2V0UHJvdG90eXBlT2YoTywgcHJvdG8pXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuJGV4cG9ydCgkZXhwb3J0LlMsICdPYmplY3QnLCB7IHNldFByb3RvdHlwZU9mOiByZXF1aXJlKCcuL19zZXQtcHJvdG8nKS5zZXQgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczYub2JqZWN0LnNldC1wcm90b3R5cGUtb2YuanNcbi8vIG1vZHVsZSBpZCA9IDQ1OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///458\n")},function(module,exports,__webpack_require__){eval("// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = __webpack_require__(36);\nvar anObject = __webpack_require__(41);\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = __webpack_require__(65)(Function.call, __webpack_require__(143).f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n//# sourceURL=[module]\n//# s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nJheSk7XG4gICAgICB9IGNhdGNoIChlKSB7IGJ1Z2d5ID0gdHJ1ZTsgfVxuICAgICAgcmV0dXJuIGZ1bmN0aW9uIHNldFByb3RvdHlwZU9mKE8sIHByb3RvKSB7XG4gICAgICAgIGNoZWNrKE8sIHByb3RvKTtcbiAgICAgICAgaWYgKGJ1Z2d5KSBPLl9fcHJvdG9fXyA9IHByb3RvO1xuICAgICAgICBlbHNlIHNldChPLCBwcm90byk7XG4gICAgICAgIHJldHVybiBPO1xuICAgICAgfTtcbiAgICB9KHt9LCBmYWxzZSkgOiB1bmRlZmluZWQpLFxuICBjaGVjazogY2hlY2tcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fc2V0LXByb3RvLmpzXG4vLyBtb2R1bGUgaWQgPSA0NTlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///459\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(461);\nvar $Object = __webpack_require__(13).Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvY3JlYXRlLmpzP2EwY2UiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmNyZWF0ZScpO1xudmFyICRPYmplY3QgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0O1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBjcmVhdGUoUCwgRCkge1xuICByZXR1cm4gJE9iamVjdC5jcmVhdGUoUCwgRCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9jcmVhdGUuanNcbi8vIG1vZHVsZSBpZCA9IDQ2MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///460\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(21);\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: __webpack_require__(133) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuY3JlYXRlLmpzP2IwNWYiXSwic291cmNlc0NvbnRlbnQiOlsidmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbi8vIDE5LjEuMi4yIC8gMTUuMi4zLjUgT2JqZWN0LmNyZWF0ZShPIFssIFByb3BlcnRpZXNdKVxuJGV4cG9ydCgkZXhwb3J0LlMsICdPYmplY3QnLCB7IGNyZWF0ZTogcmVxdWlyZSgnLi9fb2JqZWN0LWNyZWF0ZScpIH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5jcmVhdGUuanNcbi8vIG1vZHVsZSBpZCA9IDQ2MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///461\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n/**\n * @author micaelpedrosa@gmail.com\n * Base class to implement internal deploy manager of components.\n */\n\n/**\n * @author micaelpedrosa@gmail.com\n * Internal component registry of all sandboxes.\n * Process internal request's for component deploy.\n */\nvar SandboxRegistry = function () {\n /* private\n _components: \n */\n\n function SandboxRegistry(bus) {\n (0, _classCallCheck3.default)(this, SandboxRegistry);\n\n var _this = this;\n\n _this._bus = bus;\n _this._components = {};\n\n bus.addListener(SandboxRegistry.InternalDeployAddress, function (msg) {\n //console.log('SandboxRegistry-RCV: ', msg);\n // let responseMsg = {\n // id: msg.id, type: 'response', from: SandboxRegistry.InternalDeployAddress, to: SandboxRegistry.ExternalDeployAddress\n // };\n\n switch (msg.type) {\n case 'create':\n _this._onDeploy(msg);break;\n case 'delete':\n _this._onRemove(msg);break;\n }\n });\n }\n\n (0, _createClass3.default)(SandboxRegistry, [{\n key: '_responseMsg',\n value: function _responseMsg(msg, code, value) {\n\n var _this = this;\n\n // let messageFactory = _this.messageFactory;\n\n //FLOW-OUT: generic response message to external Sandbox (deploy and un-deploy responses)\n var responseMsg = {\n id: msg.id, type: 'response', from: SandboxRegistry.InternalDeployAddress, to: SandboxRegistry.ExternalDeployAddress\n };\n\n // Chanege the origin message, because the response;\n // msg.from = SandboxRegistry.InternalDeployAddress;\n // msg.to = SandboxRegistry.ExternalDeployAddress;\n\n var body = {};\n if (code) body.code = code;\n if (value) body.desc = value;\n\n responseMsg.body = body;\n\n // return messageFactory.createResponse(msg, code, value);\n return responseMsg;\n }\n\n //FLOW-IN: message from the runtime core Sandbox -> deployComponent\n\n }, {\n key: '_onDeploy',\n value: function _onDeploy(msg) {\n var _this = this;\n var config = msg.body.config;\n var componentURL = msg.body.url;\n var sourceCode = msg.body.sourceCode;\n var responseCode = void 0;\n var responseDesc = void 0;\n\n if (!_this._components.hasOwnProperty(componentURL)) {\n try {\n _this._components[componentURL] = _this._create(componentURL, sourceCode, config);\n responseCode = 200;\n } catch (error) {\n responseCode = 500;\n responseDesc = error;\n }\n } else {\n responseCode = 500;\n responseDesc = 'Instance ' + componentURL + ' already exist!';\n }\n\n var responseMsg = _this._responseMsg(msg, responseCode, responseDesc);\n _this._bus.postMessage(responseMsg);\n }\n\n //FLOW-IN: message from the runtime core Sandbox -> removeComponent\n\n }, {\n key: '_onRemove',\n value: function _onRemove(msg) {\n var _this = this;\n var componentURL = msg.body.url;\n var responseCode = void 0;\n var responseDesc = void 0;\n\n if (_this._components.hasOwnProperty(componentURL)) {\n //remove component from the pool and all listeners\n delete _this._components[componentURL];\n _this._bus.removeAllListenersOf(componentURL);\n responseCode = 200;\n } else {\n responseCode = 500;\n responseDesc = 'Instance ' + componentURL + ' doesn\\'t exist!';\n }\n\n var responseMsg = _this._responseMsg(msg, responseCode, responseDesc);\n\n _this._bus.postMessage(responseMsg);\n }\n\n /**\n * This method should be implemented by the internal sandbox code.\n * @param {ComponentURL} url URL used for the instance\n * @param {string} sourceCode Code of the component\n * @param {Config} config Configuration parameters\n * @return {Object} Returns instance of the component or throw an error \"throw 'error message'\"\n */\n\n }, {\n key: '_create',\n value: function _create(url, sourceCode, config) {\n //implementation specific\n /* example code:\n eval(sourceCode);\n return activate(url, _this._bus, config);\n */\n }\n }, {\n key: 'components',\n get: function get() {\n return this._components;\n }\n }]);\n return SandboxRegistry;\n}();\n\nSandboxRegistry.ExternalDeployAddress = 'hyperty-runtime://sandbox/external';\nSandboxRegistry.InternalDeployAddress = 'hyperty-runtime://sandbox/internal';\n\nexports.default = SandboxRegistry;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zYW5kYm94L1NhbmRib3hSZWdpc3RyeS5qcz9lZTFjIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIw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7Ozs7QUFLQTs7Ozs7QUFLQTtBQUNBOzs7O0FBSUE7QUFBQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBQUE7QUFGQTtBQUlBO0FBQ0E7QUFDQTs7O0FBR0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBREE7QUFDQTtBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7Ozs7O0FBT0E7QUFDQTtBQUNBOzs7O0FBSUE7OztBQXhGQTtBQUFBO0FBQUE7Ozs7O0FBMkZBO0FBQ0E7QUFDQTtBQUNBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///462\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _Bus2 = __webpack_require__(204);\n\nvar _Bus3 = _interopRequireDefault(_Bus2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* @author micaelpedrosa@gmail.com\n* Message BUS Interface is an extension of the Bus\n* It is used mainly in the internal sandbox routing.\n*/\nvar MiniBus = function (_Bus) {\n (0, _inherits3.default)(MiniBus, _Bus);\n\n function MiniBus() {\n (0, _classCallCheck3.default)(this, MiniBus);\n return (0, _possibleConstructorReturn3.default)(this, (MiniBus.__proto__ || (0, _getPrototypeOf2.default)(MiniBus)).call(this));\n }\n\n /**\n * Post a message for routing. Message is routed directly to the external routing _onPostMessage.\n * @param {Message} inMsg JSON with mandatory Message structure {id, type, from, to}\n * @param {Callback} responseCallback Optional callback if a response is expected from the request. A response will be always sent, even if it is a \"Timeout\".\n * @return {number} the Message id\n */\n\n\n (0, _createClass3.default)(MiniBus, [{\n key: 'postMessage',\n value: function postMessage(inMsg, responseCallback, timeout) {\n var _this = this;\n\n _this._genId(inMsg);\n _this._responseCallback(inMsg, responseCallback, timeout);\n\n //always send to external (to core MessageBus)\n _this._onPostMessage(inMsg);\n\n return inMsg.id;\n }\n\n //internal method used when a message is received by an external routing system\n\n }, {\n key: '_onMessage',\n value: function _onMessage(msg) {\n var _this = this;\n\n if (!_this._onResponse(msg)) {\n var itemList = _this._subscriptions[msg.to];\n if (itemList) {\n _this._publishOn(itemList, msg);\n if (!msg.to.startsWith('hyperty')) {\n _this._publishOnDefault(msg);\n }\n } else {\n _this._publishOnDefault(msg);\n }\n }\n }\n }]);\n return MiniBus;\n}(_Bus3.default); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n\nexports.default = MiniBus;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9idXMvTWluaUJ1cy5qcz9lNTIwIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1JTQ0hVTkcgRS5WXG4qIENvcHlyaWdodCAyMDE2IE9SQU5HRSBTQVxuKiBDb3B5cmlnaHQgMjAxNiBEZXV0c2NoZSBUZWxla29tIEFHXG4qIENvcHlyaWdodCAy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s7QUFwRUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQXdFQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///463\n")},function(module,exports,__webpack_require__){eval("var core = __webpack_require__(13);\nvar $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });\nmodule.exports = function stringify(it) { // eslint-disable-line no-unused-vars\n return $JSON.stringify.apply($JSON, arguments);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9qc29uL3N0cmluZ2lmeS5qcz9hYTQyIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBjb3JlID0gcmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9fY29yZScpO1xudmFyICRKU09OID0gY29yZS5KU09OIHx8IChjb3JlLkpTT04gPSB7IHN0cmluZ2lmeTogSlNPTi5zdHJpbmdpZnkgfSk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIHN0cmluZ2lmeShpdCkgeyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXVudXNlZC12YXJzXG4gIHJldHVybiAkSlNPTi5zdHJpbmdpZnkuYXBwbHkoJEpTT04sIGFyZ3VtZW50cyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL2pzb24vc3RyaW5naWZ5LmpzXG4vLyBtb2R1bGUgaWQgPSA0NjRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///464\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _RegistryDataModel2 = __webpack_require__(466);\n\nvar _RegistryDataModel3 = _interopRequireDefault(_RegistryDataModel2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* @author: Gil Dias (gil.dias@tecnico.ulisboa.pt)\n* HypertyInstance Data Model used to model instances of Hyperties running in devices and servers.\n*/\nvar HypertyInstance = function (_RegistryDataModel) {\n (0, _inherits3.default)(HypertyInstance, _RegistryDataModel);\n\n function HypertyInstance(id, url, descriptorURL, descriptor, hypertyURL, user, guid, runtime, context, p2pHandler, p2pRequester, dataSchemes, resources, startingTime, lastModified) {\n (0, _classCallCheck3.default)(this, HypertyInstance);\n\n var _this2 = (0, _possibleConstructorReturn3.default)(this, (HypertyInstance.__proto__ || (0, _getPrototypeOf2.default)(HypertyInstance)).call(this, id, url, descriptorURL, p2pRequester, startingTime, lastModified));\n\n var _this = _this2;\n _this._descriptor = descriptor;\n _this._hypertyURL = hypertyURL;\n _this._user = user;\n _this._guid = guid;\n _this._runtime = runtime;\n _this._context = context;\n _this._p2pHandler = p2pHandler;\n _this._dataSchemes = dataSchemes;\n _this._resources = resources;\n return _this2;\n }\n\n (0, _createClass3.default)(HypertyInstance, [{\n key: 'user',\n set: function set(identity) {\n var _this = this;\n _this.user = identity;\n },\n get: function get() {\n var _this = this;\n return _this._user;\n }\n }, {\n key: 'hypertyURL',\n get: function get() {\n var _this = this;\n return _this._hypertyURL;\n }\n }, {\n key: 'descriptor',\n get: function get() {\n var _this = this;\n return _this._descriptor;\n }\n }, {\n key: 'objectName',\n get: function get() {\n var _this = this;\n return _this._descriptor._objectName;\n }\n }, {\n key: 'p2pHandler',\n get: function get() {\n var _this = this;\n return _this._p2pHandler;\n }\n }, {\n key: 'dataSchemes',\n get: function get() {\n var _this = this;\n return _this._dataSchemes;\n }\n }, {\n key: 'resources',\n get: function get() {\n var _this = this;\n return _this._resources;\n }\n }, {\n key: 'runtimeURL',\n get: function get() {\n var _this = this;\n return _this._runtime;\n }\n }]);\n return HypertyInstance;\n}(_RegistryDataModel3.default); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n\nexports.default = HypertyInstance;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9yZWdpc3RyeS9IeXBlcnR5SW5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G4gICAgcmV0dXJuIF90aGlzLl9yZXNvdXJjZXM7XG4gIH1cblxuICBnZXQgcnVudGltZVVSTCgpIHtcbiAgICBsZXQgX3RoaXMgPSB0aGlzO1xuICAgIHJldHVybiBfdGhpcy5fcnVudGltZTtcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBIeXBlcnR5SW5zdGFuY2U7XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gc3JjL3JlZ2lzdHJ5L0h5cGVydHlJbnN0YW5jZS5qcyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFzQkE7QUFDQTs7Ozs7QUFDQTs7OztBQUlBOzs7QUFFQTtBQUFBO0FBQ0E7QUFEQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFYQTtBQVlBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBOzs7QUF2RkE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQTBGQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///465\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the "License");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an "AS IS" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n/**\n* @author: Gil Dias (gil.dias@tecnico.ulisboa.pt)\n* Registry Data Model includes all Objects to be handled by the Registry functionality including\n*/\nvar RegistryDataModel = function () {\n function RegistryDataModel(id, url, descriptorURL, p2pRequester, startingTime, lastModified, status, stubs, stubsConfiguration) {\n (0, _classCallCheck3.default)(this, RegistryDataModel);\n\n var _this = this;\n\n _this._id = id;\n _this._url = url;\n _this._descriptorURL = descriptorURL;\n _this._startingTime = startingTime;\n _this._lastModified = lastModified;\n _this._status = status;\n _this._stubs = stubs;\n _this._stubsConfiguration = stubsConfiguration;\n _this._p2pRequester = p2pRequester;\n }\n\n (0, _createClass3.default)(RegistryDataModel, [{\n key: "id",\n get: function get() {\n var _this = this;\n return _this._id;\n }\n }, {\n key: "url",\n get: function get() {\n var _this = this;\n return _this._url;\n }\n }, {\n key: "descriptor",\n get: function get() {\n var _this = this;\n return _this._descriptorURL;\n }\n }, {\n key: "p2pRequester",\n get: function get() {\n var _this = this;\n return _this._p2pRequester;\n }\n }, {\n key: "lastModified",\n get: function get() {\n var _this = this;\n return _this._lastModified;\n }\n }]);\n return RegistryDataModel;\n}();\n\nexports.default = RegistryDataModel;\nmodule.exports = exports["default"];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9yZWdpc3RyeS9SZWdpc3RyeURhdGFNb2RlbC5qcz83YTJmIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1JTQ0hVTkcgRS5WXG4qIENvcHlyaWdodCAyMDE2IE9SQU5HRSBTQVxuKiBDb3B5cmlnaHQgMjAxNiBEZXV0c2NoZSBUZWxla29tIEFHXG4qIENvcHlyaWdodCAyMDE2IEFwaXplZVxuKiBDb3B5cmlnaHQgMjAxNiBURUNITklTQ0hFIFVOSVZFUlNJVEFUIEJFUkxJTlxuKlxuKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgXCJMaWNlbnNlXCIpO1xuKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuXG4qIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdFxuKlxuKiAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMFxuKlxuKiBVbmxlc3M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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///466\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('P2PConnectionResolve');\n\n/**\n* To process address resolution for p2p connections\n*/\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\n// Log System\n\nvar P2PConnectionResolve = function () {\n function P2PConnectionResolve(registry) {\n (0, _classCallCheck3.default)(this, P2PConnectionResolve);\n\n var _this = this;\n _this._registry = registry;\n _this._remoteP2PEntities = {}; // All remote entities and associated runtime url that are reachable with existing p2p connections\n }\n\n /**\n * Verifies if remote Entity can be reached with a P2P Connection.\n * @param {URL.URL} info object URL\n * @return {HypertyDataObjectInstance} addressURL return the Data Object instance registered URL, return undefined otherwise\n */\n\n (0, _createClass3.default)(P2PConnectionResolve, [{\n key: 'checkP2P',\n value: function checkP2P(msg) {\n\n if (!msg.hasOwnProperty('to')) {\n // throw Error('The p2p verification was failed');\n return _promise2.default.reject('The p2p verification was failed');\n }\n\n var scheme = msg.to.split('://')[0];\n\n var comp = msg.to.split('://')[1].split('/')[2];\n\n var url = void 0;\n\n if (comp) url = msg.to.substring(0, msg.to.indexOf('/' + comp));else url = msg.to;\n\n var p2p = {};\n\n if (msg.body && msg.body.p2p) p2p.p2p = msg.body.p2p;\n\n if (msg.body && msg.body.p2pHandler && msg.body.p2pRequester) {\n p2p.p2pHandler = msg.body.p2pHandler;\n p2p.p2pRequester = msg.body.p2pRequester;\n p2p.runtime = msg.body.p2pHandler.split('/p2phandler/')[0];\n }\n\n switch (scheme) {\n case 'runtime':\n return this.checkP2PRuntime(url, p2p);\n break;\n default:\n return this.checkP2PEntity(url, p2p);\n break;\n\n }\n }\n\n /**\n * Verifies if remote Entity (Hyperty or Data Object) can be reached with a P2P Connection.\n * @param {string} url Remote Entity URL to be checked\n * @param {object} p2p p2p information to be used including ´runtime´ with remote Runtime URL, 'p2pHandler' remote P2P Handler Stub URL and p2pRequester with Catalogue URL of P2P Requester to be used\n * @return {promise} registeredEntity if p2p connection is possible it returns p2p information to be used in the connection, otherwise the promise is rejected\n */\n\n }, {\n key: 'checkP2PEntity',\n value: function checkP2PEntity(url, p2p) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var remoteEntity = _this._remoteP2PEntities[url];\n\n if (remoteEntity) resolve(remoteEntity);else if (p2p.runtime) resolve(p2p); // use provided p2p if available in the message body\n else if (p2p.p2p) {\n // otherwise look on Domain Registry\n\n log.log('[Registry - checkP2PEntity] - search in Domain Registry: ', url);\n\n var message = {\n type: 'read',\n from: _this._registry.registryURL,\n to: 'domain://registry.' + _this._registry._domain,\n body: {\n resource: url\n }\n };\n\n _this._registry._messageBus.postMessage(message, function (reply) {\n log.log('[Registry - checkP2PEntity] Domain Registry reply', reply);\n if ('value' in reply.body) {\n\n //todo: store retrieved entity\n var resolvedEntity = reply.body.value;\n\n if (resolvedEntity.hasOwnProperty('p2pHandler')) {\n resolve(resolvedEntity);\n } else {\n reject('[Registry checkP2PEntity] Hyperty found does not support P2P', reply.body.value);\n }\n } else {\n reject('[Registry checkP2PEntity] Hyperty with P2PHandler not found', reply.body.code);\n }\n });\n } else reject('[Registry checkP2PEntity] No P2P Connection available for ', url);\n });\n }\n\n /**\n * Verifies if remote Runtime can be reached with a P2P Connection.\n * @param {URL.URL} runtimeURL Runtime URL\n * @return {Object} p2pConnection return the P2PConnection instance registered URL, return undefined otherwise\n */\n\n }, {\n key: 'checkP2PRuntime',\n value: function checkP2PRuntime(runtimeURL, p2p) {\n var _this = this;\n\n var registeredRuntime = {};\n\n // look on locally stored p2p connections\n return new _promise2.default(function (resolve, reject) {\n if (_this._registry.p2pConnectionList[runtimeURL]) {\n resolve({ runtime: runtimeURL });\n } else if (p2p.runtime) {\n registeredRuntime = p2p;\n resolve(registeredRuntime);\n } else reject('[Registry.P2PConnectionResolve.checkP2PRuntime] No P2P Connection found to ', runtimeURL);\n });\n }\n\n /**\n * Verifies if remote Hyperty can be reached with a P2P Connection.\n * @param {JSON} info object or entity charateristics info\n * @return {addressURL} addressURL return the URL if there is any previousy registered URL, return undefined otherwise\n */\n\n }, {\n key: 'checkP2PHyperty',\n value: function checkP2PHyperty(hypertyURL, p2p) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var hyperty = void 0;\n\n // look on locally stored hyperties\n\n for (var i in _this._registry.remoteHypertyList) {\n hyperty = _this._registry.remoteHypertyList[i];\n\n log.log('[Registry - checkP2PHyperty] - for each Hyperty: ', hyperty);\n\n // todo: change to \"hyperty.url\" to be aligned with hyperty instance data model spec\n\n if (hyperty.hypertyID === hypertyURL) {\n\n if (hyperty.hasOwnProperty('p2pHandler')) {\n resolve(hyperty);\n } else {\n reject('[Registry checkP2PHyperty] Hyperty found does not support P2P', hyperty);\n }\n return;\n }\n }\n\n if (!hyperty && p2p.runtime) resolve(p2p); // use provided p2p if available in the message body\n else if (!hyperty && p2p.p2p) {\n // otherwise look on Domain Registry\n\n log.log('[Registry - checkP2PHyperty] - search in Domain Registry: ', hyperty);\n\n var message = {\n type: 'read',\n from: _this._registry.registryURL,\n to: 'domain://registry.' + _this._registry._domain,\n body: {\n resource: hypertyURL\n }\n };\n\n _this._registry._messageBus.postMessage(message, function (reply) {\n log.log('[Registry - checkP2PHyperty] Domain Registry reply', reply);\n if ('value' in reply.body) {\n\n //todo: store retrieved hyperty\n var resolvedHyperty = reply.body.value;\n\n _this._registry.remoteHypertyList.push(resolvedHyperty);\n\n if (resolvedHyperty.hasOwnProperty('p2pHandler')) {\n resolve(resolvedHyperty);\n } else {\n reject('[Registry checkP2PHyperty] Hyperty found does not support P2P', reply.body.value);\n }\n } else {\n reject('[Registry checkP2PHyperty] Hyperty with P2PHandler not found', reply.body.code);\n }\n });\n } else reject('[Registry checkP2PHyperty] No P2P Connection available for ', hypertyURL);\n });\n }\n\n /**\n * Verifies if remote Data Object can be reached with a P2P Connection.\n * @param {URL.URL} DataObjectURL object URL\n * @return {HypertyDataObjectInstance} addressURL return the Data Object instance registered URL, return undefined otherwise\n */\n\n }, {\n key: 'checkP2PDataObject',\n value: function checkP2PDataObject(url, p2p) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n // look on locally stored Remote Data Objects\n\n var dataobject = _this._registry.remoteDataObjectList.filter(function (i) {\n return _this._registry.remoteDataObjectList[i].url === url;\n });\n\n if (dataobject.length !== 0 && dataobject[0].p2pRequester) {\n resolve(dataobject[0]);\n } else if (dataobject.length !== 0) {\n reject('[Registry checkP2PDataObject] Data Object found does not support P2P', dataobject[0]);\n } else if (dataobject.length === 0 && p2p.runtime) resolve(p2p); // use provided p2p info if available in the message body\n else if (dataobject.length && p2p.p2p) {\n // otherwise look on Domain Registry\n\n // look on Domain Registry\n\n var message = {\n type: 'read',\n from: _this._registry.registryURL,\n to: 'domain://registry.' + _this._registry._domain,\n body: {\n resource: url\n }\n };\n\n _this._registry._messageBus.postMessage(message, function (reply) {\n log.log('discover data object per url reply', reply);\n if ('value' in reply.body) {\n\n //todo: store retrieved hyperty\n var resolvedDataObject = reply.body.value;\n\n _this._registry.remoteDataObjectList.push(resolvedDataObject);\n\n if (resolvedDataObject.p2pRequester) {\n resolve(resolvedDataObject);\n } else {\n reject('[Registry checkP2PDataObject] Data Object found does not support P2P', reply.body.value);\n }\n } else {\n reject('[Registry checkP2PDataObject] not found', reply.body.code);\n }\n });\n } else reject('[Registry checkP2PDataObject] no P2P Connection found');\n });\n }\n }, {\n key: 'addRemoteP2PEntity',\n value: function addRemoteP2PEntity(url, runtime) {\n this._remoteP2PEntities[url] = runtime;\n }\n }, {\n key: 'removeRemoteP2PEntity',\n value: function removeRemoteP2PEntity(url) {\n delete this._remoteP2PEntities[url];\n }\n }, {\n key: 'reconnectP2PRequester',\n value: function reconnectP2PRequester(p2pRequester) {\n var _this = this;\n\n log.log('[P2PConenctionResolve.reconnectP2PRequester] lets try to reconnect P2P Requester Stub: ', p2pRequester);\n\n return new _promise2.default(function (resolve, reject) {\n\n var remoteRuntime = p2pRequester.runtime;\n\n var message = {\n type: 'execute',\n from: _this._registry.registryURL,\n to: p2pRequester.url,\n body: {\n method: 'connect',\n params: [p2pRequester.p2pHandler]\n }\n };\n\n // lets prepare the p2pRequesterSTub reconnect by setting an observer to its status changes\n\n _this._registry.watchingYou.observe('p2pRequesterStub', function (change) {\n\n log.log('[P2PConenctionResolve.reconnectP2PRequester] p2pRequesterStubs changed ' + _this._registry.p2pRequesterStub);\n\n if (change.keypath.split('.')[0] === remoteRuntime && change.name === 'status') {\n switch (change.newValue) {\n case 'live':\n log.log('[P2PConenctionResolve.reconnectP2PRequester] p2pRequester is live ' + _this._registry.p2pRequesterStub[remoteRuntime]);\n resolve(_this._registry.p2pRequesterStub[remoteRuntime].url);\n break;\n case 'failed':\n log.log('[P2PConenctionResolve.reconnectP2PRequester] p2pRequester reconnect failed ' + _this._registry.p2pRequesterStub[remoteRuntime]);\n reject('P2P Requester reconnect failed');\n break;\n default:\n }\n }\n });\n\n // stub load\n _this._registry._messageBus.postMessage(message, function (reply) {\n log.log('[P2PConenctionResolve.reconnectP2PRequester] reconnect request reply', reply);\n });\n });\n }\n }]);\n return P2PConnectionResolve;\n}();\n\nexports.default = P2PConnectionResolve;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9yZWdpc3RyeS9QMlBDb25uZWN0aW9uUmVzb2x2ZS5qcz9iNTVkIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IE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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQURBO0FBSkE7QUFDQTtBQVFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRkE7QUFKQTtBQUNBO0FBU0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQVRBO0FBV0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///467\n")},function(module,exports){eval('// proxy-observe v0.0.18\r\n// Copyright (c) 2015, 2016 Simon Y. Blackwell, AnyWhichWay\r\n// MIT License - http://opensource.org/licenses/mit-license.php\r\n(function() {\r\n\t"use strict";\r\n\t// Creates and returns a Proxy wrapping a target so that all changes can be trapped and forwarded to\r\n\t// a callback. The callback takes an array of changes just like the traditional original Chrome Object.observe\r\n\t// {object:,name:,type:add|update|delete|reconfigure|preventExtensions|setPrototype,oldValue:}\r\n\t// The acceptlist can be add|update|delete|reconfigure|preventExtensions|setPrototype.\r\n\t// v 0.0.10 to support pausing and restarting observation two additional constructor arguments are available to Object.observe:\r\n\t// pausable - create the Observer so it can be paused\r\n\t// pause - create observer in paused state\r\n\t// if pausable is true then an additional method deliver(ignorePrevious) is available to start delivery\r\n\t// to pause delivery set a property called pause on the function deliver to true\r\n\t// pausable is optional to reduce the chance of shadowing a property or method on any existing code called deliver\r\n\tif(!Object.observe && typeof(Proxy)==="function") {\r\n\t\tfunction Observer(target,callback,acceptlist,pausable,pause,delay) {\r\n\t \tvar me = this, proxy;\r\n\t \tfunction deliver(ignorePrevious,delay) {\r\n\t \t\tdeliver.delay = delay;\r\n\t \t\tif(!deliver.pause) {\r\n\t \t\tif(me.changeset.length>0) {\r\n\t \t\t\tif(!ignorePrevious) {\r\n\t\t \t \t\tvar changes = me.changeset.filter(function(change) { return !acceptlist || acceptlist.indexOf(change.type)>=0; });\r\n\t\t \t\t\tif(changes.length>0) {\r\n\t\t \t\t\t\tcallback(changes);\r\n\t\t \t\t\t}\r\n\t \t\t\t}\r\n\t \t\t\tme.changeset = [];\r\n\t \t\t}\r\n\t \t\t}\r\n\t \t}\r\n\t \tdeliver.pause = pause;\r\n\t \tdeliver.delay = delay;\r\n\t\t me.get = function(target, property) {\r\n\t\t \tif(property==="__observer__") {\r\n\t\t \t\treturn me;\r\n\t\t \t}\r\n\t\t \tif(property==="unobserve") {\r\n\t\t \t\treturn function() {\r\n\t\t \t\t\tObject.unobserve(target);\r\n\t\t \t\t\treturn target;\r\n\t\t \t\t};\r\n\t\t \t}\r\n\t\t \tif(property==="deliver") {\r\n\t\t \t\treturn deliver;\r\n\t\t \t}\r\n\t\t \treturn target[property];\r\n\t\t }\r\n\t \tme.target = target;\r\n\t \tme.changeset = [];\r\n\t \tif(!me.target.__observerCallbacks__) {\r\n\t \t\t// __observerCallbacks__ is used as an index to get at the proxy which is the observer, so we can unobserve\r\n\t \t\tObject.defineProperty(target,"__observerCallbacks__",{enumerable:false,configurable:true,writable:false,value:[]});\r\n\t \t\tObject.defineProperty(target,"__observers__",{enumerable:false,configurable:true,writable:false,value:[]});\r\n\t \t}\r\n\t \tme.target.__observerCallbacks__.push(callback);\r\n\t \tme.target.__observers__.push(this);\r\n\t \tproxy = new Proxy(target,me);\r\n\t \tdeliver(false,delay);\r\n\t \treturn proxy;\r\n\t }\r\n\t\tObserver.prototype.deliver = function() {\r\n\t\t\treturn this.get(null,"deliver");\r\n\t\t}\r\n\t Observer.prototype.set = function(target, property, value) { // , receiver\r\n\t \tvar oldvalue = target[property];\r\n\t \tvar type = (oldvalue===undefined ? "add" : "update");\r\n\t \ttarget[property] = value;\r\n\t \tif(target.__observers__.indexOf(this)>=0 && (!this.acceptlist || this.acceptlist.indexOf(type)>=0)) {\r\n\t \tvar change = {object:target,name:property,type:type},\r\n\t \t\tstart = this.changeset.length === 0,\r\n\t \t\tdeliver = this.deliver();\r\n\t \tif(type==="update") {\r\n\t \t\tchange.oldValue = oldvalue;\r\n\t \t}\r\n\t \tthis.changeset.push(change);\r\n\t \tif(start) {\r\n\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t \t}\r\n\t \t}\r\n\t \treturn true;\r\n\t };\r\n\t Observer.prototype.deleteProperty = function(target, property) {\r\n\t \tvar oldvalue = target[property];\r\n\t \t//if(typeof(oldvalue)!=="undefined") {\r\n\t\t \tdelete target[property];\r\n\t\t \tif(target.__observers__.indexOf(this)>=0 && !this.acceptlist || this.acceptlist.indexOf("delete")>=0) {\r\n\t\t \tvar change = {object:target,name:property,type:"delete",oldValue:oldvalue},\r\n\t\t \t\tstart = this.changeset.length === 0,\r\n\t\t \t\tdeliver = this.deliver();\r\n\t\t \tthis.changeset.push(change);\r\n\t\t \tif(start) {\r\n\t\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t\t \t}\r\n\t\t \t}\r\n\t \t//}\r\n\t \treturn true;\r\n\t };\r\n\t Observer.prototype.defineProperty = function(target, property, descriptor) {\r\n\t \tObject.defineProperty(target, property, descriptor);\r\n\t \tif(target.__observers__.indexOf(this)>=0 && !this.acceptlist || this.acceptlist.indexOf("reconfigure")>=0) {\r\n\t \tvar change = {object:target,name:property,type:"reconfigure"},\r\n \t\t\tstart = this.changeset.length === 0,\r\n \t\t\tdeliver = this.deliver();\r\n\t \tthis.changeset.push(change);\r\n\t \tif(start) {\r\n\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t \t}\r\n\t \t}\r\n\t \treturn true;\r\n\t };\r\n\t Observer.prototype.setPrototypeOf = function(target, prototype) {\r\n\t \tvar oldvalue = Object.getPrototypeOf(target);\r\n\t \tObject.setPrototypeOf(target, prototype);\r\n\t \tif(target.__observers__.indexOf(this)>=0 && !this.acceptlist || this.acceptlist.indexOf("setPrototype")>=0) {\r\n\t \tvar change = {object:target,name:"__proto__",type:"setPrototype",oldValue:oldvalue},\r\n \t\t\t\tstart = this.changeset.length === 0,\r\n \t\t\t\tdeliver = this.deliver();\r\n\t \tthis.changeset.push(change);\r\n\t \tif(start) {\r\n\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t \t}\r\n\t \t}\r\n\t \treturn true;\r\n\t };\r\n\t Observer.prototype.preventExtensions = function(target) {\r\n\t Object.preventExtensions(target);\r\n\t \tif(target.__observers__.indexOf(this)>=0 && !this.acceptlist || this.acceptlist.indexOf("preventExtensions")>=0) {\r\n\t \tvar change = {object:target,type:"preventExtensions"},\r\n\t\t\t\t\tstart = this.changeset.length === 0,\r\n\t\t\t\t\tdeliver = this.deliver();\r\n\t \tthis.changeset.push(change);\r\n\t \tif(start) {\r\n\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t \t}\r\n\t \t}\r\n\t \treturn true;\r\n\t };\r\n\t Object.observe = function(object,callback,acceptlist,pausable,pause,delay) {\r\n\t \treturn new Observer(object,callback,acceptlist,pausable,pause,delay);\r\n\t };\r\n\t Object.unobserve = function(object,callback) {\r\n\t \tif(object.__observerCallbacks__) {\r\n\t \t\tif(!callback) {\r\n\t \t\t\tobject.__observerCallbacks__.splice(0,object.__observerCallbacks__.length);\r\n\t \t\t\tobject.__observers__.splice(0,object.__observers__.length);\r\n\t \t\t\treturn;\r\n\t \t\t}\r\n\t \t\tobject.__observerCallbacks__.forEach(function(observercallback,i) {\r\n\t \t\t\tif(callback===observercallback) {\r\n\t \t\t\t\tobject.__observerCallbacks__.splice(i,1);\r\n\t \t\t\t\tdelete object.__observers__[i].callback;\r\n\t \t\t\t\tobject.__observers__.splice(i,1);\r\n\t \t\t\t}\r\n\t \t\t});\r\n\t \t}\r\n\t };\r\n\t Array.observe = function(object,callback,acceptlist,pausable,pause,delay) {\r\n\t \tif(!(object instanceof Array) && !Array.isArray(object)) {\r\n\t \t\tthrow new TypeError("First argument to Array.observer is not an Array");\r\n\t \t}\r\n \tacceptlist = acceptlist || ["add", "update", "delete", "splice"];\r\n\t \tvar arrayproxy = new Proxy(object,{get: function(target,property) {\r\n\t \t\tif(property==="unobserve") {\r\n\t\t \t\treturn function(callback) {\r\n\t\t \t\t\tif(callback) {\r\n\t\t \t\t\t\treturn Object.unobserve(target,callback);\r\n\t\t \t\t\t}\r\n\t\t \t\t\treturn target.unobserve();\r\n\t\t \t\t};\r\n\t\t \t}\r\n\t \t\tif(property==="splice") {\r\n\t \t\t\treturn function(start,end) {\r\n\t \t\t\t\tif(typeof(start)!=="number" || typeof(end)!=="number") {\r\n\t \t\t\t\t\tthrow new TypeError("First two arguments to Array splice are not number, number");\r\n\t \t\t\t\t}\r\n\t \t \t\tvar removed = this.slice(start,start+end),\r\n\t \t \t\t\taddedCount = (arguments.length > 1 ? arguments.length-2 : 0),\r\n\t \t \t\t\tchange = {object:object,type:"splice",index:start,removed:removed,addedCount:addedCount};\r\n\t \t \t\ttarget.splice.apply(target,arguments);\r\n\t \t \t\tif(acceptlist.indexOf("splice")>=0) {\r\n\t \t \t\t\tvar start = proxy.__observer__.changeset.length === 0,\r\n\t \t \t\t\tdeliver = proxy.__observer__.deliver();\r\n\t \t \t\t\tproxy.__observer__.changeset.push(change);\r\n\t \t \t\t\tif(start) {\r\n\t \t\t \t\tdeliver(false,(typeof(deliver.delay)==="number" ? deliver.delay : 10));\r\n\t \t\t \t}\r\n\t \t \t\t}\r\n\t \t \t}\r\n\t \t\t}\r\n\t \t\tif(property==="push") {\r\n\t \t\t\t return function(item) {\r\n\t \t\t \treturn this.splice(this.length,0,item);\r\n\t \t\t }\r\n\t \t\t}\r\n\t \t\tif(property==="pop") {\r\n\t \t\t\t return function() {\r\n\t \t\t \treturn this.splice(this.length-1,1);\r\n\t \t\t }\r\n\t \t\t}\r\n\t \t\tif(property==="unshift") {\r\n\t \t\t\t return function(item) {\r\n \t\t \t\treturn this.splice(0,0,item);\r\n \t\t \t}\r\n\t \t\t}\r\n\t \t\tif(property==="shift") {\r\n\t \t\t\treturn function() {\r\n\t \t \t\treturn this.splice(0,1);\r\n\t \t \t}\r\n\t \t\t}\r\n\t \t\treturn target[property];\r\n\t \t}});\r\n\t \tvar proxy = Object.observe(arrayproxy,function(changeset) { \r\n\t \t\tvar changes = changeset.filter(function(change) { return change.name!=="length" && change.name!=="add" && (!acceptlist || acceptlist.indexOf(change.type)>=0); });\r\n\t \t\tif(changes.length>0) {\r\n\t \t\t\tcallback(changes);\r\n\t \t\t}\r\n\t \t},acceptlist,pausable,pause,delay);\r\n\t \treturn proxy;\r\n\t };\r\n\t Array.unobserve = function(object,callback) {\r\n\t\t return object.unobserve(callback);\r\n\t }\r\n\t}\r\n\tObject.deepObserve = function(object,callback,parts) {\r\n\r\n\t\tparts = (parts ? parts : []);\r\n\r\n\t\tvar toTypeName = function(obj) {\r\n\t\t\treturn ({}).toString.call(obj).match(/\\s([a-zA-Z]+)/)[1].toLowerCase()\r\n\t\t}\r\n\r\n\t\tfunction reobserve(value, parts) {\r\n\t\t\tvar keys = Object.keys(value);\r\n\t\t\tkeys.forEach(function(key) {\r\n\t\t\t\tif((toTypeName(value[key]) === \'object\' || toTypeName(value[key]) === \'array\') && !value[key].hasOwnProperty(\'__observers__\')) {\r\n\t\t\t\t\tvar newparts = parts.slice(0);\r\n\t\t\t\t\tnewparts.push(key);\r\n\t\t\t\t\tvalue[key] = Object.deepObserve(value[key],callback,newparts);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treobserve(object, parts);\r\n\r\n\t\tvar observed = Object.observe(object,function(changeset) {\r\n\t\t\tvar changes = [];\r\n\t\t\tfunction recurse(name,rootObject,oldObject,newObject,path) {\r\n\t\t\t\tif(newObject instanceof Object) {\r\n\t\t\t\t\tvar newkeys = Object.keys(newObject);\r\n\t\t\t\t\tnewkeys.forEach(function(key) {\r\n\t\t\t\t\t\tif(!oldObject || (oldObject[key]!==newObject[key])) {\r\n\t\t\t\t\t\t\tvar oldvalue = (oldObject && oldObject[key]!==undefined ? oldObject[key] : undefined),\r\n\t\t\t\t\t\t\t\tchange = (oldvalue===undefined ? "add" : "update"),\r\n\t\t\t\t\t\t\t\tkeypath = path + "." + key;\r\n\r\n\t\t\t\t\t\t\tchanges.push({name:name,object:rootObject,type:change,oldValue:oldvalue,newValue:newObject[key],keypath:keypath});\r\n\t\t\t\t\t\t\trecurse(name,rootObject,oldvalue,newObject[key],keypath);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else if(oldObject instanceof Object) {\r\n\t\t\t\t\tvar oldkeys = Object.keys(oldObject);\r\n\t\t\t\t\toldkeys.forEach(function(key) {\r\n\t\t\t\t\t\tvar change = (newObject===null ? "update" : "delete"),\r\n\t\t\t\t\t\t\tkeypath = path + "." + key;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tchanges.push({name:name,object:rootObject,type:change,oldValue:oldObject[key],newValue:newObject,keypath:keypath});\r\n\t\t\t\t\t\trecurse(name,rootObject,oldObject[key],undefined,keypath);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tchangeset.forEach(function(change) {\r\n\t\t\t\tvar keypath = (parts.length>0 ? parts.join(".") + "." : "") + change.name;\r\n\r\n\t\t\t\tif (change.type === "update" || change.type === "add") { \r\n\t\t\t\t\treobserve(change.object, parts);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tchanges.push({name:change.name,object:change.object,type:change.type,oldValue:change.oldValue,newValue:change.object[change.name],keypath:keypath});\r\n\t\t\t\trecurse(change.name,change.object,change.oldValue,change.object[change.name],keypath);\r\n\t\t\t});\r\n\t\t\tcallback(changes);\r\n\t\t});\r\n\t\treturn observed;\r\n\t};\r\n})();\r\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL3Byb3h5LW9ic2VydmUvaW5kZXguanM/MTIwYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAgICAgcHJveHktb2JzZXJ2ZSB2MC4wLjE4XHJcbi8vICAgICBDb3B5cmlnaHQgKGMpIDIwMTUsIDIwMTYgU2ltb24gWS4gQmxhY2t3ZWxsLCBBbnlXaGljaFdheVxyXG4vLyAgICAgTUlUIExpY2Vuc2UgLSBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvbWl0LWxpY2Vuc2UucGhwXHJcbihmdW5jdGlvbigpIHtcclxuXHRcInVzZSBzdHJpY3RcIjtcclxuXHQvLyBDcmVhdGVzIGFuZCByZXR1cm5zIGEgUHJveHkgd3JhcHBpbmcgYSB0YXJnZXQgc28gdGhhdCBhbGwgY2hhbmdlcyBjYW4gYmUgdHJhcHBlZCBhbmQgZm9yd2FyZGVkIHRvXHJcblx0Ly8gYSBjYWxsYmFjay4gVGhlIGNhbGxiYWNrIHRha2VzIGFuIGFycmF5IG9mIGNoYW5nZXMganVzdCBsaWtlIHRoZSB0cmFkaXRpb25hbCBvcmlnaW5hbCBDaHJvbWUgT2JqZWN0Lm9ic2VydmVcclxuXHQvLyB7b2J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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///468\n')},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _runtimeConfiguration = __webpack_require__(144);\n\nvar _Identities = __webpack_require__(470);\n\nvar _Identities2 = _interopRequireDefault(_Identities);\n\nvar _GuiFake = __webpack_require__(475);\n\nvar _GuiFake2 = _interopRequireDefault(_GuiFake);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('IdentityModule'); // Log System\n\n/**\n*\n* The Identity Module (Id Module) is the component responsible for handling the\n* user identity and the association of this identity with the Hyperty instances,\n* in order to make Hyperty instances identifiable. The identity in the reTHINK project\n* is not fixed to a unique Identity Service Provider, but obtained through several\n* different Identity sources. With this approach, the Id Module provides to the user the\n* option to choose the preferred method for authentication.\n* This module will thus able to support multiple Identity acquisition methods,\n* such as OpenID connect 1.0, Kerberos System, or authentication through smart cards.\n* For example, a user with a Google account can use the Google as an Identity Provider to provide Identity Tokens,\n* which can be used by the Identity Module to associate it with a Hyperty instance.\n*\n* The Identity Module uses a node package, the HelloJS, which is a client-side JavaScript API for authentication\n* that facilitates the requests for the OpenID connect protocol. This method allows for some abstraction\n* when making requests for different Identity Providers, such as OpenID connect used by Google, Facebook, Microsoft, for example.\n*\n* When a request for a user identity is made using the method loginWithRP(identifier, scope),\n* this method will analyse the Identity Provider chosen to obtain an identity and will use the HelloJS node package\n* with the selected Identity Provider and identity scope. After the HelloJS request for an Access Token\n* to the Identity Providers, the user will be prompted to authenticate towards the Identity Provider.\n* Upon receiving the Access Token, this token is validated with a RESTful web service request to an endpoint\n* on the Identity Provider Authorization Server, and after the validation is done,\n* an ID token is obtained with the information according to the scope required.\n* This ID token is then preserved in this module that can obtained through the getIdentities()\n* and is passed as return value of the loginWithRP function. The methods generateAssertion and validateAssertion have not yet been developed.\n*\n*/\nvar IdentityModule = function () {\n\n /**\n * This is the constructor to initialise the Identity Module it does not require any input.\n */\n function IdentityModule(runtimeURL, runtimeCapabilities, storageManager, dataObjectsStorage, cryptoManager, runtimeCatalogue) {\n (0, _classCallCheck3.default)(this, IdentityModule);\n\n var _this = this;\n\n if (!runtimeURL) throw new Error('runtimeURL is missing.');\n if (!storageManager) throw new Error('storageManager is missing');\n if (!cryptoManager) throw new Error('cryptoManager is missing');\n if (!runtimeCatalogue) throw new Error('runtimeCatalogue is missing');\n\n _this._runtimeURL = runtimeURL;\n\n _this._runtimeCatalogue = runtimeCatalogue;\n\n _this.dataObjectsStorage = dataObjectsStorage;\n _this._idmURL = _this._runtimeURL + '/idm';\n _this._guiURL = _this._runtimeURL + '/identity-gui';\n _this.runtimeCapabilities = runtimeCapabilities;\n\n _this._domain = (0, _utils.divideURL)(_this._runtimeURL).domain;\n\n //to store items with this format: {identity: identityURL, token: tokenID}\n _this._identities = new _Identities2.default('human', storageManager);\n\n // to be reviewed: watchingYou identitiesList or identities?\n // _this.identitiesList = _this.watchingYou.watch('identitiesList', {}, true);\n _this._crypto = cryptoManager;\n\n /* _this.emailsList = [];\n let newIdentity = new Identity('guid', 'HUMAN');\n _this.identity = newIdentity;\n _this.currentIdentity;\n _this.identities.defaultIdentity;*/\n\n //stores the association of the dataObject and the Hyperty registered within\n _this.dataObjectsIdentity = {}; // is this needed?\n\n _this._listOfIdps = [];\n\n // variable to know if the GUI is deployed to choose the identity. if the real GUI is not deployed, a fake gui is deployed instead.\n _this.guiDeployed = false;\n }\n\n //******************* GET AND SET METHODS *******************\n\n /**\n * return the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n\n\n (0, _createClass3.default)(IdentityModule, [{\n key: 'getIdentity',\n\n\n //******************* IDENTITY RELEATED METHODS *******************\n /**\n * gets all the information from a given userURL\n * @param {String} userURL user url\n * @return {JSON} identity identity bundle from the userURL\n */\n value: function getIdentity(userURL) {\n return this.identities.getIdentity(userURL);\n }\n\n /**\n * Function to set the current Identity with a given Identity\n * @param {Identity} identity identity\n */\n\n /* setCurrentIdentity(identity) {\n let _this = this;\n _this.currentIdentity = identity;\n }*/\n\n /**\n * Function to return all the identities registered within a session by a user.\n * These identities are returned in an array containing a JSON package for each user identity.\n * @return {Array} Identities\n */\n\n }, {\n key: 'getIdentitiesToChoose',\n value: function getIdentitiesToChoose() {\n var _this2 = this;\n\n // let identities = _this.identities.identifiers;\n\n // let idps = [\n // { domain: 'google.com', type: 'idToken'},\n // { domain: 'microsoft.com', type: 'idToken'},\n // { domain: 'orange.fr', type: 'idToken'},\n // { domain: 'slack.com', type: 'Legacy'}\n // ];\n\n // todo: retrieve available idps from runtime catalogue\n // todo: enable oauth idps\n // let idps = [\n // { domain: 'google.com', type: 'idToken' },\n // { domain: 'microsoft.com', type: 'idToken' },\n // { domain: 'facebook.com', type: 'idToken' },\n // { domain: 'slack.com', type: 'idToken' }\n // ];\n\n return new _promise2.default(function (resolve) {\n\n var url = _runtimeConfiguration.runtimeConfiguration.catalogueURLs.idpProxy.prefix + _this2._domain + _runtimeConfiguration.runtimeConfiguration.catalogueURLs.idpProxy.suffix;\n\n _promise2.default.all([_this2.runtimeCapabilities.isAvailable('browser'), _this2.runtimeCapabilities.isAvailable('node')]).then(function (result) {\n\n var isBrowser = result[0];\n var isNode = result[1];\n\n var constraints = { constraints: {} };\n constraints.constraints.node = isNode;\n constraints.constraints.browser = isBrowser;\n\n _this2._runtimeCatalogue.getTypeList(url, constraints).then(function (idps) {\n var listOfIdps = idps.map(function (key) {\n return { domain: key, type: 'idToken' };\n });\n log.info('[IdentityModule.getIdentityAssertion:getIdentitiesToChoose]', idps, listOfIdps);\n _this2._listOfIdps = listOfIdps;\n return resolve({ defaultIdentity: _this2.identities.defaultIdentity, identities: _this2.identities.identities, idps: listOfIdps });\n });\n });\n });\n }\n\n /**\n * Function to return the selected Identity within a session\n * @return {Identity} identity identity\n */\n /* getCurrentIdentity() {\n let _this = this;\n return _this.currentIdentity;\n }*/\n\n }, {\n key: 'init',\n value: function init() {\n var _this = this;\n return new _promise2.default(function (resolve) {\n _this._identities.loadIdentities().then(function () {\n _this._crypto.getMyPublicKey().then(function (key) {\n var guid = 'user-guid://' + (0, _utils.stringify)(key);\n _this.identities.guid = guid;\n _this._identities.loadAccessTokens().then(function () {\n\n resolve();\n });\n });\n });\n });\n }\n\n /**\n * Function that fetch an identityAssertion from a user.\n *\n * @return {IdAssertion} IdAssertion\n */\n\n }, {\n key: 'getIdentityAssertion',\n value: function getIdentityAssertion(identityBundle) {\n log.log('[IdentityModule.getIdentityAssertion:identityBundle]', identityBundle);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //CHECK whether is browser environment or nodejs\n //if it is browser, then create a fake identity\n\n _this.runtimeCapabilities.isAvailable('browser').then(function (result) {\n log.log('runtime browser identity acquisition', result);\n\n if (!result) return;\n\n //todo: only idp should be mandatory when identityBundle exists\n\n if (identityBundle && identityBundle.hasOwnProperty('idp')) {\n\n var idp = identityBundle.idp;\n var origin = identityBundle.hasOwnProperty('origin') ? identityBundle.origin : 'origin';\n var idHint = identityBundle.hasOwnProperty('idHint') ? identityBundle.idHint : '';\n\n _this.selectIdentityForHyperty(origin, idp, idHint).then(function (assertion) {\n log.log('[IdentityModule] Identity selected by hyperty.');\n return resolve(assertion);\n }, function (err) {\n // if it got an error then just select identity from GUI\n // log.error('[IdentityModule] Could not select identity from hyperty.');\n _this.selectIdentityFromGUI().then(function (newAssertion) {\n log.log('[IdentityModule] Identity selected by hyperty.');\n return resolve(newAssertion);\n }, function (err) {\n return reject(err);\n });\n });\n } else {\n\n if (_this.identities.defaultIdentity && _this.identities.defaultIdentity.expires > (0, _utils.secondsSinceEpoch)()) {\n return resolve(_this.identities.defaultIdentity);\n } else {\n _this.selectIdentityFromGUI().then(function (assertion) {\n\n log.log('[IdentityModule] Identity selected from GUI.');\n\n /*\n _this.identities.defaultIdentity = assertion.userProfile.userURL;\n return resolve(assertion);\n }*/\n\n _this.identities.defaultIdentity = assertion.userProfile.userURL;\n return resolve(assertion);\n }, function (err) {\n return reject(err);\n });\n }\n }\n }).catch(function (error) {\n log.error('Error on identity acquisition ', error);\n return reject(error);\n });\n\n _this.runtimeCapabilities.isAvailable('node').then(function (result) {\n log.log('node identity acquisition', result);\n\n if (!result) return;\n\n if (_this.identities.currentIdentity) {\n //TODO verify whether the token is still valid or not.\n // should be needed to make further requests, to obtain a valid token\n return resolve(_this.identities.currentIdentity);\n } else {\n log.log('getIdentityAssertion for nodejs');\n\n var idp = { type: 'idp', value: 'nodejs-idp', code: 200, auth: false };\n _this.callNodeJsGenerateMethods(idp.value, 'origin').then(function (value) {\n resolve(value);\n }, function (err) {\n reject(err);\n });\n }\n }).catch(function (error) {\n log.error('Error on identity acquisition ', error);\n reject(error);\n });\n });\n }\n\n /**\n * Function to return all the users URLs registered within a session\n * These users URLs are returned in an array of strings.\n * @return {Array} users\n */\n\n }, {\n key: 'getUsersIDs',\n value: function getUsersIDs() {\n /* log.log('[getUsersIDs:emailFormat]', emailFormat);\n log.log('getUsersIDs:emailFormat', emailFormat);\n let _this = this;\n let users = [];*/\n\n //if request comes with the emailFormat option, then convert url to email format\n /* let converter = (emailFormat) ? getUserEmailFromURL : (value) => { return value; };\n for (let index in _this.identities) {\n let identity = _this.identities[index];\n users.push(converter(identity.identity));\n }*/\n\n return this.identities.identifiers;\n }\n\n /**\n * Function to remove an identity\n * @param {String} userURL userURL\n * @return {Promise}\n */\n\n }, {\n key: 'deleteIdentity',\n value: function deleteIdentity(userURL) {\n\n return this.identities.removeIdentity(userURL);\n }\n\n /**\n * Function to unregister an identity from the emailsList array and not show in to the GUI\n * @param {String} email email\n */\n /* unregisterIdentity(email) {\n let _this = this;\n for (let e in _this.emailsList) {\n if (_this.emailsList[e] === email) {\n _this.emailsList.splice(e, 1);\n }\n }\n }*/\n\n /**\n * Function that sends a request to the GUI using messages. Sends all identities registered and\n * the Idps supported, and return the identity/idp received by the GUI\n * @param {Array} identities list of identitiies\n * @param {Array} idps list of idps to authenticate\n * @return {Promise} returns a chosen identity or idp\n */\n\n }, {\n key: 'requestIdentityToGUI',\n value: function requestIdentityToGUI(identities, idps) {\n log.log('[IdentityModule.requestIdentityToGUI:identities]', identities);\n log.log('[IdentityModule.requestIdentityToGUI:idps]', idps);\n\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n\n //condition to check if the real GUI is deployed. If not, deploys a fake gui\n if (_this.guiDeployed === false) {\n var guiFakeURL = _this._guiURL;\n var guiFake = new _GuiFake2.default(guiFakeURL, _this._messageBus);\n _this.guiFake = guiFake;\n _this.guiDeployed = true;\n }\n\n var message = {\n type: 'create', to: _this._guiURL, from: _this._idmURL,\n body: { value: { identities: identities, idps: idps } }\n };\n\n var callback = function callback(msg) {\n _this._messageBus.removeResponseListener(_this._idmURL, msg.id);\n\n // todo: to return the user URL and not the email or identifier\n\n if (msg.body.code === 200) {\n var selectedIdentity = msg.body;\n\n log.log('selectedIdentity: ', selectedIdentity.value);\n resolve(selectedIdentity);\n } else {\n reject('error on requesting an identity to the GUI');\n }\n };\n\n //postMessage with callback but without timeout\n try {\n _this._messageBus.postMessage(message, callback, false);\n } catch (err) {\n reject('In method callIdentityModuleFunc error: ' + err);\n }\n });\n }\n }, {\n key: 'callNodeJsGenerateMethods',\n value: function callNodeJsGenerateMethods(idp, origin) {\n log.log('[callNodeJsGenerateMethods:idp]', idp);\n log.log('[callNodeJsGenerateMethods:origin]', origin);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n //debugger;\n var publicKey = void 0;\n\n //let keyPair = nodeJSKeyPairPopulate;\n\n //generates the RSA key pair\n _this._crypto.getMyPublicKey().then(function (key) {\n\n log.log('[callNodeJsGenerateMethods:key]', key);\n\n publicKey = (0, _utils.stringify)(key);\n\n log.log('[callNodeJsGenerateMethods] NO_URL');\n\n return _this.generateAssertion(publicKey, origin, 'url', idp);\n }).then(function (value) {\n if (value) {\n resolve(value);\n } else {\n reject('Error on obtaining Identity');\n }\n }).catch(function (err) {\n log.log(err);\n reject(err);\n });\n });\n }\n }, {\n key: 'callGenerateMethods',\n value: function callGenerateMethods(idp, origin) {\n log.log('[callGenerateMethods:idp]', idp);\n log.log('[callGenerateMethods:origin]', origin);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var publicKey = void 0;\n\n //generates the RSA key pair\n _this._crypto.getMyPublicKey().then(function (key) {\n\n log.log('[callNodeJsGenerateMethods:key]', key);\n\n publicKey = (0, _utils.stringify)(key);\n\n // userkeyPair = keyPair;\n log.log('generateAssertion:no_hint');\n return _this.generateAssertion(publicKey, origin, '', idp);\n }).then(function (url) {\n _this.myHint = url;\n log.log('generateAssertion:hint');\n return _this.generateAssertion(publicKey, origin, url, idp);\n }).then(function (value) {\n if (value) {\n resolve(value);\n } else {\n reject('Error on obtaining Identity');\n }\n }).catch(function (err) {\n log.error(err);\n reject(err);\n });\n });\n }\n }, {\n key: 'loginSelectedIdentity',\n value: function loginSelectedIdentity(publicKey, origin, idp, loginUrl) {\n log.log('[loginSelectedIdentity:publicKey]', publicKey);\n log.log('[loginSelectedIdentity:origin]', origin);\n log.log('[loginSelectedIdentity:idp]', idp);\n\n // log.log('[loginSelectedIdentity:keyPair]', keyPair);\n log.log('[loginSelectedIdentity:loginUrl]', loginUrl);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n log.log('[IdentityModule] openPopup');\n _this.callIdentityModuleFunc('openPopup', { urlreceived: loginUrl }).then(function (idCode) {\n return idCode;\n }, function (err) {\n log.error('Error while logging in for the selected identity.');\n return reject(err);\n }).then(function (idCode) {\n _this.sendGenerateMessage(publicKey, origin, idCode, idp).then(function (newResponse) {\n if (newResponse.hasOwnProperty('assertion')) {\n _this.identities.addAssertion(newResponse).then(function (result) {\n resolve('Login was successfull');\n }).catch(function (err) {\n reject('Login has failed:' + err);\n });\n } else {\n log.error('Error while logging in for the selected identity.');\n return reject('Could not generate a valid assertion for selected identity.');\n }\n }).catch(function (err) {\n reject('On loginSelectedIdentity from method sendGenerateMessage error: ' + err);\n });\n });\n });\n }\n }, {\n key: 'selectIdentityForHyperty',\n value: function selectIdentityForHyperty(origin, idp, idHint) {\n log.log('[selectIdentityForHyperty:origin]', origin);\n log.log('[selectIdentityForHyperty:idp]', idp);\n log.log('[selectIdentityForHyperty:idHint]', idHint);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //generates the RSA key pair\n _this._crypto.getMyPublicKey().then(function (key) {\n var publicKey = (0, _utils.stringify)(key);\n\n _this.sendGenerateMessage(publicKey, origin, idHint, idp).then(function (response) {\n if (response.hasOwnProperty('assertion')) {\n // identity was logged in, just save it\n _this.identities.addAssertion(response).then(function (value) {\n return resolve(response);\n }, function (err) {\n return reject(err);\n });\n } else if (response.hasOwnProperty('loginUrl')) {\n // identity was not logged in\n _this.loginSelectedIdentity(publicKey, origin, idp, response.loginUrl).then(function (value) {\n return resolve(value);\n }, function (err) {\n return reject(err);\n });\n } else {\n // you should never get here, if you do then the IdP Proxy is not well implemented\n // log.error('GenerateAssertion returned invalid response.');\n log.log('Proceeding by logging in.');\n _this.callGenerateMethods(idp, origin).then(function (value) {\n return resolve(value);\n }, function (err) {\n return reject(err);\n });\n }\n }).catch(function (err) {\n reject('On selectIdentityForHyperty from method sendGenerateMessage error: ' + err);\n });\n }).catch(function (err) {\n reject('On selectIdentityForHyperty from method generateRSAKeyPair error: ' + err);\n });\n });\n }\n }, {\n key: 'selectIdentityFromGUI',\n value: function selectIdentityFromGUI(origin) {\n var _this3 = this;\n\n log.log('[IdentityModule.selectIdentityFromGUI:origin]', origin);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this3.getIdentitiesToChoose().then(function (identitiesInfo) {\n return _this.requestIdentityToGUI(identitiesInfo.identities, identitiesInfo.idps);\n }).then(function (value) {\n\n if (value.type === 'identity') {\n\n // let chosenID = getUserURLFromEmail(value.value);\n // hack while the user url is not returned from requestIdentityToGUI;\n\n /* let chosenID = 'user://' + _this.identities.currentIdentity.idp.domain + '/' + value.value;\n _this.identities.defaultIdentity = _this.identities.currentIdentity;*/\n\n // returns the identity info from the chosen id\n // if (_this.identities.currentIdentity) resolve(_this.identities.currentIdentity.assertion);\n if (_this.identities.identities[value.value]) resolve(_this.identities.identities[value.value]);else reject('[IdentityModule.selectIdentityFromGUI] identity not found: ', value.value);\n } else if (value.type === 'idp') {\n\n _this.callGenerateMethods(value.value, origin).then(function (value) {\n return resolve(value);\n }, function (err) {\n return reject(err);\n });\n } else {\n return reject('error on GUI received message.');\n }\n }).catch(function (err) {\n reject('On selectIdentityFromGUI from method requestIdentityToGUI error: ' + err);\n });\n });\n }\n }, {\n key: 'callIdentityModuleFunc',\n value: function callIdentityModuleFunc(methodName, parameters) {\n log.log('[callIdentityModuleFunc:methodName]', methodName);\n log.log('[callIdentityModuleFunc:parameters]', parameters);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var message = {\n type: 'execute', to: _this._guiURL, from: _this._idmURL,\n body: { resource: 'identity', method: methodName, params: parameters }\n };\n\n //post msg with callback but without timout\n var callback = function callback(msg) {\n _this._messageBus.removeResponseListener(_this._idmURL, msg.id);\n var result = msg.body.value;\n resolve(result);\n };\n try {\n\n _this._messageBus.postMessage(message, callback, false);\n } catch (err) {\n reject('In method callIdentityModuleFunc error: ' + err);\n }\n });\n }\n\n //******************* TOKEN METHODS *******************\n /**\n * get a Token to be added to a message\n * @param {String} fromURL origin of the message\n * @param {String} toURL target of the messageok\n * @return {JSON} token token to be added to the message\n */\n\n }, {\n key: 'getToken',\n value: function getToken(msg) {\n var _this = this;\n var fromURL = msg.from;\n var toUrl = msg.to;\n if (msg.hasOwnProperty('body') && msg.body.hasOwnProperty('source')) {\n fromURL = msg.body.source;\n }\n\n if (msg.type === 'forward') {\n fromURL = msg.body.from;\n }\n\n if (msg.hasOwnProperty('body') && msg.body.hasOwnProperty('subscriber')) {\n fromURL = msg.body.subscriber;\n }\n\n return new _promise2.default(function (resolve, reject) {\n log.log('[IdentityModule.getToken] for msg ', msg);\n\n //log.log('toUrl', toUrl);\n _this.registry.isLegacy(toUrl).then(function (result) {\n // log.log('[Identity.IdentityModule.getToken] isLEGACY: ', result);\n if (result) {\n\n _this._getAccessToken(msg).then(function (token) {\n log.log('[IdentityModule.getToken] access token ', token);\n resolve((0, _utils.deepClone)(token));\n }).catch(function (err) {\n reject('[IdentityModule.getToken] Access Token error ' + err);\n });\n } else {\n _this._getValidToken(fromURL).then(function (token) {\n resolve(token);\n }).catch(function (err) {\n reject('On getToken from method _getValidToken error: ' + err);\n });\n }\n }).catch(function (err) {\n reject('On getToken from method isLegacy error: ' + err);\n });\n });\n }\n\n /**\n * get an Id Token for a HypertyURL\n * @param {String} hypertyURL the Hyperty address\n * @return {JSON} token Id token to be added to the message\n */\n\n }, {\n key: 'getIdToken',\n value: function getIdToken(hypertyURL) {\n log.info('getIdToken:hypertyURL ', hypertyURL);\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n var splitURL = hypertyURL.split('://');\n var userURL = void 0;\n if (splitURL[0] !== 'hyperty') {\n // it is a Data Object URL\n\n _this._getHypertyFromDataObject(hypertyURL).then(function (returnedHypertyURL) {\n\n userURL = _this.registry.getHypertyOwner(returnedHypertyURL);\n\n if (userURL) {\n var identity = _this.identities.getIdentity(userURL);\n if (identity) return resolve(identity);else return reject('[IdentityModule.getIdToken] Identity not found for: ', userURL);\n } else {\n return reject('[IdentityModule.getIdToken] User not found for hyperty: ', returnedHypertyURL);\n }\n }).catch(function (reason) {\n log.error('[IdentityModule.getIdToken] Error: ', reason);\n reject(reason);\n });\n } else {\n userURL = _this.registry.getHypertyOwner(hypertyURL);\n if (userURL) {\n\n var identity = _this.identities.getIdentity(userURL);\n if (identity) return resolve(identity);else return reject('[IdentityModule.getIdToken] Identity not found for: ', userURL);\n } else {\n return reject('[IdentityModule.getIdToken] User not found for hyperty: ', userURL);\n }\n }\n });\n }\n\n /**\n * get an Access Token for an external API\n * @param {String} url the external url\n * @return {JSON} token Access token to be added to the message\n */\n\n }, {\n key: '_getAccessToken',\n value: function _getAccessToken(msg) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var url = msg.to;\n var token = void 0;\n\n if (!msg.hasOwnProperty('body')) {\n return reject('[IdentityModule._getAccessToken] missing mandatory msg body: ', msg);\n }\n if (!msg.body.hasOwnProperty('value')) {\n return reject('[IdentityModule._getAccessToken] missing mandatory msg body value: ', msg);\n }\n if (!msg.body.value.hasOwnProperty('resources')) {\n return reject('[IdentityModule._getAccessToken] missing mandatory msg body value resources: ', msg);\n }\n var domainToCheck = (0, _utils.divideURL)(url).domain;\n\n if (url.includes('protostub')) {\n domainToCheck = domainToCheck.replace(domainToCheck.split('.')[0] + '.', '');\n }\n\n var resources = msg.body.value.resources;\n\n try {\n token = _this.identities.getAccessToken(domainToCheck, resources);\n } catch (e) {\n return reject('[IdentityModule._getAccessToken] Access Token error ' + err);\n }\n\n if (!token) {\n _this._getNewAccessToken(domainToCheck, resources).then(function (token) {\n log.log('[Identity.IdentityModule.getAccessToken] new Access Token ', token);\n return resolve(token);\n }).catch(function (err) {\n reject('[IdentityModule._getAccessToken] on getNewAccessToken ' + err);\n });\n } else if (token.status === 'in-progress') {\n return resolve(_this._inProgressAccessToken(domainToCheck, resources));\n } else {\n var timeNow = (0, _utils.secondsSinceEpoch)();\n\n log.log('[Identity.IdentityModule.getAccessToken] found Access Token ', token);\n\n if (timeNow >= token.expires) return resolve(_this._getNewAccessToken(domainToCheck, resources));else return resolve(token);\n }\n });\n }\n }, {\n key: '_inProgressAccessToken',\n value: function _inProgressAccessToken(domain, resources) {\n var _this4 = this;\n\n this.identities.watchingYou.observe('accessTokens', function (change) {\n\n log.log('[IdentityModule._inProgressAccessToken] accessTokens changed ' + _this4.identities.accessTokens);\n\n var keypath = change.keypath;\n\n if (keypath.includes('status')) {\n keypath = keypath.replace('.status', '');\n }\n\n if (keypath === domain && change.name === 'status' && change.newValue === 'created') {\n // log.log('[Identity.IdentityModule.getToken] token is created ' + _this.identitiesList[domain]);\n return _this4.identities.getAccessToken(domain, resources);\n }\n });\n }\n }, {\n key: '_getNewAccessToken',\n value: function _getNewAccessToken(domain, resources) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.identities.setAccessTokenInProgress(domain);\n\n var message = {\n type: 'execute',\n to: _this._resolveDomain(domain),\n from: _this._idmURL,\n body: {\n method: 'getAccessTokenAuthorisationEndpoint',\n params: resources\n }\n };\n\n //let's first get the authorisation URL from the Idp Proxy\n _this._messageBus.postMessage(message, function (res) {\n if (res.body.code > 299) {\n return reject('[IdentityModule._getNewAccessToken] Error on getAccessTokenAuthorisationEndpoint from IdP Proxy: ', res.body.desc);\n }\n\n // let's ask the user for authorisation\n _this.callIdentityModuleFunc('openPopup', { urlreceived: res.body.value }).then(function (authorisation) {\n log.log('[IdentityModule:callIdentityModuleFunc:openPopup] auhtorisation result: ', authorisation);\n\n message.body.method = 'getAccessToken';\n message.body.params = {\n resources: resources,\n login: authorisation\n };\n\n //wihtout callback to avoid timeout errors?\n\n // let's ask Access Token from the Idp Proxy\n _this._messageBus.postMessage(message, function (res) {\n if (res.body.code > 299) return reject('[IdentityModule._getNewAccessToken] Error on getAccessToken from IdP Proxy: ', res.body.desc);\n\n _this.identities.addAccessToken(res.body.value).then(function (token) {\n log.info('[IdentityModule._getNewAccessToken] resolving token: ', token);\n return resolve(res.body.value);\n }, function (err) {\n reject(err);\n });\n });\n }, function (err) {\n reject(err);\n });\n });\n });\n }\n }, {\n key: 'sendRefreshMessage',\n value: function sendRefreshMessage(oldIdentity) {\n var _this = this;\n\n // let domain = _this._resolveDomain(oldIdentity.idp);\n // let message;\n // let assertion = _this.getIdentity(oldIdentity.userProfile.userURL);\n\n log.log('sendRefreshMessage:oldIdentity', oldIdentity);\n\n return new _promise2.default(function (resolve, reject) {\n var domain = _this._resolveDomain(oldIdentity.idp);\n var message = void 0;\n var assertion = _this.getIdentity(oldIdentity.userProfile.userURL);\n\n log.info('sendRefreshMessage:oldIdentity', oldIdentity);\n\n message = { type: 'execute', to: domain, from: _this._idmURL, body: { resource: 'identity', method: 'refreshAssertion', params: { identity: assertion } } };\n try {\n _this._messageBus.postMessage(message, function (res) {\n var result = res.body.value;\n resolve(result);\n });\n } catch (err) {\n reject('In sendRefreshMessage on postMessage error: ' + err);\n }\n });\n }\n }, {\n key: 'sendGenerateMessage',\n value: function sendGenerateMessage(contents, origin, usernameHint, idpDomain) {\n log.log('[sendGenerateMessage:contents]', contents);\n log.log('[sendGenerateMessage:origin]', origin);\n log.log('[sendGenerateMessage:usernameHint]', usernameHint);\n log.log('[sendGenerateMessage:idpDomain]', idpDomain);\n log.log('sendGenerateMessage_hint');\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var domain = _this._resolveDomain(idpDomain);\n var message = void 0;\n\n message = {\n type: 'execute', to: domain, from: _this._idmURL, body: { resource: 'identity', method: 'generateAssertion', params: { contents: contents, origin: origin, usernameHint: usernameHint } }\n };\n try {\n _this._messageBus.postMessage(message, function (res) {\n var result = res.body.value;\n resolve(result);\n });\n } catch (err) {\n reject('In sendRefreshMessage on postMessage error: ' + err);\n }\n });\n }\n\n /**\n * Requests the IdpProxy from a given Domain for an identityAssertion\n *\n * @param {DOMString} contents contents\n * @param {DOMString} origin origin\n * @param {DOMString} usernameHint usernameHint\n * @param {JSON} keyPair user keyPair\n * @return {IdAssertion} IdAssertion\n */\n\n }, {\n key: 'generateAssertion',\n value: function generateAssertion(contents, origin, usernameHint, idpDomain) {\n log.log('[generateAssertion:contents]', contents);\n log.log('[generateAssertion:origin]', origin);\n log.log('[generateAssertion:usernameHint]', usernameHint);\n\n // log.log('[generateAssertion:keyPair]', keyPair);\n log.log('[generateAssertion:idpDomain]', idpDomain);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n log.log('[IdentityModule:sendGenerateMessage:sendGenerateMessage]', usernameHint);\n _this.sendGenerateMessage(contents, origin, usernameHint, idpDomain).then(function (result) {\n\n if (result.loginUrl) {\n\n _this.callIdentityModuleFunc('openPopup', { urlreceived: result.loginUrl }).then(function (value) {\n log.log('[IdentityModule:callIdentityModuleFunc:openPopup]', usernameHint);\n\n resolve(value);\n }, function (err) {\n reject(err);\n });\n } else if (result) {\n\n _this.identities.addAssertion(result).then(function (value) {\n resolve(result);\n }, function (err) {\n reject(err);\n });\n } else {\n reject('error on obtaining identity information');\n }\n }).catch(function (err) {\n reject('On generateAssertion from method sendGenerateMessage error: ' + err);\n });\n });\n }\n\n /**\n * Requests the IdpProxy from a given Domain to validate an IdentityAssertion\n * Returns a promise with the result from the validation.\n * @param {DOMString} assertion\n * @param {DOMString} origin origin\n * @return {Promise} Promise promise with the result from the validation\n */\n\n }, {\n key: 'validateAssertion',\n value: function validateAssertion(assertion, origin, idpDomain) {\n log.log('[validateAssertion:assertion]', assertion);\n log.log('[validateAssertion:origin]', origin);\n log.log('[validateAssertion:idpDomain]', idpDomain);\n var _this = this;\n\n var domain = _this._resolveDomain(idpDomain);\n\n var message = {\n type: 'execute', to: domain, from: _this._idmURL, body: {\n resource: 'identity', method: 'validateAssertion',\n params: { assertion: assertion, origin: origin }\n }\n };\n\n return new _promise2.default(function (resolve, reject) {\n try {\n _this._messageBus.postMessage(message, function (result) {\n if (result.body.code === 200) {\n resolve(result.body.value);\n } else {\n reject('error', result.body.code);\n }\n });\n } catch (err) {\n reject('On validateAssertion from method postMessage error: ' + err);\n }\n });\n }\n }, {\n key: 'addGUIListeners',\n value: function addGUIListeners() {\n var _this = this;\n\n _this._messageBus.addListener(_this._idmURL, function (msg) {\n var funcName = msg.body.method;\n\n log.log('[IdentityModule:addGUIListeners]', msg, msg.body, funcName);\n\n var returnedValue = void 0;\n\n if (funcName === 'deployGUI') {\n returnedValue = _this.deployGUI();\n } else if (funcName === 'getIdentitiesToChoose') {\n _this.getIdentitiesToChoose().then(function (result) {\n // if the function requested is not a promise\n var value = { type: 'execute', value: result, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if storeIdentity method postMessage error: ' + err);\n }\n });\n return;\n } else if (funcName === 'unregisterIdentity') {\n var email = msg.body.params.email;\n returnedValue = _this.unregisterIdentity(email);\n } else if (funcName === 'getMyPublicKey') {\n // because generateRSAKeyPair is a promise\n // we have to send the message only after getting the key pair\n _this._crypto.getMyPublicKey().then(function (pubKey) {\n pubKey = (0, _utils.stringify)(pubKey);\n var value = { type: 'execute', value: pubKey, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if generateRSAKeyPair method postMessage error: ' + err);\n }\n });\n return;\n } else if (funcName === 'sendGenerateMessage') {\n var contents = msg.body.params.contents;\n var origin = msg.body.params.origin;\n var usernameHint = msg.body.params.usernameHint;\n var idpDomain = msg.body.params.idpDomain;\n _this.sendGenerateMessage(contents, origin, usernameHint, idpDomain).then(function (returnedValue) {\n var value = { type: 'execute', value: returnedValue, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if sendGenerateMessage method postMessage error: ' + err);\n }\n });\n return;\n } else if (funcName === 'addAssertion') {\n var result = msg.body.params;\n\n // let keyPair = msg.body.params.keyPair;\n _this.identities.addAssertion(result).then(function (returnedValue) {\n var value = { type: 'execute', value: returnedValue, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if storeIdentity method postMessage error: ' + err);\n }\n });\n return;\n } /*else if (funcName === 'selectIdentityForHyperty') {\n let origin = msg.body.params.origin;\n let idp = msg.body.params.idp;\n let idHint = msg.body.params.idHint;\n _this.selectIdentityForHyperty(origin, idp, idHint);\n return;\n }*/\n\n // if the function requested is not a promise\n var value = { type: 'execute', value: returnedValue, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n try {\n _this._messageBus.postMessage(replyMsg);\n } catch (err) {\n log.error('On addGUIListeners from if storeIdentity method postMessage error: ' + err);\n }\n });\n }\n }, {\n key: 'deployGUI',\n value: function deployGUI() {\n var _this = this;\n _this.guiDeployed = true;\n }\n\n //******************* PRIVATE METHODS *******************\n /**\n * GetValidToken is for non legacy hyperties and verifies if the Token is still valid\n * if the token is invalid it requests a new token\n * @param {String} hypertyURL hypertyURL\n * @return {Promise}\n */\n\n }, {\n key: '_getValidToken',\n value: function _getValidToken(hypertyURL) {\n log.log('[IdentityModule._getValidToken]:hypertyURL', hypertyURL);\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n _this.getIdToken(hypertyURL).then(function (assertion) {\n log.log('[IdentityModule._getValidToken] retrieved IdAssertion', assertion);\n var timeNow = (0, _utils.secondsSinceEpoch)();\n\n if (!assertion.hasOwnProperty('expires')) return resolve(assertion);\n\n var expirationDate = assertion.expires;\n\n /* if (completeId.hasOwnProperty('info')) {\n if (completeId.info.hasOwnProperty('expires')) {\n expirationDate = completeId.info.expires;\n } else if (completeId.info.hasOwnProperty('tokenIDJSON')) {\n expirationDate = completeId.info.tokenIDJSON.exp;\n } else {\n // throw 'The ID Token does not have an expiration time';\n log.info('The ID Token does not have an expiration time');\n resolve(assertion);\n }\n } else if (completeId.hasOwnProperty('infoToken') && completeId.infoToken.hasOwnProperty('exp')) {\n expirationDate = completeId.infoToken.exp;\n } else {\n // throw 'The ID Token does not have an expiration time';\n log.info('The ID Token does not have an expiration time');\n resolve(assertion);\n }*/\n\n log.log('[Identity.IdentityModule.getValidToken] Token expires in', expirationDate);\n log.log('[Identity.IdentityModule.getValidToken] time now:', timeNow);\n\n if (timeNow >= expirationDate) {\n if (assertion.hasOwnProperty('refresh')) {\n _this.sendRefreshMessage(assertion).then(function (newAssertion) {\n _this.identities.updateAssertion(newAssertion).then(function () {\n resolve(newAssertion);\n }, function (err) {\n log.error('[IdentityModule.getValidToken] error updating the assertion ', err);\n reject(err);\n });\n }, function (err) {\n log.error('[IdentityModule.getValidToken] error refreshing the assertion ', err);\n reject(err);\n });\n } else {\n // no refresh token available, user has to authenticate again to get a new assertion\n // generate new idToken\n _this.callGenerateMethods(assertion.idp.domain).then(function (value) {\n resolve(value);\n }).catch(function (err) {\n reject('[IdentityModule.getValidToken] error when generating a new assertion ' + err);\n });\n }\n } else {\n resolve(assertion);\n }\n }).catch(function (error) {\n log.error('[IdentityModule.getValidToken] error on getIdToken', error);\n reject(error);\n });\n });\n }\n\n /**\n * returns the reporter associated to the dataObject URL\n * @param {String} dataObjectURL dataObject url\n * @return {String} reporter dataObject url reporter\n */\n\n }, {\n key: '_getHypertyFromDataObject',\n value: function _getHypertyFromDataObject(dataObjectURL) {\n log.info('_getHypertyFromDataObject:dataObjectURL', dataObjectURL);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var splitedURL = (0, _utils.divideURL)(dataObjectURL);\n var domain = splitedURL.domain;\n var finalURL = (0, _utils.parseMessageURL)(dataObjectURL);\n\n // check if is the creator of the hyperty\n var reporterURL = _this.registry.getReporterURLSynchonous(finalURL);\n log.info('_getHypertyFromDataObject:reporterURL', reporterURL);\n\n if (reporterURL) {\n resolve(reporterURL);\n } else {\n // check if there is already an association from an hypertyURL to the dataObject\n var storedReporterURL = _this.dataObjectsIdentity[finalURL];\n log.info('_getHypertyFromDataObject:storedReporterURL', storedReporterURL);\n\n if (storedReporterURL) {\n resolve(storedReporterURL);\n } else {\n // check if there is any hyperty that subscribed the dataObjectURL\n var subscriberHyperty = _this.registry.getDataObjectSubscriberHyperty(dataObjectURL);\n log.info('_getHypertyFromDataObject:subscriberHyperty', subscriberHyperty);\n\n if (subscriberHyperty) {\n resolve(subscriberHyperty);\n } else {\n // search in domain registry for the hyperty associated to the dataObject\n // search in case is a subscriber who wants to know the reporter\n // To be reviewed in order to avoid the discovery transaction\n _this._coreDiscovery.discoverDataObjectPerURL(finalURL, domain).then(function (dataObject) {\n log.info('_getHypertyFromDataObject:dataObject', dataObject);\n _this.dataObjectsIdentity[finalURL] = dataObject.reporter;\n log.info('_getHypertyFromDataObject:dataObject.reporter', dataObject.reporter);\n resolve(dataObject.reporter);\n }, function (err) {\n reject(err);\n });\n }\n }\n }\n });\n }\n\n /**\n * Function that resolve and create the domainURL in case it is provided one. If not, resolve the default domainURL\n * @param {String} idpDomain idpDomain (Optional)\n */\n\n }, {\n key: '_resolveDomain',\n value: function _resolveDomain(idpDomain) {\n if (!idpDomain) {\n return 'domain-idp://google.com';\n } else {\n return 'domain-idp://' + idpDomain;\n }\n }\n\n /*\n _secondsSinceEpoch() {\n return Math.floor(Date.now() / 1000);\n }*/\n\n }, {\n key: 'messageBus',\n get: function get() {\n var _this = this;\n return _this._messageBus;\n }\n\n /**\n * Set the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n ,\n set: function set(messageBus) {\n var _this = this;\n _this._messageBus = messageBus;\n _this.addGUIListeners();\n }\n\n /**\n * return the coreDiscovery component\n * do we need this??\n */\n\n }, {\n key: 'coreDiscovery',\n get: function get() {\n var _this = this;\n return _this._coreDiscovery;\n }\n\n /**\n * Set the coreDiscovery component\n * @param {coreDiscovery} coreDiscovery\n */\n ,\n set: function set(coreDiscovery) {\n var _this = this;\n _this._coreDiscovery = coreDiscovery;\n }\n\n /**\n * return the registry in this idModule\n * @param {registry} registry\n */\n\n }, {\n key: 'registry',\n get: function get() {\n var _this = this;\n return _this._registry;\n }\n\n /**\n * Set the registry in this idModule\n * @param {registry} reg\n */\n ,\n set: function set(registry) {\n var _this = this;\n _this._registry = registry;\n }\n }, {\n key: 'identities',\n get: function get() {\n var _this = this;\n return _this._identities;\n }\n }, {\n key: 'idps',\n get: function get() {\n return this._listOfIdps;\n }\n }]);\n return IdentityModule;\n}();\n\nexports.default = IdentityModule;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9pZGVudGl0eS9JZGVudGl0eU1vZHVsZS5qcz81MTE1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIExvZyBTeXN0ZW1cbmltcG9ydCAqIGFzIGxvZ2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GVudGl0eS5leHBpcmVzID4gc2Vjb25kc1NpbmNlRXBvY2goKSkge1xuICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUoX3RoaXMuaWRlbnRpdGllcy5kZWZhdWx0SWRlbnRpdHkpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBfdGhpcy5zZWxlY3RJZGVudGl0eUZyb21HVUkoKS50aGVuKChhc3NlcnRpb24pID0+IHtcblxuICAgICAgICAgICAgICBsb2cubG9nKCdbSWRlbnRpdHlNb2R1bGVdIElkZW50aXR5IHNlbGVjdGVkIGZyb20gR1VJLicpO1xuXG4gICAgICAgICAgICAgIC8qXG4gICAgICAgICAgICAgICAgX3RoaXMuaWRlbnRpdGllcy5kZWZhdWx0SWRlbnRpdHkgPSBhc3NlcnRpb24udXNlclByb2ZpbGUudXNlclVSTDtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZShhc3NlcnRpb24pO1xuICAgICAgICAgICAgICB9Ki9cblxuICAgICAgICAgICAgICBfdGhpcy5pZGVudGl0aWVzLmRlZmF1bHRJZGVudGl0eSA9IGFzc2VydGlvbi51c2VyUHJvZmlsZS51c2VyVVJMO1xuICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZShhc3NlcnRpb24pO1xuICAgICAgICAgICAgfSwgKGVycikgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gcmVqZWN0KGVycik7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgbG9nLmVycm9yKCdFcnJvciBvbiBpZGVudGl0eSBhY3F1aXNpdGlvbiAnLCBlcnJvcik7XG4gICAgICAgIHJldHVybiByZWplY3QoZXJyb3IpO1xuICAgICAgfSk7XG5cbiAgICAgIF90aGlzLnJ1bnRpbWVDYXBhYmlsaXRpZXMuaXNBdmFpbGFibGUoJ25vZGUnKS50aGVuKChyZXN1bHQpID0+IHtcb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ICAgICAgICAgIH0sIChlcnIpID0+IHtcbiAgICAgICAgICAgICAgICBsb2cuZXJyb3IoJ1tJZGVudGl0eU1vZHVsZS5nZXRWYWxpZFRva2VuXSBlcnJvciB1cGRhdGluZyB0aGUgYXNzZXJ0aW9uICcsIGVycik7XG4gICAgICAgICAgICAgICAgcmVqZWN0KGVycik7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSwgKGVycikgPT4ge1xuICAgICAgICAgICAgICBsb2cuZXJyb3IoJ1tJZGVudGl0eU1vZHVsZS5nZXRWYWxpZFRva2VuXSBlcnJvciByZWZyZXNoaW5nIHRoZSBhc3NlcnRpb24gJywgZXJyKTtcbiAgICAgICAgICAgICAgcmVqZWN0KGVycik7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2UgeyAvLyBubyByZWZyZXNoIHRva2VuIGF2YWlsYWJsZSwgdXNlciBoYXMgdG8gYXV0aGVudGljYXRlIGFnYWluIHRvIGdldCBhIG5ldyBhc3NlcnRpb25cbiAgICAgICAgICAgIC8vIGdlbmVyYXRlIG5ldyBpZFRva2VuXG4gICAgICAgICAgICBfdGhpcy5jYWxsR2VuZXJhdGVNZXRob2RzKGFzc2VydGlvbi5pZHAuZG9tYWluKS50aGVuKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICByZXNvbHZlKHZhbHVlKTtcbiAgICAgICAgICAgIH0pLmNhdGNoKGVyciA9PiB7IHJlamVjdCgnW0lkZW50aXR5TW9kdWxlLmdldFZhbGlkVG9rZW5dIGVycm9yIHdoZW4gZ2VuZXJhdGluZyBhIG5ldyBhc3NlcnRpb24gJyArIGVycik7IH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXNvbHZlKGFzc2VydGlvbik7XG4gICAgICAgIH1cbiAgICAgIH0pLmNhdGNoKGZ1bmN0aW9uKGVycm9yKSB7XG4gICAgICAgIGxvZy5lcnJvcignW0lkZW50aXR5TW9k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Ozs7QUFJQTtBQUNBO0FBQ0E7QUFDQTs7O0FBNEJBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7Ozs7O0FBd2pDQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///469\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _isInteger = __webpack_require__(471);\n\nvar _isInteger2 = _interopRequireDefault(_isInteger);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _assign = __webpack_require__(96);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _Utils = __webpack_require__(205);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('IdentityModule'); // Log System\n\n/**\n* The Identity Data Model is used to model the reTHINK User entity. The Identity data model is handled by Identity Management functionality.\n*\n*/\nvar Identities = function () {\n function Identities(type, storageManager) {\n (0, _classCallCheck3.default)(this, Identities);\n\n var _this = this;\n\n _this._watchingYou = new _Utils.WatchingYou();\n\n _this._storageManager = storageManager;\n _this._guid;\n _this._type = type;\n _this._identities = {};\n _this._accessTokens = _this.watchingYou.watch('accessTokens', {}, true);\n }\n\n (0, _createClass3.default)(Identities, [{\n key: 'getIdentity',\n value: function getIdentity(identifier) {\n return (0, _assign2.default)({}, this._identities[identifier]);\n }\n }, {\n key: 'loadIdentities',\n value: function loadIdentities() {\n var _this = this;\n return new _promise2.default(function (resolve) {\n\n _this._storageManager.get(null, null, 'identities').then(function (identities) {\n\n log.info('[Identities.Load Identities] identities: ', identities);\n\n if (identities) {\n _this._identities = identities;\n\n // let's set as default identity the one that expires later\n\n _this.identifiers.forEach(function (id) {\n var timeNow = (0, _utils.secondsSinceEpoch)();\n var identity = _this._identities[id];\n var expires = identity.expires;\n\n // if (!identity.hasOwnProperty('interworking')\n // || !identity.interworking) {\n _this.defaultIdentity = id;\n\n if (parseInt(expires) > timeNow) {\n _this.defaultIdentity.expires = parseInt(expires);\n _this.currentIdentity = id;\n }\n });\n }\n\n resolve();\n });\n });\n }\n }, {\n key: 'loadAccessTokens',\n value: function loadAccessTokens() {\n var _this = this;\n return new _promise2.default(function (resolve) {\n\n _this._storageManager.get('accessTokens').then(function (accessTokens) {\n\n if (accessTokens) _this._accessTokens = accessTokens;\n resolve();\n });\n });\n }\n\n // to confirm if this function is required when the App constraints the identity selection\n\n }, {\n key: 'addIdentity',\n value: function addIdentity(identity) {\n var _this2 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n if (_this._isValid(identity)) {\n var id = identity.identifiers[0];\n (0, _assign2.default)(_this2._identities[id], identity);\n _this2._storeIdentity(identity).then(function () {\n _this2._identities[id].status = 'created';\n resolve();\n });\n } else reject('[Identities.addIdentity] invalid IdAssertion');\n });\n }\n }, {\n key: 'addAssertion',\n value: function addAssertion(assertion) {\n var _this3 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n if (_this._isValid(assertion)) {\n\n var userUrl = assertion.userProfile.userURL;\n\n if (!_this.identities[userUrl]) _this._identities[userUrl] = assertion;else _this.identities[userUrl] = assertion;\n\n _this._store().then(function () {\n _this3._identities[userUrl].status = 'created';\n resolve(assertion);\n });\n } else reject('[Identities.addAssertion] invalid IdAssertion: ', assertion);\n });\n }\n }, {\n key: 'removeIdentity',\n value: function removeIdentity(userUrl) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n delete _this.identities[userUrl];\n\n _this._store().then(function () {\n resolve();\n });\n });\n }\n }, {\n key: 'addAccessToken',\n value: function addAccessToken(accessToken) {\n var _this = this;\n log.info('[Identities.addAccessToken] ', accessToken);\n\n return new _promise2.default(function (resolve, reject) {\n\n if (_this._isValidAccessToken(accessToken)) {\n\n // let newAccessToken = deepClone(accessToken);\n\n _this._accessTokens[accessToken.domain] = accessToken;\n\n _this._storeAccessTokens().then(function () {\n _this._accessTokens[accessToken.domain].status = 'created';\n resolve(accessToken);\n });\n } else reject('[Identities.addIdentity] invalid AccessToken: ', accessToken);\n });\n }\n }, {\n key: 'setAccessTokenInProgress',\n value: function setAccessTokenInProgress(domain) {\n\n if (this._accessTokens[domain]) this._accessTokens[domain].status = 'in-progress';else this._accessTokens[domain] = { status: 'in-progress' };\n }\n }, {\n key: 'getAccessToken',\n value: function getAccessToken(domain, resources) {\n var accessToken = this._accessTokens[domain];\n\n if (!accessToken) return undefined;else if (resources.every(function (i) {\n return accessToken.resources.indexOf(i) != -1;\n })) return this._accessTokens[domain];else return new Error('[Identities.getAccessToken] Not found for ', domain);\n }\n }, {\n key: 'updateAssertion',\n value: function updateAssertion(assertion) {\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n var userUrl = assertion.userProfile.userUrl;\n\n if (!_this.identities[userUrl]) return reject('[Identities.updateAssertion] Identity not found for ', userUrl);else {\n _this.identities[userUrl] = assertion;\n _this._store().then(function () {\n resolve();\n });\n }\n });\n }\n }, {\n key: 'addIdAssertion',\n value: function addIdAssertion(identifier, assertion, idp, scope) {\n var _this = this;\n\n var newIdAssertion = new IdAssertion(assertion, idp, scope);\n\n _this.idAssertionList.push(newIdAssertion);\n }\n\n //TODO: complete with more verifications. To be moved to Identity?\n\n }, {\n key: '_isValid',\n value: function _isValid(identity) {\n if (!identity.hasOwnProperty('assertion')) {\n return false;\n }\n\n var splitedAssertion = identity.assertion.split('.');\n var assertionParsed = void 0;\n\n //verify if the token contains the 3 components, or just the assertion\n try {\n if (splitedAssertion[1]) {\n assertionParsed = (0, _utils.decode)(splitedAssertion[1]);\n } else {\n assertionParsed = (0, _utils.decode)(identity.assertion);\n }\n } catch (err) {\n return false;\n }\n\n return true;\n }\n }, {\n key: '_isValidAccessToken',\n value: function _isValidAccessToken(accessToken) {\n\n if (!accessToken.hasOwnProperty('accessToken')) {\n return false;\n }\n\n if (!accessToken.hasOwnProperty('domain')) {\n return false;\n }\n\n if (!(accessToken.hasOwnProperty('resources') && Array.isArray(accessToken.resources))) {\n return false;\n }\n\n if (!(accessToken.hasOwnProperty('expires') && (0, _isInteger2.default)(accessToken.expires))) {\n return false;\n }\n\n if (!accessToken.hasOwnProperty('input')) {\n return false;\n }\n\n return true;\n }\n\n //TODO: add function to only set one new identity using the new indexed storage manager\n\n }, {\n key: '_store',\n value: function _store() {\n var _this4 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var store = (0, _keys2.default)(_this4._identities).map(function (userURL) {\n return _this._storageManager.set(userURL, 0, _this4._identities[userURL], 'identities');\n });\n\n _promise2.default.all(store).then(function () {\n resolve();\n }).catch(function (err) {\n reject('On _sendReporterSessionKey from method storeIdentity error: ' + err);\n });\n });\n }\n }, {\n key: '_storeAccessTokens',\n value: function _storeAccessTokens() {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var accessTokens = (0, _utils.deepClone)(_this._accessTokens);\n\n _this._storageManager.set('accessTokens', 0, accessTokens).then(function () {\n resolve();\n }).catch(function (err) {\n reject('On _sendReporterSessionKey from method storeIdentity error: ' + err);\n });\n });\n }\n }, {\n key: 'identities',\n get: function get() {\n return this._identities;\n }\n }, {\n key: 'accessTokens',\n get: function get() {\n return this._accessTokens;\n }\n }, {\n key: 'watchingYou',\n get: function get() {\n return this._watchingYou;\n }\n }, {\n key: 'guid',\n set: function set(guid) {\n this._guid = guid;\n },\n get: function get() {\n return this._guid;\n }\n }, {\n key: 'defaultIdentity',\n set: function set(identifier) {\n if (this.identities[identifier]) this._defaultIdentity = identifier;else throw new Error('[Identities.set defaultIdentity ] Error: identity does not exist here: ', identifier);\n },\n get: function get() {\n if (this._defaultIdentity) return (0, _assign2.default)({}, this.identities[this._defaultIdentity]);else return false;\n }\n }, {\n key: 'currentIdentity',\n set: function set(identifier) {\n if (this.identities[identifier]) this._currentIdentity = identifier;else throw '[Identities.set currentIdentity ] Error: identity does not exist here: ', identifier;\n },\n get: function get() {\n return (0, _assign2.default)({}, this.identities[this._currentIdentity]);\n }\n }, {\n key: 'identifiers',\n get: function get() {\n return (0, _keys2.default)(this._identities);\n }\n }]);\n return Identities;\n}();\n\n// move to Identity service framework?\n\nvar IdAssertion = function () {\n function IdAssertion(assertion, idp, userProfile) {\n (0, _classCallCheck3.default)(this, IdAssertion);\n\n var _this = this;\n\n _this._assertion = assertion;\n _this._idp = idp;\n _this._userProfile = userProfile;\n }\n\n (0, _createClass3.default)(IdAssertion, [{\n key: 'assertion',\n get: function get() {\n return this._assertion;\n }\n }, {\n key: 'idp',\n get: function get() {\n return this._idp;\n }\n }, {\n key: 'userProfile',\n get: function get() {\n return this._userProfile;\n }\n }]);\n return IdAssertion;\n}();\n\nvar IdValidation = function () {\n function IdValidation(identity, contents) {\n (0, _classCallCheck3.default)(this, IdValidation);\n\n var _this = this;\n _this.identity = identity;\n _this.contents = contents;\n }\n\n (0, _createClass3.default)(IdValidation, [{\n key: 'validates',\n value: function validates(identity, contents) {\n //TODO implement the logic\n\n }\n }]);\n return IdValidation;\n}();\n\nexports.default = Identities;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDcwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9pZGVudG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zLl9kZWZhdWx0SWRlbnRpdHldKTtcbiAgICBlbHNlIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGdldCBjdXJyZW50SWRlbnRpdHkoKSB7XG4gICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oe30sIHRoaXMuaWRlbnRpdGllc1t0aGlzLl9jdXJyZW50SWRlbnRpdHldKTtcbiAgfVxuXG4gIGdldCBpZGVudGlmaWVycygpIHtcbiAgICByZXR1cm4gT2JqZWN0LmtleXModGhpcy5faWRlbnRpdGllcyk7XG4gIH1cblxuICBnZXRJZGVudGl0eShpZGVudGlmaWVyKSB7XG4gICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oe30sIHRoaXMuX2lkZW50aXRpZXNbaWRlbnRpZmllcl0pO1xuICB9XG5cbiAgbG9hZElkZW50aXRpZXMoKSB7XG4gICAgbGV0IF90aGlzID0gdGhpcztcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcblxuICAgICAgX3RoaXMuX3N0b3JhZ2VNYW5hZ2VyLmdldChudWxsLCBudWxsLCAnaWRlbnRpdGllcycpLnRoZW4oKGlkZW50aXRpZXMpID0+IHtcblxuICAgICAgICBsb2cuaW5mbygnW0lkZW50aXRpZXMuTG9hZCBJZGVudGl0aWVzXSBpZGVudGl0aWVzOiAnLCBpZGVudGl0aWVzKTtcblxuICAgICAgICBpZiAoaWRlbnRpdGllcykge1xuICAgICAgICAgIF90aGlzLl9pZGVudGl0aWVzID0gaWRlbnRpdGllcztcblxuICAgICAgICAgIC8vIGxldCdzIHNldCBhcyBkZWZhdWx0IGlkZW50aXR5IHRoZSBvbmUgdGhhdCBleHBpcmVzIGxhdGVyXG5cbiAgICAgICAgICBfdGhpcy5pZGVudGlmaWVycy5mb3JFYWNoKChpZCkgPT4ge1xuICAgICAgICAgICAgbGV0IHRpbWVOb3cgPSBzZWNvbmRzU2luY2VFcG9jaCgpO1xuICAgICAgICAgICAgbGV0IGlkZW50aXR5ID0gX3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0E7QUFDQTtBQUVBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7OztBQTFTQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFFQTtBQU9BO0FBQ0E7QUFFQTs7O0FBUkE7QUFDQTtBQUVBO0FBT0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7Ozs7O0FBcVFBO0FBQ0E7QUFDQTtBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBOzs7OztBQUlBO0FBRUE7QUFBQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBR0E7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///470\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(472), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDcxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9udW1iZXIvaXMtaW50ZWdlci5qcz80NTFhIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0geyBcImRlZmF1bHRcIjogcmVxdWlyZShcImNvcmUtanMvbGlicmFyeS9mbi9udW1iZXIvaXMtaW50ZWdlclwiKSwgX19lc01vZHVsZTogdHJ1ZSB9O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9udW1iZXIvaXMtaW50ZWdlci5qc1xuLy8gbW9kdWxlIGlkID0gNDcxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///471\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(473);\nmodule.exports = __webpack_require__(13).Number.isInteger;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDcyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9udW1iZXIvaXMtaW50ZWdlci5qcz83MzhlIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2Lm51bWJlci5pcy1pbnRlZ2VyJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5OdW1iZXIuaXNJbnRlZ2VyO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL251bWJlci9pcy1pbnRlZ2VyLmpzXG4vLyBtb2R1bGUgaWQgPSA0NzJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///472\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.3 Number.isInteger(number)\nvar $export = __webpack_require__(21);\n\n$export($export.S, 'Number', { isInteger: __webpack_require__(474) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDczLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5udW1iZXIuaXMtaW50ZWdlci5qcz9kNWE5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIDIwLjEuMi4zIE51bWJlci5pc0ludGVnZXIobnVtYmVyKVxudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcblxuJGV4cG9ydCgkZXhwb3J0LlMsICdOdW1iZXInLCB7IGlzSW50ZWdlcjogcmVxdWlyZSgnLi9faXMtaW50ZWdlcicpIH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm51bWJlci5pcy1pbnRlZ2VyLmpzXG4vLyBtb2R1bGUgaWQgPSA0NzNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///473\n")},function(module,exports,__webpack_require__){eval("// 20.1.2.3 Number.isInteger(number)\nvar isObject = __webpack_require__(36);\nvar floor = Math.floor;\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pcy1pbnRlZ2VyLmpzPzAwYTgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMjAuMS4yLjMgTnVtYmVyLmlzSW50ZWdlcihudW1iZXIpXG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBmbG9vciA9IE1hdGguZmxvb3I7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGlzSW50ZWdlcihpdCkge1xuICByZXR1cm4gIWlzT2JqZWN0KGl0KSAmJiBpc0Zpbml0ZShpdCkgJiYgZmxvb3IoaXQpID09PSBpdDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXMtaW50ZWdlci5qc1xuLy8gbW9kdWxlIGlkID0gNDc0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///474\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('IdentityModule');\n\n/**\n* fake class for the gui to select the identity,\n* TODO replace with the proper identity GUI\n*\n*/\n// Log System\n\nvar GuiFake = function GuiFake(url, messageBus) {\n (0, _classCallCheck3.default)(this, GuiFake);\n\n log.log('FakeGUI_deployed');\n var _this = this;\n\n _this._url = url;\n _this._waitTime = 10000;\n _this._messageBus = messageBus;\n\n _this._messageBus.addListener(_this._url, function (msg) {\n\n if (msg.hasOwnProperty('type') && msg.type === 'create' && msg.body.hasOwnProperty('value') && msg.body.value.hasOwnProperty('identities') && msg.body.value.hasOwnProperty('idps')) {\n\n var identities = msg.body.value.identities;\n var idps = msg.body.value.idps;\n\n var value = void 0;\n\n if (identities[0] !== undefined) {\n value = { type: 'identity', value: identities[0], code: 200 };\n } else {\n value = { type: 'idp', value: idps[1].domain, code: 200 };\n }\n\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n\n // to test on the identity side the listener without the timeout\n // can represent the time the user takes to choose and identity\n if (msg.body.value === 'wait') {\n\n setTimeout(function () {\n _this._messageBus.postMessage(replyMsg);\n }, _this._waitTime);\n } else {\n _this._messageBus.postMessage(replyMsg);\n }\n } else {\n log.log('Ignoring messages not intended to FakeGUI.', msg);\n }\n });\n};\n\nexports.default = GuiFake;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9pZGVudGl0eS9HdWlGYWtlLmpzP2Q4YTciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ2VyIGZyb20gJ2xvZ2xldmVsJztcbmxldCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdJZGVudGl0eU1vZHVsZScpO1xuXG4vKipcbiogZmFrZSBjbGFzcyBmb3IgdGhlIGd1aSB0byBzZWxlY3QgdGhlIGlkZW50aXR5LFxuKiBUT0RPIHJlcGxhY2Ugd2l0aCB0aGUgcHJvcGVyIGl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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFHQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///475\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('IdentityManager'); /**\n * Provides an API to manage identities from msg bus pipeline\n *\n */\n\nvar IdentityManager = function () {\n function IdentityManager(idm) {\n (0, _classCallCheck3.default)(this, IdentityManager);\n\n var _this = this;\n\n _this._idm = idm;\n }\n\n (0, _createClass3.default)(IdentityManager, [{\n key: '_isToSetID',\n value: function _isToSetID(message) {\n var schemasToIgnore = ['domain-idp', 'runtime', 'domain'];\n\n var _from = message.from;\n\n if (message.body && message.body.hasOwnProperty('source')) {\n _from = message.body.source;\n }\n\n if (message.body && message.body.hasOwnProperty('subscriber')) {\n _from = message.body.subscriber;\n }\n\n // Signalling Messages between P2P Stubs don't have Identities. FFS\n if (_from.includes('/p2prequester/') || _from.includes('/p2phandler/')) {\n return false;\n }\n\n var splitFrom = _from.split('://');\n var fromSchema = splitFrom[0];\n var isToIgnore = schemasToIgnore.indexOf(fromSchema) === -1;\n\n return isToIgnore;\n }\n }, {\n key: 'processMessage',\n value: function processMessage(message) {\n var _this2 = this;\n\n log.log('[IdentityManager.processMessage] ', message);\n\n return new _promise2.default(function (resolve, reject) {\n\n // skip messages that don't need identity tokens in the body\n\n if (!_this2._isToSetID(message)) return resolve(message);\n\n /* let from = message.from;\n let sourceURL = undefined;\n if ( message.hasOwnProperty('body') && message.body.hasOwnProperty('source')) {\n from = message.body.source;\n }\n \n if (message.type === 'forward') {\n from = message.body.from;\n }\n \n if (message.hasOwnProperty('body') && message.body.hasOwnProperty('subscriber')) {\n from = message.body.subscriber;\n }*/\n\n _this2._idm.getToken(message).then(function (identity) {\n\n if (!message.hasOwnProperty('body')) message.body = {};\n\n message.body.identity = identity;\n resolve(message);\n }).catch(function (reason) {\n log.error(reason);\n reject(reason);\n });\n });\n }\n }]);\n return IdentityManager;\n}();\n\nexports.default = IdentityManager;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9pZGVudGl0eS9JZGVudGl0eU1hbmFnZXIuanM/ZjI3ZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogUHJvdmlkZXMgYW4gQVBJIHRvIG1hbmFnZSBpZGVudGl0aWVzIGZyb20gbXNnIGJ1cyBwaXBlbGluZVxuKlxuKi9cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldEx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"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _ActionsService = __webpack_require__(478);\n\nvar _ActionsService2 = _interopRequireDefault(_ActionsService);\n\nvar _PDP = __webpack_require__(479);\n\nvar _PDP2 = _interopRequireDefault(_PDP);\n\nvar _Policy = __webpack_require__(480);\n\nvar _Policy2 = _interopRequireDefault(_Policy);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('PEP'); // Log System\n\nvar PEP = function () {\n\n /**\n * Creates a Policy Enforcement Point (PEP) instance\n * @param {Object} context\n */\n function PEP(context) {\n (0, _classCallCheck3.default)(this, PEP);\n\n var _this = this;\n\n _this.pdp = new _PDP2.default(context);\n _this.actionsService = new _ActionsService2.default(context);\n _this.context = context;\n context.pep = _this;\n\n //TODO should be added a trigger to verify when the loadConfigurations is successfully completed\n context.loadConfigurations();\n }\n\n /**\n * return the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n\n\n (0, _createClass3.default)(PEP, [{\n key: 'addGUIListeners',\n value: function addGUIListeners() {\n var _this = this;\n\n _this.context.messageBus.addListener(_this.context.pepURL, function (msg) {\n var funcName = msg.body.method;\n\n var returnedValue = void 0;\n if (funcName === 'addToGroup') {\n var groupName = msg.body.params.groupName;\n var userEmail = msg.body.params.userEmail;\n returnedValue = _this.context.addToGroup(groupName, userEmail);\n } else if (funcName === 'createGroup') {\n var _groupName = msg.body.params.groupName;\n returnedValue = _this.context.createGroup(_groupName);\n } else if (funcName === 'addPolicy') {\n var source = msg.body.params.source;\n var key = msg.body.params.key;\n var policy = msg.body.params.policy;\n var combiningAlgorithm = msg.body.params.combiningAlgorithm;\n returnedValue = _this.addPolicy(source, key, policy, combiningAlgorithm);\n } else if (funcName === 'deleteGroup') {\n var _groupName2 = msg.body.params.groupName;\n returnedValue = _this.context.deleteGroup(_groupName2);\n } else if (funcName === 'removePolicy') {\n var _source = msg.body.params.source;\n var _key = msg.body.params.key;\n returnedValue = _this.removePolicy(_source, _key);\n } else if (funcName === 'savePolicies') {\n var _source2 = msg.body.params.source;\n returnedValue = _this.context.savePolicies(_source2);\n } else if (funcName === 'userPolicies') {\n returnedValue = _this.context.userPolicies;\n } else if (funcName === 'activeUserPolicy') {\n var userPolicy = msg.body.params.userPolicy;\n if (userPolicy) {\n _this.context.activeUserPolicy = userPolicy;\n }\n returnedValue = _this.context.activeUserPolicy;\n } else if (funcName === 'userPolicy') {\n var _key2 = msg.body.params.key;\n returnedValue = _this.context.userPolicies[_key2];\n } else if (funcName === 'saveActivePolicy') {\n returnedValue = _this.context.saveActivePolicy();\n } else if (funcName === 'getMyEmails') {\n returnedValue = _this.context.getMyEmails();\n } else if (funcName === 'getMyHyperties') {\n returnedValue = _this.context.getMyHyperties();\n } else if (funcName === 'groups') {\n returnedValue = _this.context.groups;\n } else if (funcName === 'getGroupsNames') {\n returnedValue = _this.context.getGroupsNames();\n }if (funcName === 'removeFromGroup') {\n var _groupName3 = msg.body.params.groupName;\n var _userEmail = msg.body.params.userEmail;\n returnedValue = _this.context.removeFromGroup(_groupName3, _userEmail);\n }\n\n var value = { type: 'execute', value: returnedValue, code: 200 };\n var replyMsg = { id: msg.id, type: 'response', to: msg.from, from: msg.to, body: value };\n _this.context.messageBus.postMessage(replyMsg);\n });\n }\n\n /**\n * Adds a policy to the Policy Enforcement Point (PEP). The policy can be created by the service\n * provider or by the user.\n * @param {String} source\n * @param {String} key\n * @param {Object} policy\n */\n\n }, {\n key: 'addPolicy',\n value: function addPolicy(source, key, policy, combiningAlgorithm) {\n if (!source) throw new Error('source is not defined');\n if (!key) throw new Error('key is not defined');\n\n if (policy === undefined) {\n policy = new _Policy2.default(key, [], [], combiningAlgorithm);\n } else {\n if (!(policy instanceof _Policy2.default)) {\n policy = new _Policy2.default(policy.key, policy.rules, policy.actions, policy.combiningAlgorithm);\n }\n }\n\n switch (source) {\n case 'SERVICE_PROVIDER':\n this.context.savePolicies(source, policy, key);\n break;\n case 'USER':\n this.context.userPolicies[key] = policy;\n this.context.savePolicies(source);\n break;\n default:\n throw Error('Unknown policy source: ' + source);\n }\n }\n }, {\n key: 'authorise',\n value: function authorise(message, isIncoming) {\n var _this2 = this;\n\n // log.log('[Policy.PEP Authorise] ', message);\n // log.log(message);\n if (!message) throw new Error('message is not defined');\n if (!message.from) throw new Error('message.from is not defined');\n if (!message.to) throw new Error('message.to is not defined');\n if (!message.type) throw new Error('message.type is not defined');\n message.body = message.body || {};\n\n return new _promise2.default(function (resolve, reject) {\n\n message.body = message.body || {};\n var _this = _this2;\n\n var result = _this.pdp.evaluatePolicies(message, isIncoming);\n if (result === 'Not Applicable') {\n result = _this.context.defaultBehaviour;\n message.body.auth = false;\n }\n _this.actionsService.enforcePolicies(message, isIncoming).then(function (messages) {\n for (var i in messages) {\n message = messages[i];\n if (result) {\n message.body.auth = message.body.auth === undefined ? true : message.body.auth;\n resolve(message);\n } else {\n var errorMessage = { body: { code: 403, description: 'Blocked by policy' }, from: message.to, to: message.from, type: 'response' };\n reject(errorMessage);\n }\n }\n }, function (error) {\n reject(error);\n });\n });\n }\n }, {\n key: 'authoriseSync',\n value: function authoriseSync(message) {\n var result = void 0;\n message.body = message.body || {};\n result = this.pdp.evaluatePolicies(message, true);\n if (result === 'Not Applicable') {\n result = this.context.defaultBehaviour;\n }\n return result;\n }\n }, {\n key: 'removePolicy',\n value: function removePolicy(source, key) {\n if (!source) throw new Error('source is not defined');\n if (source !== '*' && !key) throw new Error('key is not defined');\n\n switch (source) {\n case '*':\n this.context.serviceProviderPolicy = {};\n this.context.userPolicies = {};\n this.context.activeUserPolicy = undefined;\n this.context.savePolicies('USER');\n this.context.savePolicies('SERVICE_PROVIDER');\n this.context.saveActivePolicy();\n break;\n case 'SERVICE_PROVIDER':\n delete this.context.serviceProviderPolicy[key];\n this.context.savePolicies();\n break;\n case 'USER':\n delete this.context.userPolicies[key];\n if (key === this.context.activeUserPolicy) {\n this.context.activeUserPolicy = undefined;\n this.context.saveActivePolicy();\n }\n this.context.savePolicies('USER');\n break;\n default:\n throw Error('Unknown policy source: ' + source);\n }\n }\n }, {\n key: 'messageBus',\n get: function get() {\n var _this = this;\n return _this.context.messageBus;\n }\n\n /**\n * Set the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n ,\n set: function set(messageBus) {\n var _this = this;\n _this.context.messageBus = messageBus;\n _this.addGUIListeners();\n }\n }]);\n return PEP;\n}();\n\nexports.default = PEP;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvUEVQLmpzPzQ3ZjIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ2VyIGZyb20gJ2xvZ2xldmVsJztcbmxldCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdQRVAnKTtcblxuaW1wb3J0IEFjdGlvbnNTZXJ2aWNlIGZyb20gJy4vQWN0aW9uc1NlcnZpY2UnO1xuaW1wb3J0IFBEUCBmcm9tICcuL1BEUCc7XG5pbXBvcnQgUG9saWN5IGZyb20gJy4vUG9saWN5JztcbmltcG9ydCB7aXNIeXBlcnR5VVJMfS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mluZWQnKTtcblxuICAgIHN3aXRjaCAoc291cmNlKSB7XG4gICAgICBjYXNlICcqJzpcbiAgICAgICAgdGhpcy5jb250ZXh0LnNlcnZpY2VQcm92aWRlclBvbGljeSA9IHt9O1xuICAgICAgICB0aGlzLmNvbnRleHQudXNlclBvbGljaWVzID0ge307XG4gICAgICAgIHRoaXMuY29udGV4dC5hY3RpdmVVc2VyUG9saWN5ID0gdW5kZWZpbmVkO1xuICAgICAgICB0aGlzLmNvbnRleHQuc2F2ZVBvbGljaWVzKCdVU0VSJyk7XG4gICAgICAgIHRoaXMuY29udGV4dC5zYXZlUG9saWNpZXMoJ1NFUlZJQ0VfUFJPVklERVInKTtcbiAgICAgICAgdGhpcy5jb250ZXh0LnNhdmVBY3RpdmVQb2xpY3koKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdTRVJWSUNFX1BST1ZJREVSJzpcbiAgICAgICAgZGVsZXRlIHRoaXMuY29udGV4dC5zZXJ2aWNlUHJvdmlkZXJQb2xpY3lba2V5XTtcbiAgICAgICAgdGhpcy5jb250ZXh0LnNhdmVQb2xpY2llcygpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ1VTRVInOlxuICAgICAgICBkZWxldGUgdGhpcy5jb250ZXh0LnVzZXJQb2xpY2llc1trZXldO1xuICAgICAgICBpZiAoa2V5ID09PSB0aGlzLmNvbnRleHQuYWN0aXZlVXNlclBvbGljeSkge1xuICAgICAgICAgIHRoaXMuY29udGV4dC5hY3RpdmVVc2VyUG9saWN5ID0gdW5kZWZpbmVkO1xuICAgICAgICAgIHRoaXMuY29udGV4dC5zYXZlQWN0aXZlUG9saWN5KCk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5jb250ZXh0LnNhdmVQb2xpY2llcygnVVNFUicpO1xuICAgICAgICBicmVhaztcbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHRocm93IEVycm9yKCdVbmtub3duIHBvbGljeSBzb3VyY2U6ICcgKyBzb3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QTtBQUNBO0FBQ0E7QUFUQTtBQVdBOzs7QUFFQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTs7O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUF0QkE7QUF3QkE7OztBQXZMQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUE4S0E7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///477\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ActionsService = function () {\n function ActionsService(context) {\n (0, _classCallCheck3.default)(this, ActionsService);\n\n this.context = context;\n }\n\n (0, _createClass3.default)(ActionsService, [{\n key: 'enforcePolicies',\n value: function enforcePolicies(message, isIncomingMessage) {\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n\n var policies = _this.context.getPolicies(message, isIncomingMessage);\n\n if (policies !== undefined) {\n if (policies.serviceProviderPolicy !== undefined) {\n policies.serviceProviderPolicy.enforceActions(_this.context, message).then(function (messages) {\n resolve(messages);\n }, function (error) {\n reject(error);\n });\n } else {\n if (policies.userPolicy !== undefined) {\n policies.userPolicy.enforceActions(_this.context, message).then(function (messages) {\n resolve(messages);\n }, function (error) {\n reject(error);\n });\n } else {\n resolve([message]);\n }\n }\n } else {\n resolve([message]);\n }\n });\n }\n }, {\n key: 'forwardToID',\n value: function forwardToID(message, email) {\n var _this = this;\n if (!_this.context.runtimeRegistry) throw new Error('forward message to given ID is unsupported in this environment');\n\n return new _promise2.default(function (resolve, reject) {\n if (_this.context.runtimeRegistry.hypertiesList[0].hypertyURL === message.to) {\n var splitTo = message.to.split('://');\n if (splitTo[0] !== 'runtime') {\n _this.context.runtimeRegistry.discoverHypertyPerUser(email).then(function (result) {\n message.to = result.hypertyURL;\n message.body.via = undefined;\n resolve(message);\n _this.context.runtimeRegistry._messageBus.postMessage(message);\n }, function (error) {\n reject(error);\n });\n } else {\n resolve(message);\n }\n } else {\n resolve(message);\n }\n });\n }\n }, {\n key: 'forwardToHyperty',\n value: function forwardToHyperty(message, hypertyURL) {\n var _this = this;\n if (!_this.context.runtimeRegistry) throw new Error('forward message to given ID is unsupported in this environment');\n\n return new _promise2.default(function (resolve) {\n if (_this.context.runtimeRegistry.hypertiesList[0].hypertyURL === message.to) {\n var splitTo = message.to.split('://');\n if (splitTo[0] !== 'runtime') {\n message.to = hypertyURL;\n message.body.via = undefined;\n resolve(message);\n _this.context.runtimeRegistry._messageBus.postMessage(message);\n } else {\n resolve(message);\n }\n } else {\n resolve(message);\n }\n });\n }\n }, {\n key: 'sendAutomaticMessage',\n value: function sendAutomaticMessage(message, text) {\n var _this = this;\n return new _promise2.default(function (resolve) {\n var automaticMessage = {\n from: message.to,\n to: message.from,\n body: {\n value: text\n },\n type: message.type\n };\n resolve(message);\n _this.context.runtimeRegistry._messageBus.postMessage(automaticMessage);\n });\n }\n }]);\n return ActionsService;\n}();\n\nexports.default = ActionsService;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvQWN0aW9uc1NlcnZpY2UuanM/MjliZCJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBBY3Rpb25zU2VydmljZSB7XG5cbiAgY29uc3RydWN0b3IoY29udGV4dCkge1xuICAgIHRoaXMuY29udGV4dCA9IGNvbnRleHQ7XG4gIH1cblxuICBlbmZvcmNlUG9saWNpZXMobWVzc2FnZSwgaXNJbmNvbWluZ01lc3NhZ2UpIHtcbiAgICBsZXQgX3RoaXMgPSB0aGlzO1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG5cbiAgICAgIGxldCBwb2xpY2llcyA9IF90aGlzLmNvbnRleHQuZ2V0UG9saWNpZXMobWVzc2FnZSwgaXNJbmNvbWluZ01lc3NhZ2UpO1xuXG4gICAgICBpZiAocG9saWNpZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAocG9saWNpZXMuc2VydmljZVByb3ZpZGVyUG9saWN5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBwb2xpY2llcy5zZXJ2aWNlUHJvdmlkZXJQb2xpY3kuZW5mb3JjZUFjdGlvbnMoX3RoaXMuY29udGV4dCwgbWVzc2FnZSkudGhlbihtZXNzYWdlcyA9PiB7XG4gICAgICAgICAgICByZXNvbHZlKG1lc3NhZ2VzKTtcbiAgICAgICAgICB9LCAoZXJyb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kZWZhdWx0IEFjdGlvbnNTZXJ2aWNlO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9wb2xpY3kvQWN0aW9uc1NlcnZpY2UuanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7QUFFQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQURBO0FBR0E7QUFOQTtBQVFBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///478\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _Operators = __webpack_require__(145);\n\nvar _Operators2 = _interopRequireDefault(_Operators);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* The Policy Decision Point (PDP) decides if a message is to be authorised by checking a set of\n* policies. The resource to be verified is specified in the first word of the 'condition' field of\n* a Policy object. The implementation that verifies if the message is compliant with a policy is\n* specified in a hashtable to allow dynamic definition of the implementation, providing\n* extensibility to the Policy Engine functionalities.\n*/\nvar PDP = function () {\n function PDP(context) {\n (0, _classCallCheck3.default)(this, PDP);\n\n this.context = context;\n this.operators = new _Operators2.default();\n }\n\n (0, _createClass3.default)(PDP, [{\n key: 'evaluatePolicies',\n value: function evaluatePolicies(message, isIncomingMessage) {\n var policies = this.context.getPolicies(message, isIncomingMessage);\n var result = 'Not Applicable';\n if (policies !== undefined) {\n result = this.evaluatePolicy(message, policies.serviceProviderPolicy, isIncomingMessage);\n if (result || result === 'Not Applicable') {\n var userResult = this.evaluatePolicy(message, policies.userPolicy, isIncomingMessage);\n if (userResult !== 'Not Applicable') {\n result = userResult;\n }\n }\n }\n\n return result;\n }\n }, {\n key: 'evaluatePolicy',\n value: function evaluatePolicy(message, policy, isIncoming) {\n var result = 'Not Applicable';\n if (policy) {\n result = policy.evaluateRules(this.context, message, isIncoming);\n }\n\n return result;\n }\n }]);\n return PDP;\n}();\n\nexports.default = PDP;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvUERQLmpzP2U5YmEiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IE9wZXJhdG9ycyBmcm9tICcuL09wZXJhdG9ycyc7XG5cbi8qKlxuKiBUaGUgUG9saWN5IERlY2lzaW9uIFBvaW50IChQRFApI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sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///479\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _AllowOverrides = __webpack_require__(206);\n\nvar _AllowOverrides2 = _interopRequireDefault(_AllowOverrides);\n\nvar _BlockOverrides = __webpack_require__(207);\n\nvar _BlockOverrides2 = _interopRequireDefault(_BlockOverrides);\n\nvar _FirstApplicable = __webpack_require__(208);\n\nvar _FirstApplicable2 = _interopRequireDefault(_FirstApplicable);\n\nvar _Rule = __webpack_require__(481);\n\nvar _Rule2 = _interopRequireDefault(_Rule);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Policy = function () {\n function Policy(key, rules, actions, combiningAlgorithm) {\n (0, _classCallCheck3.default)(this, Policy);\n\n if (!key) throw new Error('key is not defined');\n if (!actions) throw new Error('actions are not defined');\n\n this.actions = actions;\n this.key = key;\n this._setRules(rules);\n this._setCombiningAlgorithm(combiningAlgorithm);\n }\n\n (0, _createClass3.default)(Policy, [{\n key: 'addAction',\n value: function addAction(method, param) {\n this.actions.push({ method: method, param: param });\n }\n }, {\n key: 'createRule',\n value: function createRule(decision, condition, scope, target, priority) {\n if (priority === undefined) {\n priority = this.getLastPriority() + 1;\n }\n var rule = new _Rule2.default(decision, condition, scope, target, priority);\n this.rules.push(rule);\n }\n }, {\n key: 'deleteRule',\n value: function deleteRule(rule) {\n var indexToRemove = this.rules.indexOf(rule);\n this.rules.splice(indexToRemove, 1);\n }\n }, {\n key: 'enforceActions',\n value: function enforceActions(context, message) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var results = [];\n if (_this.actions.length !== 0) {\n for (var i in _this.actions) {\n var result = context.pep.actionsService[_this.actions[i].method](message, _this.actions[i].param);\n results.push(result);\n }\n _promise2.default.all(results).then(function (messages) {\n resolve(messages);\n }, function (error) {\n reject(error);\n });\n } else {\n resolve([message]);\n }\n });\n }\n }, {\n key: 'evaluateRules',\n value: function evaluateRules(context, message, isIncoming) {\n var results = [];\n for (var i in this.rules) {\n results.push(this.rules[i].evaluate(context, message, isIncoming));\n }\n\n return this.combiningAlgorithm.combine(results);\n }\n }, {\n key: 'getLastPriority',\n value: function getLastPriority() {\n var priorities = [];\n\n if (this.rules.length !== 0) {\n for (var i in this.rules) {\n priorities.push(this.rules[i].priority);\n }\n return Math.max.apply(Math, priorities);\n } else {\n return -1;\n }\n }\n }, {\n key: 'getRuleByPriority',\n value: function getRuleByPriority(priority) {\n for (var i in this.rules) {\n if (String(this.rules[i].priority) === String(priority)) {\n return this.rules[i];\n }\n }\n throw Error('Rule with priority ' + priority + ' does not exist!');\n }\n }, {\n key: '_setCombiningAlgorithm',\n value: function _setCombiningAlgorithm(combiningAlgorithm) {\n if (!combiningAlgorithm) {\n combiningAlgorithm = 'blockOverrides';\n }\n switch (combiningAlgorithm) {\n case 'blockOverrides':\n this.combiningAlgorithm = new _BlockOverrides2.default();\n break;\n case 'allowOverrides':\n this.combiningAlgorithm = new _AllowOverrides2.default();\n break;\n case 'firstApplicable':\n this.combiningAlgorithm = new _FirstApplicable2.default();\n break;\n default:\n throw Error('Unknown algorithm: ' + combiningAlgorithm);\n }\n }\n }, {\n key: '_setRules',\n value: function _setRules(rules) {\n this.rules = [];\n\n for (var i in rules) {\n var rule = rules[i];\n if (rule.priority === undefined) {\n rule.priority = this.getLastPriority() + 1;\n }\n if (!(rule instanceof _Rule2.default)) {\n rule = new _Rule2.default(rule.decision, rule.condition, rule.scope, rule.target, rule.priority);\n }\n this.rules.push(rule);\n }\n }\n }, {\n key: 'sortRules',\n value: function sortRules() {\n return this.rules.sort(function (a, b) {\n var x = a.priority;var y = b.priority;\n return x < y ? -1 : x > y ? 1 : 0;\n });\n }\n }]);\n return Policy;\n}();\n\nexports.default = Policy;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDgwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvUG9saWN5LmpzPzk4NDMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEFsbG93T3ZlcnJpZGVzIGZyb20gJy4vY29tYmluaW5nQWxnb3JpdGhtcy9BbGxvd092ZXJyaWRlcyc7XG5pbXBvcnQgQmxvY2tPdmVycmlkZXMgZnJvbSAnLi9jb21iaW5pbmdBbGdvcml0aG1zL0Jsb2NrT3ZlcnJpZGVzJztcbmltcG9ydCBGaXJzdEFwcGxpY2FibGUgZnJvbSAnLi9jb21iaW5pbmdBbGdvcml0aG1zL0ZpcnN0QXBwbGljYWJsZSc7XG5pbXBvcnQgUnVsZSBmcm9tICcuL1J1bGUnO1xuXG5jbGFzcyBQb2xpY3kge1xuXG4gIGNvbnN0cnVjdG9yKGtleSwgcnVsZXMsIGFjdGlvbnMsIGNvbWJpbmluZ0FsZ29yaXRobSkge1xuICAgIGlmICgha2V5KSB0aHJvdyBuZXcgRXJyb3IoJ2tleSBpcyBub3QgZGVmaW5lZCcpO1xuICAgIGlmICghYWN0aW9ucykgdGhyb3cgbmV3IEVycm9yKCdhY3Rpb25zIGFyZSBub3QgZGVmaW5lZCcpO1xuXG4gICAgdGhpcy5hY3Rpb25zID0gYWN0aW9ucztcbiAgICB0aGlzLmtleSA9IGtleTtcbiAgICB0aGlzLl9zZXRSdWxlcyhydWxlcyk7XG4gICAgdGhpcy5fc2V0Q29tYmluaW5nQWxnb3JpdGhtKGNvbWJpbmluZ0FsZ29yaXRobSk7XG4gIH1cblxuICBhZGRBY3Rpb24obWV0aG9kLCBwYXJh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7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQVhBO0FBYUE7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///480\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _AdvancedCondition = __webpack_require__(482);\n\nvar _AdvancedCondition2 = _interopRequireDefault(_AdvancedCondition);\n\nvar _Condition = __webpack_require__(146);\n\nvar _Condition2 = _interopRequireDefault(_Condition);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Rule = function () {\n function Rule(decision, condition, scope, target, priority) {\n (0, _classCallCheck3.default)(this, Rule);\n\n this.decision = decision;\n this.setCondition(condition);\n this.priority = priority;\n this.scope = scope;\n this.target = target;\n }\n\n (0, _createClass3.default)(Rule, [{\n key: 'setCondition',\n value: function setCondition(condition) {\n if (!(condition instanceof _Condition2.default || condition instanceof _AdvancedCondition2.default || condition instanceof _AdvancedCondition2.default)) {\n var attribute = condition.attribute;\n switch (attribute) {\n case 'subscription':\n this.condition = new _AdvancedCondition2.default(condition.attribute, condition.operator, condition.params);\n break;\n case undefined:\n this.condition = new _AdvancedCondition2.default(condition);\n break;\n default:\n this.condition = new _Condition2.default(condition.attribute, condition.operator, condition.params);\n }\n } else {\n this.condition = condition;\n }\n }\n }, {\n key: 'evaluate',\n value: function evaluate(context, message, isIncoming) {\n var field = isIncoming ? message.to : message.from;\n var hypertyName = void 0;\n switch (this.scope) {\n case 'global':\n break;\n\n case 'hyperty':\n if ((0, _utils.isDataObjectURL)(field)) {\n var reporter = context.runtimeRegistry.getReporterURLSynchonous((0, _utils.removePathFromURL)(field));\n if (reporter !== undefined) {\n hypertyName = context.runtimeRegistry.getHypertyName(reporter);\n }\n } else {\n if (field.split('://')[0] === 'hyperty') {\n hypertyName = context.runtimeRegistry.getHypertyName((0, _utils.removePathFromURL)(field));\n }\n }\n if (hypertyName === this.target) {\n break;\n }\n\n return 'Not Applicable';\n\n case 'identity':\n var owner = void 0;\n\n if ((0, _utils.isDataObjectURL)(field)) {\n var _reporter = context.runtimeRegistry.getReporterURLSynchonous((0, _utils.removePathFromURL)(field));\n owner = context.runtimeRegistry.getHypertyOwner(_reporter);\n } else {\n if (field.split('://')[0] === 'hyperty') {\n owner = context.runtimeRegistry.getHypertyOwner((0, _utils.removePathFromURL)(field));\n }\n }\n if (owner !== undefined) {\n owner = (0, _utils.getUserEmailFromURL)(owner);\n }\n if (owner === this.target) {\n break;\n }\n\n return 'Not Applicable';\n }\n\n if (this.condition.isApplicable(context, message, this.scope, this.target)) {\n return this.decision;\n } else {\n return 'Not Applicable';\n }\n }\n }]);\n return Rule;\n}();\n\nexports.default = Rule;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDgxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvUnVsZS5qcz9jOWU4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBBZHZhbmNlZENvbmRpdGlvbiBmcm9tICcuL2NvbmRpdGlvbnMvQWR2YW5jZWRDb25kaXRpb24nO1xuaW1wb3J0IENvbmRpdGlvbiBmcm9tICcuL2NvbmRpdGlvbnMvQ29uZGl0aW9uJztcbmltcG9ydCB7Z2V0VXNlckVtYWlsRnJvbVVSTCwgaXNEYXRhT2JqZWN0VVJMLCByZW1vdmVQYXRoRnJvbVVSTH0gZnJvbSAnLi4vdXRpbHMvdXRpbHMnO1xuaW1wb3J0IFN1YnNjcmlwdGlvbkNvbmRpdGlvbiBmcm9tICcuL2NvbmRpdGlvbnMvQWR2YW5jZWRDb25kaXRpb24nO1xuXG5jbGFzcyBSdWxlIHtcblxuICBjb25zdHJ1Y3RvcihkZWNpc2lvbiwgY29uZGl0aW9uLCBzY29wZSwgdGFyZ2V0LCBwcmlvcml0eSkge1xuICAgIHRoaXMuZGVjaXNpb24gPSBkZWNpc2lvbjtcbiAgICB0aGlzLnNldENvbmRpdGlvbihjb25kaXRpb24pO1xuICAgIHRoaXMucHJpb3JpdHkgPSBwcmlvcml0eTtcbiAgICB0aGlzLnNjb3BlID0gc2NvcGU7XG4gICAgdGhpcy50YXJnZXQgPSB0YXJnZXQ7XG4gIH1cblxuICBzZXRDb25kaXRpb24oY29uZGl0aW9uKSB7XG4gICAgaWYgKCEoY29uZGl0aW9uIGluc3RhbmNlb2YgQ29uZGl0aW9uIHx8IGNvbmRpdGlvbiBpbnN0YW5jZW9mIFN1YnNjcmlwdGlvbkNvbmRpdGlvbiB8fCBjb25kaXRpb24gaW5zdGFuY2VvZiBBZHZhbmNlZENvbmRpdG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J5LmdldFJlcG9ydGVyVVJMU3luY2hvbm91cyhyZW1vdmVQYXRoRnJvbVVSTChmaWVsZCkpO1xuICAgICAgICAgIGlmIChyZXBvcnRlciAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBoeXBlcnR5TmFtZSA9IGNvbnRleHQucnVudGltZVJlZ2lzdHJ5LmdldEh5cGVydHlOYW1lKHJlcG9ydGVyKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKGZpZWxkLnNwbGl0KCc6Ly8nKVswXSA9PT0gJ2h5cGVydHknKSB7XG4gICAgICAgICAgICBoeXBlcnR5TmFtZSA9IGNvbnRleHQucnVudGltZVJlZ2lzdHJ5LmdldEh5cGVydHlOYW1lKHJlbW92ZVBhdGhGcm9tVVJMKGZpZWxkKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChoeXBlcnR5TmFtZSA9PT0gdGhpcy50YXJnZXQpIHtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiAnTm90IEFwcGxpY2FibGUnO1xuXG4gICAgICBjYXNlICdpZGVudGl0eSc6XG4gICAgICAgIGxldCBvd25lcjtcblxuICAgICAgICBpZiAoaXNEYXRhT2JqZWN0VVJMKGZpZWxkKSkge1xuICAgICAgICAgIGxldCByZXBvcnRlciA9IGNvbnRleHQucnVudGltZVJlZ2lzdHJ5LmdldFJlcG9ydGVyVVJMU3luY2hvbm91cyhyZW1vdmVQYXRoRnJvbVVSTChmaWVsZCkpO1xuICAgICAgICAgIG93bmVyID0gY29udGV4dC5ydW50aW1lUmVnaXN0cnkuZ2V0SHlwZXJ0eU93bmVyKHJlcG9ydGVyKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZiAoZmllbGQuc3BsaXQoJzovLycpWzBdID09PSAnaHlwZXJ0eScpIHtcbiAgICAgICAgICAgIG93bmVyID0gY29udGV4dC5ydW50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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQXZDQTtBQUNBO0FBeUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFHQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///481\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _Condition = __webpack_require__(146);\n\nvar _Condition2 = _interopRequireDefault(_Condition);\n\nvar _Operators = __webpack_require__(145);\n\nvar _Operators2 = _interopRequireDefault(_Operators);\n\nvar _SubscriptionCondition = __webpack_require__(483);\n\nvar _SubscriptionCondition2 = _interopRequireDefault(_SubscriptionCondition);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AdvancedCondition = function () {\n function AdvancedCondition(condition) {\n (0, _classCallCheck3.default)(this, AdvancedCondition);\n\n this.operators = new _Operators2.default();\n if (condition.operators !== undefined) {\n condition = condition.condition;\n }\n condition = this.buildCondition(condition);\n this.condition = condition;\n }\n\n (0, _createClass3.default)(AdvancedCondition, [{\n key: 'buildCondition',\n value: function buildCondition(condition) {\n if (Array.isArray(condition[1])) {\n condition[1] = this.buildCondition(condition[1]);\n } else {\n if (condition[1].attribute === 'subscription') {\n condition[1] = new _SubscriptionCondition2.default(condition[1].attribute, condition[1].operator, condition[1].params);\n } else {\n condition[1] = new _Condition2.default(condition[1].attribute, condition[1].operator, condition[1].params);\n }\n }\n\n if (condition[2] !== undefined) {\n if (Array.isArray(condition[2])) {\n condition[2] = this.buildCondition(condition[2]);\n } else {\n if (condition[2].attribute === 'subscription') {\n condition[2] = new _SubscriptionCondition2.default(condition[2].attribute, condition[2].operator, condition[2].params);\n } else {\n condition[2] = new _Condition2.default(condition[2].attribute, condition[2].operator, condition[2].params);\n }\n }\n }\n return condition;\n }\n }, {\n key: 'isApplicable',\n value: function isApplicable(context, message, scope, target, operator, left, right) {\n if (!operator) {\n operator = this.condition[0];\n left = this.condition[1];\n right = this.condition[2];\n }\n\n while (!(left instanceof _Condition2.default) & !(left instanceof _SubscriptionCondition2.default) & typeof left !== 'boolean') {\n left = this.isApplicable(context, message, scope, target, left[0], left[1], left[2]);\n }\n if (right !== undefined) {\n while (!(right instanceof _Condition2.default) & !(right instanceof _SubscriptionCondition2.default) & typeof right !== 'boolean') {\n right = this.isApplicable(context, message, scope, target, right[0], right[1], right[2]);\n }\n }\n\n var resultLeft = typeof left === 'boolean' ? left : left.isApplicable(context, message, scope, target);\n var resultRight = void 0;\n if (right !== undefined) {\n resultRight = typeof right === 'boolean' ? right : right.isApplicable(context, message, scope, target);\n }\n return this.operators[operator]([resultLeft, resultRight]);\n }\n }]);\n return AdvancedCondition;\n}();\n\nexports.default = AdvancedCondition;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDgyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29uZGl0aW9ucy9BZHZhbmNlZENvbmRpdGlvbi5qcz9iZDBmIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBDb25kaXRpb24gZnJvbSAnLi9Db25kaXRpb24nO1xuaW1wb3J0IE9wZXJhdG9ycyBmcm9tICcuLi9PcGVyYXRvcnMnO1xuaW1wb3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dGlvbnMvQWR2YW5jZWRDb25kaXRpb24uanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7O0FBQUE7QUFDQTs7O0FBQUE7QUFDQTs7O0FBQUE7QUFDQTs7Ozs7QUFDQTtBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///482\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _get2 = __webpack_require__(484);\n\nvar _get3 = _interopRequireDefault(_get2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _Condition2 = __webpack_require__(146);\n\nvar _Condition3 = _interopRequireDefault(_Condition2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* @author Ana Caldeira \n* @classdesc Class to represent a subscription condition and evaluate its applicability.\n*/\nvar SubscriptionCondition = function (_Condition) {\n (0, _inherits3.default)(SubscriptionCondition, _Condition);\n\n /**\n * Creates a new SubscriptionCondition.\n * @class\n * @param {string} attribute\n * @param {string} operator\n * @param {*} params\n */\n function SubscriptionCondition(attribute, operator, params) {\n (0, _classCallCheck3.default)(this, SubscriptionCondition);\n return (0, _possibleConstructorReturn3.default)(this, (SubscriptionCondition.__proto__ || (0, _getPrototypeOf2.default)(SubscriptionCondition)).call(this, attribute, operator, params));\n }\n\n /**\n * Verifies if the subscription condition is applicable to the message. First, verifies if the message is of the subscription type; second, verifies if the message is from a remote runtime to guarantee that the subscription is being validated in the destination runtime; third, verifies if the subscription preference is met.\n * @param {Object} context environment where the Policy Engine is being used\n * @param {Object} message\n */\n\n\n (0, _createClass3.default)(SubscriptionCondition, [{\n key: 'isApplicable',\n value: function isApplicable(context, message) {\n var isSubscription = message.type === 'subscribe';\n var isFromRemoteSM = context.isFromRemoteSM(message.from);\n if (isSubscription & isFromRemoteSM) {\n return (0, _get3.default)(SubscriptionCondition.prototype.__proto__ || (0, _getPrototypeOf2.default)(SubscriptionCondition.prototype), 'isApplicable', this).call(this, context, message);\n } else {\n return false;\n }\n }\n }]);\n return SubscriptionCondition;\n}(_Condition3.default); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nexports.default = SubscriptionCondition;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDgzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29uZGl0aW9ucy9TdWJzY3JpcHRpb25Db25kaXRpb24uanM/YTkwMyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE2IFFVT0JJUyBORVRXT1JLUyBTTFxuKiBDb3B5cmlnaHQgMjAxNiBGUkFVTkhPRkVSLUdFU0VMTFNDSEFGVCBaVVIgRk9FUkRFUlVORyBERVIgQU5HRVdBTkRURU4gRk9SU0NIVU5HIEUuVlxuKiBDb3B5cmlnaHQgMjAxNiBPUkFOR0UgU0FcbiogQ29weXJpZ2h0IDIwMTYgRGV1dHNjaGUgVGVsZWtvbSBBR1xuKiBDb3B5cmlnaHQgMjAxNiBBcGl6ZWVcbiogQ29weXJpZ2h0IDIwMTYgVEVDSE5JU0NIRSBVTklWRVJTSVRBVCBCRVJMSU5cbipcbiogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlIFwiTGljZW5zZVwiKTtcbiogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaW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b21SZW1vdGVTTSkge1xuICAgICAgcmV0dXJuIHN1cGVyLmlzQXBwbGljYWJsZShjb250ZXh0LCBtZXNzYWdlKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG59XG5cbmV4cG9ydCBkZWZhdWx0IFN1YnNjcmlwdGlvbkNvbmRpdGlvbjtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvcG9saWN5L2NvbmRpdGlvbnMvU3Vic2NyaXB0aW9uQ29uZGl0aW9uLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUF1QkE7QUFDQTs7Ozs7QUFDQTs7OztBQUlBOzs7QUFFQTs7Ozs7OztBQU9BO0FBQUE7QUFBQTtBQUVBO0FBQ0E7QUFDQTs7Ozs7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUF2REE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBMkRBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///483\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _getOwnPropertyDescriptor = __webpack_require__(485);\n\nvar _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n var desc = (0, _getOwnPropertyDescriptor2.default)(object, property);\n\n if (desc === undefined) {\n var parent = (0, _getPrototypeOf2.default)(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDg0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvaGVscGVycy9nZXQuanM/Yzg0YiJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuZXhwb3J0cy5fX2VzTW9kdWxlID0gdHJ1ZTtcblxudmFyIF9nZXRQcm90b3R5cGVPZiA9IHJlcXVpcmUoXCIuLi9jb3JlLWpzL29iamVjdC9nZXQtcHJvdG90eXBlLW9mXCIpO1xuXG52YXIgX2dldFByb3RvdHlwZU9mMiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX2dldFByb3RvdHlwZU9mKTtcblxudmFyIF9nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IgPSByZXF1aXJlKFwiLi4vY29yZS1qcy9vYmplY3QvZ2V0LW93bi1wcm9wZXJ0eS1kZXNjcmlwdG9yXCIpO1xuXG52YXIgX2dldE93blByb3BlcnR5RGVzY3JpcHRvcjIgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KF9nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IpO1xuXG5mdW5jdGlvbiBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KG9iaikgeyByZXR1cm4gb2JqICYmIG9iai5fX2VzTW9kdWxlID8gb2JqIDogeyBkZWZhdWx0OiBvYmogfTsgfVxuXG5leHBvcnRzLmRlZmF1bHQgPSBmdW5jdGlvbiBnZXQob2JqZWN0LCBwcm9wZXJ0eSwgcmVjZWl2ZXIpIHtcbiAgaWYgKG9iamVjdCA9PT0gbnVsbCkgb2JqZWN0ID0gRnVuY3Rpb24ucHJvdG90eXBl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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///484\n')},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(486), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDg1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvZ2V0LW93bi1wcm9wZXJ0eS1kZXNjcmlwdG9yLmpzPzJiYTEiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9nZXQtb3duLXByb3BlcnR5LWRlc2NyaXB0b3JcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvb2JqZWN0L2dldC1vd24tcHJvcGVydHktZGVzY3JpcHRvci5qc1xuLy8gbW9kdWxlIGlkID0gNDg1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///485\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(487);\nvar $Object = __webpack_require__(13).Object;\nmodule.exports = function getOwnPropertyDescriptor(it, key) {\n return $Object.getOwnPropertyDescriptor(it, key);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDg2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvZ2V0LW93bi1wcm9wZXJ0eS1kZXNjcmlwdG9yLmpzPzcyNzkiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvcicpO1xudmFyICRPYmplY3QgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0O1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoaXQsIGtleSkge1xuICByZXR1cm4gJE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoaXQsIGtleSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9nZXQtb3duLXByb3BlcnR5LWRlc2NyaXB0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDQ4NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///486\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\nvar toIObject = __webpack_require__(45);\nvar $getOwnPropertyDescriptor = __webpack_require__(143).f;\n\n__webpack_require__(97)('getOwnPropertyDescriptor', function () {\n return function getOwnPropertyDescriptor(it, key) {\n return $getOwnPropertyDescriptor(toIObject(it), key);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDg3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuZ2V0LW93bi1wcm9wZXJ0eS1kZXNjcmlwdG9yLmpzPzg4ODkiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjYgT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihPLCBQKVxudmFyIHRvSU9iamVjdCA9IHJlcXVpcmUoJy4vX3RvLWlvYmplY3QnKTtcbnZhciAkZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcGQnKS5mO1xuXG5yZXF1aXJlKCcuL19vYmplY3Qtc2FwJykoJ2dldE93blByb3BlcnR5RGVzY3JpcHRvcicsIGZ1bmN0aW9uICgpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIGdldE93blByb3BlcnR5RGVzY3JpcHRvcihpdCwga2V5KSB7XG4gICAgcmV0dXJuICRnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IodG9JT2JqZWN0KGl0KSwga2V5KTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5nZXQtb3duLXByb3BlcnR5LWRlc2NyaXB0b3IuanNcbi8vIG1vZHVsZSBpZCA9IDQ4N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///487\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _Bus2 = __webpack_require__(204);\n\nvar _Bus3 = _interopRequireDefault(_Bus2);\n\nvar _Pipeline = __webpack_require__(489);\n\nvar _Pipeline2 = _interopRequireDefault(_Pipeline);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('MessageBus'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log system\n\n/**\n* @author micaelpedrosa@gmail.com\n* Message BUS Interface is an extension of the Bus\n* It doesn't support the default '*' listener, instead it uses the registry.resolve(..)\n*/\nvar MessageBus = function (_Bus) {\n (0, _inherits3.default)(MessageBus, _Bus);\n\n /* private\n _registry: Registry\n _forwards: { : { fl: MsgListener, sandboxToUrls: Map(Sandbox, [to-url]), urlToSandbox: { to-url: Sandbox } } }\n _pipeline: Pipeline\n */\n\n //TODO: future optimization\n //1. message batch processing with setInterval\n //2. resolve default gateway/protostub with register.resolve\n\n function MessageBus(registry) {\n (0, _classCallCheck3.default)(this, MessageBus);\n\n var _this2 = (0, _possibleConstructorReturn3.default)(this, (MessageBus.__proto__ || (0, _getPrototypeOf2.default)(MessageBus)).call(this));\n\n _this2._registry = registry;\n _this2._forwards = {};\n\n _this2._pipelineIn = new _Pipeline2.default(function (error) {\n log.error('PIPELINE-ERROR: ', (0, _stringify2.default)(error));\n });\n\n _this2._pipelineOut = new _Pipeline2.default(function (error) {\n log.error('PIPELINE-ERROR: ', (0, _stringify2.default)(error));\n });\n return _this2;\n }\n\n (0, _createClass3.default)(MessageBus, [{\n key: 'postMessage',\n\n\n /**\n * Post a message for routing. It will first search for a listener, if there is no one, it sends to a external routing using the _onPostMessage.\n * External routing use the registry.resolve(..) method to decide the destination sandbox.\n * @param {Message} inMsg JSON with mandatory Message structure {id, type, from, to}\n * @param {Callback} responseCallback Optional callback if a response is expected from the request. A response will be always sent, even if it is a \"Timeout\".\n * @return {number} the Message id\n */\n value: function postMessage(inMsg, responseCallback, timeout) {\n log.info('onPOSTMessage: ', inMsg);\n var _this = this;\n\n var deliver = function deliver(msg) {\n\n _this._responseCallback(inMsg, responseCallback, timeout);\n\n if (!_this._onResponse(msg)) {\n var itemList = _this._subscriptions[msg.to];\n if (itemList) {\n //do not publish on default address, because of loopback cycle\n _this._publishOn(itemList, msg);\n } else {\n //if there is no listener, send to external interface\n _this._onPostMessage(msg);\n }\n }\n };\n\n _this._genId(inMsg);\n\n if (_this._isToProcess(inMsg)) {\n var isIncoming = _this._isIncomingMessage(inMsg);\n\n if (isIncoming) _this._pipelineIn.process(inMsg, deliver);else _this._pipelineOut.process(inMsg, deliver);\n } else deliver(inMsg);\n\n return inMsg.id;\n }\n }, {\n key: '_isToProcess',\n value: function _isToProcess(message) {\n var schemasToIgnore = ['domain', 'domain-idp', 'global', 'hyperty-runtime', 'runtime'];\n var splitFrom = message.from.split('://');\n var fromSchema = splitFrom[0];\n var splitTo = message.to.split('://');\n var toSchema = splitTo[0];\n var from = message.from;\n var to = message.to;\n\n // Signalling messages between P2P Stubs don't have to be verified. FFS\n\n if (message.body && message.body.source) {\n from = message.body.source;\n }\n\n if (message.body && message.body.subscriber) {\n from = message.body.subscriber;\n }\n\n if (from.indexOf('/p2phandler/') !== -1 || from.indexOf('/p2prequester/') !== -1 || to.indexOf('/p2phandler/') !== -1 || to.indexOf('/p2prequester/') !== -1) {\n return false;\n }\n\n if (this._registry.isLocal(from) && this._registry.isLocal(message.to)) return false;\n\n if (message.from === fromSchema || message.to === toSchema || message.type === 'read' || message.type === 'response' || message.from.includes('hyperty://') && message.type === 'delete') {\n return false;\n } else {\n return schemasToIgnore.indexOf(fromSchema) === -1 || schemasToIgnore.indexOf(toSchema) === -1;\n }\n }\n }, {\n key: '_isIncomingMessage',\n value: function _isIncomingMessage(message) {\n var from = void 0;\n\n if (message.type === 'forward') {\n log.info('[MessageBus - isIncomingMessage] - message.type: ', message.type);\n from = message.body.from;\n } else if (message.hasOwnProperty('body') && message.body.hasOwnProperty('source') && message.body.source) {\n log.info('[MessageBus - isIncomingMessage] - message.body.source: ', message.body.source);\n from = message.body.source;\n } else if (message.hasOwnProperty('body') && message.body.hasOwnProperty('subscriber') && message.body.subscriber) {\n //TODO: this subscriber validation should not exist, because is outdated\n //TODO: the syncher and syncher manager not following the correct spec;\n log.info('[MessageBus - isIncomingMessage] - message.body.subscriber: ', message.body.subscriber);\n from = message.body.subscriber;\n } else if (message.hasOwnProperty('body') && message.body.hasOwnProperty('reporter') && message.body.reporter) {\n //TODO: this subscriber validation should not exist, because is outdated\n //TODO: the syncher and syncher manager not following the correct spec;\n log.info('[MessageBus - isIncomingMessage] - message.body.reporter: ', message.body.reporter);\n from = message.body.reporter;\n } else {\n log.info('[MessageBus - isIncomingMessage] - message.from ', message.from);\n from = message.from;\n }\n\n log.info('[MessageBus - isIncomingMessage] - check if isLocal: ', from);\n return !this._registry.isLocal(from);\n }\n\n /**\n * Adds an external publish address listener. Every message for the address will be forwarded to the external routing by _onPostMessage.\n * This means, even if there is a listener for the address, it will also send the message to the external routing.\n * @param {URL} from Publish address.\n */\n\n }, {\n key: 'addPublish',\n value: function addPublish(from) {\n var _this3 = this;\n\n var _this = this;\n\n //verify if forward exist\n var refCount = _this._forwards[from];\n if (!refCount) {\n var forwardListener = _this.addListener(from, function (msg) {\n log.info('MB-PUBLISH: ( ' + from + ' )');\n _this._onPostMessage(msg);\n });\n\n refCount = {\n counter: 0,\n fl: forwardListener,\n remove: function remove() {\n _this3.counter--;\n if (_this3.counter === 0) {\n _this3.fl.remove();\n delete _this._forwards[from];\n }\n }\n };\n\n _this._forwards[from] = refCount;\n }\n\n refCount.counter++;\n return refCount;\n }\n\n /**\n * Adds a forward listener for a message destination. Every message reaching an address will be also sent to the forward address.\n * @param {URL} from Message destination, it's actually the field \"to\" of the message.\n * @param {URL} to Forward address.\n */\n\n }, {\n key: 'addForward',\n value: function addForward(from, to) {\n var _this = this;\n\n return _this.addListener(from, function (msg) {\n log.info('MB-FORWARD: ( ' + from + ' to ' + to + ' )');\n _this.forward(to, msg);\n });\n }\n\n /**\n * Just forward's a message to the forward address. Listeners should be available for the forward address.\n * @param {URL} url Forward address.\n * @param {Message} msg Message to forward\n */\n\n }, {\n key: 'forward',\n value: function forward(url, msg) {\n var _this = this;\n\n var itemList = _this._subscriptions[url];\n if (itemList) {\n _this._publishOn(itemList, msg);\n }\n }\n\n //default route, if there are no listeners available for a message destination.\n\n }, {\n key: '_onPostMessage',\n value: function _onPostMessage(msg) {\n var _this = this;\n\n //resolve external protostub...\n _this._registry.resolve(msg).then(function (route, msg2route) {\n if (msg2route) _this.forward(route, msg2route);else _this.forward(route, msg);\n }).catch(function (e) {\n log.error('RESOLVE-ERROR: ', e);\n });\n }\n }, {\n key: 'pipelineIn',\n get: function get() {\n return this._pipelineIn;\n }\n }, {\n key: 'pipelineOut',\n get: function get() {\n return this._pipelineOut;\n }\n }]);\n return MessageBus;\n}(_Bus3.default);\n\nexports.default = MessageBus;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDg4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9idXMvTWVzc2FnZUJ1cy5qcz8zYTNhIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiogQ29weXJpZ2h0IDIwMTYgSU5FU0MtSURcbiogQ29weXJpZ2h0IDIwMTYgUVVPQklTIE5FVFdPUktTIFNMXG4qIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1JTQ0hVTkcgRS5WXG4qIENvcHlyaWdodCAyMDE2IE9SQU5HRSBTQVxuKiBDb3B5cmlnaHQgMjAxNiBEZXV0c2NoZSBUZWxla29tIEFHXG4qIENvcHlyaWdodCAyMDE2IEFwaXplZVxuKiBDb3B5cmlnaHQgMjAxNiBURUNITklTQ0hFIFVOSVZFUlNJVEFUIEJFUkxJTlxuKlxuKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY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\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('Pipeline');\n\n/**\n* @author micaelpedrosa@gmail.com\n* Sequencial processor of methods. Similar to how Sequential Promise's work, but better fit for message processing.\n* Normal use for this, is to intercept all messages with configured handlers, and act accordingly.\n*/\n\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyright 2016 Deutsche Telekom AG\n* Copyright 2016 Apizee\n* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n**/\n\nvar Pipeline = function () {\n /* public\n handlers: ((PipeContext) => void)[]\n onFail: (error) => void\n */\n\n function Pipeline(_onFail) {\n (0, _classCallCheck3.default)(this, Pipeline);\n\n var _this = this;\n\n _this.handlers = [];\n _this.onFail = _onFail;\n }\n\n /**\n * Insert a message in the pipeline queue. All messages are wrapped with a PipeContext.\n * @param {Message} msg Message for the queue\n * @param {Callback} onDeliver When message is finished processing from all handlers, it will be delivered in this callback.\n */\n\n\n (0, _createClass3.default)(Pipeline, [{\n key: 'process',\n value: function process(msg, onDeliver) {\n var _this = this;\n\n if (_this.handlers.length > 0) {\n var iter = new Iterator(_this.handlers);\n iter.next(new PipeContext(_this, iter, msg, onDeliver));\n } else {\n onDeliver(msg);\n }\n }\n }]);\n return Pipeline;\n}();\n\n/**\n* @author micaelpedrosa@gmail.com\n* Wrapper around a message that adds actions that can be fired by any interceptor handler.\n* The Pipeline is asynchronous, so an handler should always call an action, the default one is \"next()\"\n*/\n\n\nvar PipeContext = function () {\n /* private\n _inStop: boolean\n _pipeline: Pipeline\n _iter: Iterator\n _msg: Message\n */\n\n function PipeContext(pipeline, iter, msg, onDeliver) {\n (0, _classCallCheck3.default)(this, PipeContext);\n\n var _this = this;\n\n _this._inStop = false;\n\n _this._pipeline = pipeline;\n _this._iter = iter;\n _this._msg = msg;\n _this._onDeliver = onDeliver;\n }\n\n (0, _createClass3.default)(PipeContext, [{\n key: 'next',\n\n\n /**\n * Proceed to the next interceptor handler, unless there was an error. If it's the last one, proceed to onDeliver handler.\n */\n value: function next() {\n var _this = this;\n\n if (!_this._inStop) {\n if (_this._iter.hasNext) {\n _this._iter.next(_this);\n } else {\n _this._onDeliver(_this._msg);\n }\n }\n }\n\n /**\n * Proceed directly to the onDeliver handler, unless there was an error.\n */\n\n }, {\n key: 'deliver',\n value: function deliver() {\n var _this = this;\n if (!_this._inStop) {\n _this._inStop = true;\n _this._onDeliver(_this._msg);\n }\n }\n\n /**\n * Mark the context with an error and proceed to the onFail handler.\n * @param {[type]} error [description]\n */\n\n }, {\n key: 'fail',\n value: function fail(error) {\n var _this = this;\n\n if (!_this._inStop) {\n _this._inStop = true;\n if (_this._pipeline.onFail) {\n _this._pipeline.onFail(error);\n }\n }\n }\n }, {\n key: 'pipeline',\n get: function get() {\n return this._pipeline;\n }\n }, {\n key: 'msg',\n get: function get() {\n return this._msg;\n },\n set: function set(inMsg) {\n this._msg = inMsg;\n }\n }]);\n return PipeContext;\n}();\n\nvar Iterator = function () {\n /* private\n _index: number\n _array: []\n */\n\n function Iterator(array) {\n (0, _classCallCheck3.default)(this, Iterator);\n\n this._index = -1;\n this._array = array;\n }\n\n (0, _createClass3.default)(Iterator, [{\n key: 'hasNext',\n get: function get() {\n return this._index < this._array.length - 1;\n }\n }, {\n key: 'next',\n get: function get() {\n this._index++;\n return this._array[this._index];\n }\n }]);\n return Iterator;\n}();\n\nexports.default = Pipeline;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDg5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9idXMvUGlwZWxpbmUuanM/YTAzZSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE2IFFVT0JJUyBORVRXT1JLUyBTTFxuKiBDb3B5cmlnaHQgMjAxNiBGUkFVTkhPRkVSLUdFU0VMTFNDSEFGVCBaVVIgRk9FUkRFUlVORyBERVIgQU5HRVdBTkRURU4gRk9SU0NIVU5HIEUuVlxuKiBDb3B5cmlnaHQgMjAxNiBPUkFOR0UgU0FcbiogQ29weXJpZ2h0IDIwMTYgRGV1dHNjaGUgVGVsZWtvbSBBR1xuKiBDb3B5cmlnaHQgMjAxNiBBcGl6ZWVcbiogQ29weXJpZ2h0IDIwMTYgVEVDSE5JU0NIRSBVTklWRVJTSVRBVCBCRVJMSU5cbipcbiogTGljZW5zZWQgdW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BQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7QUFNQTs7O0FBR0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7OztBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUE1Q0E7QUFBQTtBQUFBOzs7QUFFQTtBQUFBO0FBQUE7QUFDQTtBQUFBO0FBQUE7Ozs7O0FBZ0RBO0FBQ0E7Ozs7O0FBS0E7QUFBQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBR0E7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///489\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _utf = __webpack_require__(491);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('CryptoManager');\n\n/**\n* Class with the cryptographic functions for the authentication protocol\n*\n*/\n\nvar Crypto = function () {\n\n /**\n * Runtimefactory is passed in the costructor, because the nodeJS has a different crypto module\n * from the browser. RuntimeFactory provides a wrapper for the fuctions of nodeJS, so they can be\n * invoked browser like.\n */\n function Crypto(runtimeFactory) {\n (0, _classCallCheck3.default)(this, Crypto);\n\n var _this = this;\n typeof runtimeFactory.createWebcrypto === 'function' ? _this._crypto = runtimeFactory.createWebcrypto() : _this._crypto = crypto;\n }\n\n /**\n * Performs a RSA encryption\n * @param {ArrayBuffer} value the public key\n * @param {BufferSource} value data to be encryped\n * @return {Uint8Array} encrypted data\n */\n\n\n (0, _createClass3.default)(Crypto, [{\n key: 'encryptRSA',\n value: function encryptRSA(pubKey, data) {\n log.log('encryptRSA:pubKey', pubKey);\n log.log('encryptRSA:data', data);\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importRSAencryptKey(new Uint8Array(pubKey)).then(function (publicKey) {\n\n _this._crypto.subtle.encrypt({\n name: 'RSA-OAEP'\n }, publicKey, //from generateKey or importKey above\n data //ArrayBuffer of data you want to encrypt\n ).then(function (encrypted) {\n //returns an ArrayBuffer containing the encrypted data\n // log.log('crypto-encryptRSA', new Uint8Array(encrypted));\n resolve(new Uint8Array(encrypted));\n }).catch(function (err) {\n // log.log('crypto-encryptRSA', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * Performs a RSA decryption\n * @param {ArrayBuffer} value the private key\n * @param {BufferSource} value data to be decrypted\n * @return {Uint8Array} decrypted data\n */\n\n }, {\n key: 'decryptRSA',\n value: function decryptRSA(privKey, data) {\n log.log('decryptRSA:privKey', privKey);\n log.log('decryptRSA:data', data);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importRSAdecryptKey(privKey).then(function (privateKey) {\n\n _this._crypto.subtle.decrypt({\n name: 'RSA-OAEP'\n }, privateKey, //from generateKey or importKey above\n data //ArrayBuffer of the data\n ).then(function (decrypted) {\n\n var decryptedData = new Uint8Array(decrypted);\n\n // log.log('crypto-decryptRSA', decryptedData);\n resolve(decryptedData);\n }).catch(function (err) {\n // log.log('crypto-decryptRSA', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * Performs a RSA sign\n * @param {ArrayBuffer} value the private key\n * @param {BufferSource} value data to be signed\n * @return {Uint8Array} data signature\n */\n\n }, {\n key: 'signRSA',\n value: function signRSA(privKey, data) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importRSAsignKey(privKey).then(function (privateKey) {\n\n _this._crypto.subtle.sign({\n name: 'RSASSA-PKCS1-v1_5'\n }, privateKey, //from generateKey or importKey above\n (0, _utf.encodeUTF8)(data) //ArrayBuffer of data you want to sign\n ).then(function (signature) {\n //returns an ArrayBuffer containing the signature\n // log.log('crypto-signRSA', new Uint8Array(signature));\n resolve(new Uint8Array(signature));\n }).catch(function (err) {\n // log.log('crypto-signRSA', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * Performs a RSA signature verification\n * @param {ArrayBuffer} value the public key\n * @param {BufferSource} value data to be verified\n * @return {Boolean} result of the signature verification\n */\n\n }, {\n key: 'verifyRSA',\n value: function verifyRSA(pubKey, data, signature) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importRSAverifyKey(pubKey).then(function (publicKey) {\n\n _this._crypto.subtle.verify({\n name: 'RSASSA-PKCS1-v1_5'\n }, publicKey, //from generateKey or importKey above\n signature, //ArrayBuffer of the signature\n (0, _utf.encodeUTF8)(data) //ArrayBuffer of the data\n ).then(function (isvalid) {\n //returns a boolean on whether the signature is true or not\n // log.log('crypto-verifyRSA', isvalid);\n resolve(isvalid);\n }).catch(function (err) {\n // log.log('crypto-verifyRSA', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * Performs a RSA signature verification\n * @param {ArrayBuffer} value the public key\n * @param {BufferSource} value data to be verified\n * @return {Boolean} result of the signature verification\n */\n\n }, {\n key: 'encryptAES',\n value: function encryptAES(key, data, iv) {\n log.log('encryptAES:key', key);\n log.log('encryptAES:data', data);\n log.log('encryptAES:iv', iv);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importAESkey(key).then(function (aesKey) {\n\n _this._crypto.subtle.encrypt({\n name: 'AES-CBC',\n\n //Don't re-use initialization vectors!\n //Always generate a new iv every time your encrypt!\n iv: iv\n }, aesKey, //from generateKey or importKey above\n (0, _utf.encodeUTF8)(data) //ArrayBuffer of data you want to encrypt\n ).then(function (encrypted) {\n //returns an ArrayBuffer containing the encrypted data\n // log.log('crypto-encryptAES', new Uint8Array(encrypted));\n resolve(new Uint8Array(encrypted));\n }).catch(function (err) {\n // log.log('crypto-encryptAES', err);\n reject(err);\n });\n });\n });\n }\n }, {\n key: 'decryptAES',\n value: function decryptAES(key, data, iv) {\n log.log('decryptAES:key', key);\n log.log('decryptAES:data', data);\n log.log('decryptAES:iv', iv);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._importAESkey(key).then(function (aesKey) {\n\n _this._crypto.subtle.decrypt({\n name: 'AES-CBC',\n iv: iv\n }, aesKey, //from generateKey or importKey above\n data //ArrayBuffer of the data\n ).then(function (decrypted) {\n\n var decodedData = (0, _utf.decodeUTF8)(new Uint8Array(decrypted));\n log.log('crypto-decryptAES', decodedData);\n resolve(decodedData);\n }).catch(function (err) {\n // log.log('crypto-decryptAES', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * creates a hash using the HMAC algorithm\n * @param {byteArray} key key to be used in the hmac\n * @param {string} data information to be hashed\n * @return {byteArray} signature resulting hash\n */\n\n }, {\n key: 'hashHMAC',\n value: function hashHMAC(key, data) {\n log.log('hashHMAC:key', key);\n log.log('hashHMAC:data', data);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n if (typeof data != 'string') {\n data = (0, _stringify2.default)(data);\n log.log('Converting hashHMAC inpured DATA');\n log.log('HHashHMAC:', data);\n }\n\n _this._importHMACkey(key).then(function (hmacKey) {\n\n _this._crypto.subtle.sign({\n name: 'HMAC'\n }, hmacKey, //from generateKey or importKey above\n (0, _utf.encodeUTF8)(data) //ArrayBuffer of data you want to sign\n ).then(function (signature) {\n log.log('HashHMAC signature:', new Uint8Array(signature));\n\n // log.log('crypto-hashHMAC', signature);\n //returns an ArrayBuffer containing the signature\n resolve(new Uint8Array(signature));\n }).catch(function (err) {\n // log.log('crypto-hashHMAC', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * verifies an hash using the HMAC algorithm\n * @param {byteArray} key key to be used in the hmac\n * @param {string} data information to be hashed to compare\n * @param {byteArray} signature hash to compare with the received data\n * @return {boolean} isvalid boolean saying if the data corresponds to the hash received\n */\n\n }, {\n key: 'verifyHMAC',\n value: function verifyHMAC(key, data, signature) {\n log.log('verifyHMAC:key', key);\n log.log('verifyHMAC:data', data);\n log.log('verifyHMAC:signature', signature);\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this._importHMACkey(key).then(function (hmacKey) {\n\n if (typeof data != 'string') {\n data = (0, _stringify2.default)(data);\n log.log('Converting verifyHMAC inputed DATA:', data);\n }\n\n _this._crypto.subtle.verify({\n name: 'HMAC'\n }, hmacKey, //from generateKey or importKey above\n signature, //ArrayBuffer of the signature\n (0, _utf.encodeUTF8)(data) //ArrayBuffer of the data\n ).then(function (isvalid) {\n //returns a boolean on whether the signature is true or not\n // log.log('crypto-verifyHMAC', isvalid);\n log.log('verifyHMAC result', isvalid);\n isvalid ? resolve(isvalid) : reject(isvalid);\n }).catch(function (err) {\n log.error('crypto-verifyHMAC', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * generates a RSA public/private key pair with a modulus length of 2048 bits\n * @return {JSON} keyPair json containing the public and private keys\n */\n\n }, {\n key: 'generateRSAKeyPair',\n value: function generateRSAKeyPair() {\n var _this = this;\n var keyPair = {};\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.generateKey({\n name: 'RSA-PSS',\n modulusLength: 2048, //can be 1024, 2048, or 4096\n publicExponent: new Uint8Array([0x01, 0x00, 0x01]),\n hash: { name: 'SHA-256' //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n } }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['sign', 'verify'] //can be any combination of 'sign' and 'verify'\n\n ).then(function (key) {\n //returns a keypair object\n // log.log(key);\n\n _this._crypto.subtle.exportKey('spki', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n key.publicKey //can be a publicKey or privateKey, as long as extractable was true\n ).then(function (publicKey) {\n //returns the exported key data\n keyPair.public = new Uint8Array(publicKey);\n return _this._crypto.subtle.exportKey('pkcs8', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n key.privateKey //can be a publicKey or privateKey, as long as extractable was true\n );\n }).then(function (privateKey) {\n keyPair.private = new Uint8Array(privateKey);\n\n // log.log('crypto-generateRSAKeyPair', keyPair);\n resolve(keyPair);\n }).catch(function (err) {\n log.error(err);\n reject(err);\n });\n }).catch(function (err) {\n log.error(err);\n reject(err);\n });\n });\n }\n\n /**\n * Generates a 128 bit random value.\n * @return {byteArray} array random value\n */\n\n }, {\n key: 'generateIV',\n value: function generateIV() {\n var _this = this;\n\n var array = new Uint8Array(16);\n _this._crypto.getRandomValues(array);\n\n return array;\n }\n\n /**\n * Generates a 256 bit random value. 32 bits are extrated from the machine time,\n * the remaining are generated randomly\n * @return {byteArray} array random value\n */\n\n }, {\n key: 'generateRandom',\n value: function generateRandom() {\n var _this = this;\n\n var array = new Uint8Array(32);\n _this._crypto.getRandomValues(array);\n\n var date = Date.now();\n\n var dateEncoded = (0, _utf.encodeUTF8)(date.toString());\n\n //extract the least significant 4 bytes in the date\n var finalDate = dateEncoded.slice(dateEncoded.length - 4, dateEncoded.length);\n\n // add in the first 4 bytes of the array the bytes extracted previously;\n for (var i = 0; i < 4; i++) {\n array[i] = finalDate[i];\n }\n return array;\n }\n\n /**\n * generates a premaster secret (PMS) of 48 bytes (384 bits) randomly\n * @return {byteArray} array premaster secret key\n */\n\n }, {\n key: 'generatePMS',\n value: function generatePMS() {\n var _this = this;\n\n var array = new Uint8Array(48);\n _this._crypto.getRandomValues(array);\n return array;\n }\n\n /**\n * generates a masterKey secret (PMS) of 48 bytes (384 bits) using the premaster secret and\n * two randoms\n * @return {byteArray} array master secret key with 48 bytes\n */\n\n }, {\n key: 'generateMasterSecret',\n value: function generateMasterSecret(hmacKey, data) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n var key = new Uint8Array(48);\n var seed = data;\n\n _this._digest(hmacKey).then(function (digestedKey) {\n\n _this.hashHMAC(digestedKey, seed).then(function (keypart0) {\n\n //copy the first 32 bytes into the key\n for (var i = 0; i < 32; i++) {\n key[i] = keypart0[i];\n }\n return _this.hashHMAC(digestedKey, seed + keypart0);\n }).then(function (keypart1) {\n\n //copy the first 16 bytes to the key remaining 16 bytes\n for (var i = 0; i < 16; i++) {\n key[i + 32] = keypart1[i];\n }\n\n // log.log('crypto-generateMasterSecret', key);\n resolve(key);\n }).catch(function (err) {\n // log.log('crypto-generateMasterSecret', err);\n reject(err);\n });\n });\n });\n }\n\n /**\n * generates both users MAC and encryption keys. generate as output an array\n * with 4 byteArray each with 32 bytes\n * @param {byteArray} secret secret to be used in the HMAC function\n * @param {String} data information to be used as seed\n * @return {Array} key array with the information to generate keys\n */\n\n }, {\n key: 'generateKeys',\n value: function generateKeys(hmacKey, data) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var key = [];\n var seed = data;\n\n // iterate 4 times to obtain a 1024 key size\n _this.hashHMAC(hmacKey, seed).then(function (keypart0) {\n key.push(keypart0);\n return _this.hashHMAC(hmacKey, seed + keypart0);\n }).then(function (keypart1) {\n key.push(keypart1);\n return _this.hashHMAC(hmacKey, seed + keypart1);\n }).then(function (keypart2) {\n key.push(keypart2);\n return _this.hashHMAC(hmacKey, seed + keypart2);\n }).then(function (keypart3) {\n key.push(keypart3);\n\n // log.log('crypto-generateKeys', key);\n resolve(key);\n }).catch(function (err) {\n // log.log('crypto-generateKeys', err);\n reject(err);\n });\n\n // log.log(hmacKey, data);\n });\n }\n }, {\n key: '_importRSAsignKey',\n value: function _importRSAsignKey(privKey) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.importKey('pkcs8', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n privKey, { //these are the algorithm options\n name: 'RSASSA-PKCS1-v1_5',\n hash: { name: 'SHA-256' //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n } }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['sign'] //'verify' for public key import, 'sign' for private key imports\n ).then(function (privateKey) {\n //returns a publicKey (or privateKey if you are importing a private key)\n // log.log('crypto-_importRSAsignKey', privateKey);\n resolve(privateKey);\n }).catch(function (err) {\n log.error('crypto-_importRSAsignKey', err);\n reject(err);\n });\n });\n }\n }, {\n key: '_importRSAverifyKey',\n value: function _importRSAverifyKey(pubKey) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.importKey('spki', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n pubKey, { //these are the algorithm options\n name: 'RSASSA-PKCS1-v1_5',\n hash: { name: 'SHA-256' //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n } }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['verify'] //'verify' for public key import, 'sign' for private key imports\n ).then(function (publicKey) {\n //returns a publicKey (or privateKey if you are importing a private key)\n // log.log('crypto-_importRSAverifyKey', publicKey);\n resolve(publicKey);\n }).catch(function (err) {\n log.error('crypto-_importRSAverifyKey', err);\n reject(err);\n });\n });\n }\n }, {\n key: '_importRSAencryptKey',\n value: function _importRSAencryptKey(pubKey) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.importKey('spki', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n pubKey, { //these are the algorithm options\n name: 'RSA-OAEP',\n hash: { name: 'SHA-256' //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n } }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['encrypt'] //'encrypt' or 'wrapKey' for public key import or\n //'decrypt' or 'unwrapKey' for private key imports\n ).then(function (publicKey) {\n //returns a publicKey (or privateKey if you are importing a private key)\n // log.log('crypto-_importRSAencryptKey', publicKey);\n resolve(publicKey);\n }).catch(function (err) {\n log.error('crypto-_importRSAencryptKey', err.name);\n reject(err);\n });\n });\n }\n }, {\n key: '_importRSAdecryptKey',\n value: function _importRSAdecryptKey(privKey) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.importKey('pkcs8', //can be 'jwk' (public or private), 'spki' (public only), or 'pkcs8' (private only)\n privKey, { //these are the algorithm options\n name: 'RSA-OAEP',\n hash: { name: 'SHA-256' //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n } }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['decrypt'] //'encrypt' or 'wrapKey' for public key import or\n //'decrypt' or 'unwrapKey' for private key imports\n ).then(function (privateKey) {\n //returns a publicKey (or privateKey if you are importing a private key)\n // log.log('crypto-_importRSAdecryptKey', privateKey);\n resolve(privateKey);\n }).catch(function (err) {\n log.error('crypto-_importRSAdecryptKey', err);\n reject(err);\n });\n });\n }\n }, {\n key: 'concatPMSwithRandoms',\n value: function concatPMSwithRandoms(pms, toRandom, fromRandom) {\n\n var finalKey = new Uint8Array(pms.length + toRandom.length + fromRandom.length);\n\n // add PremasterKey\n for (var i = 0; i < pms.length; i++) {\n finalKey[i] = pms[i];\n }\n\n //add to random\n for (var _i = 0; _i < toRandom.length; _i++) {\n finalKey[_i + pms.length] = pms[_i];\n }\n\n //add from random\n for (var _i2 = 0; _i2 < fromRandom.length; _i2++) {\n finalKey[_i2 + pms.length + toRandom.length] = pms[_i2];\n }\n\n return finalKey;\n }\n }, {\n key: '_generate256bitKey',\n value: function _generate256bitKey() {\n var _this = this;\n var array = new Uint8Array(32);\n _this._crypto.getRandomValues(array);\n\n return array;\n }\n\n /**\n * imports the secret to the HMAC function\n * @param {byteArray} arrayBuffer bytes to import as key\n * @return {JSON} key key ready to be used in the HMAC cryptographic function\n */\n\n }, {\n key: '_importHMACkey',\n value: function _importHMACkey(arrayBuffer) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this._digest(arrayBuffer).then(function (key) {\n\n _this._crypto.subtle.importKey('raw', //can be 'jwk' or 'raw'\n key, { //this is the algorithm options\n name: 'HMAC',\n hash: { name: 'SHA-256' }, //can be 'SHA-1', 'SHA-256', 'SHA-384', or 'SHA-512'\n length: 256 //optional, if you want your key length to differ from the hash function's block length\n }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['sign', 'verify'] //can be any combination of 'sign' and 'verify'\n ).then(function (key) {\n //returns the symmetric key\n // log.log('crypto-_importHMACkey', key);\n resolve(key);\n }).catch(function (err) {\n reject(err);\n });\n });\n });\n }\n }, {\n key: '_digest',\n value: function _digest(value) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.digest({\n name: 'SHA-256'\n }, value //The data you want to hash as an ArrayBuffer\n ).then(function (hash) {\n //returns the hash as an ArrayBuffer\n // log.log('crypto-digest', new Uint8Array(hash));\n resolve(new Uint8Array(hash));\n }).catch(function (err) {\n log.error(err);\n reject(err);\n });\n });\n }\n }, {\n key: '_importAESkey',\n value: function _importAESkey(arrayBuffer) {\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n _this._crypto.subtle.importKey('raw', //can be 'jwk' or 'raw'\n arrayBuffer, { //this is the algorithm options\n name: 'AES-CBC'\n }, true, //whether the key is extractable (i.e. can be used in exportKey)\n ['encrypt', 'decrypt'] //can be 'encrypt', 'decrypt', 'wrapKey', or 'unwrapKey'\n ).then(function (key) {\n //returns the symmetric key\n // log.log('crypto-importAESkey', key);\n resolve(key);\n }).catch(function (err) {\n log.error('crypto-importAESkey', err);\n reject(err);\n });\n });\n }\n }]);\n return Crypto;\n}();\n\nexports.default = Crypto;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9jcnlwdG9NYW5hZ2VyL0NyeXB0by5qcz9hZTY2Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7ZW5jb2RlVVRGOCwgZGVjb2RlVVRGOH0gZnJvbSAnLi91dGY4LmpzJztcbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignQ3J5cHRvTWFuYWdlcicpO1xuXG4vKipcbiogQ2xhc3Mgd2l0aCB0aGUgY3J5cHRvZ3JhcGhpYyBmdW5jdGlvbnMgZm9yIHRoZSBhdXRoZW50aWNhdGlvbiBwcm90b2NvbFxuKlxuKi9cbmNsYXNzIENyeXB0byB7XG5cbi8qKlxuKiBSdW50aW1lZmFjdG9yeSBpcyBwYXNzZWQgaW4gdGhlIGNvc3RydWN0b3IsIGJlY2F1c2UgdGhlIG5vZGVKUyBoYXMgYSBkaWZmZXJlbnQgY3J5cHRvIG1vZHVsZVxuKiBmcm9tIHRoZSBicm93c2VyLiBSdW50aW1lRmFjdG9yeSBwcm92aWRlcyBhIHdyYXBwZXIgZm9yIHRoZSBmdWN0aW9ucyBvZiBub2RlSlMsIHNvIHRoZXkgY2FuIGJlXG4qIGludm9rZWQgYnJvd3NlciBsaWtlLlxuKi9cbiAgY29uc3RydWN0b3IocnVudGltZUZhY3RvcnkpIHtcbiAgICBsZXQgX3RoaXMgPSB0aGlzO1xuICAgIHR5cGVvZiBydW50a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2V5KGtleSkudGhlbihmdW5jdGlvbihhZXNLZXkpIHtcblxuICAgICAgICBfdGhpcy5fY3J5cHRvLnN1YnRsZS5kZWNyeXB0KFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6ICdBRVMtQ0JDJyxcbiAgICAgICAgICAgIGl2OiBpdlxuICAgICAgICAgIH0sXG4gICAgICAgICAgYWVzS2V5LCAvL2Zyb20gZ2VuZXJhdGVLZXkgb3IgaW1wb3J0S2V5IGFib3ZlXG4gICAgICAgICAgZGF0YSAvL0FycmF5QnVmZmVyIG9mIHRoZSBkYXRhXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihmdW5jdGlvbihkZWNyeXB0ZWQpIHtcblxuICAgICAgICAgICAgbGV0IGRlY29kZWREYXRhID0gZGVjb2RlVVRGOChuZXcgVWludDhBcnJheShkZWNyeXB0ZWQpKTtcbiAgICAgICAgICAgIGxvZy5sb2coJ2NyeXB0by1kZWNyeXB0QUVTJywgZGVjb2RlZERhdGEpO1xuICAgICAgICAgICAgcmVzb2x2ZShkZWNvZGVkRGF0YSk7XG5cbiAgICAgICAgICB9KS5jYXRjaChmdW5jdGlvbihlcnIpIHtcbiAgICAgICAgICAvLyBsb2cubG9nKCdjcnlwdG8tZGVjcnlwdEFFUycsIGVycik7XG4gICAgICAgICAgICByZWplY3QoZXJyKTtcbiAgICAgICAgICB9KTtcblxuICAgICAgfSk7XG5cbiAgICB9KTtcbiAgfVxuXG4gIC8qKlxuICAqIGNyZWF0ZXMgYSBoYXNoIHVzaW5nIHRoZSBITUFDIGFsZ29yaXRobVxuICAqIEBwYXJhbSAge2J5dGVBcnJheX0gICAga2V5ICAgICAgIGtleSB0byBiZSB1c2VkIGluIHRoZSBobWFjXG4gICogQHBhcmFtICB7c3RyaW5nfSAgICAgIGRhdGEgICAgICAgaW5mb3JtYXRpb24gdG8gYmUgaGFzaGVkXG4gICogQHJldHVybiAge2J5dGVBcnJheX0gICBzaWduYXR1cmUgIHJlc3VsdGluZ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QTtBQVlBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7O0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBSEE7QUFNQTtBQVRBO0FBV0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFEQTtBQURBO0FBT0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFFQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFEQTtBQUlBO0FBUEE7QUFVQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBR0E7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///490\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.encodeUTF8 = encodeUTF8;\nexports.decodeUTF8 = decodeUTF8;\n// Marshals a string to Uint8Array.\nfunction encodeUTF8(s) {\n\tvar i = 0;\n\tvar bytes = new Uint8Array(s.length * 4);\n\tfor (var ci = 0; ci != s.length; ci++) {\n\t\ttry {\n\t\t\tvar xxx = s.charCodeAt(ci);\n\t\t} catch (err) {\n\t\t\tconsole.log(err.message);\n\t\t\treturn;\n\t\t}\n\t\tvar c = s.charCodeAt(ci);\n\t\tif (c < 128) {\n\t\t\tbytes[i++] = c;\n\t\t\tcontinue;\n\t\t}\n\t\tif (c < 2048) {\n\t\t\tbytes[i++] = c >> 6 | 192;\n\t\t} else {\n\t\t\tif (c > 0xd7ff && c < 0xdc00) {\n\t\t\t\tif (++ci == s.length) throw 'UTF-8 encode: incomplete surrogate pair';\n\t\t\t\tvar c2 = s.charCodeAt(ci);\n\t\t\t\tif (c2 < 0xdc00 || c2 > 0xdfff) throw 'UTF-8 encode: second char code 0x' + c2.toString(16) + ' at index ' + ci + ' in surrogate pair out of range';\n\t\t\t\tc = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n\t\t\t\tbytes[i++] = c >> 18 | 240;\n\t\t\t\tbytes[i++] = c >> 12 & 63 | 128;\n\t\t\t} else {\n\t\t\t\t// c <= 0xffff\n\t\t\t\tbytes[i++] = c >> 12 | 224;\n\t\t\t}\n\t\t\tbytes[i++] = c >> 6 & 63 | 128;\n\t\t}\n\t\tbytes[i++] = c & 63 | 128;\n\t}\n\treturn bytes.subarray(0, i);\n}\n\n// Unmarshals an Uint8Array to string.\nfunction decodeUTF8(bytes) {\n\tvar s = '';\n\tvar i = 0;\n\twhile (i < bytes.length) {\n\t\tvar c = bytes[i++];\n\t\tif (c > 127) {\n\t\t\tif (c > 191 && c < 224) {\n\t\t\t\tif (i >= bytes.length) throw 'UTF-8 decode: incomplete 2-byte sequence';\n\t\t\t\tc = (c & 31) << 6 | bytes[i] & 63;\n\t\t\t} else if (c > 223 && c < 240) {\n\t\t\t\tif (i + 1 >= bytes.length) throw 'UTF-8 decode: incomplete 3-byte sequence';\n\t\t\t\tc = (c & 15) << 12 | (bytes[i] & 63) << 6 | bytes[++i] & 63;\n\t\t\t} else if (c > 239 && c < 248) {\n\t\t\t\tif (i + 2 >= bytes.length) throw 'UTF-8 decode: incomplete 4-byte sequence';\n\t\t\t\tc = (c & 7) << 18 | (bytes[i] & 63) << 12 | (bytes[++i] & 63) << 6 | bytes[++i] & 63;\n\t\t\t} else throw 'UTF-8 decode: unknown multibyte start 0x' + c.toString(16) + ' at index ' + (i - 1);\n\t\t\t++i;\n\t\t}\n\n\t\tif (c <= 0xffff) s += String.fromCharCode(c);else if (c <= 0x10ffff) {\n\t\t\tc -= 0x10000;\n\t\t\ts += String.fromCharCode(c >> 10 | 0xd800);\n\t\t\ts += String.fromCharCode(c & 0x3FF | 0xdc00);\n\t\t} else throw 'UTF-8 decode: code point 0x' + c.toString(16) + ' exceeds UTF-16 reach';\n\t}\n\treturn s;\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9jcnlwdG9NYW5hZ2VyL3V0ZjguanM/M2IxOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBNYXJzaGFscyBhIHN0cmluZyB0byBVaW50OEFycmF5LlxuZXhwb3J0IGZ1bmN0aW9uIGVuY29kZVVURjgocykge1xuXHR2YXIgaSA9IDA7XG5cdHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KHMubGVuZ3RoICogNCk7XG5cdGZvciAodmFyIGNpID0gMDsgY2kgIT0gcy5sZW5ndGg7IGNpKyspIHtcbiAgICB0cnl7XG4gICAgICB2YXIgeHh4ID0gcy5jaGFyQ29kZUF0KGNpKTtcbiAgICB9IGNhdGNoIChlcnIpe1xuICAgICAgY29uc29sZS5sb2coZXJyLm1lc3NhZ2UpO1xuICAgICAgcmV0dXJuO1xuXG4gICAgfVxuXHRcdHZhciBjID0gcy5jaGFyQ29kZUF0KGNpKTtcblx0XHRpZiAoYyA8IDEyOCkge1xuXHRcdFx0Ynl0ZXNbaSsrXSA9IGM7XG5cdFx0XHRjb250aW51ZTtcblx0XHR9XG5cdFx0aWYgKGMgPCAyMDQ4KSB7XG5cdFx0XHRie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n value: true\n});\n\nvar _assign = __webpack_require__(96);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _AddressAllocation = __webpack_require__(99);\n\nvar _AddressAllocation2 = _interopRequireDefault(_AddressAllocation);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('loader'); // Log System\n\nvar Loader = function () {\n function Loader(runtimeURL, runtimeConfiguration, runtimeDescriptorsInstance) {\n (0, _classCallCheck3.default)(this, Loader);\n\n if (!runtimeConfiguration) throw Error('[Runtime.Loader] The descriptor need to know the runtime configuration');\n if (!runtimeDescriptorsInstance) throw Error('[Runtime.Loader] The descriptor need to know the runtime Descriptor instance');\n\n this.log = log;\n\n this.runtimeConfiguration = runtimeConfiguration;\n this.descriptors = runtimeDescriptorsInstance;\n }\n\n /**\n * Set runtime url\n * @param {string} value runtimeURL\n */\n\n\n (0, _createClass3.default)(Loader, [{\n key: 'loadHyperty',\n\n\n /**\n * Deploy Hyperty from Catalogue URL\n *\n * @see https://github.com/reTHINK-project/specs/tree/master/datamodel/core/address\n *\n * @param {URL.HypertyCatalogueURL} hypertyCatalogueURL - The Catalogue URL used to identify descriptors in the Catalogue.\n * @param {boolean|URL.HypertyURL} [reuseURL=false] reuseURL - reuseURL is used to reuse the hypertyURL previously registred, by default the reuse is disabled;\n * @param {URL} appURL - the app url origin address;\n * @param {object} IdpConstraint - constraints to be used when selecting the identity to be associated with the Hyperty including origin, idp, and idHint.\n * @returns {Promise} this is Promise and returns true if all components are loaded with success or an error if someone fails.\n *\n * @memberOf Loader\n */\n value: function loadHyperty(hypertyCatalogueURL) {\n var reuseURL = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var _this = this;\n\n var IdpConstraint = arguments[2];\n var appURL = arguments[3];\n\n\n if (!this._readyToUse()) return false;\n if (!hypertyCatalogueURL) throw new Error('[Runtime.Loader] Hyperty descriptor url parameter is needed');\n\n return new _promise2.default(function (resolve, reject) {\n\n var _hypertyURL = void 0;\n var _hypertySandbox = void 0;\n var _hypertyDescriptor = void 0;\n var _hypertySourcePackage = void 0;\n var haveError = false;\n\n var errorReason = function errorReason(reason) {\n log.info('[Runtime.Loader] Something failed on the deploy hyperty: ', reason);\n reject(reason);\n };\n\n var handleError = function handleError(reason) {\n haveError = true;\n reject(reason);\n };\n\n // Get Hyperty descriptor\n // TODO: the request Module should be changed,\n // because at this moment it is incompatible with nodejs;\n // Probably we need to pass a factory like we do for sandboxes;\n log.info('[Runtime.Loader] ------------------ Hyperty ------------------------');\n log.info('[Runtime.Loader] Get hyperty descriptor for :', hypertyCatalogueURL);\n return _this.descriptors.getHypertyDescriptor(hypertyCatalogueURL).then(function (hypertyDescriptor) {\n // at this point, we have completed \"step 2 and 3\" as shown in https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md\n log.info('[Runtime.Loader] 1: return hyperty descriptor');\n\n // hyperty contains the full path of the catalogue URL, e.g.\n // catalogue.rethink.eu/.well-known/..........\n _hypertyDescriptor = hypertyDescriptor;\n\n var sourcePackageURL = hypertyDescriptor.sourcePackageURL;\n\n if (sourcePackageURL === '/sourcePackage') {\n return hypertyDescriptor.sourcePackage;\n }\n\n // Get the hyperty source code\n return _this.runtimeCatalogue.getSourcePackageFromURL(sourcePackageURL);\n }, handleError).then(function (sourcePackage) {\n if (haveError) return false;\n\n log.info('[Runtime.Loader] 2: return hyperty source code');\n\n // at this point, we have completed \"step 4 and 5\" as shown in https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md\n\n _hypertySourcePackage = sourcePackage;\n\n //\n // steps 6 -- 9 are skipped.\n // TODO: on release of core 0.2;\n // TODO: Promise to check the policy engine\n\n // mock-up code;\n // temporary code, only\n var policy = true;\n\n return policy;\n }, handleError).then(function (policyResult) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 3: return policy engine result' + policyResult);\n\n // we have completed step 6 to 9 of https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n //\n // Steps 6 -- 9\n // As a result of the sipped steps, we know at this point if we execute\n // inSameSandbox or not.\n //\n\n // For testing, just assume we execute in same Sandbox.\n var inSameSandbox = true;\n var sandbox = void 0;\n\n if (inSameSandbox) {\n\n // this don't need be a Promise;\n sandbox = _this.registry.getAppSandbox();\n\n // we have completed step 11 here.\n } else {\n\n var domain = (0, _utils.divideURL)(hypertyCatalogueURL).domain;\n\n // getSandbox, this will return a promise;\n sandbox = _this.registry.getSandbox(domain);\n }\n\n // this will return the sandbox or one promise to getSandbox;\n return sandbox;\n }, handleError).then(function (sandbox) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 4: return the sandbox', sandbox);\n\n // Return the sandbox indepentely if it running in the same sandbox or not\n // we have completed step 14 here.\n return sandbox;\n }, function (reason) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 4.1: Try to register a new sandbox');\n\n // check if the sandbox is registed for this hyperty descriptor url;\n // Make Steps xxx --- xxx\n // Instantiate the Sandbox\n\n var hypertyCapabilities = {};\n if (_hypertyDescriptor && _hypertyDescriptor.hasOwnProperty('capabilities')) {\n hypertyCapabilities = _hypertyDescriptor.stubCapabilities;\n }\n\n return _this._runtimeFactory.createSandbox(hypertyCapabilities).then(function (sandbox) {\n\n sandbox.addListener('*', function (msg) {\n _this.messageBus.postMessage(msg);\n });\n\n return sandbox;\n });\n }, handleError).then(function (sandbox) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 5: return sandbox and register');\n\n _hypertySandbox = sandbox;\n\n var numberOfAddresses = 1;\n return _this._addressAllocation.create(_this._registry._domain, numberOfAddresses, _hypertyDescriptor, 'hyperty', reuseURL);\n }, handleError).then(function (addresses) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 6: return the addresses for the hyperty', addresses);\n\n // Register hyperty\n return _this.registry.registerHyperty(_hypertySandbox, hypertyCatalogueURL, _hypertyDescriptor, addresses, IdpConstraint);\n }, handleError).then(function (registrationResult) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 7: registration result', registrationResult);\n\n // we have completed step 16 of https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n _hypertyURL = registrationResult.url;\n\n // Extend original hyperty configuration;\n var configuration = {};\n if (!(0, _utils.emptyObject)(_hypertyDescriptor.configuration)) {\n try {\n configuration = (0, _assign2.default)({}, JSON.parse(_hypertyDescriptor.configuration));\n } catch (e) {\n configuration = _hypertyDescriptor.configuration;\n }\n }\n configuration.runtimeURL = _this._runtimeURL;\n\n if (registrationResult.p2pHandler) {\n configuration.p2pHandler = registrationResult.p2pHandler;\n configuration.p2pRequester = registrationResult.p2pRequester;\n }\n\n // We will deploy the component - step 17 of https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n\n try {\n return _hypertySandbox.deployComponent(_hypertySourcePackage.sourceCode, _hypertyURL, configuration);\n } catch (e) {\n log.info('[Runtime.Loader] Error on deploy component:', e);\n reject(e);\n }\n }, handleError).then(function (deployComponentStatus) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 8: Deploy component status for hyperty: ', deployComponentStatus);\n\n // we have completed step 19 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n\n // Add the message bus listener to the appSandbox or hypertSandbox;\n _this.messageBus.addListener(_hypertyURL, function (msg) {\n _hypertySandbox.postMessage(msg);\n });\n\n // we have completed step 20 of https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n var hyperty = {\n runtimeHypertyURL: _hypertyURL,\n status: deployComponentStatus\n };\n\n log.info('[Runtime.Loader] Hyperty: ', hyperty);\n resolve(hyperty);\n\n // we have completed step 21 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-hyperty.md right now.\n log.info('[Runtime.Loader] ------------------ END ------------------------');\n }, handleError).catch(errorReason);\n });\n }\n\n /**\n * Deploy Stub from Catalogue URL or domain url\n * @param {URL.URL} protostubURL Catalogue URL for the ProtoStub to be loaded or the domain to be target by the protostub\n * @param {Object} p2pConfig configuration of p2p\n */\n\n }, {\n key: 'loadStub',\n value: function loadStub(protostubURL, p2pConfig) {\n var _this2 = this;\n\n if (!this._readyToUse()) return false;\n if (!protostubURL) throw new Error('[Runtime.Loader.loadStub]ProtoStub descriptor url parameter is needed');\n\n return new _promise2.default(function (resolve, reject) {\n\n // to analyse if domain for p2pHandlers should be something else and not the default domain itself\n\n var domain = (0, _utils.divideURL)(protostubURL).domain;\n\n if (!domain) {\n domain = protostubURL;\n }\n\n var _stubSandbox = void 0;\n var _stubDescriptor = void 0;\n var _runtimeProtoStubURL = void 0;\n var _stubSourcePackage = void 0;\n var haveError = false;\n var stubId = void 0;\n\n var errorReason = function errorReason(reason) {\n log.info('[Runtime.Loader.loadStub]Something failed on the deploy of protocolstub: ', reason);\n reject(reason);\n };\n\n var handleError = function handleError(reason) {\n haveError = true;\n reject(reason);\n };\n\n // Discover Protocol Stub\n var discoverStub = void 0;\n var isP2PHandler = false;\n var isP2PRequester = false;\n var stubCapabilities = {};\n\n log.info('[Runtime.Loader.loadStub] starting loading for ', protostubURL, ' with p2pconfig ', p2pConfig);\n log.info('[Runtime.Loader.loadStub]Discover or Create a new ProtoStub for domain: ', domain);\n\n // step 2 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n try {\n if (p2pConfig) {\n\n if (p2pConfig.hasOwnProperty('isHandlerStub') && p2pConfig.isHandlerStub) {\n // step 6 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n isP2PHandler = true;\n stubId = _this2.runtimeURL;\n discoverStub = _this2.registry.discoverP2PStub();\n } else {\n isP2PRequester = true;\n var p2pHandlerRuntimeURL = p2pConfig.remoteRuntimeURL;\n stubId = p2pHandlerRuntimeURL;\n\n // step 4 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n // step 5 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n discoverStub = _this2.registry.discoverP2PStub(p2pHandlerRuntimeURL);\n }\n } else {\n // step 3 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n stubId = domain;\n discoverStub = _this2.registry.discoverProtostub(domain);\n }\n\n // Is registed?\n log.info('[Runtime.Loader.loadStub]1. Proto Stub Discovered for ', protostubURL, ': ', discoverStub);\n\n // step 23 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n resolve(discoverStub);\n log.info(' [Runtime.Loader]------------------- END ---------------------------\\n');\n } catch (reason) {\n\n // is not registed?\n log.info('[Runtime.Loader.loadStub]1. Proto Stub not found ' + reason);\n\n // step 8 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n _this2.descriptors.getStubDescriptor(protostubURL).then(function (stubDescriptor) {\n\n if (haveError) return false;\n log.info('[Runtime.Loader.loadStub]2. return the ProtoStub descriptor');\n\n // step 9 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n _stubDescriptor = stubDescriptor;\n\n var sourcePackageURL = stubDescriptor.sourcePackageURL;\n\n if (sourcePackageURL === '/sourcePackage') {\n return stubDescriptor.sourcePackage;\n }\n\n // step 10 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this2.runtimeCatalogue.getSourcePackageFromURL(sourcePackageURL);\n }, handleError).catch(errorReason).then(function (stubSourcePackage) {\n if (haveError) return false;\n\n // According to debug, it seems RuntimeCatalogue does not support yet constraints. It appears empty!!!!\n\n if (_stubDescriptor && _stubDescriptor.constraints) {\n stubCapabilities = _stubDescriptor.constraints;\n }\n\n // step 11 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub]3. return the ProtoStub Source Code');\n _stubSourcePackage = stubSourcePackage;\n\n // this will return the sandbox or one promise to getSandbox;\n // step 12 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this2.registry.getSandbox(domain, stubCapabilities);\n }).then(function (stubSandbox) {\n if (haveError) return false;\n\n // step 15 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub]4. if the sandbox is registered then return the sandbox ', stubSandbox);\n\n _stubSandbox = stubSandbox;\n return stubSandbox;\n }).catch(function (reason) {\n if (haveError) return false;\n\n // step 13 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub]5. Sandbox was not found, creating a new one ', reason);\n\n // check if the sandbox is registed for this stub descriptor url;\n\n\n // step 14 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this2._runtimeFactory.createSandbox(stubCapabilities).then(function (sandbox) {\n\n sandbox.addListener('*', function (msg) {\n _this2.messageBus.postMessage(msg);\n });\n\n return sandbox;\n });\n }).then(function (sandbox) {\n if (haveError) return false;\n\n // step 16 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub]6. return the sandbox instance and register', sandbox, 'to domain ', domain);\n\n _stubSandbox = sandbox;\n\n // we need register stub on registry - step xxx https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this2.registry.registerStub(_stubSandbox, stubId, p2pConfig, protostubURL, _stubDescriptor);\n }, handleError).then(function (runtimeProtoStub) {\n if (haveError) return false;\n\n // step 23 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub] 7. return the runtime protostub url: ', runtimeProtoStub);\n\n _runtimeProtoStubURL = runtimeProtoStub.url;\n\n // Extend original hyperty configuration;\n var configuration = {};\n if (!(0, _utils.emptyObject)(_stubDescriptor.configuration)) {\n try {\n configuration = (0, _assign2.default)({}, JSON.parse(_stubDescriptor.configuration));\n } catch (e) {\n configuration = _stubDescriptor.configuration;\n }\n }\n\n if (p2pConfig) {\n try {\n configuration = (0, _assign2.default)(configuration, JSON.parse(p2pConfig));\n } catch (e) {\n configuration = (0, _assign2.default)(configuration, p2pConfig);\n }\n }\n\n // required for protostub session\n\n configuration.runtimeURL = _this2._runtimeURL;\n\n // step 24 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n try {\n // step 26 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n log.info('[Runtime.Loader.loadStub] 8: adding sandbox listener to protostubURL : ', _runtimeProtoStubURL);\n\n // step 27 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n // Add the message bus listener\n _this2.messageBus.addListener(_runtimeProtoStubURL, function (msg) {\n _stubSandbox.postMessage(msg);\n });\n\n return _stubSandbox.deployComponent(_stubSourcePackage.sourceCode, _runtimeProtoStubURL, configuration);\n } catch (e) {\n log.error('[Runtime.Loader.loadStub] Error on deploy component:', e);\n reject(e);\n }\n }, handleError).then(function () {\n if (haveError) return false;\n\n // step 28 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n var stub = void 0;\n if (p2pConfig) {\n log.log('[Runtime.Loader.loadStub] p2pConfig: ', p2pConfig);\n\n if (p2pConfig.hasOwnProperty('isHandlerStub')) stub = _this2.registry.p2pHandlerStub[_this2._runtimeURL];\n if (p2pConfig.hasOwnProperty('p2pRequesterStub')) stub = _this2.registry.p2pRequesterStub[p2pConfig.remoteRuntimeURL];\n } else {\n stub = _this2.registry.protostubsList[domain];\n }\n\n log.log('[Runtime.Loader.loadStub] Stub: ', stub);\n resolve(stub);\n log.info('[Runtime.Loader.loadStub]------------------- END ---------------------------\\n');\n }, handleError).catch(errorReason);\n }\n });\n }\n\n /**\n * Deploy idpProxy from Catalogue URL or domain url\n * @param {URL.URL} domain domain\n */\n\n }, {\n key: 'loadIdpProxy',\n value: function loadIdpProxy(idpProxyURL) {\n var _this3 = this;\n\n if (!this._readyToUse()) return false;\n if (!idpProxyURL) throw new Error('[Runtime.Loader] IdpProxy descriptor url parameter is needed');\n\n return new _promise2.default(function (resolve, reject) {\n\n var domain = (0, _utils.divideURL)(idpProxyURL).domain;\n\n if (!domain) {\n domain = idpProxyURL;\n }\n\n var _proxySandbox = void 0;\n var _proxyDescriptor = void 0;\n var _runtimeIdpProxyURL = void 0;\n var _proxySourcePackage = void 0;\n var haveError = false;\n\n var errorReason = function errorReason(reason) {\n log.info('[Runtime.Loader] Something failed on the deploy of IdpProxy: ', reason);\n reject(reason);\n };\n\n var handleError = function handleError(reason) {\n haveError = true;\n reject(reason);\n };\n\n // Discover IDPProxy\n log.info('[Runtime.Loader] ------------------- IDP Proxy Deploy ---------------------------\\n');\n log.info('[Runtime.Loader] Discover or Create a new IdpProxy for domain/URL: ', domain);\n\n try {\n var runtimeIdpProxyURL = _this3.registry.discoverIdpProxy(domain);\n\n // Is registed?\n log.info('[Runtime.Loader] 1. IDPProxy Discovered: ', runtimeIdpProxyURL);\n\n // we have completed step 2 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n var idpProxy = _this3.registry.idpProxyList[domain];\n log.log('Deployed: ', idpProxy);\n\n resolve(idpProxy);\n log.info('[Runtime.Loader] ------------------- END ---------------------------\\n');\n } catch (reason) {\n\n // is not registed?\n log.info('[Runtime.Loader] 1. IdpProxy not found:', reason);\n\n // we have completed step 3 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n // we need to get ProtoStub descriptor step 4 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n _this3.descriptors.getIdpProxyDescriptor(idpProxyURL).then(function (proxyDescriptor) {\n\n log.info('[Runtime.Loader] 2. Return the IDPProxy descriptor');\n\n // we have completed step 5 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n _proxyDescriptor = proxyDescriptor;\n\n var sourcePackageURL = proxyDescriptor.sourcePackageURL;\n\n if (sourcePackageURL === '/sourcePackage') {\n return proxyDescriptor.sourcePackage;\n }\n\n // we need to get ProtoStub Source code from descriptor - step 6 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this3.runtimeCatalogue.getSourcePackageFromURL(sourcePackageURL);\n }, handleError).then(function (sourcePackage) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 3. return the IDPProxy source package');\n\n // we have completed step 7 https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n _proxySourcePackage = sourcePackage;\n\n // TODO: Check on PEP (policy Engine) if we need the sandbox and check if the Sandbox Factory have the context sandbox;\n var policy = true;\n return policy;\n }, handleError).then(function (policy) {\n if (haveError) return false;\n\n // this will return the sandbox or one promise to getSandbox;\n return _this3.registry.getSandbox(domain);\n }).then(function (proxySandbox) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 4. if the sandbox is registered then return the sandbox', proxySandbox);\n\n _proxySandbox = proxySandbox;\n return proxySandbox;\n }).catch(function (reason) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 5. Sandbox was not found, creating a new one', reason);\n\n var proxyCapabilities = {};\n if (_proxyDescriptor && _proxyDescriptor.hasOwnProperty('capabilities')) {\n _proxyDescriptor = _proxyDescriptor.stubCapabilities;\n }\n\n return _this3._runtimeFactory.createSandbox(proxyCapabilities).then(function (sandbox) {\n\n sandbox.addListener('*', function (msg) {\n _this3.messageBus.postMessage(msg);\n });\n\n return sandbox;\n });\n }).then(function (sandbox) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 6. return the sandbox instance and register', sandbox, 'to domain ', domain);\n\n _proxySandbox = sandbox;\n\n // we need register stub on registry - step xxx https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n return _this3.registry.registerIdpProxy(sandbox, domain);\n }, handleError).then(function (runtimeIdpProxyURL) {\n if (haveError) return false;\n log.info('[Runtime.Loader] 7. Return the runtime Idp Proxy URL: ', runtimeIdpProxyURL);\n\n // we have completed step xxx https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n _runtimeIdpProxyURL = runtimeIdpProxyURL;\n\n // Extend original hyperty configuration;\n var configuration = {};\n if (!(0, _utils.emptyObject)(_proxyDescriptor.configuration)) {\n try {\n configuration = (0, _assign2.default)({}, JSON.parse(_proxyDescriptor.configuration));\n } catch (e) {\n configuration = _proxyDescriptor.configuration;\n }\n }\n configuration.runtimeURL = _this3._runtimeURL;\n\n // Deploy Component step xxx\n try {\n // we have completed step xxx https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n // Add the message bus listener\n _this3.messageBus.addListener(_runtimeIdpProxyURL, function (msg) {\n _proxySandbox.postMessage(msg);\n });\n\n return _proxySandbox.deployComponent(_proxySourcePackage.sourceCode, runtimeIdpProxyURL, configuration);\n } catch (e) {\n log.info('[Runtime.Loader] Error on deploy component:', e);\n reject(e);\n }\n }, handleError).then(function () {\n if (haveError) return false;\n\n // we have completed step xxx https://github.com/reTHINK-project/core-framework/blob/master/docs/specs/runtime/dynamic-view/basics/deploy-protostub.md\n\n // Load Stub function resolved with success;\n // let idpProxy = {\n // runtimeIdpProxyURL: _runtimeIdpProxyURL,\n // status: deployComponentStatus\n // };\n\n //this.registry.idpProxyList[domain].status = 'deployed';\n var idpProxy = _this3.registry.idpProxyList[domain];\n\n log.log('[Runtime.Loader.loadIdpProxy] 8: loaded: ', idpProxy);\n\n resolve(idpProxy);\n log.info('[Runtime.Loader.loadIdpProxy] ------------------- END ---------------------------\\n');\n }, handleError).catch(errorReason);\n }\n });\n }\n\n // Check if the loader is ready to load all components\n\n }, {\n key: '_readyToUse',\n value: function _readyToUse() {\n\n var status = false;\n\n if (!this._runtimeURL) throw new Error('[Runtime.Loader] The loader need the runtime url address');\n if (!this._messagesBus) throw new Error('[Runtime.Loader] The loader need the messageBus component');\n if (!this._registry) throw new Error('[Runtime.Loader] The loader need the registry component');\n if (!this._runtimeFactory) throw new Error('[Runtime.Loader] The loader need the runtime factory component');\n\n status = true;\n return status;\n }\n }, {\n key: 'runtimeURL',\n set: function set(value) {\n this._runtimeURL = value;\n }\n\n /**\n * Get runtime url\n * @return {string} value runtimeURL\n */\n ,\n get: function get() {\n return this._runtimeURL;\n }\n\n /**\n * Set Registry component\n * @param {Registry} value Registry Component\n */\n\n }, {\n key: 'registry',\n set: function set(value) {\n this._registry = value;\n\n // Install AddressAllocation\n var addressAllocation = _AddressAllocation2.default.instance;\n this._addressAllocation = addressAllocation;\n\n log.log('[Loader - AddressAllocation] - ', addressAllocation);\n }\n\n /**\n * Get Registry component\n * @return {Registry} Registry component\n */\n ,\n get: function get() {\n return this._registry;\n }\n\n /**\n * Set Message Bus component\n * @param {MessageBus} value Message bus component\n */\n\n }, {\n key: 'messageBus',\n set: function set(value) {\n this._messagesBus = value;\n }\n\n /**\n * Get Message Bus component\n * @return {MessageBus} Message Bus component\n */\n ,\n get: function get() {\n return this._messagesBus;\n }\n\n /**\n * Set Runtime Factory component\n * @param {runtimeFactory} value Factory includes the specific implementations for each environment\n */\n\n }, {\n key: 'runtimeFactory',\n set: function set(value) {\n this._runtimeFactory = value;\n }\n\n /**\n * Get Runtime Factory component\n * @return {runtimeFactory} Runtime Factory component\n */\n ,\n get: function get() {\n return this._runtimeFactory;\n }\n }]);\n return Loader;\n}();\n\nexports.default = Loader;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL0xvYWRlci5qcz9jYzkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIExvZyBTeXN0ZW1cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignbG9hZGVyJyk7XG5cbmltcG9ydCB7ZGl2aWRlVVJMLCBlbXB0eU9iamVjdH0gZnJvbSAnLi4vdXRpbHMvdXRpbHMnO1xuaW1wb3J0IEFkZHJlc3NBbGxvY2F0aW9uIGZyb20gJy4uL2FsbG9jYXRpb24vQWRkcmVzc0FsbG9jYXRpb24nO1xuXG5jbGFzcyBMb2FkZXIge1xuXG4gIGNvbnN0cnVjdG9yKHJ1bnRpbWVVUkwsI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hc2ljcy9kZXBsb3ktcHJvdG9zdHViLm1kXG4gICAgICAgICAgICBsb2cuaW5mbygnW1J1bnRpbWUuTG9hZGVyLmxvYWRTdHViXSA3LiByZXR1cm4gdGhlIHJ1bnRpbWUgcHJvdG9zdHViIHVybDogJywgcnVudGltZVByb3RvU3R1Yik7XG5cbiAgICAgICAgICAgIF9ydW50aW1lUHJvdG9TdHViVVJMID0gcnVudGltZVByb3RvU3R1Yi51cmw7XG5cbiAgICAgICAgICAgIC8vIEV4dGVuZCBvcmlnaW5hbCBoeXBlcnR5IGNvbmZpZ3VyYXRpb247XG4gICAgICAgICAgICBsZXQgY29uZmlndXJhdGlvbiA9IHt9O1xuICAgICAgICAgICAgaWYgKCFlbXB0eU9iamVjdChfc3R1YkRlc2NyaXB0b3IuY29uZmlndXJhdGlvbikpIHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uID0gT2JqZWN0LmFzc2lnbih7fSwgSlNPTi5wYXJzZShfc3R1YkRlc2NyaXB0b3IuY29uZmlndXJhdGlvbikpO1xuICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiA9IF9zdHViRGVzY3JpcHRvci5jb25maWd1cmF0aW9uO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChwMnBDb25maWcpIHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uID0gT2JqZWN0LmFzc2lnbihjb25maWd1cmF0aW9uLCBKU09OLnBhcnNlKHAycENvbmZpZykpO1xuICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiA9IE9iamVjdC5hc3NpZ24oY29uZmlndXJhdGlvbiwgcDJwQ29uZmlnKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVx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IF9zdHViU2FuZGJveC5wb3N0TWVzc2FnZShtc2cpO1xuICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICByZXR1cm4gX3N0dWJTYW5kYm94LmRlcGxveUNvbXBvbmVudChfc3R1YlNvdXJjZVBhY2thZ2Uuc291cmNlQ29kZSwgX3J1bnRpbWVQcm90b1N0dWJVUkwsIGNvbmZpZ3VyYXRpb24pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICBsb2cuZXJyb3IoJ1tSdW50aW1lLkxvYWRlci5sb2FkU3R1Yl0gRXJyb3Igb24gZGVwbG95IGNvbXBvbmVudDonLCBlKTtcbiAgICAgICAgICAgICAgcmVqZWN0KGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0sIGhhbmRsZUVycm9yKVxuICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgIGlmIChoYXZlRXJyb3IpIHJldHVybiBmYWxzZTtcblxuXG4gICAgICAgICAgICAvLyBzdGVwIDI4IGh0dHBzOi8vZ2l0aHViLmNvbS9yZVRISU5LLXByb2plY3QvY29yZS1mcmFtZXdvcmsvYmxvYi9tYXN0ZXIvZG9jcy9zcGVjcy9ydW50aW1lL2R5bmFtaWMtdmlldy9iYXNpY3MvZGVwbG95LXByb3Rvc3R1Yi5tZFxuICAgICAgICAgICAgbGV0IHN0dWI7XG4gICAgICAgICAgICBpZiAocDJwQ29uZmlnKSB7XG4gICAgICAgICAgICAgIGxvZy5sb2coJ1tSdW50aW1lLkxvYWRlci5sb2FkU3R1Yl0gcDJwQ29uZmlnOiAnLCBwMnBDb25maWcpO1xuXG4gICAgICAgICAgICAgIGlmIChwMnBDb25maWcuaGFzT3duUHJvcGVydHkoJ2lzSGFuZGxlclN0dWInKSkgc3R1YiA9IHRoaXMucmVnaXN0cnkucDJwSGFuZGxlclN0dWJbdGhpcy5fcnVudGltZVVSTF07XG4gICAgICAgICAgICAgIGlmIChwMnBDb25maWcuaGF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IH0sIGhhbmRsZUVycm9yKVxuICAgICAgICAgIC50aGVuKChwb2xpY3kpID0+IHtcbiAgICAgICAgICAgIGlmIChoYXZlRXJyb3IpIHJldHVybiBmYWxzZTtcblxuICAgICAgICAgICAgLy8gdGhpcyB3aWxsIHJldHVybiB0aGUgc2FuZGJveCBvciBvbmUgcHJvbWlzZSB0byBnZXRTYW5kYm94O1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVnaXN0cnkuZ2V0U2FuZGJveChkb21haW4pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLnRoZW4oKHByb3h5U2FuZGJveCkgPT4ge1xuICAgICAgICAgICAgaWYgKGhhdmVFcnJvcikgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgbG9nLmluZm8oJ1tSdW50aW1lLkxvYWRlcl0gNC4gaWYgdGhlIHNhbmRib3ggaXMgcmVnaXN0ZXJlZCB0aGVuIHJldHVybiB0aGUgc2FuZGJveCcsIHByb3h5U2FuZGJveCk7XG5cbiAgICAgICAgICAgIF9wcm94eVNhbmRib3ggPSBwcm94eVNhbmRib3g7XG4gICAgICAgICAgICByZXR1cm4gcHJveHlTYW5kYm94O1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChyZWFzb24pID0+IHtcbiAgICAgICAgICAgIGlmIChoYXZlRXJyb3IpIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIGxvZy5pbmZvKCdbUnVudGltZS5Mb2FkZXJdIDUuIFNhbmRib3ggd2FzIG5vdCBmb3VuZCwgY3JlYXRpbmcgYSBuZXcgb25lJywgcmVhc29uKTtcblxuICAgICAgICAgICAgbGV0IHByb3h5Q2FwYWJpbGl0aWVzID0ge307XG4gICAgICAgICAgICBpZiAoX3Byb3h5RGVzY3JpcHRvciAmJiBfcHJveHlEZXNjcmlwdG9yLmhhc093blByb3BlcnR5KCdjYXBhYmlsaXRpZXMnKSkge1xuICAgICAgICAgICAgICBfcHJveHlEZXNjcmlwdG9yID0gX3Byb3h5RGVzY3JpcHRvci5zdHViQ2FwYWJpbGl0aWVzO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fcnVudGltZUZhY3RvcnkuY3JlYXRlU2FuZGJveChwcm94eUNhcGFiaWxpdGllcykudGhlbigoc2FuZGJveCkgPT4ge1xuXG4gICAgICAgICAgICAgIHNhbmRib3guYWRkTGlzdGVuZXIoJyonLCAobXNnKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5tZXNzYWdlQnVzLnBvc3RNZXNzYWdlKG1zZyk7XG4gICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgIHJldHVybiBzYW5kYm94O1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAudGhlbigoc2FuZGJveCkgPT4ge1xuICAgICAgICAgICAgaWYgKGhhdmVFcnJvcikgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgbG9nLmluZm8oJ1tSdW50aW1lLkxvYWRlcl0gNi4gcmV0dXJuIHRoZSBzYW5kYm94IGluc3RhbmNlIGFuZCByZWdpc3RlcicsIHNhbmRib3gsICd0byBkb21haW4gJywgZG9tYWluKTtcblxuICAgICAgICAgICAgX3Byb3h5U2FuZGJveCA9IHNhbmRib3g7XG5cbiAgICAgICAgICAgIC8vIHdlIG5lZWQgcmVnaXN0ZXIgc3R1YiBvbiByZWdpc3RyeSAtIHN0ZXAgeHh4IGh0dHBzOi8vZ2l0aHViLmNvbS9yZVRISU5LLXByb2plY3QvY29yZS1mcmFtZXdvcmsvYmxvYi9tYXN0ZXIvZG9jcy9zcGVjcy9ydW50aW1lL2R5bmFtaWMtdmlldy9iYXNpY3MvZGVwbG95LXByb3Rvc3R1Yi5tZFxuICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVnaXN0cnkucmVnaXN0ZXJJZHBQcm94eShzYW5kYm94LCBkb21haW4pO1xuICAgICAgICAgIH0sIGhhbmRsZUVycm9yKVxuICAgICAgICAgIC50aGVuKChydW50aW1lSWRwUHJveHlVUkwpID0+IHtcbiAgICAgICAgICAgIGlmIChoYXZlRXJyb3IpIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIGxvZy5pbmZvKCdbUnVudGltZS5Mb2FkZXJdIDcuIFJldHVybiB0aGUgcnVudGltZSBJZHAgUHJveHkgVVJMOiAnLCBydW50aW1lSWRwUHJveHlVUkwpO1xuXG4gICAgICAgICAgICAvLyB3ZSBoYXZlIGNvbXBsZXRlZCBzdGVwIHh4eCBodHRwczovL2dpdGh1Yi5jb20vcmVUSElOSy1wcm9qZWN0L2NvcmUtZnJhbWV3b3JrL2Jsb2IvbWFzdGVyL2RvY3Mvc3BlY3MvcnVudGltZS9keW5hbWljLXZpZXcvYmFzaWNzL2RlcGxveS1wcm90b3N0dWIubWRcblxuICAgICAgICAgICAgX3J1bnRpbWVJZHBQcm94eVVSTCA9IHJ1bnRpbWVJZHBQcm94eVVSTDtcblxuICAgICAgICAgICAgLy8gRXh0ZW5kIG9yaWdpbmFsIGh5cGVydHkgY29uZmlndXJhdGlvbjtcbiAgICAgICAgICAgIGxldCBjb25maWd1cmF0aW9uID0ge307XG4gICAgICAgICAgICBpZiAoIWVtcHR5T2JqZWN0KF9wcm94eURlc2NyaXB0b3IuY29uZmlndXJhdGlvbikpIHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uID0gT2JqZWN0LmFzc2lnbih7fSwgSlNPTi5wYXJzZShfcHJveHlEZXNjcmlwdG9yLmNvbmZpZ3VyYXRpb24pKTtcbiAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYXRpb24gPSBfcHJveHlEZXNjcmlwdG9yLmNvbmZpZ3VyYXRpb247XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbmZpZ3VyYXRpb24ucnVudGltZVVSTCA9IHRo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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFodEJBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QUFDQTtBQUNBOzs7OztBQW9wQkE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///492\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nexports.storage = storage;\n\nvar _runtimeConfiguration = __webpack_require__(144);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar storages = {};\n\nfunction storage(runtimeFactory) {\n if (!runtimeFactory) throw new Error('The runtime factory is a needed parameter');\n\n (0, _keys2.default)(_runtimeConfiguration.runtimeConfiguration.storageSchemas).forEach(function (key) {\n\n if (!storages.hasOwnProperty(key)) {\n storages[key] = runtimeFactory.storageManager(key, _runtimeConfiguration.runtimeConfiguration.storageSchemas[key]);\n }\n });\n\n return storages;\n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oiIn0=\n//# sourceURL=webpack-internal:///493\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _utils = __webpack_require__(14);\n\nvar _runtimeUtils = __webpack_require__(140);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('Descriptors');\n\nvar Descriptors = function () {\n function Descriptors(runtimeURL, catalogue, runtimeConfiguration) {\n (0, _classCallCheck3.default)(this, Descriptors);\n\n if (!runtimeURL) throw Error('The descriptor need to know the runtime url to be used');\n if (!catalogue) throw Error('The descriptor needs the catalogue instance');\n if (!runtimeConfiguration) throw Error('The descriptor needs the runtime configuration');\n\n this.log = log;\n\n this.runtimeConfiguration = runtimeConfiguration;\n this.runtimeURL = runtimeURL;\n this.catalogue = catalogue;\n\n this.constraints = _runtimeUtils.runtimeUtils.runtimeCapabilities;\n }\n\n (0, _createClass3.default)(Descriptors, [{\n key: 'getHypertyDescriptor',\n value: function getHypertyDescriptor(hypertyURL) {\n return this.catalogue.getHypertyDescriptor(hypertyURL, true, this.constraints);\n }\n }, {\n key: 'getStubDescriptor',\n value: function getStubDescriptor(stubURL) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var domain = void 0;\n var protostub = void 0;\n var protoStubURL = void 0;\n\n var originDividedURL = (0, _utils.divideURL)(_this.runtimeURL);\n var originDomain = originDividedURL.domain;\n\n if (stubURL.includes('://')) {\n var dividedURL = (0, _utils.divideURL)(stubURL);\n domain = dividedURL.domain;\n var path = dividedURL.identity;\n\n if (path) {\n protostub = path.substring(path.lastIndexOf('/') + 1);\n } else {\n protostub = 'default';\n }\n } else {\n protostub = 'default';\n domain = stubURL;\n }\n\n protoStubURL = (0, _utils.buildURL)(_this.runtimeConfiguration, 'catalogueURLs', 'protocolstub', protostub);\n if (domain !== _this.runtimeConfiguration.domain) {\n if (!stubURL.indexOf('https') || !stubURL.indexOf('hyperty-catalogue')) {\n protoStubURL = stubURL;\n } else {\n\n // TODO: check how to load form different configuration domain\n var resource = (0, _utils.getConfigurationResources)(_this.runtimeConfiguration, 'catalogueURLs', 'protocolstub');\n protoStubURL = resource.prefix + domain + resource.suffix + protostub;\n }\n }\n\n log.log('Load ProtocolStub for domain, ' + domain + ' : ', protoStubURL);\n return _this.catalogue.getStubDescriptor(protoStubURL, true, _this.constraints).then(function (result) {\n\n resolve(result);\n }).catch(function (error) {\n\n // log.log('Error: ', error);\n\n protostub = domain;\n domain = originDomain;\n\n var resource = (0, _utils.getConfigurationResources)(_this.runtimeConfiguration, 'catalogueURLs', 'protocolstub');\n protoStubURL = resource.prefix + domain + resource.suffix + protostub;\n\n // log.log('Fallback -> Load Protocolstub for domain, ' + domain + ' : ', protostub);\n return _this.catalogue.getStubDescriptor(protoStubURL, true, _this.constraints);\n }).then(function (result) {\n resolve(result);\n }).catch(function (reason) {\n reject(reason);\n });\n });\n }\n }, {\n key: 'getIdpProxyDescriptor',\n value: function getIdpProxyDescriptor(idpProxyURL) {\n var _this2 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var domain = void 0;\n var idpproxy = void 0;\n\n var originDividedURL = (0, _utils.divideURL)(_this2.runtimeURL);\n var originDomain = originDividedURL.domain;\n var constraints = _this2.constraints;\n\n constraints.constraints.onlyAccessToken = true;\n constraints.constraints.onlyIdAssertionValidation = true;\n\n if (idpProxyURL.includes('://')) {\n var dividedURL = (0, _utils.divideURL)(idpProxyURL);\n domain = dividedURL.domain;\n var path = dividedURL.identity;\n if (path) {\n idpproxy = path.substring(path.lastIndexOf('/') + 1);\n } else {\n idpproxy = 'default';\n }\n } else {\n idpproxy = 'default';\n domain = idpProxyURL;\n }\n\n var resource = (0, _utils.getConfigurationResources)(_this2.runtimeConfiguration, 'catalogueURLs', 'idpProxy');\n\n idpProxyURL = resource.prefix + domain + resource.suffix + idpproxy;\n // log.log('Load Idp Proxy for domain, ' + domain + ' : ', idpProxyURL);\n return _this2.catalogue.getIdpProxyDescriptor(idpProxyURL, true, constraints).then(function (result) {\n\n resolve(result);\n }).catch(function () {\n\n idpproxy = domain;\n domain = originDomain;\n\n idpProxyURL = (0, _utils.buildURL)(_this2.runtimeConfiguration, 'catalogueURLs', 'idpProxy', idpproxy);\n\n // log.log('Load Idp Proxy for domain, ' + domain + ' : ', idpProxyURL);\n return _this2.catalogue.getIdpProxyDescriptor(idpProxyURL, true, constraints);\n }).then(function (result) {\n resolve(result);\n }).catch(function (reason) {\n reject(reason);\n });\n });\n }\n }]);\n return Descriptors;\n}();\n\nexports.default = Descriptors;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL0Rlc2NyaXB0b3JzLmpzP2ZjZDgiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtkaXZpZGVVUkwsIGdldENvbmZpZ3VyYXRpb25SZXNvdXJjZXMsIGJ1aWxkVVJMfSBmcm9tICcuLi91dGlscy91dGlscyc7XG5pbXBvcnQgeyBydW50aW1lVXRpbHMgfSBmcm9tICcuL3J1bnRpbWVVdGlscyc7XG5cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZ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BQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTs7O0FBRUE7QUFBQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7Ozs7O0FBR0E7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///494\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _logLevels = __webpack_require__(201);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Class where message bus handlers are built. To be used by the RuntimeUA to initialise the runtime UA.\n */\n\nvar log = logger.getLogger('RuntimeUA');\n\n// Log System\n\nvar MsgBusHandlers = function () {\n function MsgBusHandlers(pep, idm, crypto) {\n (0, _classCallCheck3.default)(this, MsgBusHandlers);\n\n if (!pep) throw Error('[MsgBusHandlers] pep input paramenter is mandatory');\n if (!idm) throw Error('[MsgBusHandlers] idm input paramente is mandatory');\n if (!crypto) throw Error('[MsgBusHandlers] crypto input paramente is mandatory');\n\n this.policyEngine = pep;\n this.identityManager = idm;\n this.cryptoManager = crypto;\n }\n\n // Policy based access control for incoming messages\n\n (0, _createClass3.default)(MsgBusHandlers, [{\n key: 'pepInHandler',\n get: function get() {\n var _this = this;\n\n return function (ctx) {\n _this.policyEngine.authorise(ctx.msg, true).then(function (changedMgs) {\n ctx.msg = changedMgs;\n ctx.next();\n }).catch(function (reason) {\n log.error(reason);\n ctx.fail(reason);\n });\n };\n }\n\n // Policy based access control for outgoing messages\n\n }, {\n key: 'pepOutHandler',\n get: function get() {\n var _this = this;\n return function (ctx) {\n _this.policyEngine.authorise(ctx.msg, false).then(function (changedMgs) {\n ctx.msg = changedMgs;\n ctx.next();\n }).catch(function (reason) {\n log.error(reason);\n ctx.fail(reason);\n });\n };\n }\n\n // Add Identity info to messages\n\n }, {\n key: 'idmHandler',\n get: function get() {\n var _this = this;\n return function (ctx) {\n _this.identityManager.processMessage(ctx.msg).then(function (changedMgs) {\n ctx.msg = changedMgs;\n ctx.next();\n }).catch(function (reason) {\n log.error(reason);\n ctx.fail(reason);\n });\n };\n }\n\n // encrypt messages\n\n }, {\n key: 'encryptHandler',\n get: function get() {\n var _this = this;\n return function (ctx) {\n _this.cryptoManager.encryptMessage(ctx.msg).then(function (changedMgs) {\n ctx.msg = changedMgs;\n ctx.next();\n }).catch(function (reason) {\n log.error(reason);\n ctx.fail(reason);\n });\n };\n }\n\n // decrypt messages\n\n }, {\n key: 'decryptHandler',\n get: function get() {\n var _this = this;\n return function (ctx) {\n _this.cryptoManager.decryptMessage(ctx.msg).then(function (changedMgs) {\n ctx.msg = changedMgs;\n ctx.next();\n }).catch(function (reason) {\n log.warn(reason);\n ctx.fail(reason);\n });\n };\n }\n }]);\n return MsgBusHandlers;\n}();\n\nexports.default = MsgBusHandlers;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ydW50aW1lL01zZ0J1c0hhbmRsZXJzLmpzPzZiYmEiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiAgQ2xhc3Mgd2hlcmUgbWVzc2FnZSBidXMgaGFuZGxlcnMgYXJlIGJ1aWx0LiBUbyBiZSB1c2VkIGJ5IHRoZSBSdW50aW1lVUEgdG8gaW5pdGlhbGlzZSB0aGUgcnVudGltZSBVQS5cbiAqL1xuXG5pbXBvcnQgeyBsb2cgYXMgbG9nTGV2ZWxzIH0gZnJvbSAnLi4vbG9nTGV2ZWxzJztcblxuLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ2VyIGZyb20gJ2xvZ2xldmVsJztcbmxldCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdSdW50aW1lVUEnKTtcblxuY2xhc3MgTXNnQnVzSGFuZGxlcnMge1xuXG4gIGNvbnN0cnVjdG9yKHBlcCwgaWRtLCBjcnlwdG8pIHtcbiAgICBpZiAoIXBlcCkgdGhyb3cgRXJyb3IoJ1tNc2dCdXNIYW5kbGVyc10gcGVwIGlucHV0IHBhcmFtZW50ZXIgaXMgbWFuZGF0b3J5Jyk7XG4gICAgaWYgKCF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NBOzs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///495\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _GraphConnectorLight = __webpack_require__(497);\n\nvar _GraphConnectorLight2 = _interopRequireDefault(_GraphConnectorLight);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _GraphConnectorLight2.default; // let GraphConnector;\n// if (process.env.MODE !== 'light') {\n// GraphConnector = require('./GraphConnectorBase');\n// if (GraphConnector && GraphConnector.hasOwnProperty('default')) GraphConnector = GraphConnector.default;\n// } else {\n// GraphConnector = require('./GraphConnectorLight');\n// if (GraphConnector && GraphConnector.hasOwnProperty('default')) GraphConnector = GraphConnector.default;\n// }\n\n/**\n * The GraphConnectorBase have some problems with the size;\n * @deprecated Due to some problems increase a lot the file size\n */\n// import GraphConnector from './GraphConnectorBase';\n\n/**\n *\n * @experimental used instead of GraphConnectorBase;\n */\n\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ncmFwaGNvbm5lY3Rvci9HcmFwaENvbm5lY3Rvci5qcz84MGM4Il0sIn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DSyBGT09URVIgLy9cbi8vIHNyYy9ncmFwaGNvbm5lY3Rvci9HcmFwaENvbm5lY3Rvci5qcyJdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBbUJBO0FBQ0E7Ozs7O0FBcEJBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7O0FBSUE7QUFDQTtBQUNBOzs7OztBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///496\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n/**\n * The Graph Connector contains the contact list/address book.\n * @abstract\n * @experimental\n * @author beierle@tu-berlin.de\n *\n *\n */\nvar GraphConnector = function GraphConnector(hypertyRuntimeURL, messageBus, storageManager) {\n (0, _classCallCheck3.default)(this, GraphConnector);\n};\n\nexports.default = GraphConnector;\nmodule.exports = exports["default"];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9ncmFwaGNvbm5lY3Rvci9HcmFwaENvbm5lY3RvckxpZ2h0LmpzP2ZmZGYiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYXMgU0FcbiAqIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4gKiBDb3B5cmlnaHQgMjAxNiBRVU9CSVMgTkVUV09SS1MgU0xcbiAqIENvcHlyaWdodCAyMDE2IEZSQVVOSE9GRVItR0VTRUxMU0NIQUZUIFpVUiBGT0VSREVSVU5HIERFUiBBTkdFV0FORFRFTiBGT1JTQ0hVTkcgRS5WXG4gKiBDb3B5cmlnaHQgMjAxNiBPUkFOR0UgU0FcbiAqIENvcHlyaWdodCAyMDE2IERldXRzY2hlIFRlbGVrb20gQUdcbiAqIENvcHlyaWdodCAyMDE2IEFwaXplZVxuICogQ29weXJpZ2h0IDIwMTYgVEVDSE5JU0NIRSBVTklWRVJTSVRBVCBCRVJMSU5cbiAqXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgXCJMaWNlbnNlXCIpO1xuICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLlxuICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0XG4gKlxuICogICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjBcbiAqXG4gKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIH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eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('CoreDiscovery'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log System\n\n/**\n* Core Discovery interface\n* Class to allow applications to search for hyperties and DataObjects using the message bus\n*/\nvar CoreDiscovery = function () {\n\n /**\n * To initialise the Discovery, which will provide the support for hyperties to\n * query users registered in outside the internal core.\n * @param {MessageBus} msgbus msgbus\n * @param {RuntimeURL} runtimeURL runtimeURL\n * @param {graphConnector} graphConnector\n */\n function CoreDiscovery(runtimeURL, msgBus, graphConnector, runtimeFactory, registry) {\n (0, _classCallCheck3.default)(this, CoreDiscovery);\n\n if (!runtimeFactory) throw Error('The catalogue needs the runtimeFactory');\n\n var _this = this;\n this._messageBus = msgBus;\n _this.graphConnector = graphConnector;\n _this.httpRequest = runtimeFactory.createHttpRequest();\n _this.domain = (0, _utils.divideURL)(runtimeURL).domain;\n _this.discoveryURL = runtimeURL + '/discovery/';\n _this.registry = registry;\n\n _this.messageBus.addListener(_this.discoveryURL, function (msg) {\n\n _this.discoveryManager(msg).then(function (result) {\n\n //FLOW-OUT: message response\n _this.messageBus.postMessage({\n id: msg.id,\n type: 'response',\n from: msg.to,\n to: msg.from,\n body: {\n code: 200,\n value: result\n }\n });\n }).catch(function (err) {\n var description = void 0;\n var code = void 0;\n\n if (err === 'GraphConnector') {\n description = 'This search is not available at the moment. Try later.';\n code = 500;\n } else {\n description = 'Not Found';\n code = 404;\n }\n\n //FLOW-OUT: error message response\n _this.messageBus.postMessage({\n id: msg.id,\n type: 'response',\n from: msg.to,\n to: msg.from,\n body: {\n code: code,\n description: description\n }\n });\n });\n });\n }\n\n /**\n * Returns the MessageBus.\n */\n\n\n (0, _createClass3.default)(CoreDiscovery, [{\n key: 'discoveryManager',\n\n\n /* function to decide what discovery method to call and later return the response msg */\n value: function discoveryManager(msg) {\n var _this = this;\n var domain = (0, _utils.divideURL)(msg.from).domain;\n var atributes = msg.body.resource.split('/').filter(Boolean);\n var resources = [];\n var dataSchemes = [];\n\n log.log('[CoreDiscovery.discoveryManager] received: ', msg);\n\n if (msg.body.criteria) {\n if (msg.body.criteria.resources) {\n resources = msg.body.criteria.resources;\n }\n if (msg.body.criteria.dataSchemes) {\n dataSchemes = msg.body.criteria.dataSchemes;\n }\n }\n\n switch (atributes[1]) {\n case 'user':\n if (atributes[0] == 'hyperty') {\n return _this.discoverHyperties(msg.body.resource.split('user/')[1], dataSchemes, resources, msg.body.criteria.domain);\n } else {\n return _this.discoverDataObjects(msg.body.resource.split('user/')[1], dataSchemes, resources, msg.body.criteria.domain);\n }\n break;\n\n case 'url':\n if (atributes[0] == 'hyperty') {\n return _this.discoverHypertyPerURL(msg.body.resource.split('url/')[1], msg.body.criteria.domain);\n } else {\n return _this.discoverDataObjectPerURL(msg.body.resource.split('url/')[1], msg.body.criteria.domain);\n }\n break;\n case 'name':\n return _this.discoverDataObjectsPerName(msg.body.resource.split('name/')[1], dataSchemes, resources, msg.body.criteria.domain);\n break;\n case 'reporter':\n return _this.discoverDataObjectsPerReporter(msg.body.resource.split('reporter/')[1], dataSchemes, resources, msg.body.criteria.domain);\n break;\n case 'guid':\n if (typeof _this.graphConnector !== 'undefined' && _this.graphConnector !== null) {\n if (atributes[0] == 'hyperty') {\n return _this.discoverHypertiesPerGUID(msg.body.resource.split('user-guid://')[1], dataSchemes, resources);\n } else {\n return _this.discoverDataObjectsPerGUID(msg.body.resource.split('user-guid://')[1], dataSchemes, resources);\n }\n break;\n } else {\n return _promise2.default.reject('GraphConnector');\n break;\n }\n case 'userprofile':\n if (typeof _this.graphConnector !== 'undefined' && _this.graphConnector !== null) {\n if (atributes[0] == 'hyperty') {\n return _this.discoverHypertiesPerUserProfileData(msg.body.resource.split('userprofile/')[1], dataSchemes, resources);\n } else {\n return _this.discoverDataObjectsPerUserProfileData(msg.body.resource.split('userprofile/')[1], dataSchemes, resources);\n }\n break;\n } else {\n return _promise2.default.reject('GraphConnector');\n break;\n }\n }\n }\n\n /**\n * Advanced Search for Hyperties registered in domain registry associated with some user identifier (eg email, name ...)\n * @param {String} userIdentifier\n * @param {Array} dataSchemes (Optional) types of hyperties schemas\n * @param {Array} resources (Optional) types of hyperties resources\n */\n\n }, {\n key: 'discoverHypertiesPerUserProfileData',\n value: function discoverHypertiesPerUserProfileData(userIdentifier, dataSchemes, resources) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //translate user identifier (e.g. email, name...) into the associated GUIDs\n _this.discoverGUIDPerUserIdentifier(userIdentifier).then(function (guids) {\n\n var hypertiesPromises = guids.map(function (guid) {\n\n return new _promise2.default(function (resolve, reject) {\n _this.discoverHypertiesPerGUID(guid, dataSchemes, resources).then(function (hyperties) {\n resolve(hyperties);\n }).catch(function (err) {\n resolve([]);\n });\n });\n });\n\n _promise2.default.all(hypertiesPromises).then(function (hypertiesResult) {\n\n var hyperties = [].concat.apply([], hypertiesResult);\n\n if (hyperties.length === 0) {\n return reject('No hyperties were found');\n }\n\n resolve(hyperties);\n });\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /**\n * Advanced Search for DataObjects registered in domain registry associated with some user identifier (eg email, name ...)\n * @param {String} userIdentifier\n * @param {Array} dataSchemes (Optional) types of hyperties schemas\n * @param {Array} resources (Optional) types of hyperties resources\n */\n\n }, {\n key: 'discoverDataObjectsPerUserProfileData',\n value: function discoverDataObjectsPerUserProfileData(userIdentifier, dataSchemes, resources) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //translate user identifier (e.g. email, name...) into the associated GUIDs\n _this.discoverGUIDPerUserIdentifier(userIdentifier).then(function (guids) {\n\n var dataObjectsPromises = guids.map(function (guid) {\n\n return new _promise2.default(function (resolve, reject) {\n _this.discoverDataObjectsPerGUID(guid, dataSchemes, resources).then(function (dataObjects) {\n resolve(dataObjects);\n }).catch(function (err) {\n resolve([]);\n });\n });\n });\n\n _promise2.default.all(dataObjectsPromises).then(function (dataObjectsResult) {\n\n var dataObjects = [].concat.apply([], dataObjectsResult);\n\n if (dataObjects.length === 0) {\n return reject('No dataObjects were found');\n }\n\n resolve(dataObjects);\n });\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /**\n * Advanced Search for Hyperties registered in domain registry associated with some GUID\n * @param {String} guid\n * @param {Array} dataSchemes (Optional) types of hyperties schemas\n * @param {Array} resources (Optional) types of hyperties resources\n */\n\n }, {\n key: 'discoverHypertiesPerGUID',\n value: function discoverHypertiesPerGUID(guid, dataSchemes, resources) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //translate GUID into the user IDs to query the domain registry\n _this.discoverUserIdsPerGUID(guid).then(function (uids) {\n\n //translate user IDs into the associated hyperties registered in some domain\n var hypertiesPromises = uids.map(function (uid) {\n return new _promise2.default(function (resolve, reject) {\n _this.discoverHyperties(uid.uID, dataSchemes, resources, uid.domain).then(function (hyperties) {\n resolve(hyperties);\n }).catch(function (err) {\n resolve([]);\n });\n });\n });\n\n _promise2.default.all(hypertiesPromises).then(function (hypertiesResult) {\n\n var hyperties = [].concat.apply([], hypertiesResult);\n\n if (hyperties.length === 0) {\n return reject('No hyperties were found');\n }\n\n // log.log('Hyperties : ', hyperties);\n resolve(hyperties);\n });\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /**\n * Advanced Search for DataObjects registered in domain registry associated with some GUID\n * @param {String} guid\n * @param {Array} dataSchemes (Optional) types of hyperties schemas\n * @param {Array} resources (Optional) types of hyperties resources\n */\n\n }, {\n key: 'discoverDataObjectsPerGUID',\n value: function discoverDataObjectsPerGUID(guid, dataSchemes, resources) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n //translate GUID into the user IDs to query the domain registry\n _this.discoverUserIdsPerGUID(guid).then(function (uids) {\n\n //translate user IDs into the associated dataObjects registered in some domain\n var dataObjectPromises = uids.map(function (uid) {\n return new _promise2.default(function (resolve, reject) {\n _this.discoverDataObjects(uid.uID, dataSchemes, resources, uid.domain).then(function (dataObjects) {\n resolve(dataObjects);\n }).catch(function (err) {\n resolve([]);\n });\n });\n });\n\n _promise2.default.all(dataObjectPromises).then(function (dataObjectsResult) {\n\n var dataObjects = [].concat.apply([], dataObjectsResult);\n\n if (dataObjects.length === 0) {\n return reject('No dataObjects were found');\n }\n\n // log.log('DataObjects : ', dataObjects);\n resolve(dataObjects);\n });\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /** Advanced Search for Hyperties registered in domain registry and associated with some user ID\n * @param {String} user user identifier, either in url or email format\n * @param {Array} dataSchemes (Optional) types of hyperties schemas\n * @param {Array} resources (Optional) types of hyperties resources\n * @param {String} domain (Optional) domain of the registry to search\n */\n\n }, {\n key: 'discoverHyperties',\n value: function discoverHyperties(user, dataSchemes, resources, domain) {\n var _this = this;\n var activeDomain = void 0;\n\n activeDomain = !domain ? _this.domain : domain;\n\n var msg = {\n type: 'read',\n from: _this.discoveryURL,\n to: 'domain://registry.' + activeDomain,\n body: {}\n };\n\n if (user.indexOf('user://') > -1) {\n msg.body.resource = user;\n } else {\n msg.body.resource = '/hyperty/idp-identifier/' + user;\n }\n\n if (dataSchemes.length > 0) {\n if (!msg.body.criteria) {\n msg.body.criteria = {};\n }\n msg.body.criteria.dataSchemes = dataSchemes;\n }\n\n if (resources.length > 0) {\n if (!msg.body.criteria) {\n msg.body.criteria = {};\n }\n msg.body.criteria.resources = resources;\n }\n\n return new _promise2.default(function (resolve, reject) {\n // log.log(\"[CoreDiscovery.discoverHyperties] sending msg \", msg);\n\n _this.messageBus.postMessage(msg, function (reply) {\n\n // log.log(\"[CoreDiscovery.discoverHyperties] rcved reply \", reply);\n\n if (reply.body.code === 200 || reply.body.code === 500) {\n var hyperties = reply.body.value;\n\n var finalHyperties = [];\n for (var key in hyperties) {\n finalHyperties.push(hyperties[key]);\n }if (finalHyperties.length > 0) {\n // log.log(\"[CoreDiscovery.discoverHyperties] Hyperties Found: \", finalHyperties);\n resolve(finalHyperties);\n } else {\n return reject('No Hyperty was found');\n }\n } else {\n return reject('No Hyperty was found');\n }\n\n /*_this.registry.isLegacy(user).then((legacy) => {\n if (legacy) resolve([{hypertyID: user }])\n else return reject('No Hyperty was found');\n });*/\n });\n });\n }\n\n /** Advanced Search for DataObjects registered in domain registry and associated with some user ID\n * @param {String} user user identifier, either in url or email format\n * @param {Array} dataSchemes (Optional) types of dataObjects schemas\n * @param {Array} resources (Optional) types of dataObjects resources\n * @param {String} domain (Optional) domain of the registry to search\n */\n\n }, {\n key: 'discoverDataObjects',\n value: function discoverDataObjects(user, dataSchemes, resources, domain) {\n var _this = this;\n var activeDomain = void 0;\n var dataObjectsArray = [];\n\n activeDomain = !domain ? _this.domain : domain;\n\n return new _promise2.default(function (resolve, reject) {\n\n //translate user identifier (e.g. email, name...) into the associated hyperties\n _this.discoverHyperties(user, [], [], activeDomain).then(function (hyperties) {\n\n var finalHyperties = [];\n for (var key in hyperties) {\n finalHyperties.push(hyperties[key]);\n } //translate hyperties URLs into the associated dataObjects registered in some domain\n var dataObjectsPromises = finalHyperties.map(function (hyperty) {\n return new _promise2.default(function (resolve, reject) {\n _this.discoverDataObjectsPerReporter(hyperty.hypertyID, dataSchemes, resources, activeDomain).then(function (dataObject) {\n resolve(dataObject);\n }).catch(function (err) {\n resolve([]);\n });\n });\n });\n\n _promise2.default.all(dataObjectsPromises).then(function (dataObjectsResult) {\n\n var dataObjects = [].concat.apply([], dataObjectsResult);\n\n dataObjects.forEach(function (dataObject) {\n dataObjectsArray.push(dataObject);\n });\n\n var finalDataObjects = [];\n for (var key in dataObjectsArray) {\n finalDataObjects.push(dataObjectsArray[key]);\n }if (finalDataObjects.length === 0) {\n return reject('No dataObjects were found');\n }\n\n // log.log('DataObjects Found: ', finalDataObjects);\n resolve(finalDataObjects);\n });\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /**\n * function to request about hyperties registered in domain registry, and\n * return the hyperty information, if found.\n * @param {String} url dataObject URL\n * @param {String} domain (Optional)\n * @return {Promise} Promise\n */\n\n }, {\n key: 'discoverHypertyPerURL',\n value: function discoverHypertyPerURL(url, domain) {\n var _this = this;\n var activeDomain = void 0;\n\n activeDomain = !domain ? _this.domain : domain;\n\n var msg = {\n type: 'read',\n from: _this.discoveryURL,\n to: 'domain://registry.' + activeDomain,\n body: {\n resource: url\n }\n };\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.messageBus.postMessage(msg, function (reply) {\n\n if (reply.body.code !== 200 && reply.body.code !== 500) {\n return reject('No Hyperty was found');\n }\n\n var hyperty = reply.body.value;\n\n if (hyperty) {\n // log.log('Hyperty found: ', hyperty);\n resolve(hyperty);\n } else {\n return reject('No Hyperty was found');\n }\n });\n });\n }\n\n /**\n * function to request about dataObject registered in domain registry, and\n * return the dataObject information, if found.\n * @param {String} url dataObject URL\n * @param {String} domain (Optional)\n * @return {Promise} Promise\n */\n\n }, {\n key: 'discoverDataObjectPerURL',\n value: function discoverDataObjectPerURL(url, domain) {\n var _this = this;\n var activeDomain = void 0;\n\n activeDomain = !domain ? _this.domain : domain;\n\n var msg = {\n type: 'read',\n from: _this.discoveryURL,\n to: 'domain://registry.' + activeDomain,\n body: {\n resource: url\n }\n };\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.messageBus.postMessage(msg, function (reply) {\n\n var dataObject = reply.body.value;\n\n if (dataObject) {\n // log.log('DataObject found: ', dataObject);\n resolve(dataObject);\n } else {\n return reject('DataObject not found');\n }\n });\n });\n }\n\n /** Advanced Search for dataObjects registered in domain registry\n * @param {String} name name of the dataObject\n * @param {Array} dataSchemes (Optional) types of dataObject schemas\n * @param {Array} resources (Optional) types of dataObject resources\n * @param {String} domain (Optional) domain of the registry to search\n */\n\n }, {\n key: 'discoverDataObjectsPerName',\n value: function discoverDataObjectsPerName(name, dataSchemes, resources, domain) {\n var _this = this;\n var activeDomain = void 0;\n\n activeDomain = !domain ? _this.domain : domain;\n\n var msg = {\n type: 'read',\n from: _this.discoveryURL,\n to: 'domain://registry.' + activeDomain,\n body: {\n resource: name\n }\n };\n\n if (dataSchemes.length > 0) {\n if (!msg.body.criteria) {\n msg.body.criteria = {};\n }\n msg.body.criteria.dataSchemes = dataSchemes;\n }\n\n if (resources.length > 0) {\n if (!msg.body.criteria) {\n msg.body.criteria = {};\n }\n msg.body.criteria.resources = resources;\n }\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.messageBus.postMessage(msg, function (reply) {\n\n var dataObjects = reply.body.value;\n\n var finalDataObjects = [];\n for (var key in dataObjects) {\n finalDataObjects.push(dataObjects[key]);\n }if (finalDataObjects.length > 0) {\n // log.log(\"DataObjects Found: \", finalDataObjects);\n resolve(finalDataObjects);\n } else {\n return reject('No DataObject was found');\n }\n });\n });\n }\n\n /**\n * function to request about specific reporter dataObject registered in domain registry, and\n * return the dataObjects from that reporter.\n * @param {String} reporter dataObject reporter\n * @param {Array} scdataSchemeshema (Optional) types of dataObjects schemas\n * @param {Array} resources (Optional) types of dataObjects resources\n * @param {String} domain (Optional)\n */\n\n }, {\n key: 'discoverDataObjectsPerReporter',\n value: function discoverDataObjectsPerReporter(reporter, dataSchemes, resources, domain) {\n var _this = this;\n var activeDomain = void 0;\n\n activeDomain = !domain ? _this.domain : domain;\n\n var msg = {\n type: 'read',\n from: _this.discoveryURL,\n to: 'domain://registry.' + activeDomain,\n body: {\n resource: '/comm',\n criteria: {\n reporter: reporter\n }\n }\n };\n\n if (dataSchemes.length > 0) {\n msg.body.criteria.dataSchemes = dataSchemes;\n }\n\n if (resources.length > 0) {\n msg.body.criteria.resources = resources;\n }\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.messageBus.postMessage(msg, function (reply) {\n\n var dataObjects = reply.body.value;\n\n var finalDataObjects = [];\n for (var key in dataObjects) {\n finalDataObjects.push(dataObjects[key]);\n }if (finalDataObjects.length > 0) {\n // log.log(\"DataObjects Found: \", finalDataObjects);\n resolve(finalDataObjects);\n } else {\n return reject('No DataObject was found');\n }\n });\n });\n }\n\n /**\n * function to request global registry about the user IDs associated with some GUID\n * @param {String} guid\n * @return {Promise} Promise\n */\n\n }, {\n key: 'discoverUserIdsPerGUID',\n value: function discoverUserIdsPerGUID(guid) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n // log.log(\"GO graphConnector:\", guid);\n\n _this.graphConnector.queryGlobalRegistry(guid).then(function (graphConnectorContactData) {\n\n // log.log('Information returned from Global Registry: ', graphConnectorContactData);\n\n if (typeof graphConnectorContactData === 'string' || !graphConnectorContactData) {\n return reject('Unsuccessful discover userIDs by GUID');\n } else {\n\n var userids = graphConnectorContactData.userIDs;\n\n if (userids.length === 0) {\n return reject('UserIDs not available');\n }\n\n resolve(userids);\n }\n }).catch(function (err) {\n return reject(err);\n });\n });\n }\n\n /**\n * function to request discovery service about the GUID associated with some user identifier (eg email, name ...)\n * @param {String} userIdentifier\n * @return {Promise} Promise\n */\n\n }, {\n key: 'discoverGUIDPerUserIdentifier',\n value: function discoverGUIDPerUserIdentifier(userIdentifier) {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var lookupURLDiscoveryService = 'https://rethink.tlabscloud.com/discovery/rest/discover/lookup?searchquery=';\n _this.httpRequest.get(lookupURLDiscoveryService + userIdentifier).then(function (json) {\n // log.log('discover GUID by user identifier', json);\n\n var response = JSON.parse(json);\n var filteredGuid = response.results.filter(function (x) {\n return x.rethinkID != undefined;\n });\n\n if (filteredGuid.length === 0) {\n return reject('Unsuccessful discover GUID by user identifier');\n }\n\n var guids = filteredGuid.map(function (x) {\n return x.rethinkID;\n });\n\n return resolve(guids);\n }).catch(function (err) {\n // log.log(\"HTTP Request error: \", err);\n return reject(err);\n });\n });\n }\n }, {\n key: 'messageBus',\n get: function get() {\n return this._messageBus;\n }\n\n /**\n * Sets the MessageBus.\n * @param {MessageBus} messageBus The Message Bus.\n */\n ,\n set: function set(messageBus) {\n this._messageBus = messageBus;\n }\n }]);\n return CoreDiscovery;\n}();\n\nexports.default = CoreDiscovery;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9kaXNjb3ZlcnkvQ29yZURpc2NvdmVyeS5qcz8yMzdkIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuKiBDb3B5cmlnaHQgMjAxNiBQVCBJbm92YcOnw6NvIGUgU2lzdGVtYX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VkIEdVSURzXG4gICAgICBfdGhpcy5kaXNjb3ZlckdVSURQZXJVc2VySWRlbnRpZmllcih1c2VySWRlbnRpZmllcilcbiAgICAgICAgLnRoZW4oZnVuY3Rpb24oZ3VpZHMpIHtcblxuICAgICAgICAgIGxldCBoeXBlcnRpZXNQcm9taXNlcyA9IGd1aWRzLm1hcChmdW5jdGlvbihndWlkKSB7XG5cbiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbihyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgICAgICAgX3RoaXMuZGlzY292ZXJIeXBlcnRpZXNQZXJHVUlEKGd1aWQsIGRhdGFTY2hlbWVzLCByZXNvdXJjZXMpXG4gICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oaHlwZXJ0aWVzKSB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKGh5cGVydGllcyk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKFtdKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgUHJvbWlzZS5hbGwoaHlwZXJ0aWVzUHJvbWlzZXMpXG4gICAgICAgICAgICAudGhlbihmdW5jdGlvbihoeXBlcnRpZXNSZXN1bHQpIHtcblxuICAgICAgICAgICAgICBsZXQgaHlwZXJ0aWVzID0gW10uY29uY2F0LmFwcGx5KFtdLCBoeXBlcnRpZXNSZXN1bHQpO1xuXG4gICAgICAgICAgICAgIGlmIChoeXBlcnRpZXMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdCgnTm8gaHlwZXJ0aWVzIHdlcmUgZm91bmQnKTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHJlc29sdmUoaHlwZXJ0aWVzKTtc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0IGRhdGFPYmplY3RzUHJvbWlzZXMgPSBndWlkcy5tYXAoZnVuY3Rpb24oZ3VpZCkge1xuXG4gICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24ocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICAgIF90aGlzLmRpc2NvdmVyRGF0YU9iamVjdHNQZXJHVUlEKGd1aWQsIGRhdGFTY2hlbWVzLCByZXNvdXJjZXMpXG4gICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oZGF0YU9iamVjdHMpIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmUoZGF0YU9iamVjdHMpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmNhdGNoKGZ1bmN0aW9uKGVycikge1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZShbXSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIFByb21pc2UuYWxsKGRhdGFPYmplY3RzUHJvbWlzZXMpXG4gICAgICAgICAgICAudGhlbihmdW5jdGlvbihkYXRhT2JqZWN0c1Jlc3VsdCkge1xuXG4gICAgICAgICAgICAgIGxldCBkYXRhT2JqZWN0cyA9IFtdLmNvbmNhdC5hcHBseShbXSwgZGF0YU9iamVjdHNSZXN1bHQpO1xuXG4gICAgICAgICAgICAgIGlmIChkYXRhT2JqZWN0cy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVqZWN0KCdObyBkYXRhT2JqZWN0cyB3ZXJlIGZvdW5kJyk7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICByZXNvbHZlKGRhdGFPYmplY3RzKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHJlamVjdChlcnIpO1xuICAgICAgIC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qZWN0KSB7XG4gICAgICAgICAgICAgIF90aGlzLmRpc2NvdmVySHlwZXJ0aWVzKHVpZC51SUQsIGRhdGFTY2hlbWVzLCByZXNvdXJjZXMsIHVpZC5kb21haW4pXG4gICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oaHlwZXJ0aWVzKSB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKGh5cGVydGllcyk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKFtdKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgUHJvbWlzZS5hbGwoaHlwZXJ0aWVzUHJvbWlzZXMpXG4gICAgICAgICAgICAudGhlbihmdW5jdGlvbihoeXBlcnRpZXNSZXN1bHQpIHtcblxuICAgICAgICAgICAgICBsZXQgaHlwZXJ0aWVzID0gW10uY29uY2F0LmFwcGx5KFtdLCBoeXBlcnRpZXNSZXN1bHQpO1xuXG4gICAgICAgICAgICAgIGlmIChoeXBlcnRpZXMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdCgnTm8gaHlwZXJ0aWVzIHdlcmUgZm91bmQnKTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIC8vIGxvZy5sb2coJ0h5cGVydGllcyA6ICcsIGh5cGVydGllcyk7XG4gICAgICAgICAgICAgIHJlc29sdmUoaHlwZXJ0aWVzKTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaChmdW5jdGlvbihlcnIpIHtcbiAgICAgICAgICByZXR1cm4gcmVqZWN0KGVycik7XG4gICAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgLyoqXG4gICogQWR2YW5jZWQgU2VhcmNoIGZvciBEYXRhT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F0YVNjaGVtZXMsIHJlc291cmNlcywgdWlkLmRvbWFpbilcbiAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbihkYXRhT2JqZWN0cykge1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZShkYXRhT2JqZWN0cyk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKFtdKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgUHJvbWlzZS5hbGwoZGF0YU9iamVjdFByb21pc2VzKVxuICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oZGF0YU9iamVjdHNSZXN1bHQpIHtcblxuICAgICAgICAgICAgICBsZXQgZGF0YU9iamVjdHMgPSBbXS5jb25jYXQuYXBwbHkoW10sIGRhdGFPYmplY3RzUmVzdWx0KTtcblxuICAgICAgICAgICAgICBpZiAoZGF0YU9iamVjdHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdCgnTm8gZGF0YU9iamVjdHMgd2VyZSBmb3VuZCcpO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgLy8gbG9nLmxvZygnRGF0YU9iamVjdHMgOiAnLCBkYXRhT2JqZWN0cyk7XG4gICAgICAgICAgICAgIHJlc29sdmUoZGF0YU9iamVjdHMpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGZ1bmN0aW9uKGVycikge1xuICAgICAgICAgIHJldHVybiByZWplY3QoZXJyKTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICAvKiogQWR2YW5jZWQgU2VhcmNoIGZvciBIeXBlcnRpZXMgcmVnaXN0ZXJlZCBpbiBkb21haW4gcmVnaXN0cnkgYW5kIGFzc29jaWF0Z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0gZmluYWxIeXBlcnRpZXMubWFwKGZ1bmN0aW9uKGh5cGVydHkpIHtcbiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbihyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgICAgICAgX3RoaXMuZGlzY292ZXJEYXRhT2JqZWN0c1BlclJlcG9ydGVyKGh5cGVydHkuaHlwZXJ0eUlELCBkYXRhU2NoZW1lcywgcmVzb3VyY2VzLCBhY3RpdmVEb21haW4pXG4gICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oZGF0YU9iamVjdCkge1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZShkYXRhT2JqZWN0KTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5jYXRjaChmdW5jdGlvbihlcnIpIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmUoW10pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgICBQcm9taXNlLmFsbChkYXRhT2JqZWN0c1Byb21pc2VzKVxuICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24oZGF0YU9iamVjdHNSZXN1bHQpIHtcblxuICAgICAgICAgICAgICBsZXQgZGF0YU9iamVjdHMgPSBbXS5jb25jYXQuYXBwbHkoW10sIGRhdGFPYmplY3RzUmVzdWx0KTtcblxuICAgICAgICAgICAgICBkYXRhT2JqZWN0cy5mb3JFYWNoKGZ1bmN0aW9uKGRhdGFPYmplY3QpIHtcbiAgICAgICAgICAgICAgICBkYXRhT2JqZWN0c0FycmF5LnB1c2goZGF0YU9iamVjdCk7XG4gICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgIGxldCBmaW5hbERhdGFPYmplY3RzID0gW107XG4gICAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBkYXRhT2JqZWN0c0FycmF5KSBmaW5hbERhdGFPYmplY3RzLnB1c2goZGF0YU9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7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBRUE7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUF2bUJBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FBSUE7QUFDQTtBQUNBOzs7OztBQWdtQkE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///498\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _from = __webpack_require__(209);\n\nvar _from2 = _interopRequireDefault(_from);\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _typeof2 = __webpack_require__(98);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nvar _assign = __webpack_require__(96);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('DataObjectsStorage'); // Log System\n\nvar DataObjectsStorage = function () {\n function DataObjectsStorage(storageManager, storedDataObjects) {\n (0, _classCallCheck3.default)(this, DataObjectsStorage);\n\n if (!storageManager) throw new Error('[Store Data Objects] - Needs the storageManager component');\n\n this._storageManager = storageManager;\n this._storeDataObject = storedDataObjects;\n\n this._cache = {};\n }\n\n /**\n * @description should set the initial state of the dataObjectURL to be resumed if necessary;\n *\n * @param {DataObjectURL} url - dataObjectURL to be saved;\n * @param {Boolean} isReporter - the object to be saved is a reporter\n * @param {SchemaURL} schema - the schema url\n * @param {String} status - the status of current dataObject\n * @param {HypertyURL} reporter - the Reporter hypertyURL\n * @param {Array} subscription - list of subscriptions\n * @param {Array} children - list of childs of dataObjectURL\n * @param {Array} childrens - list of childrens, like, 'chatmessage';\n * @param {Array object with the dataObject information;\n */\n\n }, {\n key: 'getDataObject',\n value: function getDataObject(resource) {\n var _this2 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this2._storageManager.get('syncherManager:ObjectURLs').then(function (storedDataObject) {\n\n var observers = storedDataObject.hasOwnProperty('observers') ? storedDataObject.observers : {};\n var reporters = storedDataObject.hasOwnProperty('reporters') ? storedDataObject.reporters : {};\n\n var currentReporter = (0, _keys2.default)(reporters).find(function (value) {\n return value === resource;\n });\n var currentObserver = (0, _keys2.default)(observers).find(function (value) {\n return value === resource;\n });\n var dataObject = void 0;\n\n if (currentObserver) {\n dataObject = storedDataObject.observers[currentObserver];\n }\n if (currentReporter) {\n dataObject = storedDataObject.reporters[currentReporter];\n }\n\n log.info('[StoreDataObjects - getDataObject] - for observer: ', currentObserver);\n log.info('[StoreDataObjects - getDataObject] - for reporters: ', currentReporter);\n\n log.info('[StoreDataObjects - getDataObject] - resolve: ', dataObject);\n return dataObject ? resolve(dataObject) : reject('No dataObject was found');\n });\n });\n }\n\n /**\n * @description should get the dataObject information by the message\n *\n * @param {Object} msg - message would be analised to get the current dataObject information\n * @param {Boolean} isReporter - the object to be saved is a reporter\n *\n * @returns Promise should retun an object with the dataObject or null\n */\n\n }, {\n key: 'getResourcesByCriteria',\n value: function getResourcesByCriteria(msg, isReporter) {\n var _this3 = this;\n\n return new _promise2.default(function (resolve) {\n\n var type = _this3._getTypeOfObject(isReporter);\n\n _this3.getAll().then(function (storedDataObjects) {\n\n if (!storedDataObjects) {\n log.log('[DataObjectsStorage.getResourcesByCriteria] don\\'t have stored data objects');\n return resolve(null);\n }\n\n if (msg.body && msg.body.hasOwnProperty('resume') && !msg.body.resume) {\n return resolve(null);\n }\n\n // check if the message have other criteria\n // if not search for on the 'from' of the message.\n var result = [];\n var hasSubscription = _this3._hasSubscription(storedDataObjects[type], msg.from);\n var isOwner = _this3._searchOwner(storedDataObjects[type], msg.from);\n\n log.log('[StoredDataObjects - getResourcesByCriteria]:', storedDataObjects, msg, hasSubscription, isOwner);\n if (msg.hasOwnProperty('from') && hasSubscription || isOwner) {\n var resource = void 0;\n\n if (isOwner) {\n resource = _this3._getResourcesByOwner(storedDataObjects[type], msg.from);\n } else {\n resource = _this3._getResourcesBySubscription(storedDataObjects[type], msg.from);\n }\n\n var identityFoundData = [];\n if (msg.body && msg.body.identity) identityFoundData = _this3._getResourcesByIdentity(storedDataObjects[type], msg.body.identity);\n\n //TODO: remove schema since metadata already includes the schema?\n\n var schemaFoundData = [];\n if (msg.body && msg.body.schema) schemaFoundData = _this3._getResourcesBySchema(storedDataObjects[type], msg.body.schema);\n\n var metadataFound = [];\n if (msg.body && msg.body.value) {\n var metadata = msg.body.value;\n delete metadata.data;\n metadataFound = _this3._getResourcesByMetadata(storedDataObjects[type], metadata);\n }\n\n var dataFound = [];\n if (msg.body && msg.body.value && msg.body.value.data) dataFound = _this3._getResourcesByData(storedDataObjects[type], msg.body.value.data);\n\n // you can pass as arrays as you want.. it will be merged in on place\n // removed duplicates;\n result = _this3._intersection(resource, identityFoundData, schemaFoundData, dataFound, metadataFound);\n } else {\n return resolve(null);\n }\n\n var init = {};\n result.forEach(function (key) {\n var currentIsReporter = storedDataObjects[type][key];\n init[key] = currentIsReporter;\n return init;\n });\n\n log.log('[Store Data Objects] - ', init);\n\n resolve(init);\n });\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesByIdentity',\n value: function _getResourcesByIdentity(storedData, userURL) {\n if (!storedData) return [];\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n return storedData[objectURL].subscriberUsers.filter(function (current) {\n return current === userURL;\n }).length;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesByOwner',\n value: function _getResourcesByOwner(storedData, owner) {\n if (!storedData) return [];\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n return storedData[objectURL].reporter === owner;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesBySubscription',\n value: function _getResourcesBySubscription(storedData, subscription) {\n if (!storedData) return [];\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n return storedData[objectURL].subscriptions.filter(function (current) {\n return current === subscription;\n }).length;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesBySchema',\n value: function _getResourcesBySchema(storedData, schema) {\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n var currentObject = storedData[objectURL];\n return (0, _keys2.default)(currentObject).filter(function (key) {\n return key === 'schema' && currentObject[key] === schema;\n }).length;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesByMetadata',\n value: function _getResourcesByMetadata(storedData, metadata) {\n if (!metadata) return [];\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n var currentObject = storedData[objectURL];\n return (0, _keys2.default)(currentObject).filter(function (key) {\n // search on storeDataObjects for specific key provided from data;\n return (0, _keys2.default)(metadata).filter(function (searchFor) {\n return key === searchFor && currentObject[key] === metadata[searchFor];\n }).length;\n }).length;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getResourcesByData',\n value: function _getResourcesByData(storedData, data) {\n if (!data) return [];\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n var currentObject = storedData[objectURL].hasOwnProperty('data') ? storedData[objectURL].data : {};\n return (0, _keys2.default)(currentObject).filter(function (key) {\n // search on storeDataObjects for specific key provided from data;\n return (0, _keys2.default)(data).filter(function (searchFor) {\n return key === searchFor && currentObject[key] === data[searchFor];\n }).length;\n }).length;\n });\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_hasSubscription',\n value: function _hasSubscription(storedData, subscription) {\n if (!storedData) return false;\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n return storedData[objectURL].subscriptions.filter(function (current) {\n return current === subscription;\n }).length;\n }).length > 0 ? true : false;\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_searchOwner',\n value: function _searchOwner(storedData, from) {\n if (!storedData) return false;\n\n return (0, _keys2.default)(storedData).filter(function (objectURL) {\n return storedData[objectURL].reporter === from;\n }).length > 0 ? true : false;\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_isOwner',\n value: function _isOwner(value, url) {\n if (!value) return false;\n return value.reporter === url ? true : false;\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_intersection',\n value: function _intersection() {\n var args = (0, _from2.default)(arguments);\n\n var result = args.reduce(function (first, second) {\n return first.concat(second);\n }).filter(function (value, index, self) {\n return self.indexOf(value) === index;\n });\n log.log('DataObjectsStorage._intersection] Result an unique array of strings: ', result);\n return result;\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_updateToArray',\n value: function _updateToArray(storeDataObject, resource, key, value) {\n log.log('[DataObjectsStorage] - _updateToArray: ', storeDataObject, resource, key, value);\n if (storeDataObject[resource][key].indexOf(value) === -1) storeDataObject[resource][key].push(value);\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_removeFromArray',\n value: function _removeFromArray(storeDataObject, resource, key, value) {\n var indexOfValue = storeDataObject[resource][key].indexOf(value);\n if (indexOfValue === -1) storeDataObject[resource][key].splice(indexOfValue, 1);\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_hasValue',\n value: function _hasValue(obj, key, value) {\n return obj.hasOwnProperty(key) && obj[key] === value;\n }\n\n /**\n * @private\n * @todo documentation\n */\n\n }, {\n key: '_getTypeOfObject',\n value: function _getTypeOfObject(isReporter) {\n return isReporter ? 'reporters' : 'observers';\n }\n }]);\n return DataObjectsStorage;\n}();\n\nexports.default = DataObjectsStorage;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDk5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zdG9yZS1vYmplY3RzL0RhdGFPYmplY3RzU3RvcmFnZS5qcz9lOTU2Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIExvZyBTeXN0ZW1cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignRGF0YU9iamVjdHNTdG9yYWdlJyk7XG5cbmltcG9ydCB7IGFzc2lnbiwgZGVlcENsb25lIH0gZnJvbSAnLi4vdXRpbHMvdXRpbHMnO1xuXG5jbGFzcyBEYXRhT2JqZWN0c1N0b3JhZ2Uge1xuXG4gIGNvbnN0cnVjdG9yKHN0b3JhZ2VNYW5hZ2VyLCBzdG9yZWREYXRhT2JqZWN0cykge1xuICAgIGlmICghc3RvcmFnZU1hbmFnZXIpIHRocm93IG5ldyBFcnJvcignW1N0b3JlIERhdGEgT2JqZWN0c10gLSBOZWVkcyB0aGUgc3RvcmFnZU1hbmFnZXIgY29tcG9uZW50Jyk7XG5cbiAgICB0aGlzLl9zdG9yYWdlTWFuYWdlciA9IHN0b3JhZ2VNYW5hZ2VyO1xuICAgIHRoaXMuX3N0b3JlRGF0YU9iamVjdCA9IHN0b3JlZERhdGFPYmplY3RzO1xuXG4gICAgdGhpcy5fY2FjaGUgPSB7fTtcbiAgfVxuXG4gIC8qKlxuICAgKiBAZGVzY3JpcHRpb24gc2hvdWxkIHNldCB0aGUgaW5pdGlhbCBzdGF0ZSBvZi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__){eval("__webpack_require__(128);\n__webpack_require__(501);\nmodule.exports = __webpack_require__(13).Array.from;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9hcnJheS9mcm9tLmpzP2U3MzciXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYuc3RyaW5nLml0ZXJhdG9yJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNi5hcnJheS5mcm9tJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5BcnJheS5mcm9tO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL2FycmF5L2Zyb20uanNcbi8vIG1vZHVsZSBpZCA9IDUwMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///500\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar ctx = __webpack_require__(65);\nvar $export = __webpack_require__(21);\nvar toObject = __webpack_require__(76);\nvar call = __webpack_require__(192);\nvar isArrayIter = __webpack_require__(193);\nvar toLength = __webpack_require__(134);\nvar createProperty = __webpack_require__(502);\nvar getIterFn = __webpack_require__(194);\n\n$export($export.S + $export.F * !__webpack_require__(199)(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5hcnJheS5mcm9tLmpzP2FiMjIiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGN0eCA9IHJlcXVpcmUoJy4vX2N0eCcpO1xudmFyICRleHBvcnQgPSByZXF1aXJlKCcuL19leHBvcnQnKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4vX3RvLW9iamVjdCcpO1xudmFyIGNhbGwgPSByZXF1aXJlKCcuL19pdGVyLWNhbGwnKTtcbnZhciBpc0FycmF5SXRlciA9IHJlcXVpcmUoJy4vX2lzLWFycmF5LWl0ZXInKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4vX3RvLWxlbmd0aCcpO1xudmFyIGNyZWF0ZVByb3BlcnR5ID0gcmVxdWlyZSgnLi9fY3JlYXRlLXByb3BlcnR5Jyk7XG52YXIgZ2V0SXRlckZuID0gcmVxd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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///501\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $defineProperty = __webpack_require__(40);\nvar createDesc = __webpack_require__(73);\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19jcmVhdGUtcHJvcGVydHkuanM/N2MxNCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJGRlZmluZVByb3BlcnR5ID0gcmVxdWlyZSgnLi9fb2JqZWN0LWRwJyk7XG52YXIgY3JlYXRlRGVzYyA9IHJlcXVpcmUoJy4vX3Byb3BlcnR5LWRlc2MnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAob2JqZWN0LCBpbmRleCwgdmFsdWUpIHtcbiAgaWYgKGluZGV4IGluIG9iamVjdCkgJGRlZmluZVByb3BlcnR5LmYob2JqZWN0LCBpbmRleCwgY3JlYXRlRGVzYygwLCB2YWx1ZSkpO1xuICBlbHNlIG9iamVjdFtpbmRleF0gPSB2YWx1ZTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fY3JlYXRlLXByb3BlcnR5LmpzXG4vLyBtb2R1bGUgaWQgPSA1MDJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///502\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _PromiseQueue = __webpack_require__(504);\n\nvar _PromiseQueue2 = _interopRequireDefault(_PromiseQueue);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('HypertyResourcesStorage'); // Log System\n\nvar HypertyResourcesStorage = function () {\n function HypertyResourcesStorage(runtimeURL, bus, storageManager, hypertyResources) {\n (0, _classCallCheck3.default)(this, HypertyResourcesStorage);\n\n\n if (!storageManager) throw new Error('[HypertyResourcesStorage constructor] mandatory storageManager parameter missing');\n if (!runtimeURL) throw new Error('[HypertyResourcesStorage constructor] mandatory runtimeURL parameter missing');\n if (!bus) throw new Error('[HypertyResourcesStorage constructor] mandatory bus parameter missing');\n\n var _this = this;\n\n _this._bus = bus;\n\n _this._storageLimit = 0.9; // the save storageLimit;\n\n _this._url = runtimeURL + '/storage';\n\n _this._storageManager = storageManager;\n\n _this.promiseQueue = new _PromiseQueue2.default();\n\n _this._hypertyResources = hypertyResources;\n\n bus.addListener(_this._url, function (msg) {\n log.info('[HypertyResourcesStorage] Message RCV: ', msg);\n switch (msg.type) {\n case 'create':\n _this._onCreate(msg);break;\n case 'read':\n _this._onRead(msg);break;\n case 'delete':\n _this._onDelete(msg);break;\n }\n });\n }\n\n /**\n * check the available storage quota\n *\n * @memberof HypertyResourcesStorage\n */\n\n\n (0, _createClass3.default)(HypertyResourcesStorage, [{\n key: 'checkStorageQuota',\n value: function checkStorageQuota() {\n var _this2 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n if (_this2._availableQuota && _this2._usage) {\n return resolve((0, _utils.availableSpace)(_this2._usage, _this2._availableQuota));\n }\n\n if (navigator) {\n\n navigator.storage.estimate().then(function (estimate) {\n _this2._availableQuota = estimate.quota;\n _this2._usage = estimate.usage;\n resolve((0, _utils.availableSpace)(_this2._usage, _this2._availableQuota));\n }).catch(function (reason) {\n log.error('[HypertyResourcesStorage] CheckStorageQuota error: ', reason);\n reject(reason);\n });\n }\n });\n }\n\n /**\n * @description should save an HypertyResource contained in the body of a create message request;\n *\n * @param {string} message - message containing the hyperty resource to be stored\n */\n\n }, {\n key: '_onCreate',\n value: function _onCreate(message) {\n\n var _this = this;\n\n if (!message.body || !message.body.value) throw new Error('[HypertyResourcesStorage._onCreate] mandatory message body value missing: ', message);\n\n var content = message.body.value;\n var contentURL = content.contentURL;\n var resourceURL = '';\n\n if (!contentURL) {\n\n contentURL = [];\n resourceURL = _this._url + '/' + (0, _utils.generateGUID)();\n } else {\n var currentURL = contentURL[0];\n var resource = currentURL.substr(currentURL.lastIndexOf('/') + 1);\n resourceURL = _this._url + '/' + resource;\n }\n\n if (!_this._hypertyResources.hasOwnProperty(resourceURL)) {\n\n contentURL.push(resourceURL);\n content.contentURL = contentURL;\n }\n\n this._hypertyResources[resourceURL] = content;\n\n this.promiseQueue.add(this._toSave(resourceURL, message, content));\n }\n }, {\n key: '_toSave',\n value: function _toSave(resourceURL, message, content) {\n var _this3 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n var error = function error(reason) {\n var response = {\n from: message.to,\n to: message.from,\n id: message.id,\n type: 'response',\n body: { value: resourceURL, code: 500, description: reason }\n };\n\n _this3._bus.postMessage(response);\n\n return reject(reason);\n };\n\n _this3.checkStorageQuota().then(function (result) {\n\n if (content.size > result.quota) {\n var msg = 'The storage do not have space to store that resource';\n error(msg);\n throw Error(msg);\n }\n\n var spaceAvailable = result.quota;\n var allocated = result.usage + content.size;\n\n if (result.percent >= _this3._storageLimit || allocated > spaceAvailable) {\n return _this3._getOlderResources(content.size);\n } else {\n return true;\n }\n }).then(function () {\n return _this3._storageManager.set(resourceURL, 1, content);\n }).then(function () {\n\n var response = {\n from: message.to,\n to: message.from,\n id: message.id,\n type: 'response',\n body: { value: resourceURL, code: 200 }\n };\n\n _this3._bus.postMessage(response);\n\n log.log('Success');\n\n return resolve();\n }).catch(error);\n });\n }\n }, {\n key: '_getOlderResources',\n value: function _getOlderResources(size) {\n var _this4 = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this4._storageManager.get().then(function (result) {\n\n var resources = (0, _keys2.default)(result);\n\n var total = 0;\n var reduced = resources.sort(function (a, b) {\n return result[a].created < result[b].created;\n }).reduce(function (previousResource, currentResource) {\n var current = _this4._hypertyResources[currentResource];\n\n log.log('[HypertyResourcesStorage] _getOlderResources: ', total, size, currentResource, _this4._availableQuota);\n\n if (total <= size) {\n total += current.size;\n previousResource.push(currentResource);\n }\n\n return previousResource;\n }, []);\n\n var deleting = reduced.map(function (key) {\n return _this4._storageManager.delete(key);\n });\n\n _promise2.default.all(deleting).then(function () {\n resolve(true);\n }).catch(function (reason) {\n reject(reason);\n });\n });\n });\n }\n\n /**\n * @description should return an HypertyResource stored in the Storage Manager identified by the content url contained in the body of a read message request;\n *\n * @param {string} message - message containing the hyperty resource to be stored\n */\n\n }, {\n key: '_onRead',\n value: function _onRead(message) {\n\n var _this = this;\n\n if (!message.body || !message.body.resource) throw new Error('[HypertyResourcesStorage._onRead] mandatory message body resource missing: ', message);\n\n var contentUrl = message.body.resource;\n\n var response = {\n from: message.to,\n to: message.from,\n id: message.id,\n type: 'response',\n body: {}\n };\n\n // let content = _this._hypertyResources[contentUrl];\n\n log.info('[HypertyResourcesStorage._onRead] get resourceURL:', contentUrl);\n\n this._storageManager.get('resourceURL', contentUrl).then(function (content) {\n\n log.info('[HypertyResourcesStorage._onRead] found content:', content);\n\n if (content) {\n\n if (content.resourceType === 'file') {\n _this._onReadFile(response, content);\n } else {\n response.body.code = 200;\n response.body.p2p = true;\n response.body.value = content;\n _this._bus.postMessage(response);\n }\n } else {\n response.body.code = 404;\n response.body.desc = 'Content Not Found for ' + contentUrl;\n _this._bus.postMessage(response);\n }\n });\n\n //response.body.code = 404;\n\n //_this._hypertyResources[contentUrl] = message.body.value;\n\n }\n }, {\n key: '_onReadFile',\n value: function _onReadFile(response, resource) {\n var _this = this;\n\n var reader = new FileReader();\n\n reader.onload = function (theFile) {\n\n log.info('[FileHypertyResource.init] file loaded ', theFile);\n\n response.body.code = 200;\n response.body.p2p = true;\n response.body.value = (0, _utils.deepClone)(resource);\n response.body.value.content = theFile.target.result;\n _this._bus.postMessage(response);\n };\n\n if (resource.mimetype.includes('text/')) {\n reader.readAsText(resource.content);\n } else {\n var current = resource.content;\n\n var blob = void 0;\n if (Array.isArray(current)) {\n blob = new Blob(current, { type: resource.mimetype });\n } else {\n blob = new Blob([current], { type: resource.mimetype });\n }\n\n reader.readAsArrayBuffer(blob);\n }\n }\n\n /**\n * @description should delete an HypertyResource from the storage;\n *\n * @param {string} message - message containing the content URL of the hyperty resource to be deleted\n */\n\n }, {\n key: '_onDelete',\n value: function _onDelete(message) {\n\n var _this = this;\n\n if (!message.body) throw new Error('[HypertyResourcesStorage._onDelete] mandatory message body missing: ', message);\n\n if (message.body.resource) {\n delete _this._hypertyResources[message.body.resource];\n } else if (message.body.resources) {\n message.body.resources.forEach(function (resource) {\n delete _this._hypertyResources[resource];\n });\n } else {\n throw new Error('[HypertyResourcesStorage._onDelete] mandatory resource missing: ', message);\n }\n\n _this._storageManager.delete('resourceURL', message.body.resource).then(function () {\n var response = {\n from: message.to,\n to: message.from,\n id: message.id,\n type: 'response',\n body: { code: 200 }\n };\n\n _this._bus.postMessage(response);\n }).catch(function (reason) {\n var response = {\n from: message.to,\n to: message.from,\n id: message.id,\n type: 'response',\n body: { code: 400, description: reason }\n };\n\n _this._bus.postMessage(response);\n });\n }\n }]);\n return HypertyResourcesStorage;\n}();\n\nexports.default = HypertyResourcesStorage;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9oeXBlcnR5LXJlc291cmNlcy1zdG9yYWdlL0h5cGVydHlSZXNvdXJjZXNTdG9yYWdlLmpzP2Q0NjciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ2VyIGZyb20gJ2xvZ2xldmVsJztcbmxldCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdIeXBlcnR5UmVzb3VyY2VzU3RvcmFnZScpO1xuXG5pbXBvcnQgeyBnZW5lcmF0ZUdVSUQsIGRlZXBDbG9uZSwgYXZhaWxhYmxlU3BhY2UgfSBmcm9tICcuLi91dGlscy91dGlscyc7XG5cbmltcG9ydCBQcm9taXNlUXVldWUgZnJvbSAnLi4vdXRpbHMvUHJvbWlzZVF1ZXVlJztcblxuY2xhc3MgSHlwZXJ0eVJlc291cmNlc1N0b3JhZ2Uge1xuXG4gIGNvbnN0cnVjdG9yKHJ1bnRpbWVVUkwsIGJ1cywgc3RvcmFnZU1hbmFnZXIsIGh5cGVydHl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HIoY3VycmVudFVSTC5sYXN0SW5kZXhPZignLycpICsgMSk7XG4gICAgICByZXNvdXJjZVVSTCA9IF90aGlzLl91cmwgKyAnLycgKyByZXNvdXJjZTtcbiAgICB9XG5cbiAgICBpZiAoIV90aGlzLl9oeXBlcnR5UmVzb3VyY2VzLmhhc093blByb3BlcnR5KHJlc291cmNlVVJMKSkge1xuXG4gICAgICBjb250ZW50VVJMLnB1c2gocmVzb3VyY2VVUkwpO1xuICAgICAgY29udGVudC5jb250ZW50VVJMID0gY29udGVudFVSTDtcblxuICAgIH1cblxuICAgIHRoaXMuX2h5cGVydHlSZXNvdXJjZXNbcmVzb3VyY2VVUkxdID0gY29udGVudDtcblxuICAgIHRoaXMucHJvbWlzZVF1ZXVlLmFkZCh0aGlzLl90b1NhdmUocmVzb3VyY2VVUkwsIG1lc3NhZ2UsIGNvbnRlbnQpKTtcblxuICB9XG5cbiAgX3RvU2F2ZShyZXNvdXJjZVVSTCwgbWVzc2FnZSwgY29udGVudCkge1xuXG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcblxuICAgICAgY29uc3QgZXJyb3IgPSAocmVhc29uKSA9PiB7XG4gICAgICAgIGxldCByZXNwb25zZSA9IHtcbiAgICAgICAgICBmcm9tOiBtZXNzYWdlLnRvLFxuICAgICAgICAgIHRvOiBtZXNzYWdlLmZyb20sXG4gICAgICAgICAgaWQ6IG1lc3NhZ2UuaWQsXG4gICAgICAgICAgdHlwZTogJ3Jlc3BvbnNlJyxcbiAgICAgICAgICBib2R5OiB7IHZhbHVlOiByZXNvdXJjZVVSTCwgY29kZTogNTAwLCBkZXNjcmlwdGlvbjogcmVhc29uIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLl9idXMucG9zdE1lc3NhZ2UocmVzcG9uc2UpO1xuXG4gICAgICAgIHJldHVybiByZWplY3QocmVhc29uKTtcbiAgICAgIH07XG5cbiAgICAgIHRoaXMuY2hlY2tTdG9yY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50VXJsID0gbWVzc2FnZS5ib2R5LnJlc291cmNlO1xuXG4gICAgbGV0IHJlc3BvbnNlID0ge1xuICAgICAgZnJvbTogbWVzc2FnZS50byxcbiAgICAgIHRvOiBtZXNzYWdlLmZyb20sXG4gICAgICBpZDogbWVzc2FnZS5pZCxcbiAgICAgIHR5cGU6ICdyZXNwb25zZScsXG4gICAgICBib2R5OiB7fVxuICAgIH07XG5cbiAgICAvLyBsZXQgY29udGVudCA9IF90aGlzLl9oeXBlcnR5UmVzb3VyY2VzW2NvbnRlbnRVcmxdO1xuXG4gICAgbG9nLmluZm8oJ1tIeXBlcnR5UmVzb3VyY2VzU3RvcmFnZS5fb25SZWFkXSBnZXQgcmVzb3VyY2VVUkw6JywgY29udGVudFVybCk7XG5cbiAgICB0aGlzLl9zdG9yYWdlTWFuYWdlci5nZXQoJ3Jlc291cmNlVVJMJywgY29udGVudFVybCkudGhlbigoY29udGVudCkgPT4ge1xuXG4gICAgICBsb2cuaW5mbygnW0h5cGVydHlSZXNvdXJjZXNTdG9yYWdlLl9vblJlYWRdIGZvdW5kIGNvbnRlbnQ6JywgY29udGVudCk7XG5cbiAgICAgIGlmIChjb250ZW50KSB7XG5cbiAgICAgICAgaWYgKGNvbnRlbnQucmVzb3VyY2VUeXBlID09PSAnZmlsZScpIHtcbiAgICAgICAgICBfdGhpcy5fb25SZWFkRmlsZShyZXNwb25zZSwgY29udGVudCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmVzcG9uc2UuYm9keS5jb2RlID0gMjAwO1xuICAgICAgICAgIHJlc3BvbnNlLmJvZHkucDJwID0gdHJ1ZTtcbiAgICAgICAgICByZXNwb25zZS5ib2R5LnZhbHVlID0gY29udGVudDtcbiAgICAgICAgICBfdGhpcy5fYnVzLnBvc3RNZXNzYWdlKHJlc3BvbnNlKTtcbiAgICAgICAgfVxuXG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXNwb25zZS5ib2R5LmNvZGUgPSA0MDQ7XG4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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7Ozs7QUFNQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBTEE7QUFDQTtBQU9BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFMQTtBQUNBO0FBT0E7QUFDQTtBQUVBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///503\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _toConsumableArray2 = __webpack_require__(505);\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PromiseQueue = function () {\n\n // TODO: Improve this Queuing\n function PromiseQueue(concurrency) {\n (0, _classCallCheck3.default)(this, PromiseQueue);\n\n this.flushing = false;\n this.Promise = _promise2.default;\n this.concurrency = typeof concurrency !== 'number' ? 1 : concurrency;\n this.promises = [];\n this.queue = [];\n this.isProcessing = false;\n }\n\n (0, _createClass3.default)(PromiseQueue, [{\n key: 'done',\n value: function done(cb) {\n this.callback = cb;\n }\n }, {\n key: 'add',\n value: function add(promise) {\n var _this = this;\n\n this.queue.push(promise);\n\n if (!this.isProcessing) {\n return this.queue.reduce(function (promiseChain, currentTask) {\n return promiseChain.then(function (chainResults) {\n return currentTask.then(function (currentResult) {\n return [].concat((0, _toConsumableArray3.default)(chainResults), [currentResult]);\n });\n });\n }, _promise2.default.resolve([])).then(function (arrayOfResults) {\n // Do something with all results\n _this.isProcessing = false;\n });\n }\n }\n }]);\n return PromiseQueue;\n}();\n\nexports.default = PromiseQueue;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy91dGlscy9Qcm9taXNlUXVldWUuanM/MDViZCJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBQcm9taXNlUXVldWUge1xuXG4gIC8vIFRPRE86IEltcHJvdmUgdGhpcyBRdWV1aW5nXG4gIGNvbnN0cnVjdG9yKGNvbmN1cnJlbmN5KSB7XG4gICAgdGhpcy5mbHVzaGluZyA9IGZhbHNlO1xuICAgIHRoaXMuUHJvbWlzZSA9IFByb21pc2U7XG4gICAgdGhpcy5jb25jdXJyZW5jeSA9ICh0eXBlb2YgY29uY3VycmVuY3kgIT09ICdudW1iZXInKSA/IDEgOiBjb25jdXJyZW5jeTtcbiAgICB0aGlzLnByb21pc2VzID0gW107XG4gICAgdGhpcy5xdWV1ZSA9IFtdO1xuICAgIHRoaXMuaXNQcm9jZXNzaW5nID0gZmFsc2U7XG4gIH1cblxuICBkb25lKGNiKSB7XG4gICAgdGhpcy5jYWxsYmFjayA9IGNiO1xuICB9XG5cbiAgYWRkKHByb21pc2UpIHtcbiAgICB0aGlzLnF1ZXVlLnB1c2gocHJvbWlzZSk7XG5cbiAgICBpZiAoIXRoaXMuaXNQcm9jZXNzaW5nKSB7XG4gICAgICByZXR1cm4gdGhpcy5xdWV1ZS5yZWR1Y2UoKHByb21pc2VDaGFpbiwgY3VycmVudFRhc2spID0+IHtcbiAgICAgICAgcmV0dXJuIHByb21pc2VDaGFpbi50aGVuKGNoYWluUmVzdWx0cyA9PiBjdXJyZW50VGFzay50aGVuKGN1cnJlbnRSZXN1bHQgPT4gWy4uLmNoYWluUmVzdWx0cywgY3VycmVudFJlc3VsdF0pKTtcbiAgICAgIH0sIFByb21pc2UucmVzb2x2ZShbXSkpLnRoZW4oYXJyYXlPZlJlc3VsdHMgPT4ge1xuICAgICAgICAvLyBEbyBzb21ldGhpbmcgd2l0aCBhbGwgcmVzdWx0c1xuICAgICAgICB0aGlzLmlzUHJvY2Vzc2luZyA9IGZhbHNlO1xuICAgICAgfSk7XG5cbiAgICB9XG4gIH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCBQcm9taXNlUXVldWU7XG5cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvdXRpbHMvUHJvbWlzZVF1ZXVlLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTs7Ozs7QUFJQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///504\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nexports.__esModule = true;\n\nvar _from = __webpack_require__(209);\n\nvar _from2 = _interopRequireDefault(_from);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return (0, _from2.default)(arr);\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvaGVscGVycy90b0NvbnN1bWFibGVBcnJheS5qcz8xYWVlIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5leHBvcnRzLl9fZXNNb2R1bGUgPSB0cnVlO1xuXG52YXIgX2Zyb20gPSByZXF1aXJlKFwiLi4vY29yZS1qcy9hcnJheS9mcm9tXCIpO1xuXG52YXIgX2Zyb20yID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfZnJvbSk7XG5cbmZ1bmN0aW9uIF9pbnRlcm9wUmVxdWlyZURlZmF1bHQob2JqKSB7IHJldHVybiBvYmogJiYgb2JqLl9fZXNNb2R1bGUgPyBvYmogOiB7IGRlZmF1bHQ6IG9iaiB9OyB9XG5cbmV4cG9ydHMuZGVmYXVsdCA9IGZ1bmN0aW9uIChhcnIpIHtcbiAgaWYgKEFycmF5LmlzQXJyYXkoYXJyKSkge1xuICAgIGZvciAodmFyIGkgPSAwLCBhcnIyID0gQXJyYXkoYXJyLmxlbmd0aCk7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcbiAgICAgIGFycjJbaV0gPSBhcnJbaV07XG4gICAgfVxuXG4gICAgcmV0dXJuIGFycjI7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuICgwLCBfZnJvbTIuZGVmYXVsdCkoYXJyKTtcbiAgfVxufTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2hlbHBlcnMvdG9Db25zdW1hYmxlQXJyYXkuanNcbi8vIG1vZHVsZSBpZCA9IDUwNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///505\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _values = __webpack_require__(210);\n\nvar _values2 = _interopRequireDefault(_values);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _schemaValidation = __webpack_require__(510);\n\nvar _AddressAllocation = __webpack_require__(99);\n\nvar _AddressAllocation2 = _interopRequireDefault(_AddressAllocation);\n\nvar _ReporterObject = __webpack_require__(515);\n\nvar _ReporterObject2 = _interopRequireDefault(_ReporterObject);\n\nvar _ObserverObject = __webpack_require__(516);\n\nvar _ObserverObject2 = _interopRequireDefault(_ObserverObject);\n\nvar _CryptoManager = __webpack_require__(100);\n\nvar cryptoManager = _interopRequireWildcard(_CryptoManager);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('SyncherManager'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log System\n\n/**\n * @author micaelpedrosa@gmail.com\n * Core Syncronization system.\n */\nvar SyncherManager = function () {\n /* private\n _url: URL\n _bus: MiniBus\n _registry: Registry\n _allocator: AddressAllocation\n _reporters: { ObjectURL: ReporterObject }\n _observers: { ObjectURL: ObserverObject }\n */\n\n function SyncherManager(runtimeURL, bus, registry, catalog, storageManager, allocator, storeDataObjects, identityModule) {\n (0, _classCallCheck3.default)(this, SyncherManager);\n\n if (!runtimeURL) throw new Error('[Syncher Manager] - needs the runtimeURL parameter');\n if (!bus) throw new Error('[Syncher Manager] - needs the MessageBus instance');\n if (!registry) throw new Error('[Syncher Manager] - needs the Registry instance');\n if (!catalog) throw new Error('[Syncher Manager] - needs the RuntimeCatalogue instance');\n if (!storageManager) throw new Error('[Syncher Manager] - need the storageManager instance');\n\n var _this = this;\n\n _this._bus = bus;\n _this._registry = registry;\n _this._catalog = catalog;\n _this._storageManager = storageManager;\n _this._identityModule = identityModule;\n\n //TODO: these should be saved in persistence engine?\n _this.runtimeURL = runtimeURL;\n _this._url = runtimeURL + '/sm';\n _this._objectURL = runtimeURL + '/object-allocation';\n\n _this._reporters = {};\n _this._observers = {};\n\n _this._dataObjectsStorage = storeDataObjects;\n\n //TODO: this should not be hardcoded!\n _this._domain = (0, _utils.divideURL)(runtimeURL).domain;\n\n if (allocator) {\n _this._allocator = allocator;\n } else {\n _this._allocator = _AddressAllocation2.default.instance;\n }\n\n log.log('[SyncherManager - AddressAllocation] - ', _this._allocator);\n\n bus.addListener(_this._url, function (msg) {\n log.info('[SyncherManager] RCV: ', msg);\n switch (msg.type) {\n case 'create':\n _this._onCreate(msg);break;\n case 'delete':\n _this._onDelete(msg);break;\n case 'subscribe':\n _this._onLocalSubscribe(msg);break;\n case 'unsubscribe':\n _this._onLocalUnSubscribe(msg);break;\n }\n });\n }\n\n (0, _createClass3.default)(SyncherManager, [{\n key: '_onCreate',\n\n\n //FLOW-IN: message received from Syncher -> create\n value: function _onCreate(msg) {\n var _this2 = this;\n\n var from = msg.from;\n var to = msg.to;\n\n // check if message is to save new childrenObjects in the local storage\n // TODO: check if message is to store new child in the local storage and call storeChild. How to distinguish from others?\n\n if (msg.body.attribute) {\n this._storeChildrens(msg);\n } else {\n\n if (!msg.body.hasOwnProperty('resume') || msg.body.hasOwnProperty('resume') && !msg.body.resume) {\n\n // check if this is an invitation message\n if (msg.body.authorise) {\n this._authorise(msg);\n log.info('[SyncherManager.onCreate - invite observers]', msg);\n } else {\n // this is to create a new data object\n log.info('[SyncherManager.onCreate - Create New Object]', msg);\n this._newCreate(msg);\n }\n } else {\n\n // If from the hyperty side, call the resumeReporter we will have resume = true'\n // so we will create an resumed object and will try to resume the object previously saved;\n this._dataObjectsStorage.getResourcesByCriteria(msg, true).then(function (result) {\n\n log.info('[SyncherManager - Create Resumed] - ResourcesByCriteria | Message: ', msg, ' result: ', result);\n\n if (result && (0, _keys2.default)(result).length > 0) {\n\n var listOfReporters = [];\n\n (0, _keys2.default)(result).forEach(function (objURL) {\n listOfReporters.push(_this2._resumeCreate(msg, result[objURL]));\n });\n\n _promise2.default.all(listOfReporters).then(function (resumedReporters) {\n log.log('[SyncherManager - Create Resumed]', resumedReporters);\n\n // TODO: shoud send the information if some object was fail;\n var successfullyResumed = (0, _values2.default)(resumedReporters).filter(function (reporter) {\n return reporter !== false;\n });\n\n log.info('[SyncherManager.onCreate] returning resumed objects : ', successfullyResumed);\n\n //FLOW-OUT: message response to Syncher -> create resume\n _this2._bus.postMessage({\n id: msg.id, type: 'response', from: to, to: from,\n body: { code: 200, value: successfullyResumed }\n });\n });\n } else {\n //forward to hyperty:\n var reply = {};\n reply.id = msg.id;\n reply.from = msg.to;\n reply.to = msg.from;\n reply.type = 'response';\n reply.body = {\n code: 404,\n desc: 'No data objects reporters to be resumed'\n };\n _this2._bus.postMessage(reply);\n }\n });\n }\n }\n }\n }, {\n key: '_storeChildrens',\n value: function _storeChildrens(msg) {\n var _this = this;\n\n var resource = msg.body.resource;\n var attribute = msg.body.attribute;\n\n if (attribute === 'childrenObjects') {\n _this._dataObjectsStorage.saveChildrens(false, resource, undefined, msg.body.value);\n } else {\n _this._dataObjectsStorage.saveChildrens(true, resource, attribute, msg.body.value);\n }\n }\n }, {\n key: '_newCreate',\n value: function _newCreate(msg) {\n var _this3 = this;\n\n var _this = this;\n\n var owner = msg.from;\n var domain = (0, _utils.divideURL)(msg.from).domain;\n\n // if reporter is in a Interworking Protostub the runtime domain backend services will be used\n if (_this._registry.isInterworkingProtoStub(msg.from)) {\n domain = (0, _utils.divideURL)(_this.runtimeURL).domain;\n }\n\n // Process invitation message to observers\n\n /*if (msg.body.authorise) {\n _this._authorise(msg);\n return;\n }*/\n\n //get schema from catalogue and parse -> (scheme, children)\n _this._catalog.getDataSchemaDescriptor(msg.body.schema).then(function (descriptor) {\n\n var properties = descriptor.sourcePackage.sourceCode.properties;\n var scheme = properties.scheme ? properties.scheme.constant : 'resource';\n var childrens = properties.children ? properties.children.constant : [];\n\n // Do schema validation\n // TODO: check if is need to handle with the result of validation\n (0, _schemaValidation.schemaValidation)(scheme, descriptor, msg.body.value);\n\n var objectInfo = {\n name: msg.body.value.name,\n schema: msg.body.value.schema,\n reporter: msg.body.value.reporter,\n resources: msg.body.value.resources\n };\n\n // should resuse data object url if it passed\n var reuseDataObject = msg.body.value.resource;\n var numOfAddress = 1;\n\n //request address allocation of a new object from the msg-node\n _this._allocator.create(domain, numOfAddress, objectInfo, scheme, reuseDataObject).then(function (allocated) {\n var objectRegistration = (0, _utils.deepClone)(msg.body.value);\n objectRegistration.url = allocated.address[0];\n objectRegistration.authorise = msg.body.authorise;\n objectRegistration.childrens = childrens;\n\n //objectRegistration.expires = 30;//TODO: get it from data object configuration description when present\n\n delete objectRegistration.data;\n\n log.log('[SyncherManager._newCreate] ALLOCATOR CREATE:', allocated);\n\n var subscriptionURL = objectRegistration.url + '/subscription';\n\n log.log('[SyncherManager._newCreate] Subscription URL', subscriptionURL);\n\n //To register the dataObject in the runtimeRegistry\n log.info('[SyncherManager._newCreate] Register Object: ', objectRegistration);\n\n //_this._registry.registerDataObject(msg.body.value.name, msg.body.value.schema, objURL, msg.body.value.reporter, msg.body.value.resources, allocated, msg.body.authorise).then((resolve) => {\n _this._registry.registerDataObject(objectRegistration).then(function (registeredObject) {\n log.log('[SyncherManager._newCreate] DataObject successfully registered', registeredObject);\n\n //all OK -> create reporter and register listeners\n var reporter = void 0;\n\n if (!_this3._reporters[objectRegistration.url]) {\n reporter = new _ReporterObject2.default(_this, owner, objectRegistration.url);\n } else {\n reporter = _this3._reporters[objectRegistration.url];\n }\n\n log.log('[SyncherManager - new Create] - ', msg);\n\n // Store for each reporter hyperty the dataObject\n var userURL = void 0;\n var interworking = false;\n\n if (msg.body.hasOwnProperty('identity') && msg.body.identity.userProfile && msg.body.identity.userProfile.userURL) {\n userURL = msg.body.identity.userProfile.userURL;\n if (!userURL.includes('user://')) {\n interworking = true;\n }\n } else {\n userURL = _this._registry.getHypertyOwner(msg.from);\n if (!userURL) interworking = true;\n }\n\n // should we use the msg.body.value instead?\n\n var metadata = (0, _utils.deepClone)(objectRegistration);\n metadata.subscriberUser = userURL;\n metadata.isReporter = true;\n\n // Store the dataObject information\n\n if (!interworking) {\n _this._dataObjectsStorage.set(metadata);\n\n if (msg.body.hasOwnProperty('store') && msg.body.store) {\n reporter.isToSaveData = true;\n _this._dataObjectsStorage.update(true, objectRegistration.url, 'isToSaveData', true);\n\n if (msg.body.value.data) {\n _this._dataObjectsStorage.saveData(true, objectRegistration.url, null, msg.body.value.data);\n }\n }\n }\n\n // adding listeners to forward to reporter\n\n reporter.forwardSubscribe([objectRegistration.url, subscriptionURL]).then(function () {\n reporter.addChildrens(childrens).then(function () {\n _this._reporters[objectRegistration.url] = reporter;\n\n var responseMsg = {\n id: msg.id, type: 'response', from: msg.to, to: owner,\n body: { code: 200, resource: objectRegistration.url, childrenResources: childrens }\n };\n\n //FLOW-OUT: message response to Syncher -> create\n _this._bus.postMessage(responseMsg);\n });\n });\n }, function (error) {\n log.error(error);\n });\n });\n }).catch(function (reason) {\n //FLOW-OUT: error message response to Syncher -> create\n var responseMsg = {\n id: msg.id, type: 'response', from: msg.to, to: owner,\n body: { code: 500, desc: reason }\n };\n\n _this._bus.postMessage(responseMsg);\n });\n }\n }, {\n key: '_resumeCreate',\n value: function _resumeCreate(msg, storedObject) {\n var _this4 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n\n var owner = msg.from;\n var schema = storedObject.schema;\n var resource = storedObject.url;\n var initialData = storedObject.data;\n\n log.log('[SyncherManager] - resume create', msg, storedObject);\n\n //get schema from catalogue and parse -> (scheme, children)\n _this._catalog.getDataSchemaDescriptor(schema).then(function (descriptor) {\n\n var properties = descriptor.sourcePackage.sourceCode.properties;\n var scheme = properties.scheme ? properties.scheme.constant : 'resource';\n var childrens = properties.children ? properties.children.constant : [];\n\n log.log('[SyncherManager] - getDataSchemaDescriptor: ', descriptor, childrens);\n\n // Do schema validation\n // TODO: check if is need to handle with the result of validation\n (0, _schemaValidation.schemaValidation)(scheme, descriptor, initialData);\n\n var objectRegistration = (0, _utils.deepClone)(msg.body.value);\n objectRegistration.url = storedObject.url;\n objectRegistration.expires = storedObject.expires;\n\n delete objectRegistration.data;\n\n //all OK -> create reporter and register listeners\n var reporter = void 0;\n\n if (!_this4._reporters[resource]) {\n reporter = new _ReporterObject2.default(_this, owner, resource);\n } else {\n reporter = _this4._reporters[resource];\n }\n\n reporter.isToSaveData = storedObject.isToSaveData;\n\n reporter.forwardSubscribe([storedObject.url]).then(function () {\n reporter.addChildrens(childrens).then(function () {\n\n reporter.resumeSubscriptions(storedObject.subscriptions);\n\n _this._reporters[resource] = reporter;\n\n log.info('[SyncherManager - resume create] - resolved resumed: ', storedObject);\n\n return _this._decryptChildrens(storedObject, childrens);\n }).then(function (decryptedObject) {\n\n // log.log('result of previous promise');\n resolve(decryptedObject);\n }).catch(function (reason) {\n log.error('[SyncherManager - resume create] - fail on addChildrens: ', reason);\n resolve(false);\n });\n });\n log.info('[SyncherManager._resumeCreate] Register Object: ', objectRegistration);\n _this._registry.registerDataObject(objectRegistration).then(function (resolve) {\n log.log('[SyncherManager._resumeCreate] DataObject registration successfully updated', resolve);\n });\n\n // resolve();\n }).catch(function (reason) {\n log.error('[SyncherManager - resume create] - fail on getDataSchemaDescriptor: ', reason);\n resolve(false);\n });\n });\n }\n\n // to decrypt DataChildObjects if they are encrypted\n\n }, {\n key: '_decryptChildrens',\n value: function _decryptChildrens(storedObject, childrens) {\n var _this = this;\n return new _promise2.default(function (resolve) {\n\n if (!childrens) {\n resolve(storedObject);\n } else {\n var childrensObj = (0, _keys2.default)(storedObject.childrenObjects);\n\n if (childrensObj.length === 0) {\n resolve(storedObject);\n }\n\n childrens.forEach(function (children) {\n\n var childObjects = storedObject.childrenObjects[children];\n\n log.log('[SyncherManager._decryptChildrens] dataObjectChilds to decrypt ', childObjects);\n\n var listOfDecryptedObjects = [];\n\n (0, _keys2.default)(childObjects).forEach(function (childId) {\n var child = childObjects[childId];\n var owner = childId.split('#')[0];\n\n if (typeof child.value === 'string') {\n\n log.log('[SyncherManager._decryptChildrens] createdBy ', owner, ' object: ', child.value);\n\n var decrypted = cryptoManager.default.decryptDataObject(JSON.parse(child.value), storedObject.url);\n\n listOfDecryptedObjects.push(decrypted);\n }\n });\n\n _promise2.default.all(listOfDecryptedObjects).then(function (decryptedObjects) {\n\n log.log('[SyncherManager._decryptChildrens] returning decrypted ', decryptedObjects);\n\n decryptedObjects.forEach(function (decryptedObject) {\n var childId = decryptedObject.value.url;\n storedObject.childrenObjects[children][childId].value = decryptedObject.value;\n });\n\n log.log('[SyncherManager._decryptChildrens] storedObject ', storedObject);\n\n resolve(storedObject);\n }).catch(function (reason) {\n log.warn('[SyncherManager._decryptChildrens] failed : ', reason);\n });\n });\n }\n });\n }\n\n // Process invitations to observers\n\n }, {\n key: '_authorise',\n value: function _authorise(msg) {\n var _this = this;\n\n if (!msg.body.resource) {\n throw new Error('[SyncherManager._authorise] invitation request without data object url:', msg);\n }\n\n var objSubscriptorURL = msg.body.resource + '/subscription';\n var p2p = msg.body.p2p ? msg.body.p2p : false;\n\n log.log('[SyncherManager - authorise] - ', msg);\n\n if (msg.body.authorise) {\n msg.body.authorise.forEach(function (hypertyURL) {\n //FLOW-OUT: send invites to list of remote Syncher -> _onRemoteCreate -> onNotification\n\n _this._bus.postMessage({\n type: 'create', from: objSubscriptorURL, to: hypertyURL,\n body: { p2p: p2p, identity: msg.body.identity, source: msg.from, value: msg.body.value, schema: msg.body.schema }\n }, function (reply) {\n // lets forward the invitation response\n var response = {\n from: msg.to,\n to: msg.from,\n id: msg.id,\n type: reply.type,\n body: reply.body\n };\n\n _this._bus.postMessage(response);\n });\n });\n }\n }\n\n //FLOW-IN: message received from DataObjectReporter -> delete\n\n }, {\n key: '_onDelete',\n value: function _onDelete(msg) {\n var _this = this;\n\n var objURL = msg.body.resource;\n\n var object = _this._reporters[objURL];\n if (object) {\n //TODO: is there any policy verification before delete?\n\n object.delete();\n\n this._dataObjectsStorage.deleteResource(objURL).then(function (result) {\n\n log.log('[SyncherManager - onDelete] - deleteResource: ', result);\n\n _this._registry.unregisterDataObject(objURL);\n\n //TODO: unregister object?\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 200 }\n });\n });\n }\n }\n\n //FLOW-IN: message received from local Syncher -> subscribe\n\n }, {\n key: '_onLocalSubscribe',\n value: function _onLocalSubscribe(msg) {\n var _this5 = this;\n\n this._dataObjectsStorage.getResourcesByCriteria(msg, false).then(function (result) {\n\n log.info('[SyncherManager - Subscribe] - ResourcesByCriteria | Message: ', msg, ' result: ', result);\n\n if (result && (0, _keys2.default)(result).length > 0) {\n\n var listOfObservers = [];\n\n // TODO: should reuse the storaged information\n (0, _keys2.default)(result).forEach(function (objURL) {\n log.log('[SyncherManager - resume Subscribe] - reuse current object url: ', result[objURL]);\n listOfObservers.push(_this5._resumeSubscription(msg, result[objURL]));\n });\n\n _promise2.default.all(listOfObservers).then(function (resumedObservers) {\n log.log('[SyncherManager - Observers Resumed]', resumedObservers);\n\n // TODO: shoud send the information if some object was fail;\n var successfullyResumed = (0, _values2.default)(resumedObservers).filter(function (observer) {\n return observer !== false;\n });\n\n //FLOW-OUT: message response to Syncher -> create\n _this5._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 200, value: successfullyResumed }\n });\n });\n } else if (msg.body.schema && msg.body.resource) {\n log.log('[SyncherManager.onLocalSubscribe - new Subscribe] - ', msg.body.schema, msg.body.resource);\n _this5._newSubscription(msg);\n } else {\n //forward to hyperty:\n var reply = {};\n reply.id = msg.id;\n reply.from = msg.to;\n reply.to = msg.from;\n reply.type = 'response';\n reply.body = {\n code: 404,\n desc: 'No data objects observers to be resumed'\n };\n _this5._bus.postMessage(reply);\n }\n });\n }\n }, {\n key: '_newSubscription',\n value: function _newSubscription(msg) {\n var _this6 = this;\n\n var _this = this;\n\n var objURL = msg.body.resource;\n\n var hypertyURL = msg.from;\n var domain = (0, _utils.divideURL)(objURL).domain;\n var objURLSubscription = objURL + '/subscription';\n\n var childBaseURL = objURL + '/children/';\n\n //get schema from catalogue and parse -> (children)\n _this._catalog.getDataSchemaDescriptor(msg.body.schema).then(function (descriptor) {\n var properties = descriptor.sourcePackage.sourceCode.properties;\n var childrens = properties.children ? properties.children.constant : [];\n\n var subscriptions = [];\n subscriptions.push(objURL + '/changes');\n\n childrens.forEach(function (child) {\n return subscriptions.push(childBaseURL + child);\n });\n\n //children addresses\n\n //FLOW-OUT: subscribe message to the msg-node, registering listeners on the broker\n var nodeSubscribeMsg = {\n type: 'subscribe', from: _this._url, to: 'domain://msg-node.' + domain + '/sm',\n body: { identity: msg.body.identity, resources: subscriptions, source: hypertyURL }\n };\n\n //subscribe in msg-node\n _this._bus.postMessage(nodeSubscribeMsg, function (reply) {\n log.log('node-subscribe-response(observer): ', reply);\n if (reply.body.code === 200) {\n\n //FLOW-OUT: reply with provisional response\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: hypertyURL,\n body: { code: 100, childrenResources: childrens, schema: msg.body.schema, resource: msg.body.resource }\n });\n\n //FLOW-OUT: subscribe message to remote ReporterObject -> _onRemoteSubscribe\n var objSubscribeMsg = {\n type: 'subscribe', from: _this._url, to: objURLSubscription,\n body: { identity: nodeSubscribeMsg.body.identity, subscriber: hypertyURL }\n };\n\n //TODO: For Further Study\n if (msg.body.hasOwnProperty('mutual')) objSubscribeMsg.body.mutual = msg.body.mutual;\n log.log('[SyncherManager._newSubscription]', objSubscribeMsg, msg);\n\n //subscribe to reporter SM\n _this._bus.postMessage(objSubscribeMsg, function (reply) {\n log.log('reporter-subscribe-response-new: ', reply);\n if (reply.body.code === 200) {\n\n log.log('[SyncherManager._newSubscription] - observers: ', _this._observers, objURL, _this._observers[objURL]);\n\n var observer = _this._observers[objURL];\n if (!observer) {\n observer = new _ObserverObject2.default(_this, objURL, childrens);\n log.log('[SyncherManager._newSubscription] - observers: create new ObserverObject: ', observer);\n _this._observers[objURL] = observer;\n\n // register new hyperty subscription\n observer.addSubscription(hypertyURL);\n\n // add childrens and listeners to save data if necessary\n observer.addChildrens(childrens);\n }\n\n var interworking = false;\n\n // Store for each reporter hyperty the dataObject\n var userURL = void 0;\n if (msg.body.hasOwnProperty('identity') && msg.body.identity.userProfile && msg.body.identity.userProfile.userURL) {\n userURL = msg.body.identity.userProfile.userURL;\n if (!userURL.includes('user://')) {\n interworking = true;\n }\n } else {\n userURL = _this._registry.getHypertyOwner(msg.from);\n if (!userURL) interworking = true;\n }\n\n var metadata = (0, _utils.deepClone)(reply.body.value);\n\n // let childrenObjects = metadata.childrenObjects || {};\n\n delete metadata.data;\n delete metadata.childrenObjects;\n\n metadata.childrens = childrens;\n metadata.subscriberUser = userURL;\n metadata.isReporter = false;\n metadata.subscriberHyperty = hypertyURL;\n\n if (!interworking) {\n //_this._dataObjectsStorage.set(objURL, false, msg.body.schema, 'on', reply.body.owner, hypertyURL, childrens, userURL);\n _this._dataObjectsStorage.set(metadata);\n if (metadata.hasOwnProperty('store') && metadata.store || metadata.hasOwnProperty('isToSaveData') && metadata.isToSaveData) {\n observer.isToSaveData = true;\n _this._dataObjectsStorage.update(false, objURL, 'isToSaveData', true);\n _this._dataObjectsStorage.saveData(false, objURL, null, reply.body.value.data);\n }\n }\n\n //forward to hyperty:\n reply.id = msg.id;\n reply.from = _this._url;\n reply.to = hypertyURL;\n reply.body.schema = msg.body.schema;\n reply.body.resource = msg.body.resource;\n\n //TODO: For Further Study\n if (msg.body.hasOwnProperty('mutual')) reply.body.mutual = msg.body.mutual;\n log.log('[subscribe] - new subscription: ', msg, reply, observer);\n\n _this6._bus.postMessage(reply);\n }\n });\n } else {\n //listener rejected\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: hypertyURL,\n body: reply.body\n });\n }\n });\n });\n }\n }, {\n key: '_resumeSubscription',\n value: function _resumeSubscription(msg, storedObject) {\n var _this7 = this;\n\n return new _promise2.default(function (resolve) {\n\n var objURL = storedObject.url;\n var schema = storedObject.schema;\n\n var hypertyURL = msg.from;\n\n // let objURLSubscription = objURL + '/subscription';\n\n var childBaseURL = objURL + '/children/';\n\n log.log('[SyncherManager - ReuseSubscription] - objURL: ', objURL, ' - schema:', schema);\n\n //get schema from catalogue and parse -> (children)\n // TODO: remove this since children resources should be available in the DataObjectsStorage\n _this7._catalog.getDataSchemaDescriptor(schema).then(function (descriptor) {\n var properties = descriptor.sourcePackage.sourceCode.properties;\n var childrens = properties.children ? properties.children.constant : [];\n\n //children addresses\n var subscriptions = [];\n subscriptions.push(objURL + '/changes');\n childrens.forEach(function (child) {\n return subscriptions.push(childBaseURL + child);\n });\n\n //FLOW-OUT: reply with provisional response\n _this7._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: hypertyURL,\n body: { code: 100, childrenResources: childrens, schema: schema, resource: objURL }\n });\n\n //FLOW-OUT: subscribe message to remote ReporterObject -> _onRemoteSubscribe\n /*let objSubscribeMsg = {\n type: 'subscribe', from: this._url, to: objURLSubscription,\n body: { subscriber: hypertyURL, identity: msg.body.identity }\n };\n //subscribe to reporter SM\n this._bus.postMessage(objSubscribeMsg, (reply) => {*/\n\n var observer = _this7._observers[objURL];\n if (!observer) {\n observer = new _ObserverObject2.default(_this7, objURL, childrens);\n observer.isToSaveData = storedObject.isToSaveData;\n _this7._observers[objURL] = observer;\n }\n\n //register new hyperty subscription\n observer.addSubscription(hypertyURL);\n observer.addChildrens(childrens);\n\n // Object.assign(storedObject.data, reply.body.value.data);\n // Object.assign(storedObject.childrens, reply.body.value.childrens);\n\n //log.log('[subscribe] - resume subscription: ', msg, reply, storedObject, observer);\n\n return _this7._decryptChildrens(storedObject, childrens);\n }).then(function (decryptedObject) {\n // log.log('result of previous promise');\n resolve(decryptedObject);\n }).catch(function (reason) {\n log.error('[SyncherManager - resume subscription] - fail on getDataSchemaDescriptor: ', reason);\n resolve(false);\n });\n });\n }\n\n //FLOW-IN: message received from local DataObjectObserver -> unsubscribe\n\n }, {\n key: '_onLocalUnSubscribe',\n value: function _onLocalUnSubscribe(msg) {\n var _this = this;\n\n var hypertyURL = msg.from;\n var objURL = msg.body.resource;\n\n var observer = _this._observers[objURL];\n if (observer) {\n //TODO: is there any policy verification before delete?\n observer.removeSubscription(msg);\n\n //TODO: destroy object in the registry?\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 200 }\n });\n\n this._dataObjectsStorage.deleteResource(objURL);\n\n //TODO: remove Object if no more subscription?\n delete _this._observers[objURL];\n }\n }\n }, {\n key: 'url',\n get: function get() {\n return this._url;\n }\n }]);\n return SyncherManager;\n}();\n\nexports.default = SyncherManager;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zeW5jaGVyL1N5bmNoZXJNYW5hZ2VyLmpzPzMzMzciXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4qIENvcHlyaWdodCAyMDE2IFBUIElub3Zhw6fDo28gZSBTaXN0ZW1hcyBTQVxuKiBDb3B5cmlnaHQgMjAxNiBJTkVTQy1JRFxuKiBDb3B5cmlnaHQgMjAxNiBRVU9CSVMgTkVUV09SS1MgU0xcbiogQ29weXJpZ2h0IDIwMTYgRlJBVU5IT0ZFUi1HRVNFTExTQ0hBRlQgWlVSIEZPRVJERVJVTkcgREVSIEFOR0VXQU5EVEVOIEZPUlNDSFVORyBFLlZcbiogQ29weXJpZ2h0IDIwMTYgT1JBTkdFIFNBXG4qIENvcHlyaWdodCAyMDE2IERldXRzY2hlIFRlbGVrb20gQUdcbiogQ29weXJpZ2h0IDIwMTYgQXBpemVlXG4qIENvcHlyaWdodCAyMDE2IFRFQ0hOSVNDSEUgVU5JVkVSU0lUQVQgQkVSTElOXG4qXG4qIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZS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W5kIHRoZSBpbmZvcm1hdGlvbiBpZiBzb21lIG9iamVjdCB3YXMgZmFpbDtcbiAgICAgICAgICAgICAgbGV0IHN1Y2Nlc3NmdWxseVJlc3VtZWQgPSBPYmplY3QudmFsdWVzKHJlc3VtZWRSZXBvcnRlcnMpLmZpbHRlcigocmVwb3J0ZXIpID0+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVwb3J0ZXIgIT09IGZhbHNlO1xuICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICBsb2cuaW5mbygnW1N5bmNoZXJNYW5hZ2VyLm9uQ3JlYXRlXSByZXR1cm5pbmcgcmVzdW1lZCBvYmplY3RzIDogJywgc3VjY2Vzc2Z1bGx5UmVzdW1lZCk7XG5cbiAgICAgICAgICAgICAgLy9GTE9XLU9VVDogbWVzc2FnZSByZXNwb25zZSB0byBTeW5jaGVyIC0+IGNyZWF0ZSByZXN1bWVcbiAgICAgICAgICAgICAgdGhpcy5fYnVzLnBvc3RNZXNzYWdlKHtcbiAgICAgICAgICAgICAgICBpZDogbXNnLmlkLCB0eXBlOiAncmVzcG9uc2UnLCBmcm9tOiB0bywgdG86IGZyb20sXG4gICAgICAgICAgICAgICAgYm9keTogeyBjb2RlOiAyMDAsIHZhbHVlOiBzdWNjZXNzZnVsbHlSZXN1bWVkIH1cbiAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vZm9yd2FyZCB0byBoeXBlcnR5OlxuICAgICAgICAgICAgbGV0IHJlcGx5ID0ge307XG4gICAgICAgICAgICByZXBseS5pZCA9IG1zZy5pZDtcbiAgICAgICAgICAgIHJlcGx5LmZyb20gPSBtc2cudG87XG4gICAgICAgICAgICByZXBseS50byA9IG1zZy5mcm9tO1xuICAgICAgICAgICAgcmVwbHkudHlwZSA9ICdyZXNwb25zZSc7XG4gICAgICAgICAgICByZXBseS5ib2R5ID0ge1xuICAgICA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NlcnZlci5hZGRTdWJzY3JpcHRpb24oaHlwZXJ0eVVSTCk7XG5cbiAgICAgICAgICAgICAgICAvLyBhZGQgY2hpbGRyZW5zIGFuZCBsaXN0ZW5lcnMgdG8gc2F2ZSBkYXRhIGlmIG5lY2Vzc2FyeVxuICAgICAgICAgICAgICAgIG9ic2VydmVyLmFkZENoaWxkcmVucyhjaGlsZHJlbnMpO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgbGV0IGludGVyd29ya2luZyA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgIC8vIFN0b3JlIGZvciBlYWNoIHJlcG9ydGVyIGh5cGVydHkgdGhlIGRhdGFPYmplY3RcbiAgICAgICAgICAgICAgbGV0IHVzZXJVUkw7XG4gICAgICAgICAgICAgIGlmIChtc2cuYm9keS5oYXNPd25Qcm9wZXJ0eSgnaWRlbnRpdHknKSAmJiBtc2cuYm9keS5pZGVudGl0eS51c2VyUHJvZmlsZSAmJiBtc2cuYm9keS5pZGVudGl0eS51c2VyUHJvZmlsZS51c2VyVVJMKSB7XG4gICAgICAgICAgICAgICAgdXNlclVSTCA9IG1zZy5ib2R5LmlkZW50aXR5LnVzZXJQcm9maWxlLnVzZXJVUkw7XG4gICAgICAgICAgICAgICAgaWYgKCF1c2VyVVJMLmluY2x1ZGVzKCd1c2VyOi8vJykpIHtcbiAgICAgICAgICAgICAgICAgIGludGVyd29ya2luZyA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHVzZXJVUkwgPSBfdGhpcy5fcmVnaXN0cnkuZ2V0SHlwZXJ0eU93bmVyKG1zZy5mcm9tKTtcbiAgICAgICAgICAgICAgICBpZiAoIXVzZXJVUkwpIGludGVyd29ya2luZyA9IHRydWU7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBsZXQgbWV0YWRhdGEgPSBkZWVwQ2xvbmUocmVwbHkuYm9keS52YWx1Z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RvcmFnZS51cGRhdGUoZmFsc2UsIG9ialVSTCwgJ2lzVG9TYXZlRGF0YScsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgX3RoaXMuX2RhdGFPYmplY3RzU3RvcmFnZS5zYXZlRGF0YShmYWxzZSwgb2JqVVJMLCBudWxsLCByZXBseS5ib2R5LnZhbHVlLmRhdGEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIC8vZm9yd2FyZCB0byBoeXBlcnR5OlxuICAgICAgICAgICAgICByZXBseS5pZCA9IG1zZy5pZDtcbiAgICAgICAgICAgICAgcmVwbHkuZnJvbSA9IF90aGlzLl91cmw7XG4gICAgICAgICAgICAgIHJlcGx5LnRvID0gaHlwZXJ0eVVSTDtcbiAgICAgICAgICAgICAgcmVwbHkuYm9keS5zY2hlbWEgPSBtc2cuYm9keS5zY2hlbWE7XG4gICAgICAgICAgICAgIHJlcGx5LmJvZHkucmVzb3VyY2UgPSBtc2cuYm9keS5yZXNvdXJjZTtcblxuICAgICAgICAgICAgICAvL1RPRE86IEZvciBGdXJ0aGVyIFN0dWR5XG4gICAgICAgICAgICAgIGlmIChtc2cuYm9keS5oYXNPd25Qcm9wZXJ0eSgnbXV0dWFsJykpIHJlcGx5LmJvZHkubXV0dWFsID0gbXNnLmJvZHkubXV0dWFsO1xuICAgICAgICAgICAgICBsb2cubG9nKCdbc3Vic2NyaWJlXSAtIG5ldyBzdWJzY3JpcHRpb246ICcsIG1zZywgcmVwbHksIG9ic2VydmVyKTtcblxuICAgICAgICAgICAgICB0aGlzLl9idXMucG9zdE1lc3NhZ2UocmVwbHkpO1xuXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAvL2xpc3RlbmVyIHJlamVjdGVkXG4gICAgICAgICAgX3RoaXMuX2J1cy5wb3N0TWVzc2FnZSh7XG4gICAgICAgICAgICBpZDogbXNnLmlkLCB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data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvdmFsdWVzLmpzPzRlNjUiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczcub2JqZWN0LnZhbHVlcycpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0LnZhbHVlcztcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvdmFsdWVzLmpzXG4vLyBtb2R1bGUgaWQgPSA1MDdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///507\n")},function(module,exports,__webpack_require__){eval("// https://github.com/tc39/proposal-object-values-entries\nvar $export = __webpack_require__(21);\nvar $values = __webpack_require__(509)(false);\n\n$export($export.S, 'Object', {\n values: function values(it) {\n return $values(it);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNy5vYmplY3QudmFsdWVzLmpzPzdkOTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9naXRodWIuY29tL3RjMzkvcHJvcG9zYWwtb2JqZWN0LXZhbHVlcy1lbnRyaWVzXG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyICR2YWx1ZXMgPSByZXF1aXJlKCcuL19vYmplY3QtdG8tYXJyYXknKShmYWxzZSk7XG5cbiRleHBvcnQoJGV4cG9ydC5TLCAnT2JqZWN0Jywge1xuICB2YWx1ZXM6IGZ1bmN0aW9uIHZhbHVlcyhpdCkge1xuICAgIHJldHVybiAkdmFsdWVzKGl0KTtcbiAgfVxufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczcub2JqZWN0LnZhbHVlcy5qc1xuLy8gbW9kdWxlIGlkID0gNTA4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///508\n")},function(module,exports,__webpack_require__){eval("var getKeys = __webpack_require__(67);\nvar toIObject = __webpack_require__(45);\nvar isEnum = __webpack_require__(77).f;\nmodule.exports = function (isEntries) {\n return function (it) {\n var O = toIObject(it);\n var keys = getKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) if (isEnum.call(O, key = keys[i++])) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n } return result;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTA5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtdG8tYXJyYXkuanM/OTliNyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2V0S2V5cyA9IHJlcXVpcmUoJy4vX29iamVjdC1rZXlzJyk7XG52YXIgdG9JT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8taW9iamVjdCcpO1xudmFyIGlzRW51bSA9IHJlcXVpcmUoJy4vX29iamVjdC1waWUnKS5mO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXNFbnRyaWVzKSB7XG4gIHJldHVybiBmdW5jdGlvbiAoaXQpIHtcbiAgICB2YXIgTyA9IHRvSU9iamVjdChpdCk7XG4gICAgdmFyIGtleXMgPSBnZXRLZXlzKE8pO1xuICAgIHZhciBsZW5ndGggPSBrZXlzLmxlbmd0aDtcbiAgICB2YXIgaSA9IDA7XG4gICAgdmFyIHJlc3VsdCA9IFtdO1xuICAgIHZhciBrZXk7XG4gICAgd2hpbGUgKGxlbmd0aCA+IGkpIGlmIChpc0VudW0uY2FsbChPLCBrZXkgPSBrZXlzW2krK10pKSB7XG4gICAgICByZXN1bHQucHVzaChpc0VudHJpZXMgPyBba2V5LCBPW2tleV1dIDogT1trZXldKTtcbiAgICB9IHJldHVybiByZXN1bHQ7XG4gIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC10by1hcnJheS5qc1xuLy8gbW9kdWxlIGlkID0gNTA5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///509\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nexports.schemaValidation = schemaValidation;\n\nvar _tv = __webpack_require__(511);\n\nvar _tv2 = _interopRequireDefault(_tv);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction schemaValidation(scheme, descriptor, value) {\n\n console.log('Scheme: ', scheme);\n\n // schema validation\n console.log('Running object validation...');\n try {\n var obj = value;\n var schema = descriptor.sourcePackage.sourceCode;\n\n // add support for schema referencing itself\n _tv2.default.addSchema(schema.id, schema);\n\n // validate\n var result = _tv2.default.validateMultiple(obj, schema);\n\n // delete error stacks to improve logging\n result.errors.forEach(function (error) {\n delete error.stack;\n });\n\n // print more details about validation if it fails or schema contains $refs\n if (!result.valid || result.missing.length > 0) {\n console.warn('Object validation ' + (result.valid ? 'succeeded, but schema contained references:' : 'failed:'), (0, _stringify2.default)(result, null, 2));\n console.debug('Object:', (0, _stringify2.default)(obj, null, 2), '\\r\\nSchema:', (0, _stringify2.default)(schema, null, 2));\n } else {\n console.log('Object validation succeeded');\n }\n } catch (e) {\n console.warn('Error during object validation:', e);\n }\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTEwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy91dGlscy9zY2hlbWFWYWxpZGF0aW9uLmpzP2JkODkiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR2NCBmcm9tICcuL3R2NCc7XG5cbmV4cG9ydCBmdW5jdGlvbiBzY2hlbWFWYWxpZGF0aW9uKHNjaGVtZSwgZGVzY3JpcHRvciwgdmFsdWUpIHtcblxuICBjb25zb2xlLmxvZygnU2NoZW1lOiAnLCBzY2hlbWUpO1xuXG4gIC8vIHNjaGVtYSB2YWxpZGF0aW9uXG4gIGNvbnNvbGUubG9nKCdSdW5uaW5nIG9iamVjdCB2YWxpZGF0aW9uLi4uJyk7XG4gIHRyeSB7XG4gICAgbGV0IG9iaiA9IHZhb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KTtcbiAgICB9XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICBjb25zb2xlLndhcm4oJ0Vycm9yIGR1cmluZyBvYmplY3QgdmFsaWRhdGlvbjonLCBlKTtcbiAgfVxuXG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gc3JjL3V0aWxzL3NjaGVtYVZhbGlkYXRpb24uanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFFQTtBQUNBO0FBSEE7QUFDQTs7Ozs7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///510\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _defineProperty = __webpack_require__(200);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nvar _isFrozen = __webpack_require__(512);\n\nvar _isFrozen2 = _interopRequireDefault(_isFrozen);\n\nvar _create = __webpack_require__(203);\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = __webpack_require__(98);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/*\n Author: Geraint Luff and others\n Year: 2013\n\n This code is released into the \"public domain\" by its author(s). Anybody may use, alter and distribute the code without restriction. The author makes no guarantees, and takes no liability of any kind for use of this code.\n\n If you find a bug or make an improvement, it would be courteous to let the author know, but it is not compulsory.\n */\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FObject%2Fkeys\nif (!_keys2.default) {\n Object.keys = function () {\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n hasDontEnumBug = !{ toString: null }.propertyIsEnumerable('toString'),\n dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'],\n dontEnumsLength = dontEnums.length;\n\n return function (obj) {\n if ((typeof obj === 'undefined' ? 'undefined' : (0, _typeof3.default)(obj)) !== 'object' && typeof obj !== 'function' || obj === null) {\n throw new TypeError('Object.keys called on non-object');\n }\n\n var result = [];\n\n for (var prop in obj) {\n if (hasOwnProperty.call(obj, prop)) {\n result.push(prop);\n }\n }\n\n if (hasDontEnumBug) {\n for (var i = 0; i < dontEnumsLength; i++) {\n if (hasOwnProperty.call(obj, dontEnums[i])) {\n result.push(dontEnums[i]);\n }\n }\n }\n return result;\n };\n }();\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create\nif (!_create2.default) {\n Object.create = function () {\n function F() {}\n\n return function (o) {\n if (arguments.length !== 1) {\n throw new Error('Object.create implementation only accepts one parameter.');\n }\n F.prototype = o;\n return new F();\n };\n }();\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FisArray\nif (!Array.isArray) {\n Array.isArray = function (vArg) {\n return Object.prototype.toString.call(vArg) === \"[object Array]\";\n };\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FindexOf\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement /*, fromIndex */) {\n if (this === null) {\n throw new TypeError();\n }\n var t = Object(this);\n var len = t.length >>> 0;\n\n if (len === 0) {\n return -1;\n }\n var n = 0;\n if (arguments.length > 1) {\n n = Number(arguments[1]);\n if (n !== n) {\n // shortcut for verifying if it's NaN\n n = 0;\n } else if (n !== 0 && n !== Infinity && n !== -Infinity) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n }\n if (n >= len) {\n return -1;\n }\n var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n for (; k < len; k++) {\n if (k in t && t[k] === searchElement) {\n return k;\n }\n }\n return -1;\n };\n}\n\n// Grungey Object.isFrozen hack\nif (!_isFrozen2.default) {\n Object.isFrozen = function (obj) {\n var key = \"tv4_test_frozen_key\";\n while (obj.hasOwnProperty(key)) {\n key += Math.random();\n }\n try {\n obj[key] = true;\n delete obj[key];\n return false;\n } catch (e) {\n return true;\n }\n };\n}\n// Based on: https://github.com/geraintluff/uri-templates, but with all the de-substitution stuff removed\n\nvar uriTemplateGlobalModifiers = {\n \"+\": true,\n \"#\": true,\n \".\": true,\n \"/\": true,\n \";\": true,\n \"?\": true,\n \"&\": true\n};\nvar uriTemplateSuffices = {\n \"*\": true\n};\n\nfunction notReallyPercentEncode(string) {\n return encodeURI(string).replace(/%25[0-9][0-9]/g, function (doubleEncoded) {\n return \"%\" + doubleEncoded.substring(3);\n });\n}\n\nfunction uriTemplateSubstitution(spec) {\n var modifier = \"\";\n if (uriTemplateGlobalModifiers[spec.charAt(0)]) {\n modifier = spec.charAt(0);\n spec = spec.substring(1);\n }\n var separator = \"\";\n var prefix = \"\";\n var shouldEscape = true;\n var showVariables = false;\n var trimEmptyString = false;\n if (modifier === '+') {\n shouldEscape = false;\n } else if (modifier === \".\") {\n prefix = \".\";\n separator = \".\";\n } else if (modifier === \"/\") {\n prefix = \"/\";\n separator = \"/\";\n } else if (modifier === '#') {\n prefix = \"#\";\n shouldEscape = false;\n } else if (modifier === ';') {\n prefix = \";\";\n separator = \";\";\n showVariables = true;\n trimEmptyString = true;\n } else if (modifier === '?') {\n prefix = \"?\";\n separator = \"&\";\n showVariables = true;\n } else if (modifier === '&') {\n prefix = \"&\";\n separator = \"&\";\n showVariables = true;\n }\n\n var varNames = [];\n var varList = spec.split(\",\");\n var varSpecs = [];\n var varSpecMap = {};\n for (var i = 0; i < varList.length; i++) {\n var varName = varList[i];\n var truncate = null;\n if (varName.indexOf(\":\") !== -1) {\n var parts = varName.split(\":\");\n varName = parts[0];\n truncate = parseInt(parts[1], 10);\n }\n var suffices = {};\n while (uriTemplateSuffices[varName.charAt(varName.length - 1)]) {\n suffices[varName.charAt(varName.length - 1)] = true;\n varName = varName.substring(0, varName.length - 1);\n }\n var varSpec = {\n truncate: truncate,\n name: varName,\n suffices: suffices\n };\n varSpecs.push(varSpec);\n varSpecMap[varName] = varSpec;\n varNames.push(varName);\n }\n var subFunction = function subFunction(valueFunction) {\n var result = \"\";\n var startIndex = 0;\n for (var i = 0; i < varSpecs.length; i++) {\n var varSpec = varSpecs[i];\n var value = valueFunction(varSpec.name);\n if (value === null || value === undefined || Array.isArray(value) && value.length === 0 || (typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) === 'object' && (0, _keys2.default)(value).length === 0) {\n startIndex++;\n continue;\n }\n if (i === startIndex) {\n result += prefix;\n } else {\n result += separator || \",\";\n }\n if (Array.isArray(value)) {\n if (showVariables) {\n result += varSpec.name + \"=\";\n }\n for (var j = 0; j < value.length; j++) {\n if (j > 0) {\n result += varSpec.suffices['*'] ? separator || \",\" : \",\";\n if (varSpec.suffices['*'] && showVariables) {\n result += varSpec.name + \"=\";\n }\n }\n result += shouldEscape ? encodeURIComponent(value[j]).replace(/!/g, \"%21\") : notReallyPercentEncode(value[j]);\n }\n } else if ((typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) === \"object\") {\n if (showVariables && !varSpec.suffices['*']) {\n result += varSpec.name + \"=\";\n }\n var first = true;\n for (var key in value) {\n if (!first) {\n result += varSpec.suffices['*'] ? separator || \",\" : \",\";\n }\n first = false;\n result += shouldEscape ? encodeURIComponent(key).replace(/!/g, \"%21\") : notReallyPercentEncode(key);\n result += varSpec.suffices['*'] ? '=' : \",\";\n result += shouldEscape ? encodeURIComponent(value[key]).replace(/!/g, \"%21\") : notReallyPercentEncode(value[key]);\n }\n } else {\n if (showVariables) {\n result += varSpec.name;\n if (!trimEmptyString || value !== \"\") {\n result += \"=\";\n }\n }\n if (varSpec.truncate != null) {\n value = value.substring(0, varSpec.truncate);\n }\n result += shouldEscape ? encodeURIComponent(value).replace(/!/g, \"%21\") : notReallyPercentEncode(value);\n }\n }\n return result;\n };\n subFunction.varNames = varNames;\n return {\n prefix: prefix,\n substitution: subFunction\n };\n}\n\nfunction UriTemplate(template) {\n if (!(this instanceof UriTemplate)) {\n return new UriTemplate(template);\n }\n var parts = template.split(\"{\");\n var textParts = [parts.shift()];\n var prefixes = [];\n var substitutions = [];\n var varNames = [];\n while (parts.length > 0) {\n var part = parts.shift();\n var spec = part.split(\"}\")[0];\n var remainder = part.substring(spec.length + 1);\n var funcs = uriTemplateSubstitution(spec);\n substitutions.push(funcs.substitution);\n prefixes.push(funcs.prefix);\n textParts.push(remainder);\n varNames = varNames.concat(funcs.substitution.varNames);\n }\n this.fill = function (valueFunction) {\n var result = textParts[0];\n for (var i = 0; i < substitutions.length; i++) {\n var substitution = substitutions[i];\n result += substitution(valueFunction);\n result += textParts[i + 1];\n }\n return result;\n };\n this.varNames = varNames;\n this.template = template;\n}\n\nUriTemplate.prototype = {\n toString: function toString() {\n return this.template;\n },\n fillFromObject: function fillFromObject(obj) {\n return this.fill(function (varName) {\n return obj[varName];\n });\n }\n};\nvar ValidatorContext = function ValidatorContext(parent, collectMultiple, errorReporter, checkRecursive, trackUnknownProperties) {\n this.missing = [];\n this.missingMap = {};\n this.formatValidators = parent ? (0, _create2.default)(parent.formatValidators) : {};\n this.schemas = parent ? (0, _create2.default)(parent.schemas) : {};\n this.collectMultiple = collectMultiple;\n this.errors = [];\n this.handleError = collectMultiple ? this.collectError : this.returnError;\n if (checkRecursive) {\n this.checkRecursive = true;\n this.scanned = [];\n this.scannedFrozen = [];\n this.scannedFrozenSchemas = [];\n this.scannedFrozenValidationErrors = [];\n this.validatedSchemasKey = 'tv4_validation_id';\n this.validationErrorsKey = 'tv4_validation_errors_id';\n }\n if (trackUnknownProperties) {\n this.trackUnknownProperties = true;\n this.knownPropertyPaths = {};\n this.unknownPropertyPaths = {};\n }\n this.errorReporter = errorReporter || defaultErrorReporter('en');\n if (typeof this.errorReporter === 'string') {\n throw new Error('debug');\n }\n this.definedKeywords = {};\n if (parent) {\n for (var key in parent.definedKeywords) {\n this.definedKeywords[key] = parent.definedKeywords[key].slice(0);\n }\n }\n};\nValidatorContext.prototype.defineKeyword = function (keyword, keywordFunction) {\n this.definedKeywords[keyword] = this.definedKeywords[keyword] || [];\n this.definedKeywords[keyword].push(keywordFunction);\n};\nValidatorContext.prototype.createError = function (code, messageParams, dataPath, schemaPath, subErrors, data, schema) {\n var error = new ValidationError(code, messageParams, dataPath, schemaPath, subErrors);\n error.message = this.errorReporter(error, data, schema);\n return error;\n};\nValidatorContext.prototype.returnError = function (error) {\n return error;\n};\nValidatorContext.prototype.collectError = function (error) {\n if (error) {\n this.errors.push(error);\n }\n return null;\n};\nValidatorContext.prototype.prefixErrors = function (startIndex, dataPath, schemaPath) {\n for (var i = startIndex; i < this.errors.length; i++) {\n this.errors[i] = this.errors[i].prefixWith(dataPath, schemaPath);\n }\n return this;\n};\nValidatorContext.prototype.banUnknownProperties = function (data, schema) {\n for (var unknownPath in this.unknownPropertyPaths) {\n var error = this.createError(ErrorCodes.UNKNOWN_PROPERTY, { path: unknownPath }, unknownPath, \"\", null, data, schema);\n var result = this.handleError(error);\n if (result) {\n return result;\n }\n }\n return null;\n};\n\nValidatorContext.prototype.addFormat = function (format, validator) {\n if ((typeof format === 'undefined' ? 'undefined' : (0, _typeof3.default)(format)) === 'object') {\n for (var key in format) {\n this.addFormat(key, format[key]);\n }\n return this;\n }\n this.formatValidators[format] = validator;\n};\nValidatorContext.prototype.resolveRefs = function (schema, urlHistory) {\n if (schema['$ref'] !== undefined) {\n urlHistory = urlHistory || {};\n if (urlHistory[schema['$ref']]) {\n return this.createError(ErrorCodes.CIRCULAR_REFERENCE, { urls: (0, _keys2.default)(urlHistory).join(', ') }, '', '', null, undefined, schema);\n }\n urlHistory[schema['$ref']] = true;\n schema = this.getSchema(schema['$ref'], urlHistory);\n }\n return schema;\n};\nValidatorContext.prototype.getSchema = function (url, urlHistory) {\n var schema;\n if (this.schemas[url] !== undefined) {\n schema = this.schemas[url];\n return this.resolveRefs(schema, urlHistory);\n }\n var baseUrl = url;\n var fragment = \"\";\n if (url.indexOf('#') !== -1) {\n fragment = url.substring(url.indexOf(\"#\") + 1);\n baseUrl = url.substring(0, url.indexOf(\"#\"));\n }\n if ((0, _typeof3.default)(this.schemas[baseUrl]) === 'object') {\n schema = this.schemas[baseUrl];\n var pointerPath = decodeURIComponent(fragment);\n if (pointerPath === \"\") {\n return this.resolveRefs(schema, urlHistory);\n } else if (pointerPath.charAt(0) !== \"/\") {\n return undefined;\n }\n var parts = pointerPath.split(\"/\").slice(1);\n for (var i = 0; i < parts.length; i++) {\n var component = parts[i].replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n if (schema[component] === undefined) {\n schema = undefined;\n break;\n }\n schema = schema[component];\n }\n if (schema !== undefined) {\n return this.resolveRefs(schema, urlHistory);\n }\n }\n if (this.missing[baseUrl] === undefined) {\n this.missing.push(baseUrl);\n this.missing[baseUrl] = baseUrl;\n this.missingMap[baseUrl] = baseUrl;\n }\n};\nValidatorContext.prototype.searchSchemas = function (schema, url) {\n if (Array.isArray(schema)) {\n for (var i = 0; i < schema.length; i++) {\n this.searchSchemas(schema[i], url);\n }\n } else if (schema && (typeof schema === 'undefined' ? 'undefined' : (0, _typeof3.default)(schema)) === \"object\") {\n if (typeof schema.id === \"string\") {\n if (isTrustedUrl(url, schema.id)) {\n if (this.schemas[schema.id] === undefined) {\n this.schemas[schema.id] = schema;\n }\n }\n }\n for (var key in schema) {\n if (key !== \"enum\") {\n if ((0, _typeof3.default)(schema[key]) === \"object\") {\n this.searchSchemas(schema[key], url);\n } else if (key === \"$ref\") {\n var uri = getDocumentUri(schema[key]);\n if (uri && this.schemas[uri] === undefined && this.missingMap[uri] === undefined) {\n this.missingMap[uri] = uri;\n }\n }\n }\n }\n }\n};\nValidatorContext.prototype.addSchema = function (url, schema) {\n //overload\n if (typeof url !== 'string' || typeof schema === 'undefined') {\n if ((typeof url === 'undefined' ? 'undefined' : (0, _typeof3.default)(url)) === 'object' && typeof url.id === 'string') {\n schema = url;\n url = schema.id;\n } else {\n return;\n }\n }\n if (url === getDocumentUri(url) + \"#\") {\n // Remove empty fragment\n url = getDocumentUri(url);\n }\n this.schemas[url] = schema;\n delete this.missingMap[url];\n normSchema(schema, url);\n this.searchSchemas(schema, url);\n};\n\nValidatorContext.prototype.getSchemaMap = function () {\n var map = {};\n for (var key in this.schemas) {\n map[key] = this.schemas[key];\n }\n return map;\n};\n\nValidatorContext.prototype.getSchemaUris = function (filterRegExp) {\n var list = [];\n for (var key in this.schemas) {\n if (!filterRegExp || filterRegExp.test(key)) {\n list.push(key);\n }\n }\n return list;\n};\n\nValidatorContext.prototype.getMissingUris = function (filterRegExp) {\n var list = [];\n for (var key in this.missingMap) {\n if (!filterRegExp || filterRegExp.test(key)) {\n list.push(key);\n }\n }\n return list;\n};\n\nValidatorContext.prototype.dropSchemas = function () {\n this.schemas = {};\n this.reset();\n};\nValidatorContext.prototype.reset = function () {\n this.missing = [];\n this.missingMap = {};\n this.errors = [];\n};\n\nValidatorContext.prototype.validateAll = function (data, schema, dataPathParts, schemaPathParts, dataPointerPath) {\n var topLevel;\n schema = this.resolveRefs(schema);\n if (!schema) {\n return null;\n } else if (schema instanceof ValidationError) {\n this.errors.push(schema);\n return schema;\n }\n\n var startErrorCount = this.errors.length;\n var frozenIndex,\n scannedFrozenSchemaIndex = null,\n scannedSchemasIndex = null;\n if (this.checkRecursive && data && (typeof data === 'undefined' ? 'undefined' : (0, _typeof3.default)(data)) === 'object') {\n topLevel = !this.scanned.length;\n if (data[this.validatedSchemasKey]) {\n var schemaIndex = data[this.validatedSchemasKey].indexOf(schema);\n if (schemaIndex !== -1) {\n this.errors = this.errors.concat(data[this.validationErrorsKey][schemaIndex]);\n return null;\n }\n }\n if ((0, _isFrozen2.default)(data)) {\n frozenIndex = this.scannedFrozen.indexOf(data);\n if (frozenIndex !== -1) {\n var frozenSchemaIndex = this.scannedFrozenSchemas[frozenIndex].indexOf(schema);\n if (frozenSchemaIndex !== -1) {\n this.errors = this.errors.concat(this.scannedFrozenValidationErrors[frozenIndex][frozenSchemaIndex]);\n return null;\n }\n }\n }\n this.scanned.push(data);\n if ((0, _isFrozen2.default)(data)) {\n if (frozenIndex === -1) {\n frozenIndex = this.scannedFrozen.length;\n this.scannedFrozen.push(data);\n this.scannedFrozenSchemas.push([]);\n }\n scannedFrozenSchemaIndex = this.scannedFrozenSchemas[frozenIndex].length;\n this.scannedFrozenSchemas[frozenIndex][scannedFrozenSchemaIndex] = schema;\n this.scannedFrozenValidationErrors[frozenIndex][scannedFrozenSchemaIndex] = [];\n } else {\n if (!data[this.validatedSchemasKey]) {\n try {\n (0, _defineProperty2.default)(data, this.validatedSchemasKey, {\n value: [],\n configurable: true\n });\n (0, _defineProperty2.default)(data, this.validationErrorsKey, {\n value: [],\n configurable: true\n });\n } catch (e) {\n //IE 7/8 workaround\n data[this.validatedSchemasKey] = [];\n data[this.validationErrorsKey] = [];\n }\n }\n scannedSchemasIndex = data[this.validatedSchemasKey].length;\n data[this.validatedSchemasKey][scannedSchemasIndex] = schema;\n data[this.validationErrorsKey][scannedSchemasIndex] = [];\n }\n }\n\n var errorCount = this.errors.length;\n var error = this.validateBasic(data, schema, dataPointerPath) || this.validateNumeric(data, schema, dataPointerPath) || this.validateString(data, schema, dataPointerPath) || this.validateArray(data, schema, dataPointerPath) || this.validateObject(data, schema, dataPointerPath) || this.validateCombinations(data, schema, dataPointerPath) || this.validateHypermedia(data, schema, dataPointerPath) || this.validateFormat(data, schema, dataPointerPath) || this.validateDefinedKeywords(data, schema, dataPointerPath) || null;\n\n if (topLevel) {\n while (this.scanned.length) {\n var item = this.scanned.pop();\n delete item[this.validatedSchemasKey];\n }\n this.scannedFrozen = [];\n this.scannedFrozenSchemas = [];\n }\n\n if (error || errorCount !== this.errors.length) {\n while (dataPathParts && dataPathParts.length || schemaPathParts && schemaPathParts.length) {\n var dataPart = dataPathParts && dataPathParts.length ? \"\" + dataPathParts.pop() : null;\n var schemaPart = schemaPathParts && schemaPathParts.length ? \"\" + schemaPathParts.pop() : null;\n if (error) {\n error = error.prefixWith(dataPart, schemaPart);\n }\n this.prefixErrors(errorCount, dataPart, schemaPart);\n }\n }\n\n if (scannedFrozenSchemaIndex !== null) {\n this.scannedFrozenValidationErrors[frozenIndex][scannedFrozenSchemaIndex] = this.errors.slice(startErrorCount);\n } else if (scannedSchemasIndex !== null) {\n data[this.validationErrorsKey][scannedSchemasIndex] = this.errors.slice(startErrorCount);\n }\n\n return this.handleError(error);\n};\nValidatorContext.prototype.validateFormat = function (data, schema) {\n if (typeof schema.format !== 'string' || !this.formatValidators[schema.format]) {\n return null;\n }\n var errorMessage = this.formatValidators[schema.format].call(null, data, schema);\n if (typeof errorMessage === 'string' || typeof errorMessage === 'number') {\n return this.createError(ErrorCodes.FORMAT_CUSTOM, { message: errorMessage }, '', '/format', null, data, schema);\n } else if (errorMessage && (typeof errorMessage === 'undefined' ? 'undefined' : (0, _typeof3.default)(errorMessage)) === 'object') {\n return this.createError(ErrorCodes.FORMAT_CUSTOM, { message: errorMessage.message || \"?\" }, errorMessage.dataPath || '', errorMessage.schemaPath || \"/format\", null, data, schema);\n }\n return null;\n};\nValidatorContext.prototype.validateDefinedKeywords = function (data, schema, dataPointerPath) {\n for (var key in this.definedKeywords) {\n if (typeof schema[key] === 'undefined') {\n continue;\n }\n var validationFunctions = this.definedKeywords[key];\n for (var i = 0; i < validationFunctions.length; i++) {\n var func = validationFunctions[i];\n var result = func(data, schema[key], schema, dataPointerPath);\n if (typeof result === 'string' || typeof result === 'number') {\n return this.createError(ErrorCodes.KEYWORD_CUSTOM, {\n key: key,\n message: result\n }, '', '', null, data, schema).prefixWith(null, key);\n } else if (result && (typeof result === 'undefined' ? 'undefined' : (0, _typeof3.default)(result)) === 'object') {\n var code = result.code;\n if (typeof code === 'string') {\n if (!ErrorCodes[code]) {\n throw new Error('Undefined error code (use defineError): ' + code);\n }\n code = ErrorCodes[code];\n } else if (typeof code !== 'number') {\n code = ErrorCodes.KEYWORD_CUSTOM;\n }\n var messageParams = (0, _typeof3.default)(result.message) === 'object' ? result.message : {\n key: key,\n message: result.message || \"?\"\n };\n var schemaPath = result.schemaPath || \"/\" + key.replace(/~/g, '~0').replace(/\\//g, '~1');\n return this.createError(code, messageParams, result.dataPath || null, schemaPath, null, data, schema);\n }\n }\n }\n return null;\n};\n\nfunction recursiveCompare(A, B) {\n if (A === B) {\n return true;\n }\n if (A && B && (typeof A === 'undefined' ? 'undefined' : (0, _typeof3.default)(A)) === \"object\" && (typeof B === 'undefined' ? 'undefined' : (0, _typeof3.default)(B)) === \"object\") {\n if (Array.isArray(A) !== Array.isArray(B)) {\n return false;\n } else if (Array.isArray(A)) {\n if (A.length !== B.length) {\n return false;\n }\n for (var i = 0; i < A.length; i++) {\n if (!recursiveCompare(A[i], B[i])) {\n return false;\n }\n }\n } else {\n var key;\n for (key in A) {\n if (B[key] === undefined && A[key] !== undefined) {\n return false;\n }\n }\n for (key in B) {\n if (A[key] === undefined && B[key] !== undefined) {\n return false;\n }\n }\n for (key in A) {\n if (!recursiveCompare(A[key], B[key])) {\n return false;\n }\n }\n }\n return true;\n }\n return false;\n}\n\nValidatorContext.prototype.validateBasic = function validateBasic(data, schema, dataPointerPath) {\n var error;\n if (error = this.validateType(data, schema, dataPointerPath)) {\n return error.prefixWith(null, \"type\");\n }\n if (error = this.validateEnum(data, schema, dataPointerPath)) {\n return error.prefixWith(null, \"type\");\n }\n return null;\n};\n\nValidatorContext.prototype.validateType = function validateType(data, schema) {\n if (schema.type === undefined) {\n return null;\n }\n var dataType = typeof data === 'undefined' ? 'undefined' : (0, _typeof3.default)(data);\n if (data === null) {\n dataType = \"null\";\n } else if (Array.isArray(data)) {\n dataType = \"array\";\n }\n var allowedTypes = schema.type;\n if (!Array.isArray(allowedTypes)) {\n allowedTypes = [allowedTypes];\n }\n\n for (var i = 0; i < allowedTypes.length; i++) {\n var type = allowedTypes[i];\n if (type === dataType || type === \"integer\" && dataType === \"number\" && data % 1 === 0) {\n return null;\n }\n }\n return this.createError(ErrorCodes.INVALID_TYPE, {\n type: dataType,\n expected: allowedTypes.join(\"/\")\n }, '', '', null, data, schema);\n};\n\nValidatorContext.prototype.validateEnum = function validateEnum(data, schema) {\n if (schema[\"enum\"] === undefined) {\n return null;\n }\n for (var i = 0; i < schema[\"enum\"].length; i++) {\n var enumVal = schema[\"enum\"][i];\n if (recursiveCompare(data, enumVal)) {\n return null;\n }\n }\n return this.createError(ErrorCodes.ENUM_MISMATCH, { value: typeof JSON !== 'undefined' ? (0, _stringify2.default)(data) : data }, '', '', null, data, schema);\n};\n\nValidatorContext.prototype.validateNumeric = function validateNumeric(data, schema, dataPointerPath) {\n return this.validateMultipleOf(data, schema, dataPointerPath) || this.validateMinMax(data, schema, dataPointerPath) || this.validateNaN(data, schema, dataPointerPath) || null;\n};\n\nvar CLOSE_ENOUGH_LOW = Math.pow(2, -51);\nvar CLOSE_ENOUGH_HIGH = 1 - CLOSE_ENOUGH_LOW;\nValidatorContext.prototype.validateMultipleOf = function validateMultipleOf(data, schema) {\n var multipleOf = schema.multipleOf || schema.divisibleBy;\n if (multipleOf === undefined) {\n return null;\n }\n if (typeof data === \"number\") {\n var remainder = data / multipleOf % 1;\n if (remainder >= CLOSE_ENOUGH_LOW && remainder < CLOSE_ENOUGH_HIGH) {\n return this.createError(ErrorCodes.NUMBER_MULTIPLE_OF, {\n value: data,\n multipleOf: multipleOf\n }, '', '', null, data, schema);\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateMinMax = function validateMinMax(data, schema) {\n if (typeof data !== \"number\") {\n return null;\n }\n if (schema.minimum !== undefined) {\n if (data < schema.minimum) {\n return this.createError(ErrorCodes.NUMBER_MINIMUM, {\n value: data,\n minimum: schema.minimum\n }, '', '/minimum', null, data, schema);\n }\n if (schema.exclusiveMinimum && data === schema.minimum) {\n return this.createError(ErrorCodes.NUMBER_MINIMUM_EXCLUSIVE, {\n value: data,\n minimum: schema.minimum\n }, '', '/exclusiveMinimum', null, data, schema);\n }\n }\n if (schema.maximum !== undefined) {\n if (data > schema.maximum) {\n return this.createError(ErrorCodes.NUMBER_MAXIMUM, {\n value: data,\n maximum: schema.maximum\n }, '', '/maximum', null, data, schema);\n }\n if (schema.exclusiveMaximum && data === schema.maximum) {\n return this.createError(ErrorCodes.NUMBER_MAXIMUM_EXCLUSIVE, {\n value: data,\n maximum: schema.maximum\n }, '', '/exclusiveMaximum', null, data, schema);\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateNaN = function validateNaN(data, schema) {\n if (typeof data !== \"number\") {\n return null;\n }\n if (isNaN(data) === true || data === Infinity || data === -Infinity) {\n return this.createError(ErrorCodes.NUMBER_NOT_A_NUMBER, { value: data }, '', '/type', null, data, schema);\n }\n return null;\n};\n\nValidatorContext.prototype.validateString = function validateString(data, schema, dataPointerPath) {\n return this.validateStringLength(data, schema, dataPointerPath) || this.validateStringPattern(data, schema, dataPointerPath) || null;\n};\n\nValidatorContext.prototype.validateStringLength = function validateStringLength(data, schema) {\n if (typeof data !== \"string\") {\n return null;\n }\n if (schema.minLength !== undefined) {\n if (data.length < schema.minLength) {\n return this.createError(ErrorCodes.STRING_LENGTH_SHORT, {\n length: data.length,\n minimum: schema.minLength\n }, '', '/minLength', null, data, schema);\n }\n }\n if (schema.maxLength !== undefined) {\n if (data.length > schema.maxLength) {\n return this.createError(ErrorCodes.STRING_LENGTH_LONG, {\n length: data.length,\n maximum: schema.maxLength\n }, '', '/maxLength', null, data, schema);\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateStringPattern = function validateStringPattern(data, schema) {\n if (typeof data !== \"string\" || typeof schema.pattern !== \"string\" && !(schema.pattern instanceof RegExp)) {\n return null;\n }\n var regexp;\n if (schema.pattern instanceof RegExp) {\n regexp = schema.pattern;\n } else {\n var body,\n flags = '';\n // Check for regular expression literals\n // @see http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5\n var literal = schema.pattern.match(/^\\/(.+)\\/([img]*)$/);\n if (literal) {\n body = literal[1];\n flags = literal[2];\n } else {\n body = schema.pattern;\n }\n regexp = new RegExp(body, flags);\n }\n if (!regexp.test(data)) {\n return this.createError(ErrorCodes.STRING_PATTERN, { pattern: schema.pattern }, '', '/pattern', null, data, schema);\n }\n return null;\n};\n\nValidatorContext.prototype.validateArray = function validateArray(data, schema, dataPointerPath) {\n if (!Array.isArray(data)) {\n return null;\n }\n return this.validateArrayLength(data, schema, dataPointerPath) || this.validateArrayUniqueItems(data, schema, dataPointerPath) || this.validateArrayItems(data, schema, dataPointerPath) || null;\n};\n\nValidatorContext.prototype.validateArrayLength = function validateArrayLength(data, schema) {\n var error;\n if (schema.minItems !== undefined) {\n if (data.length < schema.minItems) {\n error = this.createError(ErrorCodes.ARRAY_LENGTH_SHORT, {\n length: data.length,\n minimum: schema.minItems\n }, '', '/minItems', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n if (schema.maxItems !== undefined) {\n if (data.length > schema.maxItems) {\n error = this.createError(ErrorCodes.ARRAY_LENGTH_LONG, {\n length: data.length,\n maximum: schema.maxItems\n }, '', '/maxItems', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateArrayUniqueItems = function validateArrayUniqueItems(data, schema) {\n if (schema.uniqueItems) {\n for (var i = 0; i < data.length; i++) {\n for (var j = i + 1; j < data.length; j++) {\n if (recursiveCompare(data[i], data[j])) {\n var error = this.createError(ErrorCodes.ARRAY_UNIQUE, {\n match1: i,\n match2: j\n }, '', '/uniqueItems', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateArrayItems = function validateArrayItems(data, schema, dataPointerPath) {\n if (schema.items === undefined) {\n return null;\n }\n var error, i;\n if (Array.isArray(schema.items)) {\n for (i = 0; i < data.length; i++) {\n if (i < schema.items.length) {\n if (error = this.validateAll(data[i], schema.items[i], [i], [\"items\", i], dataPointerPath + \"/\" + i)) {\n return error;\n }\n } else if (schema.additionalItems !== undefined) {\n if (typeof schema.additionalItems === \"boolean\") {\n if (!schema.additionalItems) {\n error = this.createError(ErrorCodes.ARRAY_ADDITIONAL_ITEMS, {}, '/' + i, '/additionalItems', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n } else if (error = this.validateAll(data[i], schema.additionalItems, [i], [\"additionalItems\"], dataPointerPath + \"/\" + i)) {\n return error;\n }\n }\n }\n } else {\n for (i = 0; i < data.length; i++) {\n if (error = this.validateAll(data[i], schema.items, [i], [\"items\"], dataPointerPath + \"/\" + i)) {\n return error;\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateObject = function validateObject(data, schema, dataPointerPath) {\n if ((typeof data === 'undefined' ? 'undefined' : (0, _typeof3.default)(data)) !== \"object\" || data === null || Array.isArray(data)) {\n return null;\n }\n return this.validateObjectMinMaxProperties(data, schema, dataPointerPath) || this.validateObjectRequiredProperties(data, schema, dataPointerPath) || this.validateObjectProperties(data, schema, dataPointerPath) || this.validateObjectDependencies(data, schema, dataPointerPath) || null;\n};\n\nValidatorContext.prototype.validateObjectMinMaxProperties = function validateObjectMinMaxProperties(data, schema) {\n var keys = (0, _keys2.default)(data);\n var error;\n if (schema.minProperties !== undefined) {\n if (keys.length < schema.minProperties) {\n error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MINIMUM, {\n propertyCount: keys.length,\n minimum: schema.minProperties\n }, '', '/minProperties', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n if (schema.maxProperties !== undefined) {\n if (keys.length > schema.maxProperties) {\n error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MAXIMUM, {\n propertyCount: keys.length,\n maximum: schema.maxProperties\n }, '', '/maxProperties', null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateObjectRequiredProperties = function validateObjectRequiredProperties(data, schema) {\n if (schema.required !== undefined) {\n for (var i = 0; i < schema.required.length; i++) {\n var key = schema.required[i];\n if (data[key] === undefined) {\n var error = this.createError(ErrorCodes.OBJECT_REQUIRED, { key: key }, '', '/required/' + i, null, data, schema);\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateObjectProperties = function validateObjectProperties(data, schema, dataPointerPath) {\n var error;\n for (var key in data) {\n var keyPointerPath = dataPointerPath + \"/\" + key.replace(/~/g, '~0').replace(/\\//g, '~1');\n var foundMatch = false;\n if (schema.properties !== undefined && schema.properties[key] !== undefined) {\n foundMatch = true;\n if (error = this.validateAll(data[key], schema.properties[key], [key], [\"properties\", key], keyPointerPath)) {\n return error;\n }\n }\n if (schema.patternProperties !== undefined) {\n for (var patternKey in schema.patternProperties) {\n var regexp = new RegExp(patternKey);\n if (regexp.test(key)) {\n foundMatch = true;\n if (error = this.validateAll(data[key], schema.patternProperties[patternKey], [key], [\"patternProperties\", patternKey], keyPointerPath)) {\n return error;\n }\n }\n }\n }\n if (!foundMatch) {\n if (schema.additionalProperties !== undefined) {\n if (this.trackUnknownProperties) {\n this.knownPropertyPaths[keyPointerPath] = true;\n delete this.unknownPropertyPaths[keyPointerPath];\n }\n if (typeof schema.additionalProperties === \"boolean\") {\n if (!schema.additionalProperties) {\n error = this.createError(ErrorCodes.OBJECT_ADDITIONAL_PROPERTIES, { key: key }, '', '/additionalProperties', null, data, schema).prefixWith(key, null);\n if (this.handleError(error)) {\n return error;\n }\n }\n } else {\n if (error = this.validateAll(data[key], schema.additionalProperties, [key], [\"additionalProperties\"], keyPointerPath)) {\n return error;\n }\n }\n } else if (this.trackUnknownProperties && !this.knownPropertyPaths[keyPointerPath]) {\n this.unknownPropertyPaths[keyPointerPath] = true;\n }\n } else if (this.trackUnknownProperties) {\n this.knownPropertyPaths[keyPointerPath] = true;\n delete this.unknownPropertyPaths[keyPointerPath];\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateObjectDependencies = function validateObjectDependencies(data, schema, dataPointerPath) {\n var error;\n if (schema.dependencies !== undefined) {\n for (var depKey in schema.dependencies) {\n if (data[depKey] !== undefined) {\n var dep = schema.dependencies[depKey];\n if (typeof dep === \"string\") {\n if (data[dep] === undefined) {\n error = this.createError(ErrorCodes.OBJECT_DEPENDENCY_KEY, {\n key: depKey,\n missing: dep\n }, '', '', null, data, schema).prefixWith(null, depKey).prefixWith(null, \"dependencies\");\n if (this.handleError(error)) {\n return error;\n }\n }\n } else if (Array.isArray(dep)) {\n for (var i = 0; i < dep.length; i++) {\n var requiredKey = dep[i];\n if (data[requiredKey] === undefined) {\n error = this.createError(ErrorCodes.OBJECT_DEPENDENCY_KEY, {\n key: depKey,\n missing: requiredKey\n }, '', '/' + i, null, data, schema).prefixWith(null, depKey).prefixWith(null, \"dependencies\");\n if (this.handleError(error)) {\n return error;\n }\n }\n }\n } else {\n if (error = this.validateAll(data, dep, [], [\"dependencies\", depKey], dataPointerPath)) {\n return error;\n }\n }\n }\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateCombinations = function validateCombinations(data, schema, dataPointerPath) {\n return this.validateAllOf(data, schema, dataPointerPath) || this.validateAnyOf(data, schema, dataPointerPath) || this.validateOneOf(data, schema, dataPointerPath) || this.validateNot(data, schema, dataPointerPath) || null;\n};\n\nValidatorContext.prototype.validateAllOf = function validateAllOf(data, schema, dataPointerPath) {\n if (schema.allOf === undefined) {\n return null;\n }\n var error;\n for (var i = 0; i < schema.allOf.length; i++) {\n var subSchema = schema.allOf[i];\n if (error = this.validateAll(data, subSchema, [], [\"allOf\", i], dataPointerPath)) {\n return error;\n }\n }\n return null;\n};\n\nValidatorContext.prototype.validateAnyOf = function validateAnyOf(data, schema, dataPointerPath) {\n if (schema.anyOf === undefined) {\n return null;\n }\n var errors = [];\n var startErrorCount = this.errors.length;\n var oldUnknownPropertyPaths, oldKnownPropertyPaths;\n if (this.trackUnknownProperties) {\n oldUnknownPropertyPaths = this.unknownPropertyPaths;\n oldKnownPropertyPaths = this.knownPropertyPaths;\n }\n var errorAtEnd = true;\n for (var i = 0; i < schema.anyOf.length; i++) {\n if (this.trackUnknownProperties) {\n this.unknownPropertyPaths = {};\n this.knownPropertyPaths = {};\n }\n var subSchema = schema.anyOf[i];\n\n var errorCount = this.errors.length;\n var error = this.validateAll(data, subSchema, [], [\"anyOf\", i], dataPointerPath);\n\n if (error === null && errorCount === this.errors.length) {\n this.errors = this.errors.slice(0, startErrorCount);\n\n if (this.trackUnknownProperties) {\n for (var knownKey in this.knownPropertyPaths) {\n oldKnownPropertyPaths[knownKey] = true;\n delete oldUnknownPropertyPaths[knownKey];\n }\n for (var unknownKey in this.unknownPropertyPaths) {\n if (!oldKnownPropertyPaths[unknownKey]) {\n oldUnknownPropertyPaths[unknownKey] = true;\n }\n }\n // We need to continue looping so we catch all the property definitions, but we don't want to return an error\n errorAtEnd = false;\n continue;\n }\n\n return null;\n }\n if (error) {\n errors.push(error.prefixWith(null, \"\" + i).prefixWith(null, \"anyOf\"));\n }\n }\n if (this.trackUnknownProperties) {\n this.unknownPropertyPaths = oldUnknownPropertyPaths;\n this.knownPropertyPaths = oldKnownPropertyPaths;\n }\n if (errorAtEnd) {\n errors = errors.concat(this.errors.slice(startErrorCount));\n this.errors = this.errors.slice(0, startErrorCount);\n return this.createError(ErrorCodes.ANY_OF_MISSING, {}, \"\", \"/anyOf\", errors, data, schema);\n }\n};\n\nValidatorContext.prototype.validateOneOf = function validateOneOf(data, schema, dataPointerPath) {\n if (schema.oneOf === undefined) {\n return null;\n }\n var validIndex = null;\n var errors = [];\n var startErrorCount = this.errors.length;\n var oldUnknownPropertyPaths, oldKnownPropertyPaths;\n if (this.trackUnknownProperties) {\n oldUnknownPropertyPaths = this.unknownPropertyPaths;\n oldKnownPropertyPaths = this.knownPropertyPaths;\n }\n for (var i = 0; i < schema.oneOf.length; i++) {\n if (this.trackUnknownProperties) {\n this.unknownPropertyPaths = {};\n this.knownPropertyPaths = {};\n }\n var subSchema = schema.oneOf[i];\n\n var errorCount = this.errors.length;\n var error = this.validateAll(data, subSchema, [], [\"oneOf\", i], dataPointerPath);\n\n if (error === null && errorCount === this.errors.length) {\n if (validIndex === null) {\n validIndex = i;\n } else {\n this.errors = this.errors.slice(0, startErrorCount);\n return this.createError(ErrorCodes.ONE_OF_MULTIPLE, {\n index1: validIndex,\n index2: i\n }, \"\", \"/oneOf\", null, data, schema);\n }\n if (this.trackUnknownProperties) {\n for (var knownKey in this.knownPropertyPaths) {\n oldKnownPropertyPaths[knownKey] = true;\n delete oldUnknownPropertyPaths[knownKey];\n }\n for (var unknownKey in this.unknownPropertyPaths) {\n if (!oldKnownPropertyPaths[unknownKey]) {\n oldUnknownPropertyPaths[unknownKey] = true;\n }\n }\n }\n } else if (error) {\n errors.push(error);\n }\n }\n if (this.trackUnknownProperties) {\n this.unknownPropertyPaths = oldUnknownPropertyPaths;\n this.knownPropertyPaths = oldKnownPropertyPaths;\n }\n if (validIndex === null) {\n errors = errors.concat(this.errors.slice(startErrorCount));\n this.errors = this.errors.slice(0, startErrorCount);\n return this.createError(ErrorCodes.ONE_OF_MISSING, {}, \"\", \"/oneOf\", errors, data, schema);\n } else {\n this.errors = this.errors.slice(0, startErrorCount);\n }\n return null;\n};\n\nValidatorContext.prototype.validateNot = function validateNot(data, schema, dataPointerPath) {\n if (schema.not === undefined) {\n return null;\n }\n var oldErrorCount = this.errors.length;\n var oldUnknownPropertyPaths, oldKnownPropertyPaths;\n if (this.trackUnknownProperties) {\n oldUnknownPropertyPaths = this.unknownPropertyPaths;\n oldKnownPropertyPaths = this.knownPropertyPaths;\n this.unknownPropertyPaths = {};\n this.knownPropertyPaths = {};\n }\n var error = this.validateAll(data, schema.not, null, null, dataPointerPath);\n var notErrors = this.errors.slice(oldErrorCount);\n this.errors = this.errors.slice(0, oldErrorCount);\n if (this.trackUnknownProperties) {\n this.unknownPropertyPaths = oldUnknownPropertyPaths;\n this.knownPropertyPaths = oldKnownPropertyPaths;\n }\n if (error === null && notErrors.length === 0) {\n return this.createError(ErrorCodes.NOT_PASSED, {}, \"\", \"/not\", null, data, schema);\n }\n return null;\n};\n\nValidatorContext.prototype.validateHypermedia = function validateCombinations(data, schema, dataPointerPath) {\n if (!schema.links) {\n return null;\n }\n var error;\n for (var i = 0; i < schema.links.length; i++) {\n var ldo = schema.links[i];\n if (ldo.rel === \"describedby\") {\n var template = new UriTemplate(ldo.href);\n var allPresent = true;\n for (var j = 0; j < template.varNames.length; j++) {\n if (!(template.varNames[j] in data)) {\n allPresent = false;\n break;\n }\n }\n if (allPresent) {\n var schemaUrl = template.fillFromObject(data);\n var subSchema = { \"$ref\": schemaUrl };\n if (error = this.validateAll(data, subSchema, [], [\"links\", i], dataPointerPath)) {\n return error;\n }\n }\n }\n }\n};\n\n// parseURI() and resolveUrl() are from https://gist.github.com/1088850\n// - released as public domain by author (\"Yaffle\") - see comments on gist\n\nfunction parseURI(url) {\n var m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n // authority = '//' + user + ':' + pass '@' + hostname + ':' port\n return m ? {\n href: m[0] || '',\n protocol: m[1] || '',\n authority: m[2] || '',\n host: m[3] || '',\n hostname: m[4] || '',\n port: m[5] || '',\n pathname: m[6] || '',\n search: m[7] || '',\n hash: m[8] || ''\n } : null;\n}\n\nfunction resolveUrl(base, href) {\n // RFC 3986\n\n function removeDotSegments(input) {\n var output = [];\n input.replace(/^(\\.\\.?(\\/|$))+/, '').replace(/\\/(\\.(\\/|$))+/g, '/').replace(/\\/\\.\\.$/, '/../').replace(/\\/?[^\\/]*/g, function (p) {\n if (p === '/..') {\n output.pop();\n } else {\n output.push(p);\n }\n });\n return output.join('').replace(/^\\//, input.charAt(0) === '/' ? '/' : '');\n }\n\n href = parseURI(href || '');\n base = parseURI(base || '');\n\n return !href || !base ? null : (href.protocol || base.protocol) + (href.protocol || href.authority ? href.authority : base.authority) + removeDotSegments(href.protocol || href.authority || href.pathname.charAt(0) === '/' ? href.pathname : href.pathname ? (base.authority && !base.pathname ? '/' : '') + base.pathname.slice(0, base.pathname.lastIndexOf('/') + 1) + href.pathname : base.pathname) + (href.protocol || href.authority || href.pathname ? href.search : href.search || base.search) + href.hash;\n}\n\nfunction getDocumentUri(uri) {\n return uri.split('#')[0];\n}\n\nfunction normSchema(schema, baseUri) {\n if (schema && (typeof schema === 'undefined' ? 'undefined' : (0, _typeof3.default)(schema)) === \"object\") {\n if (baseUri === undefined) {\n baseUri = schema.id;\n } else if (typeof schema.id === \"string\") {\n baseUri = resolveUrl(baseUri, schema.id);\n schema.id = baseUri;\n }\n if (Array.isArray(schema)) {\n for (var i = 0; i < schema.length; i++) {\n normSchema(schema[i], baseUri);\n }\n } else {\n if (typeof schema['$ref'] === \"string\") {\n schema['$ref'] = resolveUrl(baseUri, schema['$ref']);\n }\n for (var key in schema) {\n if (key !== \"enum\") {\n normSchema(schema[key], baseUri);\n }\n }\n }\n }\n}\n\nfunction defaultErrorReporter(language) {\n language = language || 'en';\n\n var errorMessages = languages[language];\n\n return function (error) {\n var messageTemplate = errorMessages[error.code] || ErrorMessagesDefault[error.code];\n if (typeof messageTemplate !== 'string') {\n return \"Unknown error code \" + error.code + \": \" + (0, _stringify2.default)(error.messageParams);\n }\n var messageParams = error.params;\n // Adapted from Crockford's supplant()\n return messageTemplate.replace(/\\{([^{}]*)\\}/g, function (whole, varName) {\n var subValue = messageParams[varName];\n return typeof subValue === 'string' || typeof subValue === 'number' ? subValue : whole;\n });\n };\n}\n\nvar ErrorCodes = {\n INVALID_TYPE: 0,\n ENUM_MISMATCH: 1,\n ANY_OF_MISSING: 10,\n ONE_OF_MISSING: 11,\n ONE_OF_MULTIPLE: 12,\n NOT_PASSED: 13,\n // Numeric errors\n NUMBER_MULTIPLE_OF: 100,\n NUMBER_MINIMUM: 101,\n NUMBER_MINIMUM_EXCLUSIVE: 102,\n NUMBER_MAXIMUM: 103,\n NUMBER_MAXIMUM_EXCLUSIVE: 104,\n NUMBER_NOT_A_NUMBER: 105,\n // String errors\n STRING_LENGTH_SHORT: 200,\n STRING_LENGTH_LONG: 201,\n STRING_PATTERN: 202,\n // Object errors\n OBJECT_PROPERTIES_MINIMUM: 300,\n OBJECT_PROPERTIES_MAXIMUM: 301,\n OBJECT_REQUIRED: 302,\n OBJECT_ADDITIONAL_PROPERTIES: 303,\n OBJECT_DEPENDENCY_KEY: 304,\n // Array errors\n ARRAY_LENGTH_SHORT: 400,\n ARRAY_LENGTH_LONG: 401,\n ARRAY_UNIQUE: 402,\n ARRAY_ADDITIONAL_ITEMS: 403,\n // Custom/user-defined errors\n FORMAT_CUSTOM: 500,\n KEYWORD_CUSTOM: 501,\n // Schema structure\n CIRCULAR_REFERENCE: 600,\n // Non-standard validation options\n UNKNOWN_PROPERTY: 1000\n};\nvar ErrorCodeLookup = {};\nfor (var key in ErrorCodes) {\n ErrorCodeLookup[ErrorCodes[key]] = key;\n}\nvar ErrorMessagesDefault = {\n INVALID_TYPE: \"Invalid type: {type} (expected {expected})\",\n ENUM_MISMATCH: \"No enum match for: {value}\",\n ANY_OF_MISSING: \"Data does not match any schemas from \\\"anyOf\\\"\",\n ONE_OF_MISSING: \"Data does not match any schemas from \\\"oneOf\\\"\",\n ONE_OF_MULTIPLE: \"Data is valid against more than one schema from \\\"oneOf\\\": indices {index1} and {index2}\",\n NOT_PASSED: \"Data matches schema from \\\"not\\\"\",\n // Numeric errors\n NUMBER_MULTIPLE_OF: \"Value {value} is not a multiple of {multipleOf}\",\n NUMBER_MINIMUM: \"Value {value} is less than minimum {minimum}\",\n NUMBER_MINIMUM_EXCLUSIVE: \"Value {value} is equal to exclusive minimum {minimum}\",\n NUMBER_MAXIMUM: \"Value {value} is greater than maximum {maximum}\",\n NUMBER_MAXIMUM_EXCLUSIVE: \"Value {value} is equal to exclusive maximum {maximum}\",\n NUMBER_NOT_A_NUMBER: \"Value {value} is not a valid number\",\n // String errors\n STRING_LENGTH_SHORT: \"String is too short ({length} chars), minimum {minimum}\",\n STRING_LENGTH_LONG: \"String is too long ({length} chars), maximum {maximum}\",\n STRING_PATTERN: \"String does not match pattern: {pattern}\",\n // Object errors\n OBJECT_PROPERTIES_MINIMUM: \"Too few properties defined ({propertyCount}), minimum {minimum}\",\n OBJECT_PROPERTIES_MAXIMUM: \"Too many properties defined ({propertyCount}), maximum {maximum}\",\n OBJECT_REQUIRED: \"Missing required property: {key}\",\n OBJECT_ADDITIONAL_PROPERTIES: \"Additional properties not allowed\",\n OBJECT_DEPENDENCY_KEY: \"Dependency failed - key must exist: {missing} (due to key: {key})\",\n // Array errors\n ARRAY_LENGTH_SHORT: \"Array is too short ({length}), minimum {minimum}\",\n ARRAY_LENGTH_LONG: \"Array is too long ({length}), maximum {maximum}\",\n ARRAY_UNIQUE: \"Array items are not unique (indices {match1} and {match2})\",\n ARRAY_ADDITIONAL_ITEMS: \"Additional items not allowed\",\n // Format errors\n FORMAT_CUSTOM: \"Format validation failed ({message})\",\n KEYWORD_CUSTOM: \"Keyword failed: {key} ({message})\",\n // Schema structure\n CIRCULAR_REFERENCE: \"Circular $refs: {urls}\",\n // Non-standard validation options\n UNKNOWN_PROPERTY: \"Unknown property (not in schema)\"\n};\n\nfunction ValidationError(code, params, dataPath, schemaPath, subErrors) {\n Error.call(this);\n if (code === undefined) {\n throw new Error(\"No error code supplied: \" + schemaPath);\n }\n this.message = '';\n this.params = params;\n this.code = code;\n this.dataPath = dataPath || \"\";\n this.schemaPath = schemaPath || \"\";\n this.subErrors = subErrors || null;\n\n var err = new Error(this.message);\n this.stack = err.stack || err.stacktrace;\n if (!this.stack) {\n try {\n throw err;\n } catch (err) {\n this.stack = err.stack || err.stacktrace;\n }\n }\n}\n\nValidationError.prototype = (0, _create2.default)(Error.prototype);\nValidationError.prototype.constructor = ValidationError;\nValidationError.prototype.name = 'ValidationError';\n\nValidationError.prototype.prefixWith = function (dataPrefix, schemaPrefix) {\n if (dataPrefix !== null) {\n dataPrefix = dataPrefix.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n this.dataPath = \"/\" + dataPrefix + this.dataPath;\n }\n if (schemaPrefix !== null) {\n schemaPrefix = schemaPrefix.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n this.schemaPath = \"/\" + schemaPrefix + this.schemaPath;\n }\n if (this.subErrors !== null) {\n for (var i = 0; i < this.subErrors.length; i++) {\n this.subErrors[i].prefixWith(dataPrefix, schemaPrefix);\n }\n }\n return this;\n};\n\nfunction isTrustedUrl(baseUrl, testUrl) {\n if (testUrl.substring(0, baseUrl.length) === baseUrl) {\n var remainder = testUrl.substring(baseUrl.length);\n if (testUrl.length > 0 && testUrl.charAt(baseUrl.length - 1) === \"/\" || remainder.charAt(0) === \"#\" || remainder.charAt(0) === \"?\") {\n return true;\n }\n }\n return false;\n}\n\nvar languages = {};\n\nfunction createApi(language) {\n var globalContext = new ValidatorContext();\n var currentLanguage;\n var customErrorReporter;\n var api = {\n setErrorReporter: function setErrorReporter(reporter) {\n if (typeof reporter === 'string') {\n return this.language(reporter);\n }\n customErrorReporter = reporter;\n return true;\n },\n addFormat: function addFormat() {\n globalContext.addFormat.apply(globalContext, arguments);\n },\n language: function language(code) {\n if (!code) {\n return currentLanguage;\n }\n if (!languages[code]) {\n code = code.split('-')[0]; // fall back to base language\n }\n if (languages[code]) {\n currentLanguage = code;\n return code; // so you can tell if fall-back has happened\n }\n return false;\n },\n addLanguage: function addLanguage(code, messageMap) {\n var key;\n for (key in ErrorCodes) {\n if (messageMap[key] && !messageMap[ErrorCodes[key]]) {\n messageMap[ErrorCodes[key]] = messageMap[key];\n }\n }\n var rootCode = code.split('-')[0];\n if (!languages[rootCode]) {\n // use for base language if not yet defined\n languages[code] = messageMap;\n languages[rootCode] = messageMap;\n } else {\n languages[code] = (0, _create2.default)(languages[rootCode]);\n for (key in messageMap) {\n if (typeof languages[rootCode][key] === 'undefined') {\n languages[rootCode][key] = messageMap[key];\n }\n languages[code][key] = messageMap[key];\n }\n }\n return this;\n },\n freshApi: function freshApi(language) {\n var result = createApi();\n if (language) {\n result.language(language);\n }\n return result;\n },\n validate: function validate(data, schema, checkRecursive, banUnknownProperties) {\n var def = defaultErrorReporter(currentLanguage);\n var errorReporter = customErrorReporter ? function (error, data, schema) {\n return customErrorReporter(error, data, schema) || def(error, data, schema);\n } : def;\n var context = new ValidatorContext(globalContext, false, errorReporter, checkRecursive, banUnknownProperties);\n if (typeof schema === \"string\") {\n schema = { \"$ref\": schema };\n }\n context.addSchema(\"\", schema);\n var error = context.validateAll(data, schema, null, null, \"\");\n if (!error && banUnknownProperties) {\n error = context.banUnknownProperties(data, schema);\n }\n this.error = error;\n this.missing = context.missing;\n this.valid = error === null;\n return this.valid;\n },\n validateResult: function validateResult() {\n var result = {};\n this.validate.apply(result, arguments);\n return result;\n },\n validateMultiple: function validateMultiple(data, schema, checkRecursive, banUnknownProperties) {\n var def = defaultErrorReporter(currentLanguage);\n var errorReporter = customErrorReporter ? function (error, data, schema) {\n return customErrorReporter(error, data, schema) || def(error, data, schema);\n } : def;\n var context = new ValidatorContext(globalContext, true, errorReporter, checkRecursive, banUnknownProperties);\n if (typeof schema === \"string\") {\n schema = { \"$ref\": schema };\n }\n context.addSchema(\"\", schema);\n context.validateAll(data, schema, null, null, \"\");\n if (banUnknownProperties) {\n context.banUnknownProperties(data, schema);\n }\n var result = {};\n result.errors = context.errors;\n result.missing = context.missing;\n result.valid = result.errors.length === 0;\n return result;\n },\n addSchema: function addSchema() {\n return globalContext.addSchema.apply(globalContext, arguments);\n },\n getSchema: function getSchema() {\n return globalContext.getSchema.apply(globalContext, arguments);\n },\n getSchemaMap: function getSchemaMap() {\n return globalContext.getSchemaMap.apply(globalContext, arguments);\n },\n getSchemaUris: function getSchemaUris() {\n return globalContext.getSchemaUris.apply(globalContext, arguments);\n },\n getMissingUris: function getMissingUris() {\n return globalContext.getMissingUris.apply(globalContext, arguments);\n },\n dropSchemas: function dropSchemas() {\n globalContext.dropSchemas.apply(globalContext, arguments);\n },\n defineKeyword: function defineKeyword() {\n globalContext.defineKeyword.apply(globalContext, arguments);\n },\n defineError: function defineError(codeName, codeNumber, defaultMessage) {\n if (typeof codeName !== 'string' || !/^[A-Z]+(_[A-Z]+)*$/.test(codeName)) {\n throw new Error('Code name must be a string in UPPER_CASE_WITH_UNDERSCORES');\n }\n if (typeof codeNumber !== 'number' || codeNumber % 1 !== 0 || codeNumber < 10000) {\n throw new Error('Code number must be an integer > 10000');\n }\n if (typeof ErrorCodes[codeName] !== 'undefined') {\n throw new Error('Error already defined: ' + codeName + ' as ' + ErrorCodes[codeName]);\n }\n if (typeof ErrorCodeLookup[codeNumber] !== 'undefined') {\n throw new Error('Error code already used: ' + ErrorCodeLookup[codeNumber] + ' as ' + codeNumber);\n }\n ErrorCodes[codeName] = codeNumber;\n ErrorCodeLookup[codeNumber] = codeName;\n ErrorMessagesDefault[codeName] = ErrorMessagesDefault[codeNumber] = defaultMessage;\n for (var langCode in languages) {\n var language = languages[langCode];\n if (language[codeName]) {\n language[codeNumber] = language[codeNumber] || language[codeName];\n }\n }\n },\n reset: function reset() {\n globalContext.reset();\n this.error = null;\n this.missing = [];\n this.valid = true;\n },\n missing: [],\n error: null,\n valid: true,\n normSchema: normSchema,\n resolveUrl: resolveUrl,\n getDocumentUri: getDocumentUri,\n errorCodes: ErrorCodes\n };\n api.language(language || 'en');\n return api;\n}\n\n//export function validator() {\nvar tv4 = createApi();\ntv4.addLanguage('en-gb', ErrorMessagesDefault);\n\n//legacy property\ntv4.tv4 = tv4;\n//return tv4;\nexports.default = tv4;\n//}\n\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTExLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy91dGlscy90djQuanM/NzkwOCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuIEF1dGhvcjogR2VyYWludCBMdWZmIGFuZCBvdGhlcnNcbiBZZWFyOiAyMDEzXG5cbiBUaGlzIGNvZGUgaXMgcmVsZWFzZWQgaW50byB0aGUgXCJwdWJsaWMgZG9tYWluXCIgYnkgaXRzIGF1dGhvcihzKS4gIEFueWJvZHkgbWF5IHVzZSwgYWx0ZXIgYW5kIGRpc3RyaWJ1dGUgdGhlIGNvZGUgd2l0aG91dCByZXN0cmljdGlvbi4gIFRoZSBhdXRob3IgbWFrZXMgbm8gZ3VhcmFudGVlcywgYW5kIHRha2VzIG5vIGxpYWJpbGl0eSBvZiBhbnkga2luZCBmb3IgdXNlIG9mIHRoaXMgY29kZS5cblxuIElmIHlvdSBmaW5kIGEgYnVnIG9yIG1ha2UgYW4gaW1wcm92ZW1lbnQsIGl0IHdvdWxkIGJlIGNvdXJ0ZW91cyB0byBsZXQgdGhlIGF1dGhvciBrbm93LCBidXQgaXQgaXMgbm90IGNvbXB1bHNvcnkuXG4gKi9cbi8vIGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL0phdmFTY3JpcHQvUmVmZXJlbmNlL0dsb2JhbF9PYmplY3RzL09iamVjdC9rZXlzP3JlZGlyZWN0bG9jYWxlPWVuLVVTJnJlZGlyZWN0c2x1Zz1KYXZhU2NyaXB0JTJGUmVmZXJlbmNlJTJGR2xvYmFsX09iamVjdHMlMkZPYmplY3QlMkZrZXlzXG5pZiAoIU9iamVjdC5rZXlzKSB7XG4gICAgT2JqZWN0LmtleXMgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgaGFzT3duUHJvcGVydHkgPSBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LFxuICAgICAgICAgICAgaGFzRG9udEVudW1CdWcgPSAhKHt0b1N0cmluZzogbnVsbH0pLnByb3BlcnR5SXNFbnVtZXJhYmxlKCd0b1N0cmluZycpLFxuICAgICAgICAgICAgZG9udEVudW1zID0gW1xuICAgICAgICAgICAgICAgICd0b1N0cmluZycsXG4gICAgICAgICAgICAgICAgJ3RvTG9jYWxlU3RyaW5nJyxcbiAgICAgICAgICAgICAgICAndmFsdWVPZicsXG4gICAgICAgICAgICAgICAgJ2hhc093blByb3BlcnR5JyxcbiAgICAgICAgICAgICAgICAnaXNQcm90b3R5cGVPZicsXG4gICAgICAgICAgICAgICAgJ3Byb3BlcnR5SXNFbnVtZXJhYmxlJyxcbiAgICAgICAgICAgICAgICAnY29uc3RydWN0b3InXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgZG9udEVudW1zTGVuZ3RoID0gZG9udEVudW1zLmxlbmd0aDtcblxuICAgICAgICByZXR1cm4gZnVuY3Rpb24gKG9iaikge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBvYmogIT09ICdvYmplY3QnICYmIHR5cGVvZiBvYmogIT09ICdmdW5jdGlvbicgfHwgb2JqID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignT2JqZWN0LmtleXMgY2FsbGVkIG9uIG5vbi1vYmplY3QnKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIHJlc3VsdCA9IFtdO1xuXG4gICAgICAgICAgICBmb3IgKHZhciBwcm9wIGluIG9iaikge1xuICAgICAgICAgICAgICAgIGlmIChoYXNPd25Qcm9wZXJ0eS5jYWxsKG9iaiwgcHJvcCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2gocHJvcCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoaGFzRG9udEVudW1CdWcpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRvbnRFbnVtc0xlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChoYXNPd25Qcm9wZXJ0eS5jYWxsKG9iaiwgZG9udEVudW1zW2ldKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goZG9udEVudW1zW2ldKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH07XG4gICAgfSkoKTtcbn1cbi8vIGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL0phdmFTY3JpcHQvUmVmZXJlbmNlL0dsb2JhbF9PYmplY3RzL09iamVjdC9jcmVhdGVcbmlmICghT2JqZWN0LmNyZWF0ZSkge1xuICAgIE9iamVjdC5jcmVhdGUgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICBmdW5jdGlvbiBGKCkge1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChvKSB7XG4gICAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCAhPT0gMSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignT2JqZWN0LmNyZWF0ZSBpbXBsZW1lbnRhdGlvbiBvbmx5IGFjY2VwdHMgb25lIHBhcmFtZXRlci4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIEYucHJvdG90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0gdC5sZW5ndGggPj4+IDA7XG5cbiAgICAgICAgaWYgKGxlbiA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICB9XG4gICAgICAgIHZhciBuID0gMDtcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICBuID0gTnVtYmVyKGFyZ3VtZW50c1sxXSk7XG4gICAgICAgICAgICBpZiAobiAhPT0gbikgeyAvLyBzaG9ydGN1dCBmb3IgdmVyaWZ5aW5nIGlmIGl0J3MgTmFOXG4gICAgICAgICAgICAgICAgbiA9IDA7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG4gIT09IDAgJiYgbiAhPT0gSW5maW5pdHkgJiYgbiAhPT0gLUluZmluaXR5KSB7XG4gICAgICAgICAgICAgICAgbiA9IChuID4gMCB8fCAtMSkgKiBNYXRoLmZsb29yKE1hdGguYWJzKG4pKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAobiA+PSBsZW4pIHtcbiAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgayA9IG4gPj0gMCA/IG4gOiBNYXRoLm1heChsZW4gLSBNYXRoLmFicyhuKSwgMCk7XG4gICAgICAgIGZvciAoOyBrIDwgbGVuOyBrKyspIHtcbiAgICAgICAgICAgIGlmIChrIGluIHQgJiYgdFtrXSA9PT0gc2VhcmNoRWxlbWVudCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAtMTtcbiAgICB9O1xufVxuXG4vLyBHcnVuZ2V5IE9iamVjdC5pc0Zyb3plbiBoYWNrXG5pZiAoIU9iamVjdC5pc0Zyb3plbikge1xuICAgIE9iamVjdC5pc0Zyb3plbiA9IGZ1bmN0aW9uIChvYmopIHtcbiAgICAgICAgdmFyIGtleSA9IFwidHY0X3Rlc3RfZnJvemVu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lbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gKHNlcGFyYXRvciB8fCBcIixcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh2YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2hvd1ZhcmlhYmxlcykge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gdmFyU3BlYy5uYW1lICsgXCI9XCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdmFsdWUubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGogPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gdmFyU3BlYy5zdWZmaWNlc1snKiddID8gKHNlcGFyYXRvciB8fCBcIixcIikgOiBcIixcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YXJTcGVjLnN1ZmZpY2VzWycqJ10gJiYgc2hvd1ZhcmlhYmxlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSB2YXJTcGVjLm5hbWUgKyBcIj1cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gc2hvdWxkRXNjYXBlID8gZW5jb2RlVVJJQ29tcG9uZW50KHZhbHVlW2pdKS5yZXBsYWNlKC8hL2csIFwiJTIxXCIpIDogbm90UmVhbGx5UGVyY2VudEVuY29kZSh2YWx1ZVtqXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgdmFsdWUgPT09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2hvd1ZhcmlhYmxlcyAmJiAhdmFyU3BlYy5zdWZmaWNlc1snKiddKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSB2YXJTcGVjLm5hbWUgKyBcIj1cIjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIGZpcnN0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFmaXJzdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHZhclNwZWMuc3VmZmljZXNbJyonXSA/IChzZXBhcmF0b3IgfHwgXCIsXCIpIDogXCIsXCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZmlyc3QgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHNob3VsZEVzY2FwZSA/IGVuY29kZVVSSUNvbXBvbmVudChrZXkpLnJlcGxhY2UoLyEvZywgXCIlMjFcIikgOiBub3RSZWFsbHlQZXJjZW50RW5jb2RlKGtleSk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSB2YXJTcGVjLnN1ZmZpY2VzWycqJ10gPyAnPScgOiBcIixcIjtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHNob3VsZEVzY2FwZSA/IGVuY29kZVVSSUNvbXBvbmVudCh2YWx1ZVtrZXldKS5yZXBsYWNlKC8hL2csIFwiJTIxXCIpIDogbm90UmVhbGx5UGVyY2VudEVuY29kZSh2YWx1ZVtrZXldKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChzaG93VmFyaWFibGVzKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSB2YXJTcGVjLm5hbWU7XG4gICAgICAgICAgICAgICAgICAgIGlmICghdHJpbUVtcHR5U3RyaW5nIHx8IHZhbHVlICE9PSBcIlwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1b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hc2VVcmxdID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgdGhpcy5taXNzaW5nLnB1c2goYmFzZVVybCk7XG4gICAgICAgIHRoaXMubWlzc2luZ1tiYXNlVXJsXSA9IGJhc2VVcmw7XG4gICAgICAgIHRoaXMubWlzc2luZ01hcFtiYXNlVXJsXSA9IGJhc2VVcmw7XG4gICAgfVxufTtcblZhbGlkYXRvckNvbnRleHQucHJvdG90eXBlLnNlYXJjaFNjaGVtYXMgPSBmdW5jdGlvbiAoc2NoZW1hLCB1cmwpIHtcbiAgICBpZiAoQXJyYXkuaXNBcnJheShzY2hlbWEpKSB7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc2NoZW1hLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB0aGlzLnNlYXJjaFNjaGVtYXMoc2NoZW1hW2ldLCB1cmwpO1xuICAgICAgICB9XG4gICAgfSBlbHNlIGlmIChzY2hlbWEgJiYgdHlwZW9mIHNjaGVtYSA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICBpZiAodHlwZW9mIHNjaGVtYS5pZCA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgaWYgKGlzVHJ1c3RlZFVybCh1cmwsIHNjaGVtYS5pZCkpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zY2hlbWFzW3NjaGVtYS5pZF0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNjaGVtYXNbc2NoZW1hLmlkXSA9IHNjaGVtYTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZm9yICh2YXIga2V5IGluIHNjaGVtYSkge1xuICAgICAgICAgICAgaWYgKGtleSAhPT0gXCJlbnVtXCIpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHNjaGVtYVtrZXldID09PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VhcmNoU2NoZW1hcyhzY2hlbWFba2V5XSwgdXJsKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleSA9PT0gXCIkcmVmXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVyaSA9IGdldERvY3VtZW50VXJpKHNjaGVtYVtrZXldKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHVyaSAmJiB0aGlzLnNjaGVtYXNbdXJpXSA9PT0gdW5kZWZpbmVkICYmIHRoaXMubWlzc2luZ01hcFt1cmldID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWlzc2luZ01hcFt1cmldID0gdXJpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufTtcblZhbGlkYXRvckNvbnRleHQucHJvdG90eXBlLmFkZFNjaGVtYSA9IGZ1bmN0aW9uICh1cmwsIHNjaGVtYSkge1xuICAgIC8vb3ZlcmxvYWRcbiAgICBpZiAodHlwZW9mIHVybCAhPT0gJ3N0cmluZycgfHwgdHlwZW9mIHNjaGVtYSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgaWYgKHR5cGVvZiB1cmwgPT09ICdvYmplY3QnICYmIHR5cGVvZiB1cmwuaWQgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBzY2hlbWEgPSB1cmw7XG4gICAgICAgICAgICB1cmwgPSBzY2hlbWEuaWQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKHVybCA9PT0gZ2V0RG9jdW1lbnRVcmkodXJsKSArIFwiI1wiKSB7XG4gICAgICAgIC8vIFJlbW92ZSBlbXB0eSBmcmFnbWVudFxuICAgICAgICB1cmwgPSBnZXREb2N1bWVudFVyaSh1cmwpO1xuICAgIH1cbiAg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kLmxlbmd0aDtcbiAgICAgICAgaWYgKGRhdGFbdGhpcy52YWxpZGF0ZWRTY2hlbWFzS2V5XSkge1xuICAgICAgICAgICAgdmFyIHNjaGVtYUluZGV4ID0gZGF0YVt0aGlzLnZhbGlkYXRlZFNjaGVtYXNLZXldLmluZGV4T2Yoc2NoZW1hKTtcbiAgICAgICAgICAgIGlmIChzY2hlbWFJbmRleCAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVycm9ycyA9IHRoaXMuZXJyb3JzLmNvbmNhdChkYXRhW3RoaXMudmFsaWRhdGlvbkVycm9yc0tleV1bc2NoZW1hSW5kZXhdKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoT2JqZWN0LmlzRnJvemVuKGRhdGEpKSB7XG4gICAgICAgICAgICBmcm96ZW5JbmRleCA9IHRoaXMuc2Nhbm5lZEZyb3plbi5pbmRleE9mKGRhdGEpO1xuICAgICAgICAgICAgaWYgKGZyb3plbkluZGV4ICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHZhciBmcm96ZW5TY2hlbWFJbmRleCA9IHRoaXMuc2Nhbm5lZEZyb3plblNjaGVtYXNbZnJvemVuSW5kZXhdLmluZGV4T2Yoc2NoZW1hKTtcbiAgICAgICAgICAgICAgICBpZiAoZnJvemVuU2NoZW1hSW5kZXggIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZXJyb3JzID0gdGhpcy5lcnJvcnMuY29uY2F0KHRoaXMuc2Nhbm5lZEZyb3plblZhbGlkYXRpb25FcnJvcnNbZnJvemVuSW5kZXhdW2Zyb3plblNjaGVtYUluZGV4XSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNjYW5uZWQucHVzaChkYXRhKTtcbiAgICAgICAgaWYgKE9iamVjdC5pc0Zyb3plbihkYXRhKSkge1xuICAgICAgICAgICAgaWYgKGZyb3plbkluZGV4ID09PSAtMSkge1xuICAgICAgICAgICAgICAgIGZyb3plbkluZGV4ID0gdGhpcy5zY2FubmVkRnJvemVuLmxlbmd0aDtcbiAgICAgICAgICAgICAgICB0aGlzLnNjYW5uZWRGcm96ZW4ucHVzaChkYXRhKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNjYW5uZWRGcm96ZW5TY2hlbWFzLnB1c2goW10pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2Nhbm5lZEZyb3plblNjaGVtYUluZGV4ID0gdGhpcy5zY2FubmVkRnJvemVuU2NoZW1hc1tmcm96ZW5JbmRleF0ubGVuZ3RoO1xuICAgICAgICAgICAgdGhpcy5zY2FubmVkRnJvemVuU2NoZW1hc1tmcm96ZW5JbmRleF1bc2Nhbm5lZEZyb3plblNjaGVtYUluZGV4XSA9IHNjaGVtYTtcbiAgICAgICAgICAgIHRoaXMuc2Nhbm5lZEZyb3plblZhbGlkYXRpb25FcnJvcnNbZnJvemVuSW5kZXhdW3NjYW5uZWRGcm96ZW5TY2hlbWFJbmRleF0gPSBbXTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmICghZGF0YVt0aGlzLnZhbGlkYXRlZFNjaGVtYXNLZXldKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGRhdGEsIHRoaXMudmFsaWRhdGVkU2NoZW1hc0tleSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IFtdLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZGF0YSwgdGhpcy52YWxpZGF0aW9uRXJyb3JzS2V5LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogW10sXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICAvL0lFIDcvOCB3b3JrYXJvdW5kXG4gICAgICAgICAgICAgICAgICAgIGRhdGFbdGhpcy52YWxpZGF0ZWRTY2hlbWFzS2V5XSA9IFtdO1xuICAgICAgICAgICAgICAgICAgICBkYXRhW3RoaXMudmFsaWRhdGlvbkVycm9yc0tleV0gPSBbXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzY2FubmVkU2NoZW1hc0luZGV4ID0gZGF0YVt0aGlzLnZhbGlkYXRlZFNjaGVtYXNLZXldLmxlbmd0aDtcbiAgICAgICAgICAgIGRhdGFbdGhpcy52YWxpZGF0ZWRTY2hlbWFzS2V5XVtzY2FubmVkU2NoZW1hc0luZGV4XSA9IHNjaGVtYTtcbiAgICAgICAgICAgIGRhdGFbdGhpcy52YWxpZGF0aW9uRXJyb3JzS2V5XVtzY2FubmVkU2NoZW1hc0luZGV4XSA9IFtdO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgdmFyIGVycm9yQ291bnQgPSB0aGlzLmVycm9ycy5sZW5ndGg7XG4gICAgdmFyIGVycm9yID0gdGhpcy52YWxpZGF0ZUJhc2ljKGRhdGEsIHNjaGVtYSwgZGF0YVBvaW50ZXJQYXRoKVxuICAgICAgICB8fCB0aGlzLnZhbGlkYXRlTnVtZXJpYyhkYXRhLCBzY2hlbWEsIGRhdGFQb2ludGVyUGF0aClcbiAgICAgICAgfHwgdGhpcy52YWxpZGF0ZVN0cmluZyhkYXRhLCBzY2hlbWEsIGRhdGFQb2ludGVyUGF0aClcbiAgICAgICAgfHwgdGhpcy52YWxpZGF0ZUFycmF5KGRh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IGtleSBpbiB0aGlzLmRlZmluZWRLZXl3b3Jkcykge1xuICAgICAgICBpZiAodHlwZW9mIHNjaGVtYVtrZXldID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHZhbGlkYXRpb25GdW5jdGlvbnMgPSB0aGlzLmRlZmluZWRLZXl3b3Jkc1trZXldO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHZhbGlkYXRpb25GdW5jdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBmdW5jID0gdmFsaWRhdGlvbkZ1bmN0aW9uc1tpXTtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSBmdW5jKGRhdGEsIHNjaGVtYVtrZXldLCBzY2hlbWEsIGRhdGFQb2ludGVyUGF0aCk7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHJlc3VsdCA9PT0gJ3N0cmluZycgfHwgdHlwZW9mIHJlc3VsdCA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVFcnJvcihFcnJvckNvZGVzLktFWVdPUkRfQ1VTVE9NLCB7XG4gICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiByZXN1bHRcbiAgICAgICAgICAgICAgICB9LCAnJywgJycsIG51bGwsIGRhdGEsIHNjaGVtYSkucHJlZml4V2l0aChudWxsLCBrZXkpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXN1bHQgJiYgdHlwZW9mIHJlc3VsdCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICB2YXIgY29kZSA9IHJlc3VsdC5jb2RlO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgY29kZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFFcnJvckNvZGVzW2NvZGVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1VuZGVmaW5lZCBlcnJvciBjb2RlICh1c2UgZGVmaW5lRXJyb3IpOiAnICsgY29kZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29kZSA9IEVycm9yQ29kZXNbY29kZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgY29kZSAhPT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICAgICAgY29kZSA9IEVycm9yQ29kZXMuS0VZV09SRF9DVVNUT007XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBtZXNzYWdlUGFyYW1zID0gKHR5cGVvZiByZXN1bHQubWVzc2FnZSA9PT0gJ29iamVjdCcpID8gcmVzdWx0Lm1lc3NhZ2UgOiB7XG4gICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiByZXN1bHQubWVzc2FnZSB8fCBcIj9cIlxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgdmFyIHNjaGVtYVBhdGggPSByZXN1bHQuc2NoZW1hUGF0aCB8fCAoXCIvXCIgKyBrZXkucmVwbGFjZSgvfi9nLCAnfjAnKS5yZXBsYWNlKC9cXC8vZywgJ34xJykpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmNyZWF0ZUVycm9yKGNvZGUsIG1lc3NhZ2VQYXJhbXMsIHJlc3VsdC5kYXRhUGF0aCB8fCBudWxsLCBzY2hlbWFQYXRoLCBudWxsLCBkYXRhLCBzY2hlbWEpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBudWxsO1xufTtcblxuZnVuY3Rpb24gcmVjdXJzaXZlQ29tcGFyZShBLCBCKSB7XG4gICAgaWYgKEEgPT09IEIpIHtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuICAgIGlmIChBICYmIEIgJiYgdHlwZW9mIEEgPT09IFwib2JqZWN0XCIgJiYgdHlwZW9mIEIgPT09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoQSkgIT09IEFycmF5LmlzQXJyYXkoQikpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KEEpKSB7XG4gICAgICAgICAgICBpZiAoQS5sZW5ndGggIT09IEIubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBBLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFyZWN1cnNpdmVDb21wYXJlKEFbaV0sIEJbaV0pKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIga2V5O1xuICAgICAgICAgICAgZm9yIChrZXkgaW4gQSkge1xuICAgICAgICAgICAgICAgIGlmIChCW2tleV0gPT09IHVuZGVmaW5lZCAmJiBBW2tleV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yIChrZXkgaW4gQikge1xuICAgICAgICAgICAgICAgIGlmIChBW2tleV0gPT09IHVuZGVmaW5lZCAmJiBCW2tleV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yIChrZXkgaW4gQSkge1xuICAgICAgICAgICAgICAgIGlmICghc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W5pbXVtXG4gICAgICAgICAgICB9LCAnJywgJy9taW5pbXVtJywgbnVsbCwgZGF0YSwgc2NoZW1hKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoc2NoZW1hLmV4Y2x1c2l2ZU1pbmltdW0gJiYgZGF0YSA9PT0gc2NoZW1hLm1pbmltdW0pIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNyZWF0ZUVycm9yKEVycm9yQ29kZXMuTlVNQkVSX01JTklNVU1fRVhDTFVTSVZFLCB7XG4gICAgICAgICAgICAgICAgdmFsdWU6IGRhdGEsXG4gICAgICAgICAgICAgICAgbWluaW11bTogc2NoZW1hLm1pbmltdW1cbiAgICAgICAgICAgIH0sICcnLCAnL2V4Y2x1c2l2ZU1pbmltdW0nLCBudWxsLCBkYXRhLCBzY2hlbWEpO1xuICAgICAgICB9XG4gICAgfVxuICAgIGlmIChzY2hlbWEubWF4aW11bSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGlmIChkYXRhID4gc2NoZW1hLm1heGltdW0pIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNyZWF0ZUVycm9yKEVycm9yQ29kZXMuTlVNQkVSX01BWElNVU0sIHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogZGF0YSxcbiAgICAgICAgICAgICAgICBtYXhpbXVtOiBzY2hlbWEubWF4aW11bVxuICAgICAgICAgICAgfSwgJycsICcvbWF4aW11bScsIG51bGwsIGRhdGEsIHNjaGVtYSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNjaGVtYS5leGNsdXNpdmVNYXhpbXVtICYmIGRhdGEgPT09IHNjaGVtYS5tYXhpbXVtKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVFcnJvcihFcnJvckNvZGVzLk5VTUJFUl9NQVhJTVVNX0VYQ0xVU0lWRSwge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBkYXRhLFxuICAgICAgICAgICAgICAgIG1heGltdW06IHNjaGVtY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uICAgICAgICAgICAgfSwgJycsICcvbWluSXRlbXMnLCBudWxsLCBkYXRhLCBzY2hlbWEpO1xuICAgICAgICAgICAgaWYgKHRoaXMuaGFuZGxlRXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIGlmIChzY2hlbWEubWF4SXRlbXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAoZGF0YS5sZW5ndGggPiBzY2hlbWEubWF4SXRlbXMpIHtcbiAgICAgICAgICAgIGVycm9yID0gdGhpcy5jcmVhdGVFcnJvcihFcnJvckNvZGVzLkFSUkFZX0xFTkdUSF9MT05HLCB7XG4gICAgICAgICAgICAgICAgbGVuZ3RoOiBkYXRhLmxlbmd0aCxcbiAgICAgICAgICAgICAgICBtYXhpbXVtOiBzY2hlbWEubWF4SXRlbXNcbiAgICAgICAgICAgIH0sICcnLCAnL21heEl0ZW1zJywgbnVsbCwgZGF0YSwgc2NoZW1hKTtcbiAgICAgICAgICAgIGlmICh0aGlzLmhhbmRsZUVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gbnVsbDtcbn07XG5cblZhbGlkYXRvckNvbnRleHQucHJvdG90eXBlLnZhbGlkYXRlQXJyYXlVbmlxdWVJdGVtcyA9IGZ1bmN0aW9uIHZhbGlkYXRlQXJyYXlVbmlxdWVJdGVtcyhkYXRhLCBzY2hlbWEpIHtcbiAgICBpZiAoc2NoZW1hLnVuaXF1ZUl0ZW1zKSB7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZGF0YS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IGkgKyAxOyBqIDwgZGF0YS5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIGlmIChyZWN1cnNpdmVDb21wYXJlKGRhdGFbaV0sIGRhdGFbal0pKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBlcnJvciA9IHRoaXMuY3JlYXRlRXJyb3IoRXJyb3JDb2Rlcy5BUlJBWV9VTklRVUUsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoMTogaSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoMjogalxuICAgICAgICAgICAgICAgICAgICB9LCAnJywgJy91bmlxdWVJdGVtcycsIG51bGwsIGRhdGEsIHNjaGVtYSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmhhbmRsZUVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBudWxsO1xufTtcblxuVmFsaWRhdG9yQ29udGV4dC5wcm90b3R5cGUudmFsaWRhdGVBcnJheUl0ZW1zID0gZnVuY3Rpb24gdmFsaWRhdGVBcnJheUl0ZW1zKGRhdGEsIHNjaGVtYSwgZGF0YVBvaW50ZXJQYXRoKSB7XG4gICAgaWYgKHNjaGVtYS5pdGVtcyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgICB2YXIgZXJyb3IsIGk7XG4gICAgaWYgKEFycmF5LmlzQXJyYXkoc2NoZW1hLml0ZW1zKSkge1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZGF0YS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKGkgPCBzY2hlbWEuaXRlbXMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgaWYgKGVycm9yID0gdGhpcy52YWxpZGF0ZUFsbChkYXRhW2ldLCBzY2hlbWEuaXRlbXNbaV0sIFtpXSwgW1wiaXRlbXNcIiwgaV0sIGRhdGFQb2ludGVyUGF0aCArIFwiL1wiICsgaSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2NoZW1hLmFkZGl0aW9uYWxJdGVtcyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzY2hlbWEuYWRkaXRpb25hbEl0ZW1zID09PSBcImJvb2xlYW5cIikge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNjaGVtYS5hZGRpdGlvbmFsSXRlbXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yID0gKHRoaXMuY3JlYXRlRXJyb3IoRXJyb3JDb2Rlcy5BUlJBWV9BRERJVElPTkFMX0lURU1TLCB7fSwgJy8nICsgaSwgJy9hZGRpdGlvbmFsSXRlbXMnLCBudWxsLCBkYXRhLCBzY2hlbWEpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmhhbmRsZUVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZXJyb3IgPSB0aGlzLnZhbGlkYXRlQWxsKGRhdGFbaV0sIHNjaGVtYS5hZGRpdGlvbmFsSXRlbXMsIFtpXSwgW1wiYWRkaXRpb25hbEl0ZW1zXCJdLCBkYXRhUG9pbnRlclBhdGggKyBcIi9cIiArIGkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZGF0YS5sZW5ndGg7IGkrKykge1xu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XRlT2JqZWN0TWluTWF4UHJvcGVydGllcyhkYXRhLCBzY2hlbWEpIHtcbiAgICB2YXIga2V5cyA9IE9iamVjdC5rZXlzKGRhdGEpO1xuICAgIHZhciBlcnJvcjtcbiAgICBpZiAoc2NoZW1hLm1pblByb3BlcnRpZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAoa2V5cy5sZW5ndGggPCBzY2hlbWEubWluUHJvcGVydGllcykge1xuICAgICAgICAgICAgZXJyb3IgPSB0aGlzLmNyZWF0ZUVycm9yKEVycm9yQ29kZXMuT0JKRUNUX1BST1BFUlRJRVNfTUlOSU1VTSwge1xuICAgICAgICAgICAgICAgIHByb3BlcnR5Q291bnQ6IGtleXMubGVuZ3RoLFxuICAgICAgICAgICAgICAgIG1pbmltdW06IHNjaGVtYS5taW5Qcm9wZXJ0aWVzXG4gICAgICAgICAgICB9LCAnJywgJy9taW5Qcm9wZXJ0aWVzJywgbnVsbCwgZGF0YSwgc2NoZW1hKTtcbiAgICAgICAgICAgIGlmICh0aGlzLmhhbmRsZUVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBpZiAoc2NoZW1hLm1heFByb3BlcnRpZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAoa2V5cy5sZW5ndGggPiBzY2hlbWEubWF4UHJvcGVydGllcykge1xuICAgICAgICAgICAgZXJyb3IgPSB0aGlzLmNyZWF0ZUVycm9yKEVycm9yQ29kZXMuT0JKRUNUX1BST1BFUlRJRVNfTUFYSU1VTSwge1xuICAgICAgICAgICAgICAgIHByb3BlcnR5Q291bnQ6IGtleXMubGVuZ3RoLFxuICAgICAgICAgICAgICAgIG1heGltdW06IHNjaGVtYS5tYXhQcm9wZXJ0aWVzXG4gICAgICAgICAgICB9LCAnJywgJy9tYXhQcm9wZXJ0aWVzJywgbnVsbCwgZGF0YSwgc2NoZ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XRhUG9pbnRlclBhdGgpIHtcbiAgICB2YXIgZXJyb3I7XG4gICAgZm9yICh2YXIga2V5IGluIGRhdGEpIHtcbiAgICAgICAgdmFyIGtleVBvaW50ZXJQYXRoID0gZGF0YVBvaW50ZXJQYXRoICsgXCIvXCIgKyBrZXkucmVwbGFjZSgvfi9nLCAnfjAnKS5yZXBsYWNlKC9cXC8vZywgJ34xJyk7XG4gICAgICAgIHZhciBmb3VuZE1hdGNoID0gZmFsc2U7XG4gICAgICAgIGlmIChzY2hlbWEucHJvcGVydGllcyAhPT0gdW5kZWZpbmVkICYmIHNjaGVtYS5wcm9wZXJ0aWVzW2tleV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgZm91bmRNYXRjaCA9IHRydWU7XG4gICAgICAgICAgICBpZiAoZXJyb3IgPSB0aGlzLnZhbGlkYXRlQWxsKGRhdGFba2V5XSwgc2NoZW1hLnByb3BlcnRpZXNba2V5XSwgW2tleV0sIFtcInByb3BlcnRpZXNcIiwga2V5XSwga2V5UG9pbnRlclBhdGgpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChzY2hlbWEucGF0dGVyblByb3BlcnRpZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgZm9yICh2YXIgcGF0dGVybktleSBpbiBzY2hlbWEucGF0dGVyblByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICB2YXIgcmVnZXhwID0gbmV3IFJlZ0V4cChwYXR0ZXJuS2V5KTtcbiAgICAgICAgICAgICAgICBpZiAocmVnZXhwLnRlc3Qoa2V5KSkge1xuICAgICAgICAgICAgICAgICAgICBmb3VuZE1hdGNoID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yID0gdGhpcy52YWxpZGF0ZUFsbChkYXRhW2tleV0sIHNjaGVtYS5wYXR0ZXJuUHJvcGVydGllc1twYXR0ZXJuS2V5XSwgW2tleV0sIFtcInBhdHRlcm5Qcm9wZXJ0aWVzXCIsIHBhdHRlcm5LZXldLCBrZXlQb2ludGVyUGF0aCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoIWZvdW5kTWF0Y2gpIHtcbiAgICAgICAgICAgIGlmIChzY2hlbWEuYWRkaXRpb25hbFByb3BlcnRpZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnRyYWNrVW5rbm93blByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5rbm93blByb3BlcnR5UGF0aHNba2V5UG9pbnRlclBhdGhdID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMudW5rbm93blByb3BlcnR5UGF0aHNba2V5UG9pbnRlclBhdGhdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHNjaGVtYS5hZGRpdGlvbmFsUHJvcGVydGllcyA9PT0gXCJib29sZWFuXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzY2hlbWEuYWRkaXRpb25hbFByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yID0gdGhpcy5jcmVhdGVFcnJvcihFcnJvckNvZGVzLk9CSkVDVF9BRERJVElPTkFMX1BST1BFUlRJRVMsIHtrZXk6IGtleX0sICcnLCAnL2FkZGl0aW9uYWxQcm9wZXJ0aWVzJywgbnVsbCwgZGF0YSwgc2NoZW1hKS5wcmVmaXhXaXRoKGtleSwgbnVsbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5oYW5kbGVFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXJyb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IgPSB0aGlzLnZhbGlkYXRlQWxsKGRhdGFba2V5XSwgc2NoZW1hLmFkZGl0aW9uYWxQcm9wZXJ0aWVzLCBba2V5XSwgW1wiYWRkaXRpb25hbFByb3BlcnRpZXNcIl0sIGtleVBvaW50ZXJQYXRoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnRyYWNrVW5rbm93blByb3BlcnRpZXMgJiYgIXRoaXMua25vd25Qcm9wZXJ0eVBhdGhzW2tleVBvaW50ZXJQYXRoXSkge1xuICAgICAgICAgICAgICAgIHRoaXMudW5rbm93blByb3BlcnR5UGF0aHNba2V5UG9pbnRlclBhdGhdID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICh0aGlzLnRyYWNrVW5rbm93blByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgIHRoaXMua25vd25Qcm9wZXJ0eVBhdGhzW2tleVBvaW50ZXJQYXRoXSA9IHRydWU7XG4gICAgICAgICAgICBkZWxldGUgdGhpcy51bmtub3duUHJvcGVydHlQYXRoc1trZXlQb2ludGVyUGF0aF07XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG51bGw7XG59O1xuXG5WYWxpZGF0b3JDb250ZXh0LnByb3RvdHlwZS52YWxpZGF0ZU9iamVjdERlcGVuZGVuY2llcyA9IGZ1bmN0aW9uIHZhbGlkYXRlT2JqZWN0RGVwZW5kZW5jaWVzKGRhdGEsIHNjaGVtYSwgZGF0YVBvaW50ZXJQYXRoKSB7XG4gICAgdmFyIGVycm9yO1xuICAgIGlmIChzY2hlbWEuZGVwZW5kZW5jaWVzICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgZm9yICh2YXIgZGVwS2V5IGluIHNjaGVtYS5kZXBlbmRlbmNpZXMpIHtcbiAgICAgICAgICAgIGlmIChkYXRhW2RlcEtleV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHZhciBkZXAgPSBzY2hlbWEuZGVwZW5kZW5jaWVzW2RlcEtleV07XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBkZXAgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGFbZGVwXSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvciA9IHRoaXMuY3JlYXRlRXJyb3IoRXJyb3JDb2Rlcy5PQkpFQ1RfREVQRU5ERU5DWV9LRVksIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGRlcEtleSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaXNzaW5nOiBkZXBcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sICcnLCAnJywgbnVsbCwgZGF0YSwgc2NoZW1hKS5wcmVmaXhXaXRoKG51bGwsIGRlcEtleSkucHJlZml4V2l0aChudWxsLCBcImRlcGVuZGVuY2llc1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmhhbmRsZUVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoQXJyYXkuaXNBcnJheShkZXApKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZGVwLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVxdWlyZWRLZXkgPSBkZXBbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YVtyZXF1aXJlZEtleV0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yID0gdGhpcy5jcmVhdGVFcnJvcihFcnJvckNvZGVzLk9CSkVDVF9ERVBFTkRFTkNZX0tFWSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGRlcEtleSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWlzc2luZzogcmVxdWlyZWRLZXlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAnJywgJy8nICsgaSwgbnVsbCwgZGF0YSwgc2NoZW1hKS5wcmVmaXhXaXRoKG51bGwsIGRlcEtleSkucHJlZml4V2l0aChudWxsLCBcImRlcGVuZGVuY2llc1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5oYW5kbGVFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvciA9IHRoaXMudmFsaWRhdGVBbGwoZGF0YSwgZGVwLCBbXSwgW1wiZGVwZW5kZW5jaWVzXCIsIGRlcEtleV0sIGRhdGFQb2ludGVyUGF0aCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gbnVsbDtcbn07XG5cblZhbGlkYXR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CJhbnlPZlwiLCBpXSwgZGF0YVBvaW50ZXJQYXRoKTtcblxuICAgICAgICBpZiAoZXJyb3IgPT09IG51bGwgJiYgZXJyb3JDb3VudCA9PT0gdGhpcy5lcnJvcnMubGVuZ3RoKSB7XG4gICAgICAgICAgICB0aGlzLmVycm9ycyA9IHRoaXMuZXJyb3JzLnNsaWNlKDAsIHN0YXJ0RXJyb3JDb3VudCk7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnRyYWNrVW5rbm93blByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBrbm93bktleSBpbiB0aGlzLmtub3duUHJvcGVydHlQYXRocykge1xuICAgICAgICAgICAgICAgICAgICBvbGRLbm93blByb3BlcnR5UGF0aHNba25vd25LZXldID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG9sZFVua25vd25Qcm9wZXJ0eVBhdGhzW2tub3duS2V5XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgdW5rbm93bktleSBpbiB0aGlzLnVua25vd25Qcm9wZXJ0eVBhdGhzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghb2xkS25vd25Qcm9wZXJ0eVBhdGhzW3Vua25vd25LZXldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvbGRVbmtub3duUHJvcGVydHlQYXRoc1t1bmtub3duS2V5XSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gV2UgbmVlZCB0byBjb250aW51ZSBsb29waW5nIHNvIHdlIGNhdGNoIGFsbCB0aGUgcHJvcGVydHkgZGVmaW5pdGlvbnMsIGJ1dCB3ZSBkb24ndCB3YW50IHRvIHJldHVybiBhbiBlcnJvclxuICAgICAgICAgICAgICAgIGVycm9yQXRFbmQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgIC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FydEVycm9yQ291bnQgPSB0aGlzLmVycm9ycy5sZW5ndGg7XG4gICAgdmFyIG9sZFVua25vd25Qcm9wZXJ0eVBhdGhzLCBvbGRLbm93blByb3BlcnR5UGF0aHM7XG4gICAgaWYgKHRoaXMudHJhY2tVbmtub3duUHJvcGVydGllcykge1xuICAgICAgICBvbGRVbmtub3duUHJvcGVydHlQYXRocyA9IHRoaXMudW5rbm93blByb3BlcnR5UGF0aHM7XG4gICAgICAgIG9sZEtub3duUHJvcGVydHlQYXRocyA9IHRoaXMua25vd25Qcm9wZXJ0eVBhdGhzO1xuICAgIH1cbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHNjaGVtYS5vbmVPZi5sZW5ndGg7IGkrKykge1xuICAgICAgICBpZiAodGhpcy50cmFja1Vua25vd25Qcm9wZXJ0aWVzKSB7XG4gICAgICAgICAgICB0aGlzLnVua25vd25Qcm9wZXJ0eVBhdGhzID0ge307XG4gICAgICAgICAgICB0aGlzLmtub3duUHJvcGVydHlQYXRocyA9IHt9O1xuICAgICAgICB9XG4gICAgICAgIHZhciBzdWJTY2hlbWEgPSBzY2hlbWEub25lT2ZbaV07XG5cbiAgICAgICAgdmFyIGVycm9yQ291bnQgPSB0aGlzLmVycm9ycy5sZW5ndGg7XG4gICAgICAgIHZhciBlcnJvciA9IHRoaXMudmFsaWRhdGVBbGwoZGF0YSwgc3ViU2NoZW1hLCBbXSwgW1wib25lT2ZcIiwgaV0sIGRhdGFQb2ludGVyUGF0aCk7XG5cbiAgICAgICAgaWYgKGVycm9yID09PSBudWxsICYmIGVycm9yQ291bnQgPT09IHRoaXMuZXJyb3JzLmxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKHZhbGlkSW5kZXggPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB2YWxpZEluZGV4ID0gaTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5lcnJvcnMgPSB0aGlzLmVycm9ycy5zbGljZSgwLCBzdGFydEVycm9yQ291bnQpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmNyZWF0ZUVycm9yKEVycm9yQ29kZXMuT05FX09GX01VTFRJUExFLCB7XG4gICAgICAgICAgICAgICAgICAgIGluZGV4MTogdmFsaWRJbmRleCxcbiAgICAgICAgICAgICAgICAgICAgaW5kZXgyOiBpXG4gICAgICAgICAgICAgICAgfSwgXCJcIiwgXCIvb25lT2ZcIiwgbnVsbCwgZGF0YSwgc2NoZW1hKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLnRyYWNrVW5rbm93blByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBrbm93bktleSBpbiB0aGlzLmtub3duUHJvcGVydHlQYXRocykge1xuICAgICAgICAgICAgICAgICAgICBvbGRLbm93blByb3BlcnR5UGF0aHNba25vd25LZXldID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG9sZFVua25vd25Qcm9wZXJ0eVBhdGhzW2tub3duS2V5XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgdW5rbm93bktleSBpbiB0aGlzLnVua25vd25Qcm9wZXJ0eVBhdGhzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghb2xkS25vd25Qcm9wZXJ0eVBhdGhzW3Vua25vd25LZXldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvbGRVbmtub3duUHJvcGVydHlQYXRoc1t1bmtub3duS2V5XSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgIGVycm9ycy5wdXNoKGVycm9yKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBpZiAodGhpcy50cmFja1Vua25vd25Qcm9wZXJ0aWVzKSB7XG4gICAgICAgIHRoaXMud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oZW1hLmxpbmtzKSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgICB2YXIgZXJyb3I7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBzY2hlbWEubGlua3MubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgdmFyIGxkbyA9IHNjaGVtYS5saW5rc1tpXTtcbiAgICAgICAgaWYgKGxkby5yZWwgPT09IFwiZGVzY3JpYmVkYnlcIikge1xuICAgICAgICAgICAgdmFyIHRlbXBsYXRlID0gbmV3IFVyaVRlbXBsYXRlKGxkby5ocmVmKTtcbiAgICAgICAgICAgIHZhciBhbGxQcmVzZW50ID0gdHJ1ZTtcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGVtcGxhdGUudmFyTmFtZXMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoISh0ZW1wbGF0ZS52YXJOYW1lc1tqXSBpbiBkYXRhKSkge1xuICAgICAgICAgICAgICAgICAgICBhbGxQcmVzZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChhbGxQcmVzZW50KSB7XG4gICAgICAgICAgICAgICAgdmFyIHNjaGVtYVVybCA9IHRlbXBsYXRlLmZpbGxGcm9tT2JqZWN0KGRhdGEpO1xuICAgICAgICAgICAgICAgIHZhciBzdWJTY2hlbWEgPSB7XCIkcmVmXCI6IHNjaGVtYVVybH07XG4gICAgICAgICAgICAgICAgaWYgKGVycm9yID0gdGhpcy52YWxpZGF0ZUFsbChkYXRhLCBzdWJTY2hlbWEsIFtdLCBbXCJsaW5rc1wiLCBpXSwgZGF0YVBvaW50ZXJQYXRoKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXJyb3I7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufTtcblxu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ID0gW107XG4gICAgICAgIGlucHV0LnJlcGxhY2UoL14oXFwuXFwuPyhcXC98JCkpKy8sICcnKVxuICAgICAgICAgICAgLnJlcGxhY2UoL1xcLyhcXC4oXFwvfCQpKSsvZywgJy8nKVxuICAgICAgICAgICAgLnJlcGxhY2UoL1xcL1xcLlxcLiQvLCAnLy4uLycpXG4gICAgICAgICAgICAucmVwbGFjZSgvXFwvP1teXFwvXSovZywgZnVuY3Rpb24gKHApIHtcbiAgICAgICAgICAgICAgICBpZiAocCA9PT0gJy8uLicpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0LnBvcCgpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5wdXNoKHApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gb3V0cHV0LmpvaW4oJycpLnJlcGxhY2UoL15cXC8vLCBpbnB1dC5jaGFyQXQoMCkgPT09ICcvJyA/ICcvJyA6ICcnKTtcbiAgICB9XG5cbiAgICBocmVmID0gcGFyc2VVUkkoaHJlZiB8fCAnJyk7XG4gICAgYmFzZSA9IHBhcnNlVVJJKGJhc2UgfHwgJycpO1xuXG4gICAgcmV0dXJuICFocmVmIHx8ICFiYXNlID8gbnVsbCA6IChocmVmLnByb3RvY29sIHx8IGJhc2UucHJvdG9jb2wpICtcbiAgICAoaHJlZi5wcm90b2NvbCB8fCBocmVmLmF1dGhvcml0eSA/IGhyZWYuYXV0aG9yaXR5IDogYmFzZS5hdXRob3JpdHkpICtcbiAgICByZW1vdmVEb3RTZWdtZW50cyhocmVmLnByb3RvY29sIHx8IGhyZWYuYXV0aG9yaXR5IHx8IGhyZWYucGF0aG5hbWUuY2hhckF0KDApID09PSAnLycgPyBocmVmLnBhdGhuYW1lIDogKGhyZWYucGF0aG5hbWUgPyAoKGJhc2UuYXV0aG9yaXR5ICYmICFiYXNlLnBhdGhuYW1lID8gJy8nIDogJyc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WVzKTtcbiAgICAgICAgICAgIGlmICh0eXBlb2Ygc2NoZW1hID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgc2NoZW1hID0ge1wiJHJlZlwiOiBzY2hlbWF9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29udGV4dC5hZGRTY2hlbWEoXCJcIiwgc2NoZW1hKTtcbiAgICAgICAgICAgIHZhciBlcnJvciA9IGNvbnRleHQudmFsaWRhdGVBbGwoZGF0YSwgc2NoZW1hLCBudWxsLCBudWxsLCBcIlwiKTtcbiAgICAgICAgICAgIGlmICghZXJyb3IgJiYgYmFuVW5rbm93blByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICBlcnJvciA9IGNvbnRleHQuYmFuVW5rbm93blByb3BlcnRpZXMoZGF0YSwgc2NoZW1hKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuZXJyb3IgPSBlcnJvcjtcbiAgICAgICAgICAgIHRoaXMubWlzc2luZyA9IGNvbnRleHQubWlzc2luZztcbiAgICAgICAgICAgIHRoaXMudmFsaWQgPSAoZXJyb3IgPT09IG51bGwpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMudmFsaWQ7XG4gICAgICAgIH0sXG4gICAgICAgIHZhbGlkYXRlUmVzdWx0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0ge307XG4gICAgICAgICAgICB0aGlzLnZhbGlkYXRlLmFwcGx5KHJlc3VsdCwgYXJndW1lbnRzKTtcbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH0sXG4gICAgICAgIHZhbGlkYXRlTXVsdGlwbGU6IGZ1bmN0aW9uIChkYXRhLCBzY2hlbWEsIGNoZWNrUmVjdXJzaXZlLCBiYW5Vbmtub3duUHJvcGVydGllcykge1xuICAgICAgICAgICAgdmFyIGRlZiA9IGRlZmF1bHRFcnJvclJlcG9ydGVyKGN1cnJlbnRMYW5ndWFnZSk7XG4gICAgICAgICAgICB2YXIgZXJyb3JSZXBvcnRlciA9IGN1c3RvbUVycm9yUmVwb3J0ZXIgPyBmdW5jdGlvbiAoZXJyb3IsIGRhdGEsIHNjaGVtYSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjdXN0b21FcnJvclJlcG9ydGVyKGVycm9yLCBkYXRhLCBzY2hlbWEpIHx8IGRlZihlcnJvciwgZGF0YSwgc2NoZW1hKTtcbiAgICAgICAgICAgIH0gOiBkZWY7XG4gICAgICAgICAgICB2YXIgY29udGV4dCA9IG5ldyBWYWxpZGF0b3JDb250ZXh0KGdsb2JhbENvbnRleHQsIHRydWUsIGVycm9yUmVwb3J0ZXIsIGNoZWNrUmVjdXJzaXZlLCBiYW5Vbmtub3duUHJvcGVydGllcyk7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHNjaGVtYSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgIHNjaGVtYSA9IHtcIiRyZWZcIjogc2NoZW1hfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnRleHQuYWRkU2NoZW1hKFwiXCIsIHNjaGVtYSk7XG4gICAgICAgICAgICBjb250ZXh0LnZhbGlkYXRlQWxsKGRhdGEsIHNjaGVtYSwgbnVsbCwgbnVsbCwgXCJcIik7XG4gICAgICAgICAgICBpZiAoYmFuVW5rbm93blByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICBjb250ZXh0LmJhblVua25vd25Qcm9wZXJ0aWVzKGRhdGEsIHNjaGVtYSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0ge307XG4gICAgICAgICAgICByZXN1bHQuZXJyb3JzID0gY29udGV4dC5lcnJvcnM7XG4gICAgICAgICAgICByZXN1bHQubWlzc2luZyA9IGNvbnRleHQubWlzc2luZztcbiAgICAgICAgICAgIHJlc3VsdC52YWxpZCA9IChyZXN1bHQuZXJyb3JzLmxlbmd0aCA9PT0gMCk7XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICB9LFxuICAgICAgICBhZGRTY2hlbWE6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBnbG9iYWxDb250ZXh0LmFkZFNjaGVtYS5hcHBseShnbG9iYWxDb250ZXh0LCBhcmd1bWVudHMpO1xuICAgICAgICB9LFxuICAgICAgICBnZXRTY2hlbWE6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBnbG9iYWxDb250ZXh0LmdldFNjaGVtYS5hcHBseShnbG9iYWxDb250ZXh0LCBhcmd1bWVudHMpO1xuICAgICAgICB9LFxuICAgICAgICBnZXRTY2hlbWFNYXA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBnbG9iYWxDb250ZXh0LmdldFNjaGVtYU1hcC5hcHBseShnbG9iYWxDb250ZXh0LCBhcmd1bWVudHMpO1xuICAgICAgICB9LFxuICAgICAgICBnZXRTY2hlbWFVcmlzOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gZ2xvYmFsQ29udGV4dC5nZXRTY2hlbWFVcmlzLmFwcGx5KGdsb2JhbENvbnRleHQsIGFyZ3VtZW50cyk7XG4gICAgICAgIH0sXG4gICAgICAgIGdldE1pc3NpbmdVcmlzOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gZ2xvYmFsQ29udGV4dC5nZXRNaXNzaW5nVXJpcy5hcHBseShnbG9iYWxDb250ZXh0LCBhcmd1bWVudHMpO1xuICAgICAgICB9LFxuICAgICAgICBkcm9wU2NoZW1hczogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgZ2xvYmFsQ29udGV4dC5kcm9wU2NoZW1hcy5hcHBseShnbG9iYWxDb250ZXh0LCBhcmd1bWVudHMpO1xuICAgICAgICB9LFxuICAgICAgICBkZWZpbmVLZXl3b3JkOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIC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R5IHVzZWQ6ICcgKyBFcnJvckNvZGVMb29rdXBbY29kZU51bWJlcl0gKyAnIGFzICcgKyBjb2RlTnVtYmVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIEVycm9yQ29kZXNbY29kZU5hbWVdID0gY29kZU51bWJlcjtcbiAgICAgICAgICAgIEVycm9yQ29kZUxvb2t1cFtjb2RlTnVtYmVyXSA9IGNvZGVOYW1lO1xuICAgICAgICAgICAgRXJyb3JNZXNzYWdlc0RlZmF1bHRbY29kZU5hbWVdID0gRXJyb3JNZXNzYWdlc0RlZmF1bHRbY29kZU51bWJlcl0gPSBkZWZhdWx0TWVzc2FnZTtcbiAgICAgICAgICAgIGZvciAodmFyIGxhbmdDb2RlIGluIGxhbmd1YWdlcykge1xuICAgICAgICAgICAgICAgIHZhciBsYW5ndWFnZSA9IGxhbmd1YWdlc1tsYW5nQ29kZV07XG4gICAgICAgICAgICAgICAgaWYgKGxhbmd1YWdlW2NvZGVOYW1lXSkge1xuICAgICAgICAgICAgICAgICAgICBsYW5ndWFnZVtjb2RlTnVtYmVyXSA9IGxhbmd1YWdlW2NvZGVOdW1iZXJdIHx8IGxhbmd1YWdlW2NvZGVOYW1lXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHJlc2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBnbG9iYWxDb250ZXh0LnJlc2V0KCk7XG4gICAgICAgICAgICB0aGlzLmVycm9yID0gbnVsbDtcbiAgICAgICAgICAgIHRoaXMubWlzc2luZyA9IFtdO1xuICAgICAgICAgICAgdGhpcy52YWxpZCA9IHRydWU7XG4gICAgICAgIH0sXG4gICAgICAgIG1pc3Npbmc6IFtdLFxuICAgICAgICBlcnJvcjogbnVsbCxcbiAgICAgICAgdmFsaWQ6IHRydWUsXG4gICAgICAgIG5vcm1TY2hlbWE6IG5vcm1TY2hlbWEsXG4gICAgICAgIHJlc29sdmVVcmw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ZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///511\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(513), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTEyLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvaXMtZnJvemVuLmpzP2Q5ZmEiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9pcy1mcm96ZW5cIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvb2JqZWN0L2lzLWZyb3plbi5qc1xuLy8gbW9kdWxlIGlkID0gNTEyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///512\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(514);\nmodule.exports = __webpack_require__(13).Object.isFrozen;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTEzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvaXMtZnJvemVuLmpzPzVmZDMiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmlzLWZyb3plbicpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuT2JqZWN0LmlzRnJvemVuO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9pcy1mcm96ZW4uanNcbi8vIG1vZHVsZSBpZCA9IDUxM1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///513\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.12 Object.isFrozen(O)\nvar isObject = __webpack_require__(36);\n\n__webpack_require__(97)('isFrozen', function ($isFrozen) {\n return function isFrozen(it) {\n return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE0LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3QuaXMtZnJvemVuLmpzP2M5MTIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjEyIE9iamVjdC5pc0Zyb3plbihPKVxudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgnaXNGcm96ZW4nLCBmdW5jdGlvbiAoJGlzRnJvemVuKSB7XG4gIHJldHVybiBmdW5jdGlvbiBpc0Zyb3plbihpdCkge1xuICAgIHJldHVybiBpc09iamVjdChpdCkgPyAkaXNGcm96ZW4gPyAkaXNGcm96ZW4oaXQpIDogZmFsc2UgOiB0cnVlO1xuICB9O1xufSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczYub2JqZWN0LmlzLWZyb3plbi5qc1xuLy8gbW9kdWxlIGlkID0gNTE0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///514\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _keys = __webpack_require__(37);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _Subscription = __webpack_require__(211);\n\nvar _Subscription2 = _interopRequireDefault(_Subscription);\n\nvar _CryptoManager = __webpack_require__(100);\n\nvar cryptoManager = _interopRequireWildcard(_CryptoManager);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('ReporterObject'); // Log System\n\nvar ReporterObject = function () {\n function ReporterObject(parent, owner, url) {\n (0, _classCallCheck3.default)(this, ReporterObject);\n\n var _this = this;\n\n _this._parent = parent;\n _this._owner = owner;\n _this._url = url;\n\n _this._bus = parent._bus;\n\n _this._domain = (0, _utils.divideURL)(url).domain;\n _this._objSubscriptorURL = _this._url + '/subscription';\n\n _this._subscriptions = {};\n _this._childrens = [];\n _this._childrenListeners = [];\n\n _this._forwards = {};\n\n _this._isToSaveData = false;\n\n _this._allocateListeners();\n }\n\n (0, _createClass3.default)(ReporterObject, [{\n key: '_allocateListeners',\n value: function _allocateListeners() {\n var _this2 = this;\n\n var _this = this;\n\n //add subscription listener...\n _this._subscriptionListener = _this._bus.addListener(_this._objSubscriptorURL, function (msg) {\n log.info('[SyncherManager.ReporterObject received ]', msg);\n switch (msg.type) {\n case 'subscribe':\n _this._onRemoteSubscribe(msg);break;\n case 'unsubscribe':\n _this._onRemoteUnSubscribe(msg);break;\n case 'response':\n _this._onRemoteResponse(msg);break;\n }\n });\n\n var changeURL = _this._url + '/changes';\n _this._changeListener = _this._bus.addListener(changeURL, function (msg) {\n\n log.info('[SyncherManager.ReporterObject ] SyncherManager-' + changeURL + '-RCV: ', msg);\n\n //TODO: what todo here? Save changes?\n if (_this2._isToSaveData && msg.body.attribute) {\n log.log('[SyncherManager.ReporterObject ] SyncherManager - save data: ', msg);\n _this._parent._dataObjectsStorage.update(true, _this._url, 'version', msg.body.version);\n _this._parent._dataObjectsStorage.update(true, _this._url, 'lastModified', msg.body.lastModified);\n _this._parent._dataObjectsStorage.saveData(true, _this._url, msg.body.attribute, msg.body.value);\n }\n });\n }\n }, {\n key: '_releaseListeners',\n value: function _releaseListeners() {\n var _this = this;\n\n _this._subscriptionListener.remove();\n\n _this._changeListener.remove();\n\n _this._childrenListeners.forEach(function (cl) {\n cl.remove();\n });\n\n (0, _keys2.default)(_this._forwards).forEach(function (key) {\n _this.forwardUnSubscribe(key);\n });\n\n //remove all subscriptions\n (0, _keys2.default)(_this._subscriptions).forEach(function (key) {\n _this._subscriptions[key]._releaseListeners();\n });\n }\n }, {\n key: 'resumeSubscriptions',\n value: function resumeSubscriptions(subscriptions) {\n var _this = this;\n\n if (!subscriptions) return;\n\n (0, _keys2.default)(subscriptions).forEach(function (key) {\n var hypertyURL = subscriptions[key];\n\n log.log('[SyncherManager.ReporterObject] - resume subscriptions', _this, hypertyURL, _this._childrens);\n\n if (!_this._subscriptions[hypertyURL]) {\n _this._subscriptions[hypertyURL] = new _Subscription2.default(_this._bus, _this._owner, _this._url, _this._childrens, true);\n }\n });\n }\n\n /**\n * Register a listener in the msg-node and in the local MessageBus, so that messages on this address are forwarded to the reporter object\n * @param {string} address - URL to register the listeners\n * @return {Promise} Return Promise OK or error\n */\n\n }, {\n key: 'forwardSubscribe',\n value: function forwardSubscribe(addresses) {\n var _this = this;\n\n //FLOW-OUT: message sent to the msg-node SubscriptionManager component\n var nodeSubscribeMsg = {\n type: 'subscribe', from: _this._parent._url, to: 'domain://msg-node.' + _this._domain + '/sm',\n body: { resources: addresses, source: _this._owner }\n };\n\n return new _promise2.default(function (resolve, reject) {\n _this._bus.postMessage(nodeSubscribeMsg, function (reply) {\n log.log('[SyncherManager.ReporterObject ]forward-subscribe-response(reporter): ', reply);\n if (reply.body.code === 200) {\n var newForward = _this._bus.addForward(_this._url, _this._owner);\n _this._forwards[addresses[0]] = newForward;\n resolve();\n } else {\n reject('Error on msg-node subscription: ' + reply.body.desc);\n }\n });\n });\n }\n\n /**\n * UnRegister a listener in the msg-node and in the local MessageBus, so that messages on this address are removed from forward\n * @param {string} address - URL to un-register the listeners\n */\n\n }, {\n key: 'forwardUnSubscribe',\n value: function forwardUnSubscribe(address) {\n var _this = this;\n\n _this._forwards[address].remove();\n delete _this._forwards[address];\n\n //FLOW-OUT: message sent to the msg-node SubscriptionManager component\n var nodeUnSubscribeMsg = {\n type: 'unsubscribe', from: _this._parent._url, to: 'domain://msg-node.' + _this._domain + '/sm',\n body: { resources: [address], source: _this._owner }\n };\n\n _this._bus.postMessage(nodeUnSubscribeMsg);\n }\n\n /**\n * Register listeners for a list of childrens. Public channels used to transmit messages.\n * @param {string[]} childrens - channels to register\n * @return {Promise} Return Promise OK or error\n */\n\n }, {\n key: 'addChildrens',\n value: function addChildrens(childrens) {\n var _this3 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n if (childrens.length === 0) {\n resolve();\n return;\n }\n\n var childBaseURL = _this._url + '/children/';\n log.log('[SyncherManager.ReporterObject - addChildrens] - childrens: ', childrens, childBaseURL);\n\n childrens.forEach(function (child) {\n _this._childrens.push(child);\n });\n\n /*\n _this._childrens.forEach((child) => {\n let childId = childBaseURL + child;\n let selfForward = _this._bus.addForward(childId, owner);\n _this._childrenListeners.push(selfForward);\n });*/\n\n var subscriptions = [];\n childrens.forEach(function (child) {\n return subscriptions.push(childBaseURL + child);\n });\n\n //_this._storageSubscriptions[_this._objSubscriptorURL] = {url: _this._url, owner: _this._owner, childrens: _this._childrens};\n\n //FLOW-OUT: message sent to the msg-node SubscriptionManager component\n var nodeSubscribeMsg = {\n type: 'subscribe', from: _this._parent._url, to: 'domain://msg-node.' + _this._domain + '/sm',\n body: { resources: subscriptions, source: _this._owner }\n };\n\n _this._bus.postMessage(nodeSubscribeMsg, function (reply) {\n log.log('[SyncherManager.ReporterObject ]node-subscribe-response(reporter):', reply);\n if (reply.body.code === 200) {\n\n //add children listeners on local ...\n subscriptions.forEach(function (childURL) {\n var childListener = _this._bus.addListener(childURL, function (msg) {\n //TODO: what todo here? Save childrens?\n log.log('[SyncherManager.ReporterObject received]', msg);\n\n if (msg.type === 'create' && msg.to.includes('children') && _this3._isToSaveData) {\n\n // if the value is not encrypted lets encrypt it\n // todo: should be subject to some policy\n var splitedReporterURL = (0, _utils.splitObjectURL)(msg.to);\n\n var url = splitedReporterURL.url;\n\n //remove false when mutualAuthentication is enabled\n if (!(typeof msg.body.value === 'string')) {\n\n log.log('[SyncherManager.ReporterObject] encrypting received data ', msg.body.value);\n\n cryptoManager.default.encryptDataObject(msg.body.value, url).then(function (encryptedValue) {\n log.log('[SyncherManager.ReporterObject] encrypted data ', encryptedValue);\n\n _this._storeChildObject(msg, (0, _stringify2.default)(encryptedValue));\n }).catch(function (reason) {\n log.warn('[SyncherManager._decryptChildrens] failed : ', reason, ' Storing unencrypted');\n _this._storeChildObject(msg, msg.body.value);\n });\n } else {\n _this._storeChildObject(msg, msg.body.value);\n }\n }\n });\n _this._childrenListeners.push(childListener);\n\n var selfForward = _this._bus.addForward(childURL, _this._owner);\n _this._childrenListeners.push(selfForward);\n });\n\n resolve();\n } else {\n reject('Error on msg-node subscription: ' + reply.body.desc);\n }\n });\n });\n }\n\n // store childObject\n\n }, {\n key: '_storeChildObject',\n value: function _storeChildObject(msg, data) {\n var _this = this;\n\n var splitedReporterURL = (0, _utils.splitObjectURL)(msg.to);\n\n var url = splitedReporterURL.url;\n\n var resource = splitedReporterURL.resource;\n var value = {\n identity: msg.body.identity,\n value: data\n };\n\n var objectURLResource = msg.body.resource;\n var attribute = resource;\n\n if (objectURLResource) attribute += '.' + objectURLResource;\n\n // this identity data is not needed to be stored\n delete value.identity.assertion;\n delete value.identity.expires;\n\n console.log('[SyncherManager.ReporterObject._storeChildObject] : ', url, attribute, value);\n\n _this._parent._dataObjectsStorage.saveChildrens(true, url, attribute, value);\n }\n }, {\n key: 'delete',\n value: function _delete() {\n var _this = this;\n var domain = (0, _utils.divideURL)(_this._owner).domain;\n\n //FLOW-OUT: message sent directly to all subscribers of the reporter\n _this._bus.postMessage({\n type: 'delete', from: _this._objSubscriptorURL, to: _this._url + '/changes'\n });\n\n //FLOW-OUT: message sent to the msg-node ObjectAllocationManager component\n _this._bus.postMessage({\n type: 'delete', from: _this._parent._url, to: 'domain://msg-node.' + domain + '/object-address-allocation',\n body: { resource: _this._url, childrenResources: _this._childrens }\n });\n\n _this._releaseListeners();\n delete _this._parent._reporters[_this._url];\n }\n }, {\n key: '_onRemoteResponse',\n value: function _onRemoteResponse(msg) {\n var _this = this;\n\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: _this._url,\n body: { code: msg.body.code, identity: msg.body.identity, source: msg.from }\n });\n }\n\n //FLOW-IN: message received from Syncher -> subscribe\n\n }, {\n key: '_onRemoteSubscribe',\n value: function _onRemoteSubscribe(msg) {\n var _this = this;\n var hypertyURL = msg.body.subscriber;\n\n //validate if subscription already exists?\n if (_this._subscriptions[hypertyURL]) {\n // let errorMsg = {\n // id: msg.id, type: 'response', from: msg.to, to: hypertyURL,\n // body: { code: 500, desc: 'Subscription for (' + _this._url + ' : ' + hypertyURL + ') already exists!' }\n // };\n //\n // _this._bus.postMessage(errorMsg);\n // return;\n\n // new version because of reusage\n _this._subscriptions[hypertyURL]._releaseListeners();\n }\n\n //ask to subscribe to Syncher? (depends on the operation mode)\n //TODO: get mode from object!\n var mode = 'sub/pub';\n\n if (mode === 'sub/pub') {\n //FLOW-OUT: message sent to local hyperty address Syncher -> _onForward\n var forwardMsg = {\n type: 'forward', from: _this._url, to: _this._owner,\n body: { type: msg.type, from: hypertyURL, to: _this._url, identity: msg.body.identity }\n };\n\n //TODO: For Further Study\n if (msg.body.hasOwnProperty('mutual')) forwardMsg.body.mutual = msg.body.mutual;\n\n _this._bus.postMessage(forwardMsg, function (reply) {\n log.log('[SyncherManager.ReporterObject ]forward-reply: ', reply);\n if (reply.body.code === 200) {\n if (!_this._subscriptions[hypertyURL]) {\n log.log('[SyncherManager.ReporterObject] - _onRemoteSubscribe:', _this._childrens);\n _this._subscriptions[hypertyURL] = new _Subscription2.default(_this._bus, _this._owner, _this._url, _this._childrens, true);\n }\n }\n\n //TODO: atualizar mutual no storage e tb na sessionKeys\n\n // Store for each reporter hyperty the dataObject\n var userURL = void 0;\n if (msg.body.identity && msg.body.identity.userProfile.userURL) {\n userURL = msg.body.identity.userProfile.userURL;\n _this._parent._dataObjectsStorage.update(true, _this._url, 'subscriberUsers', userURL);\n }\n\n if (msg.body.hasOwnProperty('mutual')) {\n // _this._parent._identityModule.updateIsToEncryptForDataObjectSessionKey(_this._url, msg.body.mutual).then(()=>{\n _this._parent._dataObjectsStorage.update(true, _this._url, 'mutual', msg.body.mutual);\n // });\n }\n\n _this._parent._dataObjectsStorage.update(true, _this._url, 'subscriptions', hypertyURL);\n\n reply.body.owner = _this._owner;\n\n //FLOW-OUT: subscription response sent (forward from internal Hyperty)\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: reply.body\n });\n });\n }\n }\n\n //FLOW-IN: message received from remote ObserverObject -> removeSubscription\n\n }, {\n key: '_onRemoteUnSubscribe',\n value: function _onRemoteUnSubscribe(msg) {\n var _this = this;\n var unsubscriber = msg.body.source;\n\n var subscription = _this._subscriptions[unsubscriber];\n if (subscription) {\n subscription._releaseListeners();\n delete _this._subscriptions[unsubscriber];\n\n var forwardMsg = {\n type: 'forward', from: _this._url, to: _this._owner,\n body: { type: msg.type, from: unsubscriber, to: _this._url, identity: msg.body.identity }\n };\n\n _this._bus.postMessage(forwardMsg);\n }\n }\n }, {\n key: 'isToSaveData',\n set: function set(value) {\n this._isToSaveData = value;\n }\n }]);\n return ReporterObject;\n}();\n\nexports.default = ReporterObject;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE1LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zeW5jaGVyL1JlcG9ydGVyT2JqZWN0LmpzP2M3Y2IiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ2VyIGZyb20gJ2xvZ2xldmVsJztcbmxldCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdSZXBvcnRlck9iamVjdCcpO1xuXG5pbXBvcnQgeyBkaXZpZGVVUkwsIHNwbGl0T2JqZWN0VVJMIH0gZnJvbSAnLi4vdXRpbHMvdXRpbHMnO1xuaW1wb3J0IFN1YnNjc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cHRlZFZhbHVlKT0+e1xuICAgICAgICAgICAgICAgICAgICBsb2cubG9nKCdbU3luY2hlck1hbmFnZXIuUmVwb3J0ZXJPYmplY3RdIGVuY3J5cHRlZCBkYXRhICcsICBlbmNyeXB0ZWRWYWx1ZSk7XG5cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuX3N0b3JlQ2hpbGRPYmplY3QobXNnLCBKU09OLnN0cmluZ2lmeShlbmNyeXB0ZWRWYWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgfSkuY2F0Y2goKHJlYXNvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBsb2cud2FybignW1N5bmNoZXJNYW5hZ2VyLl9kZWNyeXB0Q2hpbGRyZW5zXSBmYWlsZWQgOiAnLCByZWFzb24sICcgU3RvcmluZyB1bmVuY3J5cHRlZCcpO1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5fc3RvcmVDaGlsZE9iamVjdChtc2csIG1zZy5ib2R5LnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBfdGhpcy5fc3RvcmVDaGlsZE9iamVjdChtc2csIG1zZy5ib2R5LnZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBfdGhpcy5fY2hpbGRyZW5MaXN0ZW5lcnMucHVzaChjaGlsZExpc3RlbmVyKTtcblxuICAgICAgICAgICAgbGV0IHNlbGZGb3J3YXJkID0gX3RoaXMuX2J1cy5hZGRGb3J3YXJkKGNoaWxkVVJMLCBfdGhpcy5fb3duZXIpO1xuICAgICAgICAgICAgX3RoaXMuX2NoaWxkcmVuTGlzdGVuZXJzLnB1c2goc2VsZkZvcndhcmQpO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIH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QTtBQUNBO0FBQ0E7QUFGQTtBQUtBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRkE7QUFDQTtBQUtBO0FBQ0E7QUFFQTs7O0FBMVVBO0FBQ0E7QUFDQTs7Ozs7QUE0VUE7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///515\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _Subscription = __webpack_require__(211);\n\nvar _Subscription2 = _interopRequireDefault(_Subscription);\n\nvar _CryptoManager = __webpack_require__(100);\n\nvar cryptoManager = _interopRequireWildcard(_CryptoManager);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('ObserverObject'); // Log System\n\nvar ObserverObject = function () {\n function ObserverObject(parent, url, childrens) {\n var _this2 = this;\n\n (0, _classCallCheck3.default)(this, ObserverObject);\n\n var _this = this;\n\n _this._parent = parent;\n _this._url = url;\n _this._childrens = childrens;\n\n _this._bus = parent._bus;\n\n _this._subscriptions = {};\n _this._storageSubscriptions = {};\n _this._childrenListeners = [];\n\n this._isToSaveData = false;\n\n var changeURL = _this._url + '/changes';\n _this._changeListener = _this._bus.addListener(changeURL, function (msg) {\n\n log.log('[SyncherManager.ObserverObject ] SyncherManager-' + changeURL + '-RCV: ', msg);\n\n //TODO: what todo here? Save changes?\n if (_this2._isToSaveData && msg.body.attribute) {\n log.log('[SyncherManager.ObserverObject ] SyncherManager - save data: ', msg);\n _this._parent._dataObjectsStorage.update(false, _this._url, 'version', msg.body.version);\n _this._parent._dataObjectsStorage.update(false, _this._url, 'lastModified', msg.body.lastModified);\n _this._parent._dataObjectsStorage.saveData(false, _this._url, msg.body.attribute, msg.body.value);\n }\n });\n }\n\n (0, _createClass3.default)(ObserverObject, [{\n key: '_newSubscription',\n value: function _newSubscription(hyperty) {\n var _this = this;\n\n var subscription = _this._subscriptions[hyperty];\n log.log('[Observer Object - new subscription] - ', _this._subscriptions, hyperty, _this._subscriptions.hasOwnProperty(hyperty));\n if (!subscription) {\n _this._subscriptions[hyperty] = new _Subscription2.default(_this._bus, hyperty, _this._url, _this._childrens, false);\n }\n }\n }, {\n key: 'addSubscription',\n value: function addSubscription(hyperty) {\n var _this = this;\n\n _this._newSubscription(hyperty);\n }\n }, {\n key: 'addChildrens',\n value: function addChildrens(childrens) {\n var _this3 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n if (childrens.length === 0) {\n return resolve();\n }\n\n var childBaseURL = _this._url + '/children/';\n log.log('[SyncherManager.ObserverObject - addChildrens] - childrens: ', childrens, childBaseURL);\n\n childrens.forEach(function (child) {\n\n var childListener = _this._bus.addListener(childBaseURL + child, function (msg) {\n //TODO: what todo here? Save childrens?\n log.log('[SyncherManager.ObserverObject received]', msg);\n\n if (msg.type === 'create' && msg.to.includes('children') && _this3._isToSaveData) {\n var splitedReporterURL = (0, _utils.splitObjectURL)(msg.to);\n\n var url = splitedReporterURL.url;\n\n //remove false when mutualAuthentication is enabled\n if (!(typeof msg.body.value === 'string')) {\n\n log.log('[SyncherManager.ObserverObject] encrypting received data ', msg.body.value);\n\n cryptoManager.default.encryptDataObject(msg.body.value, url).then(function (encryptedValue) {\n log.log('[SyncherManager.ObserverObject] encrypted data ', encryptedValue);\n\n _this._storeChildObject(msg, (0, _stringify2.default)(encryptedValue));\n }).catch(function (reason) {\n log.warn('[SyncherManager.ObserverObject._encryptChild] failed, storing unencrypted ', reason);\n _this._storeChildObject(msg, msg.body.value);\n });\n } else {\n _this._storeChildObject(msg, msg.body.value);\n }\n }\n\n log.log('[SyncherManager.ObserverObject children Listeners]', _this._childrenListeners, childListener);\n if (_this._childrenListeners.indexOf(childListener) === -1) {\n _this._childrenListeners.push(childListener);\n }\n });\n });\n });\n }\n\n // store childObject\n\n }, {\n key: '_storeChildObject',\n value: function _storeChildObject(msg, data) {\n var _this = this;\n\n var splitedReporterURL = (0, _utils.splitObjectURL)(msg.to);\n\n var url = splitedReporterURL.url;\n\n var resource = splitedReporterURL.resource;\n var value = {\n identity: msg.body.identity,\n value: data\n };\n\n // this identity data is not needed to be stored\n delete value.identity.assertion;\n delete value.identity.expires;\n\n var objectURLResource = msg.body.resource;\n var attribute = resource;\n\n if (objectURLResource) attribute += '.' + objectURLResource;\n\n log.log('[SyncherManager.ObserverObject._storeChildObject] : ', url, attribute, value);\n\n _this._parent._dataObjectsStorage.saveChildrens(false, url, attribute, value);\n }\n }, {\n key: 'removeSubscription',\n value: function removeSubscription(msg) {\n var _this = this;\n\n var hyperty = msg.from;\n\n var domain = (0, _utils.divideURL)(hyperty).domain;\n var objURLSubscription = _this._url + '/subscription';\n\n var subscription = _this._subscriptions[hyperty];\n if (subscription) {\n //FLOW-OUT: message sent to remote ReporterObject -> _onRemoteUnSubscribe\n _this._bus.postMessage({\n type: 'unsubscribe', from: _this._parent._url, to: objURLSubscription,\n body: { source: hyperty, identity: msg.body.identity }\n });\n\n //TODO: should I wait for response before unsubscribe on msg-node\n //FLOW-OUT: message sent to msg-node SubscriptionManager component\n _this._bus.postMessage({\n type: 'unsubscribe', from: _this._parent._url, to: 'domain://msg-node.' + domain + '/sm',\n body: { resource: _this._url, childrenResources: _this._childrens }\n });\n\n subscription._releaseListeners();\n delete _this._subscriptions[hyperty];\n }\n }\n }, {\n key: 'isToSaveData',\n set: function set(value) {\n this._isToSaveData = value;\n }\n }]);\n return ObserverObject;\n}();\n\nexports.default = ObserverObject;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE2LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zeW5jaGVyL09ic2VydmVyT2JqZWN0LmpzPzFiNTUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9nIFN5c3RlbVxuaW1wb3J0ICogYXMgbG9nZ2VyIGZyb20gJ2xvZ2xldmVsJztcbmxldCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdPYnNlcnZlck9iamVjdCcpO1xuXG5pbXBvcnQgeyBkaXZpZGVVUkwsIHNwbGl0T2JqZWN0VVJMIH0gZnJvbSAnLi4vdXRpbHMvdXRpbHMnO1xuaW1wb3J0IFN1YnNjcmlwdGlvbiBmcm9tICcuL1N1YnNjcmlwdGlvbic7XG5pbXBvcnQgKiBhcyBjcnlwdG9NYW5hZ2VyIGZyb20gJy4uL2NyeXB0b01hbmFnZXIvQ3J5cHRvTWFuYWdlcic7XG5cbmNsYXNzIE9ic2VydmVyT2JqZWN0IHtcblxuICBjb25zdHJ1Y3RvcihwYXJlbnQsIHVybCwgY2hpbGRyZW5zKSB7XG4gICAgbGV0IF90aGlzID0gdGhpcztcblxuICAgIF90aGlzLl9wYXJlbnQgPSBwYXJlbnQ7XG4gICAgX3RoaXMuX3VybCA9IHVybDtcbiAgICBfdGhpcy5fY2hpbGRyZW5zID0gY2hpbGRyZW5zO1xuXG4gICAgX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BO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRkE7QUFDQTtBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRkE7QUFDQTtBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFGQTtBQUNBO0FBSUE7QUFDQTtBQUNBO0FBQ0E7OztBQS9IQTtBQUNBO0FBQ0E7Ozs7O0FBaUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///516\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _values = __webpack_require__(210);\n\nvar _values2 = _interopRequireDefault(_values);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _utils = __webpack_require__(14);\n\nvar _Subscription = __webpack_require__(518);\n\nvar _Subscription2 = _interopRequireDefault(_Subscription);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('SubscriptionManager'); /**\n * Copyright 2016 PT Inovação e Sistemas SA\n * Copyright 2016 INESC-ID\n * Copyright 2016 QUOBIS NETWORKS SL\n * Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n * Copyright 2016 ORANGE SA\n * Copyright 2016 Deutsche Telekom AG\n * Copyright 2016 Apizee\n * Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\n// Log System\n\n/**\n * @author paulo-g-chainho@alticelabs.com\n * Subscription Manager used to manage routing paths at the runtime.\n */\n\nvar SubscriptionManager = function () {\n function SubscriptionManager(runtimeURL, bus, storage) {\n (0, _classCallCheck3.default)(this, SubscriptionManager);\n\n if (!runtimeURL) throw new Error('[SubscriptionManager] - needs the runtimeURL parameter');\n if (!bus) throw new Error('[SubscriptionManager] - needs the MessageBus instance');\n\n var _this = this;\n\n _this._bus = bus;\n _this._storage = storage;\n\n _this._subscriptions = {};\n\n _this._subscriptionsStorage = {};\n\n //TODO: these should be saved in persistence engine?\n _this.runtimeURL = runtimeURL;\n _this._url = runtimeURL + '/subscriptions';\n\n //TODO: this should not be hardcoded!\n _this._domain = (0, _utils.divideURL)(runtimeURL).domain;\n\n bus.addListener(_this._url, function (msg) {\n log.info('[SubscriptionManager] RCV: ', msg);\n switch (msg.type) {\n case 'subscribe':\n _this._onSubscribe(msg);break;\n case 'unsubscribe':\n _this._onUnSubscribe(msg);break;\n case 'read':\n _this._onRead(msg);break;\n }\n });\n }\n\n (0, _createClass3.default)(SubscriptionManager, [{\n key: 'init',\n value: function init() {\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n\n _this._storage.get('subscriptions').then(function (subscriptions) {\n log.log('[SubscriptionManager.init] resume subscriptions: ', subscriptions);\n if (subscriptions) {\n\n _this._subscriptionsStorage = subscriptions;\n\n (0, _values2.default)(subscriptions).forEach(function (subscription) {\n _this._createSubscription(subscription.domain, subscription.resources, subscription.subscriber, subscription.identity);\n });\n }\n resolve();\n });\n });\n }\n }, {\n key: '_onSubscribe',\n\n\n //message received to set a routing path\n value: function _onSubscribe(msg) {\n\n var _this = this;\n\n var resources = msg.body.resources;\n\n var subscriber = msg.from;\n var domain = (0, _utils.divideURL)(resources[0]).domain; //we are assuming resources are all from the same domain\n\n var identity = msg.body.identity;\n\n _this._createSubscription(domain, resources, subscriber, identity).then(function (reply) {\n //forward to hyperty:\n reply.id = msg.id;\n reply.from = _this._url;\n reply.to = subscriber;\n reply.body = msg.body;\n reply.body.code = 200;\n\n log.log('[SubscriptionManager] - craeteSubscription: ', msg, reply, subscriber);\n\n _this._bus.postMessage(reply);\n\n if (!_this._subscriptionsStorage[subscriber]) {\n\n _this._subscriptionsStorage[subscriber] = {\n domain: domain,\n resources: resources,\n subscriber: subscriber,\n identity: identity\n };\n } else {\n resources.forEach(function (resource) {\n if (!_this._subscriptionsStorage[subscriber].resources.includes(resource)) {\n _this._subscriptionsStorage[subscriber].resources.push(resource);\n }\n });\n }\n\n _this._storage.set('subscriptions', 1, _this._subscriptionsStorage);\n });\n }\n }, {\n key: '_createSubscription',\n value: function _createSubscription(domain, resources, subscriber, identity) {\n\n var _this = this;\n\n return new _promise2.default(function (resolve) {\n //FLOW-OUT: subscribe message to the msg-node, registering listeners on the broker\n\n var nodeSubscribeMsg = {\n type: 'subscribe', from: _this._url, to: 'domain://msg-node.' + domain + '/sm',\n body: { identity: identity, resources: resources, source: subscriber }\n };\n\n //subscribe in msg-node\n _this._bus.postMessage(nodeSubscribeMsg, function (reply) {\n log.log('[SubscriptionManager] node-subscribe-response: ', reply);\n\n //if (reply.body.code === 200) {//TODO: uncomment when MN replies with correct response body code\n\n //TODO: support multiple routes for multiple resources\n\n var subscription = _this._subscriptions[subscriber];\n log.log('[SubscriptionManager] - ', _this._subscriptions, resources, _this._subscriptions.hasOwnProperty(subscriber));\n if (!subscription) {\n _this._subscriptions[subscriber] = {};\n }\n\n resources.forEach(function (resource) {\n _this._subscriptions[subscriber][resource] = new _Subscription2.default(_this._bus, subscriber, resource);\n });\n\n resolve(reply);\n });\n });\n }\n\n // message received to remove routing path\n\n }, {\n key: '_onUnSubscribe',\n value: function _onUnSubscribe(msg) {\n var _this = this;\n\n var unsubscriber = msg.from;\n var resource = msg.body.resource;\n\n if (_this._subscriptions[unsubscriber] && _this._subscriptions[unsubscriber][resource]) {\n var domain = (0, _utils.divideURL)(resource).domain;\n var subscription = _this._subscriptions[unsubscriber][resource];\n\n //FLOW-OUT: message sent to msg-node SubscriptionManager component\n _this._bus.postMessage({\n type: 'unsubscribe', from: _this._url, to: 'domain://msg-node.' + domain + '/sm',\n body: { resources: [resource], source: unsubscriber }\n });\n\n subscription._releaseListeners();\n delete _this._subscriptions[unsubscriber][resource];\n\n if (_this._subscriptionsStorage[unsubscriber]) {\n var i = _this._subscriptionsStorage[unsubscriber].resources.indexOf(resource);\n if (i != -1) {\n _this._subscriptionsStorage[unsubscriber].resources.splice(i, 1);\n }\n _this._storage.set('subscriptions', 1, _this._subscriptionsStorage);\n }\n }\n\n _this._bus.postMessage({\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 200 }\n });\n }\n\n //message received to read existing routing paths. At this point limited to read all existing routing paths set for one listener\n\n }, {\n key: '_onRead',\n value: function _onRead(msg) {\n\n var _this = this;\n\n var listenerAddress = msg.body.resource;\n var reply = void 0;\n\n log.log('[SubscriptionManager] - request to read Subscriptions: ', msg);\n\n _this._storage.get('subscriptions').then(function (subscriptions) {\n if (subscriptions && subscriptions[listenerAddress]) {\n var resources = subscriptions[listenerAddress].resources;\n\n reply = {\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 200, value: resources }\n };\n } else {\n reply = {\n id: msg.id, type: 'response', from: msg.to, to: msg.from,\n body: { code: 404, description: 'Not Found' }\n };\n }\n _this._bus.postMessage(reply);\n });\n }\n }, {\n key: 'url',\n get: function get() {\n return this._url;\n }\n }]);\n return SubscriptionManager;\n}();\n\nexports.default = SubscriptionManager;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE3LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zdWJzY3JpcHRpb25NYW5hZ2VyL1N1YnNjcmlwdGlvbk1hbmFnZXIuanM/ZGE4MiJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogQ29weXJpZ2h0IDIwMTYgUFQgSW5vdmHDp8OjbyBlIFNpc3RlbWFzIFNBXG4qIENvcHlyaWdodCAyMDE2IElORVNDLUlEXG4qIENvcHlyaWdodCAyMDE2IFFVT0JJUyBORVRXT1JLUyBTTFxuKiBDb3B5cmlnaHQgMjAxNiBGUkFVTkhPRkVSLUdFU0VMTFNDSEFGVCBaVVI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UFDQTtBQUVBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBSkE7QUFPQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBQ0E7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBRUE7QUFDQTs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBQ0E7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFGQTtBQUtBO0FBQ0E7QUFDQTtBQUNBOzs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFGQTtBQUlBO0FBQ0E7QUFDQTtBQUNBOzs7QUF2SkE7QUFBQTtBQUFBOzs7OztBQTBKQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///517\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('Subscription'); // Log System\n\nvar Subscription = function () {\n function Subscription(bus, subscriber, resource) {\n (0, _classCallCheck3.default)(this, Subscription);\n\n var _this = this;\n _this._subscriber = subscriber;\n _this.resource = resource;\n\n log.log('[SubscriptionManager.Subscription] new: ', subscriber, resource);\n\n //add forward\n _this._listener = bus.addForward(resource, subscriber);\n }\n\n (0, _createClass3.default)(Subscription, [{\n key: '_releaseListeners',\n value: function _releaseListeners() {\n var _this = this;\n\n _this._listener.remove();\n }\n }]);\n return Subscription;\n}();\n\nexports.default = Subscription;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9zdWJzY3JpcHRpb25NYW5hZ2VyL1N1YnNjcmlwdGlvbi5qcz85NDk1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIExvZyBTeXN0ZW1cbmltcG9ydCAqIGFzIGxvZ2dlciBmcm9tICdsb2dsZXZlbCc7XG5sZXQgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignU3Vic2NyaXB0aW9uJyk7XG5cbmNsYXNzIFN1YnNjcmlwdGlvbiB7XG5cbiAgY29uc3RydWN0b3IoYnVzLCBzdWJzY3JpYmVyLCByZXNvdXJjZSkge1xuICAgIGxldCBfdGhpcyA9IHRoaXM7XG4gICAgX3RoaXMuX3N1YnNjcmliZXIgPSBzdWJzY3JpYmVyO1xuICAgIF90aGlzLnJlc291cmNlID0gcmVzb3VyY2U7XG5cbiAgICBsb2cubG9nKCdbU3Vic2NyaXB0aW9uTWFuYWdlci5TdWJzY3JpcHRpb25dIG5ldzogJywgc3Vic2NyaWJlciwgcmVzb3VyY2UpXG5cbiAgICAvL2FkZCBmb3J3YXJkXG4gICAgX3RoaXMuX2xpc3RlbmVyID0gYnVzLmFkZEZvcndhcmQocmVzb3VyY2UsIHN1YnNjcmliZXIpO1xuXG4gIH1cblxuICBfcmVsZWFzZUxpc3RlbmVycygpIHtcbiAgICBsZXQgX3RoaXMgPSB0aGlzO1xuXG4gICAgX3RoaXMuX2xpc3RlbmVyLnJlbW92ZSgpO1xuXG4gIH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCBTdWJzY3JpcHRpb247XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gc3JjL3N1YnNjcmlwdGlvbk1hbmFnZXIvU3Vic2NyaXB0aW9uLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUNBO0FBQ0E7QUFEQTtBQUNBOzs7OztBQUFBO0FBQ0E7QUFDQTtBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBOzs7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///518\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(46);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _promise = __webpack_require__(9);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _getPrototypeOf = __webpack_require__(60);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(68);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(69);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _loglevel = __webpack_require__(7);\n\nvar logger = _interopRequireWildcard(_loglevel);\n\nvar _AllowOverrides = __webpack_require__(206);\n\nvar _AllowOverrides2 = _interopRequireDefault(_AllowOverrides);\n\nvar _BlockOverrides = __webpack_require__(207);\n\nvar _BlockOverrides2 = _interopRequireDefault(_BlockOverrides);\n\nvar _utils = __webpack_require__(14);\n\nvar _FirstApplicable = __webpack_require__(208);\n\nvar _FirstApplicable2 = _interopRequireDefault(_FirstApplicable);\n\nvar _ReThinkCtx2 = __webpack_require__(520);\n\nvar _ReThinkCtx3 = _interopRequireDefault(_ReThinkCtx2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar log = logger.getLogger('PEP');\n\nvar RuntimeCoreCtx = function (_ReThinkCtx) {\n (0, _inherits3.default)(RuntimeCoreCtx, _ReThinkCtx);\n\n function RuntimeCoreCtx(runtimeURL, idModule, runtimeRegistry, storageManager, runtimeCapabilities) {\n (0, _classCallCheck3.default)(this, RuntimeCoreCtx);\n\n var _this2 = (0, _possibleConstructorReturn3.default)(this, (RuntimeCoreCtx.__proto__ || (0, _getPrototypeOf2.default)(RuntimeCoreCtx)).call(this));\n\n _this2._runtimeURL = runtimeURL;\n _this2._pepURL = _this2._runtimeURL + '/pep';\n _this2._guiURL = _this2._runtimeURL + '/policy-gui';\n _this2.idModule = idModule;\n _this2.runtimeRegistry = runtimeRegistry;\n _this2.activeUserPolicy = undefined;\n _this2.serviceProviderPolicy = {};\n _this2.userPolicies = {};\n _this2.storageManager = storageManager;\n _this2.runtimeCapabilities = runtimeCapabilities;\n return _this2;\n }\n\n (0, _createClass3.default)(RuntimeCoreCtx, [{\n key: 'loadConfigurations',\n value: function loadConfigurations() {\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n console.log(_this.storageManager);\n\n _this.storageManager.get('rethink:activePolicy').then(function (value) {\n _this.activeUserPolicy = value;\n\n return _this.storageManager.get('rethink:groups');\n }).then(function (groupInfo) {\n var groups = groupInfo;\n _this.groups = groups === undefined ? {} : groups;\n\n return _this.storageManager.get('rethink:spPolicies');\n }).then(function (policiesInfo) {\n var spPolicies = policiesInfo;\n _this.serviceProviderPolicy = spPolicies === undefined ? {} : spPolicies;\n\n _this._loadUserPolicies().then(function () {\n resolve();\n });\n });\n });\n }\n }, {\n key: 'getPolicies',\n value: function getPolicies(message, isIncomingMessage) {\n var policies = {};\n\n if (this.activeUserPolicy !== undefined) {\n policies.userPolicy = this.userPolicies[this.activeUserPolicy];\n }\n\n policies.serviceProviderPolicy = this.getServiceProviderPolicy(message, isIncomingMessage);\n\n return policies;\n }\n }, {\n key: '_isValidUpdate',\n value: function _isValidUpdate(message) {\n var _this = this;\n return new _promise2.default(function (resolve, reject) {\n if (message.from.split('://').length > 1) {\n _this.idModule._getHypertyFromDataObject(message.from).then(function (hypertyURL) {\n if (hypertyURL === message.body.source) {\n resolve(message);\n } else {\n reject('The source of the message is not valid.');\n }\n }, function (error) {\n reject(error);\n });\n } else {\n resolve(message);\n }\n });\n }\n }, {\n key: 'getMyEmails',\n value: function getMyEmails() {\n var identities = this.idModule.getIdentities();\n var emails = [];\n\n for (var i in identities) {\n emails.push((0, _utils.getUserEmailFromURL)(identities[i].identity));\n }\n\n return emails;\n }\n }, {\n key: 'getMyHyperties',\n value: function getMyHyperties() {\n var hyperties = this.runtimeRegistry.hypertiesList;\n var hypertiesNames = [];\n\n for (var i in hyperties) {\n var hypertyName = hyperties[i].objectName;\n if (hypertiesNames.indexOf(hypertyName) === -1) {\n hypertiesNames.push(hypertyName);\n }\n }\n\n return hypertiesNames;\n }\n }, {\n key: 'getServiceProviderPolicy',\n value: function getServiceProviderPolicy(message, isIncoming) {\n var policy = void 0;\n\n if (isIncoming) {\n var toHyperty = this.runtimeRegistry.getHypertyName(message.to);\n policy = this.serviceProviderPolicy[toHyperty];\n } else {\n var fromHyperty = this.runtimeRegistry.getHypertyName(message.from);\n policy = this.serviceProviderPolicy[fromHyperty];\n }\n return policy;\n }\n }, {\n key: 'getURL',\n value: function getURL(url) {\n var splitURL = url.split('/');\n return splitURL[0] + '//' + splitURL[2] + '/' + splitURL[3];\n }\n\n /**\n * Creates a group with the given name.\n * @param {String} groupName\n */\n\n }, {\n key: '_loadUserPolicies',\n value: function _loadUserPolicies() {\n var _this3 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n\n _this.storageManager.get('rethink:userPolicies').then(function (value) {\n var policies = value;\n if (policies !== undefined) {\n for (var i in policies) {\n _this3.pep.addPolicy('USER', i, policies[i]);\n }\n }\n resolve();\n });\n });\n }\n }, {\n key: '_getLastComponentOfURL',\n value: function _getLastComponentOfURL(url) {\n var split = url.split('/');\n return split[split.length - 1];\n }\n }, {\n key: '_getPoliciesJSON',\n value: function _getPoliciesJSON(policies) {\n for (var i in policies) {\n var combiningAlgorithm = policies[i].combiningAlgorithm;\n if (combiningAlgorithm instanceof _BlockOverrides2.default) {\n policies[i].combiningAlgorithm = 'blockOverrides';\n } else {\n if (combiningAlgorithm instanceof _AllowOverrides2.default) {\n policies[i].combiningAlgorithm = 'allowOverrides';\n } else {\n if (combiningAlgorithm instanceof _FirstApplicable2.default) {\n policies[i].combiningAlgorithm = 'firstApplicable';\n } else {\n policies[i].combiningAlgorithm = undefined;\n }\n }\n }\n }\n\n return policies;\n }\n }, {\n key: 'saveActivePolicy',\n value: function saveActivePolicy() {\n var _this4 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this.storageManager.set('rethink:activePolicy', 0, _this4.activeUserPolicy).then(function () {\n resolve();\n });\n });\n }\n }, {\n key: 'saveGroups',\n value: function saveGroups() {\n var _this5 = this;\n\n var _this = this;\n\n return new _promise2.default(function (resolve, reject) {\n _this.storageManager.set('rethink:groups', 0, _this5.groups).then(function () {\n resolve();\n });\n });\n }\n }, {\n key: 'savePolicies',\n value: function savePolicies(source, policy, key) {\n var policiesJson = void 0;\n\n switch (source) {\n case 'USER':\n policiesJson = (0, _stringify2.default)(this.userPolicies);\n policiesJson = this._getPoliciesJSON(JSON.parse(policiesJson));\n this.storageManager.set('rethink:userPolicies', 0, policiesJson);\n break;\n case 'SERVICE_PROVIDER':\n if (policy !== undefined & key !== undefined) {\n this.serviceProviderPolicy[key] = policy;\n }\n policiesJson = (0, _stringify2.default)(this.serviceProviderPolicy);\n policiesJson = this._getPoliciesJSON(JSON.parse(policiesJson));\n this.storageManager.set('rethink:spPolicies', 0, policiesJson);\n break;\n default:\n throw Error('Unknown policy source: ' + source);\n }\n }\n }, {\n key: 'getGroupsNames',\n value: function getGroupsNames() {\n var myGroups = this.groups;\n var groupsNames = [];\n if (myGroups !== undefined) {\n for (var groupName in myGroups) {\n groupsNames.push(groupName);\n }\n }\n return groupsNames;\n }\n }, {\n key: 'getGroup',\n value: function getGroup(groupName, destination) {\n var members = [];\n\n if (groupName === 'preauthorised') {\n var dataObjectURL = destination.split('/');\n dataObjectURL.pop();\n dataObjectURL = dataObjectURL[0] + '//' + dataObjectURL[2];\n members = this.runtimeRegistry.getPreAuthSubscribers(dataObjectURL);\n } else {\n if (this.groups[groupName] !== undefined) {\n members = this.groups[groupName];\n }\n }\n\n return members;\n }\n\n /**\n * Creates a group with the given name.\n * @param {String} groupName\n */\n\n }, {\n key: 'createGroup',\n value: function createGroup(groupName) {\n this.groups[groupName] = [];\n this.saveGroups();\n }\n }, {\n key: 'deleteGroup',\n value: function deleteGroup(groupName) {\n delete this.groups[groupName];\n this.saveGroups();\n }\n\n /**\n * Adds the given user email to the group with the given name.\n * @param {String} userEmail\n * @param {String} groupName\n */\n\n }, {\n key: 'addToGroup',\n value: function addToGroup(groupName, userEmail) {\n var myGroups = this.groups;\n if (myGroups[groupName] !== undefined) {\n if (myGroups[groupName].indexOf(userEmail) === -1) {\n myGroups[groupName].push(userEmail);\n this.saveGroups();\n }\n } else {\n throw Error('Group \"' + groupName + '\" does not exist!');\n }\n }\n }, {\n key: 'removeFromGroup',\n value: function removeFromGroup(groupName, userEmail) {\n var group = this.groups[groupName];\n\n group.splice(group.indexOf(userEmail), 1);\n this.saveGroups();\n }\n }, {\n key: 'pepURL',\n get: function get() {\n var _this = this;\n return _this._pepURL;\n }\n }, {\n key: 'guiURL',\n get: function get() {\n var _this = this;\n return _this._guiURL;\n }\n }, {\n key: 'runtimeURL',\n get: function get() {\n var _this = this;\n return _this._runtimeURL;\n }\n\n /**\n * return the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n\n }, {\n key: 'messageBus',\n get: function get() {\n var _this = this;\n return _this._messageBus;\n }\n\n /**\n * Set the messageBus in this Registry\n * @param {MessageBus} messageBus\n */\n ,\n set: function set(messageBus) {\n var _this = this;\n _this._messageBus = messageBus;\n }\n }, {\n key: 'subscription',\n get: function get() {\n return this._subscription;\n },\n set: function set(params) {\n this._subscription = params.message.body.subscriber;\n }\n }]);\n return RuntimeCoreCtx;\n}(_ReThinkCtx3.default);\n\nexports.default = RuntimeCoreCtx;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTE5LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvY29udGV4dC9SdW50aW1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iwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///519\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(1);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(2);\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _utils = __webpack_require__(14);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ReThinkCtx = function () {\n function ReThinkCtx() {\n (0, _classCallCheck3.default)(this, ReThinkCtx);\n\n this.defaultBehaviour = true;\n this.groups = {};\n }\n\n (0, _createClass3.default)(ReThinkCtx, [{\n key: 'scheme',\n get: function get() {\n return this._scheme;\n },\n set: function set(params) {\n var from = params.message.from;\n if ((0, _utils.isDataObjectURL)(from)) {\n this._scheme = (0, _utils.divideURL)(from).type;\n } else {\n this._scheme = undefined;\n }\n }\n }, {\n key: 'date',\n get: function get() {\n return this._date;\n },\n set: function set(now) {\n var date = new Date();\n var day = String(date.getDate());\n if (day.length === 1) {\n day = '0' + day;\n }\n var month = String(date.getMonth() + 1);\n if (month.length === 1) {\n month = '0' + month;\n }\n this._date = day + '/' + month + '/' + date.getFullYear();\n }\n }, {\n key: 'domain',\n get: function get() {\n return this._domain;\n },\n set: function set(params) {\n if (params.message.body.identity !== undefined) {\n this._domain = (0, _utils.divideEmail)(params.message.body.identity.userProfile.username).domain;\n }\n }\n }, {\n key: 'type',\n get: function get() {\n return this._type;\n },\n set: function set(params) {\n var message = params.message;\n if (message.body.value !== undefined) {\n this._type = message.body.value.resourceType;\n }\n }\n }, {\n key: 'source',\n get: function get() {\n return this._source;\n },\n set: function set(params) {\n if (params.message.body.identity !== undefined) {\n this._source = params.message.body.identity.userProfile.username;\n }\n }\n }, {\n key: 'time',\n get: function get() {\n return this._time;\n },\n set: function set(now) {\n now = new Date();\n var minutes = String(now.getMinutes());\n if (minutes.length === 1) {\n minutes = '0' + minutes;\n }\n this._time = parseInt(String(now.getHours()) + minutes);\n }\n }, {\n key: 'weekday',\n get: function get() {\n return this._weekday;\n },\n set: function set(now) {\n this._weekday = String(new Date().getDay());\n }\n }]);\n return ReThinkCtx;\n}();\n\nexports.default = ReThinkCtx;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTIwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9wb2xpY3kvUmVUaGlua0N0eC5qcz82ZmRhIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7ZGl2aWRlRW1haWwsIGRpdmlkZVVSTCwgaXNEYXRhT2JqZWN0VVJMfSBmcm9tICcuLi91dGlscy91dGlscyc7XG5cbmNsYXNzIFJlVGhpbmtDdHgge1xuXG4gIGNvbnN0cnVjdG9yKCkge1xuICAgIHRoaXMuZGVmYXVsdEJlaGF2aW91ciA9IHRydWU7XG4gICAgdGhpcy5ncm91cHMgPSB7fTtcbiAgfVxuXG4gIGdldCBzY2hlbWUoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NjaGVtZTtcbiAgfVxuXG4gIGdldCBkYXRlKCkge1xuICAgIHJldHVybiB0aGlzLl9kYXRlO1xuICB9XG5cbiAgZ2V0IGRvbWFpbigpIHtcbiAgICByZXR1cm4gdGhpcy5fZG9tYWluO1xuICB9XG5cbiAgZ2V0IHR5cGUoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3R5cGU7XG4gIH1cblxuICBnZXQgc291cmNlKCkge1xuICAgIHJldHVybiB0aGlzLl9zb3VyY2U7XG4gIH1cblxuICBnZXQgdGltZSgpIHtcbiAgICByZXR1cm4gdGhpcy5fdGltZTtcbiAgfVxuXG4gIGdldCB3ZWVrZGF5KCkge1xuICAgIHJldHVybiB0aGlzLl93ZWVrZGF5O1xuICB9XG5cbiAgc2V0I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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBeENBO0FBQ0E7QUFDQTtBQXdDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUExQ0E7QUFDQTtBQUNBO0FBMENBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBN0NBO0FBQ0E7QUFDQTtBQTZDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUEvQ0E7QUFDQTtBQUNBO0FBK0NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQXBEQTtBQUNBO0FBQ0E7QUFvREE7QUFDQTtBQUNBOzs7OztBQUlBO0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///520\n")}])}); \ No newline at end of file diff --git a/dist/Runtime.light.js b/dist/Runtime.light.js index 2ac43bde..23040d7c 100644 --- a/dist/Runtime.light.js +++ b/dist/Runtime.light.js @@ -1,3 +1,273 @@ +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) +// licence: +/** +* Copyright 2016 PT Inovação e Sistemas SA +* Copyright 2016 INESC-ID +* Copyright 2016 QUOBIS NETWORKS SL +* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V +* Copyright 2016 ORANGE SA +* Copyright 2016 Deutsche Telekom AG +* Copyright 2016 Apizee +* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + + +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) +// licence: +/** +* Copyright 2016 PT Inovação e Sistemas SA +* Copyright 2016 INESC-ID +* Copyright 2016 QUOBIS NETWORKS SL +* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V +* Copyright 2016 ORANGE SA +* Copyright 2016 Deutsche Telekom AG +* Copyright 2016 Apizee +* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + + +// version: 0.11.1 +// date: Fri Jan 12 2018 12:41:34 GMT+0000 (WET) +// licence: +/** +* Copyright 2016 PT Inovação e Sistemas SA +* Copyright 2016 INESC-ID +* Copyright 2016 QUOBIS NETWORKS SL +* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V +* Copyright 2016 ORANGE SA +* Copyright 2016 Deutsche Telekom AG +* Copyright 2016 Apizee +* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + + +// version: 0.11.1 +// date: Fri Jan 12 2018 12:41:34 GMT+0000 (WET) +// licence: +/** +* Copyright 2016 PT Inovação e Sistemas SA +* Copyright 2016 INESC-ID +* Copyright 2016 QUOBIS NETWORKS SL +* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V +* Copyright 2016 ORANGE SA +* Copyright 2016 Deutsche Telekom AG +* Copyright 2016 Apizee +* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + + +// version: 0.11.0 +// date: Fri Jan 12 2018 12:21:50 GMT+0000 (WET) +// licence: +/** +* Copyright 2016 PT Inovação e Sistemas SA +* Copyright 2016 INESC-ID +* Copyright 2016 QUOBIS NETWORKS SL +* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V +* Copyright 2016 ORANGE SA +* Copyright 2016 Deutsche Telekom AG +* Copyright 2016 Apizee +* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + + +// version: 0.11.0 +// date: Fri Jan 12 2018 12:21:50 GMT+0000 (WET) +// licence: +/** +* Copyright 2016 PT Inovação e Sistemas SA +* Copyright 2016 INESC-ID +* Copyright 2016 QUOBIS NETWORKS SL +* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V +* Copyright 2016 ORANGE SA +* Copyright 2016 Deutsche Telekom AG +* Copyright 2016 Apizee +* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + + +// version: 0.11.0 +// date: Fri Jan 12 2018 12:17:17 GMT+0000 (WET) +// licence: +/** +* Copyright 2016 PT Inovação e Sistemas SA +* Copyright 2016 INESC-ID +* Copyright 2016 QUOBIS NETWORKS SL +* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V +* Copyright 2016 ORANGE SA +* Copyright 2016 Deutsche Telekom AG +* Copyright 2016 Apizee +* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + + +// version: 0.11.0 +// date: Fri Jan 12 2018 12:17:17 GMT+0000 (WET) +// licence: +/** +* Copyright 2016 PT Inovação e Sistemas SA +* Copyright 2016 INESC-ID +* Copyright 2016 QUOBIS NETWORKS SL +* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V +* Copyright 2016 ORANGE SA +* Copyright 2016 Deutsche Telekom AG +* Copyright 2016 Apizee +* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + + +// version: 0.11.0 +// date: Fri Jan 12 2018 12:14:42 GMT+0000 (WET) +// licence: +/** +* Copyright 2016 PT Inovação e Sistemas SA +* Copyright 2016 INESC-ID +* Copyright 2016 QUOBIS NETWORKS SL +* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V +* Copyright 2016 ORANGE SA +* Copyright 2016 Deutsche Telekom AG +* Copyright 2016 Apizee +* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + + +// version: 0.11.0 +// date: Fri Jan 12 2018 12:14:42 GMT+0000 (WET) +// licence: +/** +* Copyright 2016 PT Inovação e Sistemas SA +* Copyright 2016 INESC-ID +* Copyright 2016 QUOBIS NETWORKS SL +* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V +* Copyright 2016 ORANGE SA +* Copyright 2016 Deutsche Telekom AG +* Copyright 2016 Apizee +* Copyright 2016 TECHNISCHE UNIVERSITAT BERLIN +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + + // version: 0.11.0 // date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) // licence: diff --git a/dist/Runtime.min.js b/dist/Runtime.min.js index 89cdf355..7235294c 100644 --- a/dist/Runtime.min.js +++ b/dist/Runtime.min.js @@ -1,5 +1,5 @@ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA @@ -3883,7 +3883,7 @@ var d=(0,c.getConfigurationResources)(t.runtimeConfiguration,"catalogueURLs","pr // log.log('Error: ', error); o=i,i=u;var r=(0,c.getConfigurationResources)(t.runtimeConfiguration,"catalogueURLs","protocolstub"); // log.log('Fallback -> Load Protocolstub for domain, ' + domain + ' : ', protostub); -return s=r.prefix+i+r.suffix+o,t.catalogue.getStubDescriptor(s,!0,t.constraints)}).then(function(e){r(e)}).catch(function(e){n(e)})})}},{key:"getIdpProxyDescriptor",value:function(e){var t=this;return new i.default(function(r,n){var i=void 0,o=void 0,s=(0,c.divideURL)(t.runtimeURL),a=s.domain,u=t.constraints;if(u.onlyAccessToken=!0,u.onlyIdAssertionValidation=!0,e.includes("://")){var f=(0,c.divideURL)(e);i=f.domain;var l=f.identity;o=l?l.substring(l.lastIndexOf("/")+1):"default"}else o="default",i=e;var d=(0,c.getConfigurationResources)(t.runtimeConfiguration,"catalogueURLs","idpProxy"); +return s=r.prefix+i+r.suffix+o,t.catalogue.getStubDescriptor(s,!0,t.constraints)}).then(function(e){r(e)}).catch(function(e){n(e)})})}},{key:"getIdpProxyDescriptor",value:function(e){var t=this;return new i.default(function(r,n){var i=void 0,o=void 0,s=(0,c.divideURL)(t.runtimeURL),a=s.domain,u=t.constraints;if(u.constraints.onlyAccessToken=!0,u.constraints.onlyIdAssertionValidation=!0,e.includes("://")){var f=(0,c.divideURL)(e);i=f.domain;var l=f.identity;o=l?l.substring(l.lastIndexOf("/")+1):"default"}else o="default",i=e;var d=(0,c.getConfigurationResources)(t.runtimeConfiguration,"catalogueURLs","idpProxy"); // log.log('Load Idp Proxy for domain, ' + domain + ' : ', idpProxyURL); return e=d.prefix+i+d.suffix+o,t.catalogue.getIdpProxyDescriptor(e,!0,u).then(function(e){r(e)}).catch(function(){ // log.log('Load Idp Proxy for domain, ' + domain + ' : ', idpProxyURL); diff --git a/dist/minibus.js b/dist/minibus.js index 37a3b783..60054fa4 100644 --- a/dist/minibus.js +++ b/dist/minibus.js @@ -1,5 +1,5 @@ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA @@ -25,8 +25,8 @@ **/ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA diff --git a/dist/sandbox.js b/dist/sandbox.js index 8ac950a5..3fa9ac87 100644 --- a/dist/sandbox.js +++ b/dist/sandbox.js @@ -1,5 +1,5 @@ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA @@ -25,8 +25,8 @@ **/ -// version: 0.11.0 -// date: Wed Jan 10 2018 16:54:02 GMT+0000 (WET) +// version: 0.11.1 +// date: Fri Jan 12 2018 12:42:38 GMT+0000 (WET) // licence: /** * Copyright 2016 PT Inovação e Sistemas SA diff --git a/package.json b/package.json index a9572dce..8b1971da 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "runtime-core", - "version": "0.11.0", + "version": "0.11.1", "description": "core runtime development", "files": [ "dist" diff --git a/src/runtime/Descriptors.js b/src/runtime/Descriptors.js index 42695127..2ff80c83 100755 --- a/src/runtime/Descriptors.js +++ b/src/runtime/Descriptors.js @@ -98,8 +98,9 @@ class Descriptors { let originDividedURL = divideURL(this.runtimeURL); let originDomain = originDividedURL.domain; let constraints = this.constraints; - constraints.onlyAccessToken = true; - constraints.onlyIdAssertionValidation = true; + + constraints.constraints.onlyAccessToken = true; + constraints.constraints.onlyIdAssertionValidation = true; if (idpProxyURL.includes('://')) { let dividedURL = divideURL(idpProxyURL);