UNPKG

@supermapgis/iclient-maplibregl

Version:

@supermapgis/iclient-maplibregl 是一套基于 Maplibre GL 的云 GIS 网络客户端开发平台, 支持访问 SuperMap iServer / iEdge / iPortal / iManager / Online 的地图、服务和资源,为用户提供了完整专业的 GIS 能力, 同时提供了优秀的可视化功能。

22 lines (20 loc) 1.73 MB
/*! * forked from antvis/L7 * Copyright (c) 2018 AntV team * Copyright© 2000-2024 SuperMap Software Co. Ltdnpm * license: MIT * version: 20240927 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("maplibre-gl")):"function"==typeof define&&define.amd?define(["exports","maplibre-gl"],t):t((e=e||self).L7={},e.maplibregl)}(this,(function(e,t){"use strict";function n(e,t,n,r,i){var o={};return Object.keys(r).forEach((function(e){o[e]=r[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,u,"next",e)}function u(e){i(a,r,o,s,u,"throw",e)}s(void 0)}))}}function a(e,t,n){return t=d(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t,n){if(m())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&S(i,n.prototype),i}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w(r.key),r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=k(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function f(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=A(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(null,arguments)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}function g(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function x(){x=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new P(r||[]);return i(a,"_invoke",{value:w(e,n,s)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",p="executing",d="completed",v={};function g(){}function m(){}function y(){}var _={};c(_,a,(function(){return this}));var b=Object.getPrototypeOf,S=b&&b(b(I([])));S&&S!==n&&r.call(S,a)&&(_=S);var E=y.prototype=g.prototype=Object.create(_);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function n(i,o,a,s){var u=h(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function w(t,n,r){var i=f;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===d){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=h(t,n,r);if("normal"===c.type){if(i=r.done?d:"suspendedYield",c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=d,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return m.prototype=y,i(E,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:m,configurable:!0}),m.displayName=c(y,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,c(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},A(T.prototype),c(T.prototype,s,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new T(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(E),c(E,u,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function S(e,t){return(S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}function T(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function M(e){var t="function"==typeof Map?new Map:void 0;return(M=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return u(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),S(n,e)})(e)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var P,I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function O(e,t){return e(t={exports:{}},t.exports),t.exports /*! ***************************************************************************** Copyright (C) Microsoft. All rights reserved. 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 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */}!function(e){!function(t){var n="object"==typeof I?I:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=i(e);function i(e,t){return function(n,r){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0===n.Reflect?n.Reflect=e:r=i(n.Reflect,r),function(e){var t=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,s=!o&&!a,u={create:o?function(){return R(Object.create(null))}:a?function(){return R({__proto__:null})}:function(){return R({})},has:s?function(e,n){return t.call(e,n)}:function(e,t){return t in e},get:s?function(e,n){return t.call(e,n)?e[n]:void 0}:function(e,t){return e[t]}},c=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,h=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,r)},t.prototype.values=function(){return new n(this._keys,this._values,o)},t.prototype.entries=function(){return new n(this._keys,this._values,a)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function r(e,t){return e}function o(e,t){return t}function a(e,t){return[e,t]}}():Map,f=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new h}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}():Set,p=new(l||"function"!=typeof WeakMap?function(){var e=u.create(),n=r();return function(){function e(){this._key=r()}return e.prototype.has=function(e){var t=i(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=i(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return i(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=i(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=r()},e}();function r(){var t;do{t="@@WeakMap@@"+a()}while(u.has(e,t));return e[t]=!0,t}function i(e,r){if(!t.call(e,n)){if(!r)return;Object.defineProperty(e,n,{value:u.create()})}return e[n]}function o(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function a(){var e,t=(e=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):o(new Uint8Array(e),e):o(new Array(e),e));t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var n="",r=0;r<16;++r){var i=t[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}():WeakMap);function d(e,t,n){var r=p.get(e);if(b(r)){if(!n)return;r=new h,p.set(e,r)}var i=r.get(t);if(b(i)){if(!n)return;i=new h,r.set(t,i)}return i}function v(e,t,n){var r=d(t,n,!1);return!b(r)&&!!r.has(e)}function g(e,t,n){var r=d(t,n,!1);if(!b(r))return r.get(e)}function m(e,t,n,r){d(n,r,!0).set(e,t)}function y(e,t){var n=[],r=d(e,t,!1);if(b(r))return n;for(var o=function(e){var t=k(e,i);if(!w(t))throw new TypeError;var n=t.call(e);if(!S(n))throw new TypeError;return n}(r.keys()),a=0;;){var s=M(o);if(!s)return n.length=a,n;var u=s.value;try{n[a]=u}catch(e){try{P(o)}finally{throw e}}a++}}function _(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function b(e){return void 0===e}function x(e){return null===e}function S(e){return"object"==typeof e?null!==e:"function"==typeof e}function E(e,t){switch(_(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var n=3===t?"string":5===t?"number":"default",i=k(e,r);if(void 0!==i){var o=i.call(e,n);if(S(o))throw new TypeError;return o}return function(e,t){if("string"===t){var n=e.toString;if(w(n))if(!S(i=n.call(e)))return i;if(w(r=e.valueOf))if(!S(i=r.call(e)))return i}else{var r;if(w(r=e.valueOf))if(!S(i=r.call(e)))return i;var i,o=e.toString;if(w(o))if(!S(i=o.call(e)))return i}throw new TypeError}(e,"default"===n?"number":n)}function A(e){var t=E(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function T(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function w(e){return"function"==typeof e}function C(e){return"function"==typeof e}function k(e,t){var n=e[t];if(null!=n){if(!w(n))throw new TypeError;return n}}function M(e){var t=e.next();return!t.done&&t}function P(e){var t=e.return;t&&t.call(e)}function I(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===c)return t;if(t!==c)return t;var n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var i=r.constructor;return"function"!=typeof i||i===e?t:i}function R(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,n,r){if(b(n)){if(!T(e))throw new TypeError;if(!C(t))throw new TypeError;return function(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!b(r)&&!x(r)){if(!C(r))throw new TypeError;t=r}}return t}(e,t)}if(!T(e))throw new TypeError;if(!S(t))throw new TypeError;if(!S(r)&&!b(r)&&!x(r))throw new TypeError;return x(r)&&(r=void 0),function(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!b(o)&&!x(o)){if(!S(o))throw new TypeError;r=o}}return r}(e,t,n=A(n),r)})),e("metadata",(function(e,t){return function(n,r){if(!S(n))throw new TypeError;if(!b(r)&&!function(e){switch(_(e)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;m(e,t,n,r)}})),e("defineMetadata",(function(e,t,n,r){if(!S(n))throw new TypeError;return b(r)||(r=A(r)),m(e,t,n,r)})),e("hasMetadata",(function(e,t,n){if(!S(t))throw new TypeError;return b(n)||(n=A(n)),function e(t,n,r){if(v(t,n,r))return!0;var i=I(n);return!x(i)&&e(t,i,r)}(e,t,n)})),e("hasOwnMetadata",(function(e,t,n){if(!S(t))throw new TypeError;return b(n)||(n=A(n)),v(e,t,n)})),e("getMetadata",(function(e,t,n){if(!S(t))throw new TypeError;return b(n)||(n=A(n)),function e(t,n,r){if(v(t,n,r))return g(t,n,r);var i=I(n);return x(i)?void 0:e(t,i,r)}(e,t,n)})),e("getOwnMetadata",(function(e,t,n){if(!S(t))throw new TypeError;return b(n)||(n=A(n)),g(e,t,n)})),e("getMetadataKeys",(function(e,t){if(!S(e))throw new TypeError;return b(t)||(t=A(t)),function e(t,n){var r=y(t,n),i=I(t);if(null===i)return r;var o=e(i,n);if(o.length<=0)return r;if(r.length<=0)return o;for(var a=new f,s=[],u=0,c=r;u<c.length;u++){var l=c[u];a.has(l)||(a.add(l),s.push(l))}for(var h=0,p=o;h<p.length;h++){l=p[h];a.has(l)||(a.add(l),s.push(l))}return s}(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!S(e))throw new TypeError;return b(t)||(t=A(t)),y(e,t)})),e("deleteMetadata",(function(e,t,n){if(!S(t))throw new TypeError;b(n)||(n=A(n));var r=d(t,n,!1);if(b(r))return!1;if(!r.delete(e))return!1;if(r.size>0)return!0;var i=p.get(t);return i.delete(n),i.size>0||p.delete(t),!0}))}(r)}()}(P||(P={}));var L=O((function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,a),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,p=l.length;for(c=0;c<p;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,r);break;case 4:l[c].fn.call(l[c].context,t,r,i);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==t||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})),N=L.EventEmitter,D=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NON_CUSTOM_TAG_KEYS=t.POST_CONSTRUCT=t.DESIGN_PARAM_TYPES=t.PARAM_TYPES=t.TAGGED_PROP=t.TAGGED=t.MULTI_INJECT_TAG=t.INJECT_TAG=t.OPTIONAL_TAG=t.UNMANAGED_TAG=t.NAME_TAG=t.NAMED_TAG=void 0,t.NAMED_TAG="named",t.NAME_TAG="name",t.UNMANAGED_TAG="unmanaged",t.OPTIONAL_TAG="optional",t.INJECT_TAG="inject",t.MULTI_INJECT_TAG="multi_inject",t.TAGGED="inversify:tagged",t.TAGGED_PROP="inversify:tagged_props",t.PARAM_TYPES="inversify:paramtypes",t.DESIGN_PARAM_TYPES="design:paramtypes",t.POST_CONSTRUCT="post_construct",t.NON_CUSTOM_TAG_KEYS=[t.INJECT_TAG,t.MULTI_INJECT_TAG,t.NAME_TAG,t.UNMANAGED_TAG,t.NAMED_TAG,t.OPTIONAL_TAG]}));R(D);D.NON_CUSTOM_TAG_KEYS,D.POST_CONSTRUCT,D.DESIGN_PARAM_TYPES,D.PARAM_TYPES,D.TAGGED_PROP,D.TAGGED,D.MULTI_INJECT_TAG,D.INJECT_TAG,D.OPTIONAL_TAG,D.UNMANAGED_TAG,D.NAME_TAG,D.NAMED_TAG;var F=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TargetTypeEnum=t.BindingTypeEnum=t.BindingScopeEnum=void 0;t.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};t.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};t.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}}));R(F);F.TargetTypeEnum,F.BindingTypeEnum,F.BindingScopeEnum;var z=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.id=void 0;var n=0;t.id=function(){return n++}}));R(z);z.id;var B=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Binding=void 0;var n=function(){function e(e,t){this.id=z.id(),this.activated=!1,this.serviceIdentifier=e,this.scope=t,this.type=F.BindingTypeEnum.Invalid,this.constraint=function(e){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return e.prototype.clone=function(){var t=new e(this.serviceIdentifier,this.scope);return t.activated=t.scope===F.BindingScopeEnum.Singleton&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.factory=this.factory,t.provider=this.provider,t.constraint=this.constraint,t.onActivation=this.onActivation,t.cache=this.cache,t},e}();t.Binding=n}));R(B);B.Binding;var j=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.STACK_OVERFLOW=t.CIRCULAR_DEPENDENCY_IN_FACTORY=t.POST_CONSTRUCT_ERROR=t.MULTIPLE_POST_CONSTRUCT_METHODS=t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=t.ARGUMENTS_LENGTH_MISMATCH=t.INVALID_DECORATOR_OPERATION=t.INVALID_TO_SELF_VALUE=t.INVALID_FUNCTION_BINDING=t.INVALID_MIDDLEWARE_RETURN=t.NO_MORE_SNAPSHOTS_AVAILABLE=t.INVALID_BINDING_TYPE=t.NOT_IMPLEMENTED=t.CIRCULAR_DEPENDENCY=t.UNDEFINED_INJECT_ANNOTATION=t.MISSING_INJECT_ANNOTATION=t.MISSING_INJECTABLE_ANNOTATION=t.NOT_REGISTERED=t.CANNOT_UNBIND=t.AMBIGUOUS_MATCH=t.KEY_NOT_FOUND=t.NULL_ARGUMENT=t.DUPLICATED_METADATA=t.DUPLICATED_INJECTABLE_DECORATOR=void 0,t.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",t.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",t.NULL_ARGUMENT="NULL argument",t.KEY_NOT_FOUND="Key Not Found",t.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",t.CANNOT_UNBIND="Could not unbind serviceIdentifier:",t.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",t.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",t.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";t.UNDEFINED_INJECT_ANNOTATION=function(e){return"@inject called with undefined this could mean that the class "+e+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},t.CIRCULAR_DEPENDENCY="Circular dependency found:",t.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",t.INVALID_BINDING_TYPE="Invalid binding type:",t.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",t.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",t.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",t.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",t.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";t.ARGUMENTS_LENGTH_MISMATCH=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"The number of constructor arguments in the derived class "+e[0]+" must be >= than the number of constructor arguments of its base class."},t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",t.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";t.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"@postConstruct error in class "+e[0]+": "+e[1]};t.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"It looks like there is a circular dependency in one of the '"+e[0]+"' bindings. Please investigate bindings withservice identifier '"+e[1]+"'."},t.STACK_OVERFLOW="Maximum call stack size exceeded"}));R(j);j.STACK_OVERFLOW,j.CIRCULAR_DEPENDENCY_IN_FACTORY,j.POST_CONSTRUCT_ERROR,j.MULTIPLE_POST_CONSTRUCT_METHODS,j.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK,j.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE,j.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE,j.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT,j.ARGUMENTS_LENGTH_MISMATCH,j.INVALID_DECORATOR_OPERATION,j.INVALID_TO_SELF_VALUE,j.INVALID_FUNCTION_BINDING,j.INVALID_MIDDLEWARE_RETURN,j.NO_MORE_SNAPSHOTS_AVAILABLE,j.INVALID_BINDING_TYPE,j.NOT_IMPLEMENTED,j.CIRCULAR_DEPENDENCY,j.UNDEFINED_INJECT_ANNOTATION,j.MISSING_INJECT_ANNOTATION,j.MISSING_INJECTABLE_ANNOTATION,j.NOT_REGISTERED,j.CANNOT_UNBIND,j.AMBIGUOUS_MATCH,j.KEY_NOT_FOUND,j.NULL_ARGUMENT,j.DUPLICATED_METADATA,j.DUPLICATED_INJECTABLE_DECORATOR;var U=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataReader=void 0;var n=function(){function e(){}return e.prototype.getConstructorMetadata=function(e){return{compilerGeneratedMetadata:Reflect.getMetadata(D.PARAM_TYPES,e),userGeneratedMetadata:Reflect.getMetadata(D.TAGGED,e)||{}}},e.prototype.getPropertiesMetadata=function(e){return Reflect.getMetadata(D.TAGGED_PROP,e)||[]},e}();t.MetadataReader=n}));R(U);U.MetadataReader;var V=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BindingCount=void 0;t.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}}));R(V);V.BindingCount;var G=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isStackOverflowExeption=void 0,t.isStackOverflowExeption=function(e){return e instanceof RangeError||e.message===j.STACK_OVERFLOW}}));R(G);G.isStackOverflowExeption;var H=O((function(e,t){function n(e){return"function"==typeof e?e.name:"symbol"==typeof e?e.toString():e}function r(e){if(e.name)return e.name;var t=e.toString(),n=t.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+t}Object.defineProperty(t,"__esModule",{value:!0}),t.circularDependencyToException=t.listMetadataForTarget=t.listRegisteredBindingsForServiceIdentifier=t.getServiceIdentifierAsString=t.getFunctionName=void 0,t.getServiceIdentifierAsString=n,t.listRegisteredBindingsForServiceIdentifier=function(e,t,n){var i="",o=n(e,t);return 0!==o.length&&(i="\nRegistered bindings:",o.forEach((function(e){var t="Object";null!==e.implementationType&&(t=r(e.implementationType)),i=i+"\n "+t,e.constraint.metaData&&(i=i+" - "+e.constraint.metaData)}))),i},t.circularDependencyToException=function e(t){t.childRequests.forEach((function(t){if(function e(t,n){return null!==t.parentRequest&&(t.parentRequest.serviceIdentifier===n||e(t.parentRequest,n))}(t,t.serviceIdentifier)){var r=function(e){return function e(t,r){void 0===r&&(r=[]);var i=n(t.serviceIdentifier);return r.push(i),null!==t.parentRequest?e(t.parentRequest,r):r}(e).reverse().join(" --\x3e ")}(t);throw new Error(j.CIRCULAR_DEPENDENCY+" "+r)}e(t)}))},t.listMetadataForTarget=function(e,t){if(t.isTagged()||t.isNamed()){var n="",r=t.getNamedTag(),i=t.getCustomTags();return null!==r&&(n+=r.toString()+"\n"),null!==i&&i.forEach((function(e){n+=e.toString()+"\n"}))," "+e+"\n "+e+" - "+n}return" "+e},t.getFunctionName=r}));R(H);H.circularDependencyToException,H.listMetadataForTarget,H.listRegisteredBindingsForServiceIdentifier,H.getServiceIdentifierAsString,H.getFunctionName;var W=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;var n=function(){function e(e){this.id=z.id(),this.container=e}return e.prototype.addPlan=function(e){this.plan=e},e.prototype.setCurrentRequest=function(e){this.currentRequest=e},e}();t.Context=n}));R(W);W.Context;var Y=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.toString=function(){return this.key===D.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},e}();t.Metadata=n}));R(Y);Y.Metadata;var X=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Plan=void 0;var n=function(e,t){this.parentContext=e,this.rootRequest=t};t.Plan=n}));R(X);X.Plan;var Z=O((function(e,t){function n(e,t,n,r,i){var o={},a="number"==typeof i,s=void 0!==i&&a?i.toString():n;if(a&&void 0!==n)throw new Error(j.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(e,t)&&(o=Reflect.getMetadata(e,t));var u=o[s];if(Array.isArray(u))for(var c=0,l=u;c<l.length;c++){var h=l[c];if(h.key===r.key)throw new Error(j.DUPLICATED_METADATA+" "+h.key.toString())}else u=[];u.push(r),o[s]=u,Reflect.defineMetadata(e,o,t)}function r(e,t){Reflect.decorate(e,t)}function i(e,t){return function(n,r){t(n,r,e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.tagProperty=t.tagParameter=t.decorate=void 0,t.tagParameter=function(e,t,r,i){n(D.TAGGED,e,t,i,r)},t.tagProperty=function(e,t,r){n(D.TAGGED_PROP,e.constructor,t,r)},t.decorate=function(e,t,n){"number"==typeof n?r([i(n,e)],t):"string"==typeof n?Reflect.decorate([e],t,n):r([e],t)}}));R(Z);Z.tagProperty,Z.tagParameter,Z.decorate;var q=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.inject=t.LazyServiceIdentifer=void 0;var n=function(){function e(e){this._cb=e}return e.prototype.unwrap=function(){return this._cb()},e}();t.LazyServiceIdentifer=n,t.inject=function(e){return function(t,n,r){if(void 0===e)throw new Error(j.UNDEFINED_INJECT_ANNOTATION(t.name));var i=new Y.Metadata(D.INJECT_TAG,e);"number"==typeof r?Z.tagParameter(t,n,r,i):Z.tagProperty(t,n,i)}}}));R(q);q.inject,q.LazyServiceIdentifer;var K=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.QueryableString=void 0;var n=function(){function e(e){this.str=e}return e.prototype.startsWith=function(e){return 0===this.str.indexOf(e)},e.prototype.endsWith=function(e){var t,n=e.split("").reverse().join("");return t=this.str.split("").reverse().join(""),this.startsWith.call({str:t},n)},e.prototype.contains=function(e){return-1!==this.str.indexOf(e)},e.prototype.equals=function(e){return this.str===e},e.prototype.value=function(){return this.str},e}();t.QueryableString=n}));R(K);K.QueryableString;var Q=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Target=void 0;var n=function(){function e(e,t,n,r){this.id=z.id(),this.type=e,this.serviceIdentifier=n,this.name=new K.QueryableString(t||""),this.metadata=new Array;var i=null;"string"==typeof r?i=new Y.Metadata(D.NAMED_TAG,r):r instanceof Y.Metadata&&(i=r),null!==i&&this.metadata.push(i)}return e.prototype.hasTag=function(e){for(var t=0,n=this.metadata;t<n.length;t++){if(n[t].key===e)return!0}return!1},e.prototype.isArray=function(){return this.hasTag(D.MULTI_INJECT_TAG)},e.prototype.matchesArray=function(e){return this.matchesTag(D.MULTI_INJECT_TAG)(e)},e.prototype.isNamed=function(){return this.hasTag(D.NAMED_TAG)},e.prototype.isTagged=function(){return this.metadata.some((function(e){return D.NON_CUSTOM_TAG_KEYS.every((function(t){return e.key!==t}))}))},e.prototype.isOptional=function(){return this.matchesTag(D.OPTIONAL_TAG)(!0)},e.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(e){return e.key===D.NAMED_TAG}))[0]:null},e.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(e){return D.NON_CUSTOM_TAG_KEYS.every((function(t){return e.key!==t}))})):null},e.prototype.matchesNamedTag=function(e){return this.matchesTag(D.NAMED_TAG)(e)},e.prototype.matchesTag=function(e){var t=this;return function(n){for(var r=0,i=t.metadata;r<i.length;r++){var o=i[r];if(o.key===e&&o.value===n)return!0}return!1}},e}();t.Target=n}));R(Q);Q.Target;var $=O((function(e,t){var n=I&&I.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};function r(e,t,r,a){var s=e.getConstructorMetadata(r),u=s.compilerGeneratedMetadata;if(void 0===u){var c=j.MISSING_INJECTABLE_ANNOTATION+" "+t+".";throw new Error(c)}var l=s.userGeneratedMetadata,h=Object.keys(l),f=0===r.length&&h.length>0,p=h.length>r.length,d=function(e,t,n,r,o){for(var a=[],s=0;s<o;s++){var u=i(s,e,t,n,r);null!==u&&a.push(u)}return a}(a,t,u,l,f||p?h.length:r.length),v=function e(t,r){for(var i=t.getPropertiesMetadata(r),a=[],s=Object.keys(i),u=0,c=s;u<c.length;u++){var l=c[u],h=i[l],f=o(i[l]),p=f.targetName||l,d=f.inject||f.multiInject,v=new Q.Target(F.TargetTypeEnum.ClassProperty,p,d);v.metadata=h,a.push(v)}var g=Object.getPrototypeOf(r.prototype).constructor;if(g!==Object){var m=e(t,g);a=n(n([],a),m)}return a}(e,r);return n(n([],d),v)}function i(e,t,n,r,i){var a=i[e.toString()]||[],s=o(a),u=!0!==s.unmanaged,c=r[e],l=s.inject||s.multiInject;if((c=l||c)instanceof q.LazyServiceIdentifer&&(c=c.unwrap()),u){if(!t&&(c===Object||c===Function||void 0===c)){var h=j.MISSING_INJECT_ANNOTATION+" argument "+e+" in class "+n+".";throw new Error(h)}var f=new Q.Target(F.TargetTypeEnum.ConstructorArgument,s.targetName,c);return f.metadata=a,f}return null}function o(e){var t={};return e.forEach((function(e){t[e.key.toString()]=e.value})),{inject:t[D.INJECT_TAG],multiInject:t[D.MULTI_INJECT_TAG],targetName:t[D.NAME_TAG],unmanaged:t[D.UNMANAGED_TAG]}}Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionName=t.getBaseClassDependencyCount=t.getDependencies=void 0,Object.defineProperty(t,"getFunctionName",{enumerable:!0,get:function(){return H.getFunctionName}}),t.getDependencies=function(e,t){return r(e,H.getFunctionName(t),t,!1)},t.getBaseClassDependencyCount=function e(t,n){var i=Object.getPrototypeOf(n.prototype).constructor;if(i!==Object){var o=r(t,H.getFunctionName(i),i,!0),a=o.map((function(e){return e.metadata.filter((function(e){return e.key===D.UNMANAGED_TAG}))})),s=[].concat.apply([],a).length,u=o.length-s;return u>0?u:e(t,i)}return 0}}));R($);$.getFunctionName,$.getBaseClassDependencyCount,$.getDependencies;var J=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Request=void 0;var n=function(){function e(e,t,n,r,i){this.id=z.id(),this.serviceIdentifier=e,this.parentContext=t,this.parentRequest=n,this.target=i,this.childRequests=[],this.bindings=Array.isArray(r)?r:[r],this.requestScope=null===n?new Map:null}return e.prototype.addChildRequest=function(t,n,r){var i=new e(t,this.parentContext,this,n,r);return this.childRequests.push(i),i},e}();t.Request=n}));R(J);J.Request;var ee=O((function(e,t){function n(e){return e._bindingDictionary}function r(e,t,n,r,i,o){var a=e?D.MULTI_INJECT_TAG:D.INJECT_TAG,s=new Y.Metadata(a,n),u=new Q.Target(t,r,n,s);if(void 0!==i){var c=new Y.Metadata(i,o);u.metadata.push(c)}return u}function i(e,t,n,r,i){var a=o(n.container,i.serviceIdentifier),s=[];return a.length===V.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&e.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),a=o(n.container,i.serviceIdentifier)),s=t?a:a.filter((function(e){var t=new J.Request(e.serviceIdentifier,n,r,e,i);return e.constraint(t)})),function(e,t,n,r){switch(t.length){case V.BindingCount.NoBindingsAvailable:if(n.isOptional())return t;var i=H.getServiceIdentifierAsString(e),a=j.NOT_REGISTERED;throw a+=H.listMetadataForTarget(i,n),a+=H.listRegisteredBindingsForServiceIdentifier(r,i,o),new Error(a);case V.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return t;case V.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return t;i=H.getServiceIdentifierAsString(e),a=j.AMBIGUOUS_MATCH+" "+i;throw a+=H.listRegisteredBindingsForServiceIdentifier(r,i,o),new Error(a)}}(i.serviceIdentifier,s,i,n.container),s}function o(e,t){var r=[],i=n(e);return i.hasKey(t)?r=i.get(t):null!==e.parent&&(r=o(e.parent,t)),r}Object.defineProperty(t,"__esModule",{value:!0}),t.getBindingDictionary=t.createMockRequest=t.plan=void 0,t.getBindingDictionary=n,t.plan=function(e,t,n,o,a,s,u,c){void 0===c&&(c=!1);var l=new W.Context(t),h=r(n,o,a,"",s,u);try{return function e(t,n,r,o,a,s){var u,c;if(null===a){u=i(t,n,o,null,s),c=new J.Request(r,o,null,u,s);var l=new X.Plan(o,c);o.addPlan(l)}else u=i(t,n,o,a,s),c=a.addChildRequest(s.serviceIdentifier,u,s);u.forEach((function(n){var r=null;if(s.isArray())r=c.addChildRequest(n.serviceIdentifier,n,s);else{if(n.cache)return;r=c}if(n.type===F.BindingTypeEnum.Instance&&null!==n.implementationType){var i=$.getDependencies(t,n.implementationType);if(!o.container.options.skipBaseClassChecks){var a=$.getBaseClassDependencyCount(t,n.implementationType);if(i.length<a){var u=j.ARGUMENTS_LENGTH_MISMATCH($.getFunctionName(n.implementationType));throw new Error(u)}}i.forEach((function(n){e(t,!1,n.serviceIdentifier,o,r,n)}))}}))}(e,c,a,l,null,h),l}catch(e){throw G.isStackOverflowExeption(e)&&l.plan&&H.circularDependencyToException(l.plan.rootRequest),e}},t.createMockRequest=function(e,t,n,r){var i=new Q.Target(F.TargetTypeEnum.Variable,"",t,new Y.Metadata(n,r)),o=new W.Context(e);return new J.Request(t,o,null,[],i)}}));R(ee);ee.getBindingDictionary,ee.createMockRequest,ee.plan;var te=O((function(e,t){var n=I&&I.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveInstance=void 0,t.resolveInstance=function(e,t,r){var i,o,a=null;if(t.length>0){var s=t.filter((function(e){return null!==e.target&&e.target.type===F.TargetTypeEnum.ConstructorArgument})).map(r);o=s,a=function(e,t,n){var r=t.filter((function(e){return null!==e.target&&e.target.type===F.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(t,n){var r;r=t.target.name.value();var o=i[n];e[r]=o})),e}(a=new((i=e).bind.apply(i,n([void 0],o))),t,r)}else a=new e;return function(e,t){if(Reflect.hasMetadata(D.POST_CONSTRUCT,e)){var n=Reflect.getMetadata(D.POST_CONSTRUCT,e);try{t[n.value]()}catch(t){throw new Error(j.POST_CONSTRUCT_ERROR(e.name,t.message))}}}(e,a),a}}));R(te);te.resolveInstance;var ne=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolve=void 0;var n=function(e,t,n){try{return n()}catch(n){throw G.isStackOverflowExeption(n)?new Error(j.CIRCULAR_DEPENDENCY_IN_FACTORY(e,t.toString())):n}},r=function(e){return function(t){t.parentContext.setCurrentRequest(t);var i=t.bindings,o=t.childRequests,a=t.target&&t.target.isArray(),s=!(t.parentRequest&&t.parentRequest.target&&t.target&&t.parentRequest.target.matchesArray(t.target.serviceIdentifier));if(a&&s)return o.map((function(t){return r(e)(t)}));var u=null;if(!t.target.isOptional()||0!==i.length){var c=i[0],l=c.scope===F.BindingScopeEnum.Singleton,h=c.scope===F.BindingScopeEnum.Request;if(l&&c.activated)return c.cache;if(h&&null!==e&&e.has(c.id))return e.get(c.id);if(c.type===F.BindingTypeEnum.ConstantValue)u=c.cache,c.activated=!0;else if(c.type===F.BindingTypeEnum.Function)u=c.cache,c.activated=!0;else if(c.type===F.BindingTypeEnum.Constructor)u=c.implementationType;else if(c.type===F.BindingTypeEnum.DynamicValue&&null!==c.dynamicValue)u=n("toDynamicValue",c.serviceIdentifier,(function(){return c.dynamicValue(t.parentContext)}));else if(c.type===F.BindingTypeEnum.Factory&&null!==c.factory)u=n("toFactory",c.serviceIdentifier,(function(){return c.factory(t.parentContext)}));else if(c.type===F.BindingTypeEnum.Provider&&null!==c.provider)u=n("toProvider",c.serviceIdentifier,(function(){return c.provider(t.parentContext)}));else{if(c.type!==F.BindingTypeEnum.Instance||null===c.implementationType){var f=H.getServiceIdentifierAsString(t.serviceIdentifier);throw new Error(j.INVALID_BINDING_TYPE+" "+f)}u=te.resolveInstance(c.implementationType,o,r(e))}return"function"==typeof c.onActivation&&(u=c.onActivation(t.parentContext,u)),l&&(c.cache=u,c.activated=!0),h&&null!==e&&!e.has(c.id)&&e.set(c.id,u),u}}};t.resolve=function(e){return r(e.plan.rootRequest.requestScope)(e.plan.rootRequest)}}));R(ne);ne.resolve;var re=O((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.typeConstraint=t.namedConstraint=t.taggedConstraint=t.traverseAncerstors=void 0;var n=function(e,t){var r=e.parentRequest;return null!==r&&(!!t(r)||n(r,t))};t.traverseAncerstors=n;var r=function(e){return function(t){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(e)(t)};return n.metaData=new Y.Metadata(e,t),n}};t.taggedConstraint=r;var i=r(D.NAMED_TAG);t.namedConstraint=i;t.typeConstraint=function(e){return function(t){var n=null;if(null!==t){if(n=t.bindings[0],"string"==typeof e)return n.serviceIdentifier===e;var r=t.bindings[0].implementationType;return e===r}return!1}}}));R(re);re.typeConstraint,re.namedConstraint,re.taggedConstraint,re.traverseAncerstors;var ie=O((function(e,t){Object.defineProperty(t,