@antv/g 5.0.23-alpha.12 → 5.0.23-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
15
  ***************************************************************************** */
16
- var n;!function(n){!function(r){var i="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),o=a(n);function a(t,e){return function(n,r){"function"!=typeof t[n]&&Object.defineProperty(t,n,{configurable:!0,writable:!0,value:r}),e&&e(n,r)}}void 0===i.Reflect?i.Reflect=n:o=a(i.Reflect,o),function(e){var n=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,u={__proto__:[]}instanceof Array,s=!a&&!u,c={create:a?function(){return I(Object.create(null))}:u?function(){return I({__proto__:null})}:function(){return I({})},has:s?function(t,e){return n.call(t,e)}:function(t,e){return e in t},get:s?function(t,e){return n.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},l=Object.getPrototypeOf(Function),h="object"==typeof t&&t.env&&"true"===t.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=h||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var t={},e=[],n=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[o]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var n=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var n=this._find(t,!0);return this._values[n]=e,this},e.prototype.delete=function(e){var n=this._find(e,!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--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new n(this._keys,this._values,r)},e.prototype.values=function(){return new n(this._keys,this._values,i)},e.prototype.entries=function(){return new n(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[o]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function i(t,e){return e}function a(t,e){return[t,e]}}():Map,p=h||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function t(){this._map=new f}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[o]=function(){return this.keys()},t}():Set,d=new(h||"function"!=typeof WeakMap?function(){var t=c.create(),e=r();return function(){function t(){this._key=r()}return t.prototype.has=function(t){var e=i(t,!1);return void 0!==e&&c.has(e,this._key)},t.prototype.get=function(t){var e=i(t,!1);return void 0!==e?c.get(e,this._key):void 0},t.prototype.set=function(t,e){return i(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=i(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=r()},t}();function r(){var e;do{e="@@WeakMap@@"+a()}while(c.has(t,e));return t[e]=!0,e}function i(t,r){if(!n.call(t,e)){if(!r)return;Object.defineProperty(t,e,{value:c.create()})}return t[e]}function o(t,e){for(var n=0;n<e;++n)t[n]=255*Math.random()|0;return t}function a(){var t,e=(t=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):o(new Uint8Array(t),t):o(new Array(t),t));e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",r=0;r<16;++r){var i=e[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}():WeakMap);function y(t,e,n){var r=d.get(t);if(E(r)){if(!n)return;r=new f,d.set(t,r)}var i=r.get(e);if(E(i)){if(!n)return;i=new f,r.set(e,i)}return i}function v(t,e,n){var r=y(e,n,!1);return!E(r)&&!!r.has(t)}function m(t,e,n){var r=y(e,n,!1);if(!E(r))return r.get(t)}function g(t,e,n,r){y(n,r,!0).set(t,e)}function b(t,e){var n=[],r=y(t,e,!1);if(E(r))return n;for(var i=function(t){var e=A(t,o);if(!S(e))throw new TypeError;var n=e.call(t);if(!M(n))throw new TypeError;return n}(r.keys()),a=0;;){var u=C(i);if(!u)return n.length=a,n;var s=u.value;try{n[a]=s}catch(t){try{_(i)}finally{throw t}}a++}}function T(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function E(t){return void 0===t}function w(t){return null===t}function M(t){return"object"==typeof t?null!==t:"function"==typeof t}function k(t,e){switch(T(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var n=3===e?"string":5===e?"number":"default",r=A(t,i);if(void 0!==r){var o=r.call(t,n);if(M(o))throw new TypeError;return o}return function(t,e){if("string"===e){var n=t.toString;if(S(n))if(!M(i=n.call(t)))return i;if(S(r=t.valueOf))if(!M(i=r.call(t)))return i}else{var r;if(S(r=t.valueOf))if(!M(i=r.call(t)))return i;var i,o=t.toString;if(S(o))if(!M(i=o.call(t)))return i}throw new TypeError}(t,"default"===n?"number":n)}function P(t){var e=k(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function x(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function S(t){return"function"==typeof t}function N(t){return"function"==typeof t}function A(t,e){var n=t[e];if(null!=n){if(!S(n))throw new TypeError;return n}}function C(t){var e=t.next();return!e.done&&e}function _(t){var e=t.return;e&&e.call(t)}function O(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===l)return e;if(e!==l)return e;var n=t.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return e;var i=r.constructor;return"function"!=typeof i||i===t?e:i}function I(t){return t.__=void 0,delete t.__,t}e("decorate",(function(t,e,n,r){if(E(n)){if(!x(t))throw new TypeError;if(!N(e))throw new TypeError;return function(t,e){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(e);if(!E(r)&&!w(r)){if(!N(r))throw new TypeError;e=r}}return e}(t,e)}if(!x(t))throw new TypeError;if(!M(e))throw new TypeError;if(!M(r)&&!E(r)&&!w(r))throw new TypeError;return w(r)&&(r=void 0),function(t,e,n,r){for(var i=t.length-1;i>=0;--i){var o=(0,t[i])(e,n,r);if(!E(o)&&!w(o)){if(!M(o))throw new TypeError;r=o}}return r}(t,e,n=P(n),r)})),e("metadata",(function(t,e){return function(n,r){if(!M(n))throw new TypeError;if(!E(r)&&!function(t){switch(T(t)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;g(t,e,n,r)}})),e("defineMetadata",(function(t,e,n,r){if(!M(n))throw new TypeError;return E(r)||(r=P(r)),g(t,e,n,r)})),e("hasMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=P(n)),function t(e,n,r){if(v(e,n,r))return!0;var i=O(n);return!w(i)&&t(e,i,r)}(t,e,n)})),e("hasOwnMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=P(n)),v(t,e,n)})),e("getMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=P(n)),function t(e,n,r){if(v(e,n,r))return m(e,n,r);var i=O(n);return w(i)?void 0:t(e,i,r)}(t,e,n)})),e("getOwnMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=P(n)),m(t,e,n)})),e("getMetadataKeys",(function(t,e){if(!M(t))throw new TypeError;return E(e)||(e=P(e)),function t(e,n){var r=b(e,n),i=O(e);if(null===i)return r;var o=t(i,n);if(o.length<=0)return r;if(r.length<=0)return o;for(var a=new p,u=[],s=0,c=r;s<c.length;s++){var l=c[s];a.has(l)||(a.add(l),u.push(l))}for(var h=0,f=o;h<f.length;h++){l=f[h];a.has(l)||(a.add(l),u.push(l))}return u}(t,e)})),e("getOwnMetadataKeys",(function(t,e){if(!M(t))throw new TypeError;return E(e)||(e=P(e)),b(t,e)})),e("deleteMetadata",(function(t,e,n){if(!M(e))throw new TypeError;E(n)||(n=P(n));var r=y(e,n,!1);if(E(r))return!1;if(!r.delete(t))return!1;if(r.size>0)return!0;var i=d.get(e);return i.delete(n),i.size>0||d.delete(e),!0}))}(o)}()}(n||(n={}))}).call(this,n(23),n(13))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReader=void 0;var r=n(0),i=function(){function t(){}return t.prototype.getConstructorMetadata=function(t){return{compilerGeneratedMetadata:Reflect.getMetadata(r.PARAM_TYPES,t),userGeneratedMetadata:Reflect.getMetadata(r.TAGGED,t)||{}}},t.prototype.getPropertiesMetadata=function(t){return Reflect.getMetadata(r.TAGGED_PROP,t)||[]},t}();e.MetadataReader=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStackOverflowExeption=void 0;var r=n(2);e.isStackOverflowExeption=function(t){return t instanceof RangeError||t.message===r.STACK_OVERFLOW}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inject=e.LazyServiceIdentifer=void 0;var r=n(2),i=n(0),o=n(3),a=n(5),u=function(){function t(t){this._cb=t}return t.prototype.unwrap=function(){return this._cb()},t}();e.LazyServiceIdentifer=u,e.inject=function(t){return function(e,n,u){if(void 0===t)throw new Error(r.UNDEFINED_INJECT_ANNOTATION(e.name));var s=new o.Metadata(i.INJECT_TAG,t);"number"==typeof u?a.tagParameter(e,n,u,s):a.tagProperty(e,n,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Target=void 0;var r=n(0),i=n(7),o=n(3),a=n(31),u=function(){function t(t,e,n,u){this.id=i.id(),this.type=t,this.serviceIdentifier=n,this.name=new a.QueryableString(e||""),this.metadata=new Array;var s=null;"string"==typeof u?s=new o.Metadata(r.NAMED_TAG,u):u instanceof o.Metadata&&(s=u),null!==s&&this.metadata.push(s)}return t.prototype.hasTag=function(t){for(var e=0,n=this.metadata;e<n.length;e++){if(n[e].key===t)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(r.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(t){return this.matchesTag(r.MULTI_INJECT_TAG)(t)},t.prototype.isNamed=function(){return this.hasTag(r.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some((function(t){return r.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))}))},t.prototype.isOptional=function(){return this.matchesTag(r.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(t){return t.key===r.NAMED_TAG}))[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(t){return r.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))})):null},t.prototype.matchesNamedTag=function(t){return this.matchesTag(r.NAMED_TAG)(t)},t.prototype.matchesTag=function(t){var e=this;return function(n){for(var r=0,i=e.metadata;r<i.length;r++){var o=i[r];if(o.key===t&&o.value===n)return!0}return!1}},t}();e.Target=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenOnSyntax=void 0;var r=n(9),i=n(10),o=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new i.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new r.BindingOnSyntax(this._binding)}return t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingWhenOnSyntax=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=void 0;var r=n(0),i=n(3),o=function(t,e){var n=t.parentRequest;return null!==n&&(!!e(n)||o(n,e))};e.traverseAncerstors=o;var a=function(t){return function(e){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(t)(e)};return n.metaData=new i.Metadata(t,e),n}};e.taggedConstraint=a;var u=a(r.NAMED_TAG);e.namedConstraint=u;e.typeConstraint=function(t){return function(e){var n=null;if(null!==e){if(n=e.bindings[0],"string"==typeof t)return n.serviceIdentifier===t;var r=e.bindings[0].implementationType;return t===r}return!1}}},,,,function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,c=[],l=!1,h=-1;function f(){l&&s&&(l=!1,s.length?c=s.concat(c):h=-1,c.length&&p())}function p(){if(!l){var t=u(f);l=!0;for(var e=c.length;e;){for(s=c,c=[];++h<e;)s&&s[h].run();h=-1,e=c.length}s=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||u(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;var a=n(25),u=n(2),s=n(4),c=n(0),l=n(14),h=n(26),f=n(33),p=n(35),d=n(7),y=n(8),v=n(38),m=n(39),g=function(){function t(t){this._appliedMiddleware=[];var e=t||{};if("object"!=typeof e)throw new Error(""+u.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===e.defaultScope)e.defaultScope=s.BindingScopeEnum.Transient;else if(e.defaultScope!==s.BindingScopeEnum.Singleton&&e.defaultScope!==s.BindingScopeEnum.Transient&&e.defaultScope!==s.BindingScopeEnum.Request)throw new Error(""+u.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===e.autoBindInjectable)e.autoBindInjectable=!1;else if("boolean"!=typeof e.autoBindInjectable)throw new Error(""+u.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===e.skipBaseClassChecks)e.skipBaseClassChecks=!1;else if("boolean"!=typeof e.skipBaseClassChecks)throw new Error(""+u.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:e.autoBindInjectable,defaultScope:e.defaultScope,skipBaseClassChecks:e.skipBaseClassChecks},this.id=d.id(),this._bindingDictionary=new m.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new l.MetadataReader}return t.merge=function(e,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var a=new t,u=o([e,n],r).map((function(t){return h.getBindingDictionary(t)})),s=h.getBindingDictionary(a);function c(t,e){t.traverse((function(t,n){n.forEach((function(t){e.add(t.serviceIdentifier,t.clone())}))}))}return u.forEach((function(t){c(t,s)})),a},t.prototype.load=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=this._getContainerModuleHelpersFactory(),r=0,i=t;r<i.length;r++){var o=i[r],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},t.prototype.loadAsync=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:e=this._getContainerModuleHelpersFactory(),n=0,r=t,i.label=1;case 1:return n<r.length?(o=r[n],a=e(o.id),[4,o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)]):[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},t.prototype.unload=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=function(t){return function(e){return e.moduleId===t}};e.forEach((function(e){var n=r(e.id);t._bindingDictionary.removeByCondition(n)}))},t.prototype.bind=function(t){var e=this.options.defaultScope||s.BindingScopeEnum.Transient,n=new a.Binding(t,e);return this._bindingDictionary.add(t,n),new p.BindingToSyntax(n)},t.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},t.prototype.unbind=function(t){try{this._bindingDictionary.remove(t)}catch(e){throw new Error(u.CANNOT_UNBIND+" "+y.getServiceIdentifierAsString(t))}},t.prototype.unbindAll=function(){this._bindingDictionary=new m.Lookup},t.prototype.isBound=function(t){var e=this._bindingDictionary.hasKey(t);return!e&&this.parent&&(e=this.parent.isBound(t)),e},t.prototype.isBoundNamed=function(t,e){return this.isBoundTagged(t,c.NAMED_TAG,e)},t.prototype.isBoundTagged=function(t,e,n){var r=!1;if(this._bindingDictionary.hasKey(t)){var i=this._bindingDictionary.get(t),o=h.createMockRequest(this,t,e,n);r=i.some((function(t){return t.constraint(o)}))}return!r&&this.parent&&(r=this.parent.isBoundTagged(t,e,n)),r},t.prototype.snapshot=function(){this._snapshots.push(v.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},t.prototype.restore=function(){var t=this._snapshots.pop();if(void 0===t)throw new Error(u.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=t.bindings,this._middleware=t.middleware},t.prototype.createChild=function(e){var n=new t(e||this.options);return n.parent=this,n},t.prototype.applyMiddleware=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._appliedMiddleware=this._appliedMiddleware.concat(t);var n=this._middleware?this._middleware:this._planAndResolve();this._middleware=t.reduce((function(t,e){return e(t)}),n)},t.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},t.prototype.get=function(t){return this._get(!1,!1,s.TargetTypeEnum.Variable,t)},t.prototype.getTagged=function(t,e,n){return this._get(!1,!1,s.TargetTypeEnum.Variable,t,e,n)},t.prototype.getNamed=function(t,e){return this.getTagged(t,c.NAMED_TAG,e)},t.prototype.getAll=function(t){return this._get(!0,!0,s.TargetTypeEnum.Variable,t)},t.prototype.getAllTagged=function(t,e,n){return this._get(!1,!0,s.TargetTypeEnum.Variable,t,e,n)},t.prototype.getAllNamed=function(t,e){return this.getAllTagged(t,c.NAMED_TAG,e)},t.prototype.resolve=function(t){var e=this.createChild();return e.bind(t).toSelf(),this._appliedMiddleware.forEach((function(t){e.applyMiddleware(t)})),e.get(t)},t.prototype._getContainerModuleHelpersFactory=function(){var t=this,e=function(t,e){t._binding.moduleId=e},n=function(n){return function(r){var i=t.rebind.bind(t)(r);return e(i,n),i}};return function(r){return{bindFunction:(i=r,function(n){var r=t.bind.bind(t)(n);return e(r,i),r}),isboundFunction:function(e){return t.isBound.bind(t)(e)},rebindFunction:n(r),unbindFunction:function(e){t.unbind.bind(t)(e)}};var i}},t.prototype._get=function(t,e,n,r,i,o){var a=null,s={avoidConstraints:t,contextInterceptor:function(t){return t},isMultiInject:e,key:i,serviceIdentifier:r,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(s)))throw new Error(u.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(s);return a},t.prototype._planAndResolve=function(){var t=this;return function(e){var n=h.plan(t._metadataReader,t,e.isMultiInject,e.targetType,e.serviceIdentifier,e.key,e.value,e.avoidConstraints);return n=e.contextInterceptor(n),f.resolve(n)}},t}();e.Container=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Binding=void 0;var r=n(4),i=n(7),o=function(){function t(t,e){this.id=i.id(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=r.BindingTypeEnum.Invalid,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===r.BindingScopeEnum.Singleton&&this.activated,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.cache=this.cache,e},t}();e.Binding=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBindingDictionary=e.createMockRequest=e.plan=void 0;var r=n(27),i=n(2),o=n(4),a=n(0),u=n(15),s=n(8),c=n(28),l=n(3),h=n(29),f=n(30),p=n(32),d=n(17);function y(t){return t._bindingDictionary}function v(t,e,n,o,a){var u=m(n.container,a.serviceIdentifier),c=[];return u.length===r.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof a.serviceIdentifier&&t.getConstructorMetadata(a.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(a.serviceIdentifier).toSelf(),u=m(n.container,a.serviceIdentifier)),c=e?u:u.filter((function(t){var e=new p.Request(t.serviceIdentifier,n,o,t,a);return t.constraint(e)})),function(t,e,n,o){switch(e.length){case r.BindingCount.NoBindingsAvailable:if(n.isOptional())return e;var a=s.getServiceIdentifierAsString(t),u=i.NOT_REGISTERED;throw u+=s.listMetadataForTarget(a,n),u+=s.listRegisteredBindingsForServiceIdentifier(o,a,m),new Error(u);case r.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return e;case r.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return e;a=s.getServiceIdentifierAsString(t),u=i.AMBIGUOUS_MATCH+" "+a;throw u+=s.listRegisteredBindingsForServiceIdentifier(o,a,m),new Error(u)}}(a.serviceIdentifier,c,a,n.container),c}function m(t,e){var n=[],r=y(t);return r.hasKey(e)?n=r.get(e):null!==t.parent&&(n=m(t.parent,e)),n}e.getBindingDictionary=y,e.plan=function(t,e,n,r,y,m,g,b){void 0===b&&(b=!1);var T=new c.Context(e),E=function(t,e,n,r,i,o){var u=t?a.MULTI_INJECT_TAG:a.INJECT_TAG,s=new l.Metadata(u,n),c=new d.Target(e,r,n,s);if(void 0!==i){var h=new l.Metadata(i,o);c.metadata.push(h)}return c}(n,r,y,"",m,g);try{return function t(e,n,r,a,u,s){var c,l;if(null===u){c=v(e,n,a,null,s),l=new p.Request(r,a,null,c,s);var d=new h.Plan(a,l);a.addPlan(d)}else c=v(e,n,a,u,s),l=u.addChildRequest(s.serviceIdentifier,c,s);c.forEach((function(n){var r=null;if(s.isArray())r=l.addChildRequest(n.serviceIdentifier,n,s);else{if(n.cache)return;r=l}if(n.type===o.BindingTypeEnum.Instance&&null!==n.implementationType){var u=f.getDependencies(e,n.implementationType);if(!a.container.options.skipBaseClassChecks){var c=f.getBaseClassDependencyCount(e,n.implementationType);if(u.length<c){var h=i.ARGUMENTS_LENGTH_MISMATCH(f.getFunctionName(n.implementationType));throw new Error(h)}}u.forEach((function(n){t(e,!1,n.serviceIdentifier,a,r,n)}))}}))}(t,b,y,T,null,E),T}catch(t){throw u.isStackOverflowExeption(t)&&T.plan&&s.circularDependencyToException(T.plan.rootRequest),t}},e.createMockRequest=function(t,e,n,r){var i=new d.Target(o.TargetTypeEnum.Variable,"",e,new l.Metadata(n,r)),a=new c.Context(t);return new p.Request(e,a,null,[],i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingCount=void 0;e.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var r=n(7),i=function(){function t(t){this.id=r.id(),this.container=t}return t.prototype.addPlan=function(t){this.plan=t},t.prototype.setCurrentRequest=function(t){this.currentRequest=t},t}();e.Context=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Plan=void 0;var r=function(t,e){this.parentContext=t,this.rootRequest=e};e.Plan=r},function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.getFunctionName=e.getBaseClassDependencyCount=e.getDependencies=void 0;var i=n(16),o=n(2),a=n(4),u=n(0),s=n(8);Object.defineProperty(e,"getFunctionName",{enumerable:!0,get:function(){return s.getFunctionName}});var c=n(17);function l(t,e,n,i){var u=t.getConstructorMetadata(n),s=u.compilerGeneratedMetadata;if(void 0===s){var l=o.MISSING_INJECTABLE_ANNOTATION+" "+e+".";throw new Error(l)}var p=u.userGeneratedMetadata,d=Object.keys(p),y=0===n.length&&d.length>0,v=d.length>n.length,m=function(t,e,n,r,i){for(var o=[],a=0;a<i;a++){var u=h(a,t,e,n,r);null!==u&&o.push(u)}return o}(i,e,s,p,y||v?d.length:n.length),g=function t(e,n){for(var i=e.getPropertiesMetadata(n),o=[],u=Object.keys(i),s=0,l=u;s<l.length;s++){var h=l[s],p=i[h],d=f(i[h]),y=d.targetName||h,v=d.inject||d.multiInject,m=new c.Target(a.TargetTypeEnum.ClassProperty,y,v);m.metadata=p,o.push(m)}var g=Object.getPrototypeOf(n.prototype).constructor;if(g!==Object){var b=t(e,g);o=r(r([],o),b)}return o}(t,n);return r(r([],m),g)}function h(t,e,n,r,u){var s=u[t.toString()]||[],l=f(s),h=!0!==l.unmanaged,p=r[t],d=l.inject||l.multiInject;if((p=d||p)instanceof i.LazyServiceIdentifer&&(p=p.unwrap()),h){if(!e&&(p===Object||p===Function||void 0===p)){var y=o.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".";throw new Error(y)}var v=new c.Target(a.TargetTypeEnum.ConstructorArgument,l.targetName,p);return v.metadata=s,v}return null}function f(t){var e={};return t.forEach((function(t){e[t.key.toString()]=t.value})),{inject:e[u.INJECT_TAG],multiInject:e[u.MULTI_INJECT_TAG],targetName:e[u.NAME_TAG],unmanaged:e[u.UNMANAGED_TAG]}}e.getDependencies=function(t,e){return l(t,s.getFunctionName(e),e,!1)},e.getBaseClassDependencyCount=function t(e,n){var r=Object.getPrototypeOf(n.prototype).constructor;if(r!==Object){var i=l(e,s.getFunctionName(r),r,!0),o=i.map((function(t){return t.metadata.filter((function(t){return t.key===u.UNMANAGED_TAG}))})),a=[].concat.apply([],o).length,c=i.length-a;return c>0?c:t(e,r)}return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryableString=void 0;var r=function(){function t(t){this.str=t}return t.prototype.startsWith=function(t){return 0===this.str.indexOf(t)},t.prototype.endsWith=function(t){var e,n=t.split("").reverse().join("");return e=this.str.split("").reverse().join(""),this.startsWith.call({str:e},n)},t.prototype.contains=function(t){return-1!==this.str.indexOf(t)},t.prototype.equals=function(t){return this.str===t},t.prototype.value=function(){return this.str},t}();e.QueryableString=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Request=void 0;var r=n(7),i=function(){function t(t,e,n,i,o){this.id=r.id(),this.serviceIdentifier=t,this.parentContext=e,this.parentRequest=n,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=null===n?new Map:null}return t.prototype.addChildRequest=function(e,n,r){var i=new t(e,this.parentContext,this,n,r);return this.childRequests.push(i),i},t}();e.Request=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=void 0;var r=n(2),i=n(4),o=n(15),a=n(8),u=n(34),s=function(t,e,n){try{return n()}catch(n){throw o.isStackOverflowExeption(n)?new Error(r.CIRCULAR_DEPENDENCY_IN_FACTORY(t,e.toString())):n}},c=function(t){return function(e){e.parentContext.setCurrentRequest(e);var n=e.bindings,o=e.childRequests,l=e.target&&e.target.isArray(),h=!(e.parentRequest&&e.parentRequest.target&&e.target&&e.parentRequest.target.matchesArray(e.target.serviceIdentifier));if(l&&h)return o.map((function(e){return c(t)(e)}));var f=null;if(!e.target.isOptional()||0!==n.length){var p=n[0],d=p.scope===i.BindingScopeEnum.Singleton,y=p.scope===i.BindingScopeEnum.Request;if(d&&p.activated)return p.cache;if(y&&null!==t&&t.has(p.id))return t.get(p.id);if(p.type===i.BindingTypeEnum.ConstantValue)f=p.cache,p.activated=!0;else if(p.type===i.BindingTypeEnum.Function)f=p.cache,p.activated=!0;else if(p.type===i.BindingTypeEnum.Constructor)f=p.implementationType;else if(p.type===i.BindingTypeEnum.DynamicValue&&null!==p.dynamicValue)f=s("toDynamicValue",p.serviceIdentifier,(function(){return p.dynamicValue(e.parentContext)}));else if(p.type===i.BindingTypeEnum.Factory&&null!==p.factory)f=s("toFactory",p.serviceIdentifier,(function(){return p.factory(e.parentContext)}));else if(p.type===i.BindingTypeEnum.Provider&&null!==p.provider)f=s("toProvider",p.serviceIdentifier,(function(){return p.provider(e.parentContext)}));else{if(p.type!==i.BindingTypeEnum.Instance||null===p.implementationType){var v=a.getServiceIdentifierAsString(e.serviceIdentifier);throw new Error(r.INVALID_BINDING_TYPE+" "+v)}f=u.resolveInstance(p.implementationType,o,c(t))}return"function"==typeof p.onActivation&&(f=p.onActivation(e.parentContext,f)),d&&(p.cache=f,p.activated=!0),y&&null!==t&&!t.has(p.id)&&t.set(p.id,f),f}}};e.resolve=function(t){return c(t.plan.rootRequest.requestScope)(t.plan.rootRequest)}},function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveInstance=void 0;var i=n(2),o=n(4),a=n(0);e.resolveInstance=function(t,e,n){var u,s,c=null;if(e.length>0){var l=e.filter((function(t){return null!==t.target&&t.target.type===o.TargetTypeEnum.ConstructorArgument})).map(n);s=l,c=function(t,e,n){var r=e.filter((function(t){return null!==t.target&&t.target.type===o.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(e,n){var r;r=e.target.name.value();var o=i[n];t[r]=o})),t}(c=new((u=t).bind.apply(u,r([void 0],s))),e,n)}else c=new t;return function(t,e){if(Reflect.hasMetadata(a.POST_CONSTRUCT,t)){var n=Reflect.getMetadata(a.POST_CONSTRUCT,t);try{e[n.value]()}catch(e){throw new Error(i.POST_CONSTRUCT_ERROR(t.name,e.message))}}}(t,c),c}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingToSyntax=void 0;var r=n(2),i=n(4),o=n(36),a=n(18),u=function(){function t(t){this._binding=t}return t.prototype.to=function(t){return this._binding.type=i.BindingTypeEnum.Instance,this._binding.implementationType=t,new o.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+r.INVALID_TO_SELF_VALUE);var t=this._binding.serviceIdentifier;return this.to(t)},t.prototype.toConstantValue=function(t){return this._binding.type=i.BindingTypeEnum.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(t){return this._binding.type=i.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new o.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(t){return this._binding.type=i.BindingTypeEnum.Constructor,this._binding.implementationType=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(t){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(t){if("function"!=typeof t)throw new Error(r.INVALID_FUNCTION_BINDING);var e=this.toConstantValue(t);return this._binding.type=i.BindingTypeEnum.Function,this._binding.scope=i.BindingScopeEnum.Singleton,e},t.prototype.toAutoFactory=function(t){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=function(e){return function(){return e.container.get(t)}},this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(t){return this._binding.type=i.BindingTypeEnum.Provider,this._binding.provider=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(t){this.toDynamicValue((function(e){return e.container.get(t)}))},t}();e.BindingToSyntax=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInWhenOnSyntax=void 0;var r=n(37),i=n(9),o=n(10),a=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new o.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new i.BindingOnSyntax(this._binding),this._bindingInSyntax=new r.BindingInSyntax(t)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingInWhenOnSyntax=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInSyntax=void 0;var r=n(4),i=n(18),o=function(){function t(t){this._binding=t}return t.prototype.inRequestScope=function(){return this._binding.scope=r.BindingScopeEnum.Request,new i.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=r.BindingScopeEnum.Singleton,new i.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=r.BindingScopeEnum.Transient,new i.BindingWhenOnSyntax(this._binding)},t}();e.BindingInSyntax=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerSnapshot=void 0;var r=function(){function t(){}return t.of=function(e,n){var r=new t;return r.bindings=e,r.middleware=n,r},t}();e.ContainerSnapshot=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lookup=void 0;var r=n(2),i=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(t,e){if(null==t)throw new Error(r.NULL_ARGUMENT);if(null==e)throw new Error(r.NULL_ARGUMENT);var n=this._map.get(t);void 0!==n?(n.push(e),this._map.set(t,n)):this._map.set(t,[e])},t.prototype.get=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);var e=this._map.get(t);if(void 0!==e)return e;throw new Error(r.KEY_NOT_FOUND)},t.prototype.remove=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);if(!this._map.delete(t))throw new Error(r.KEY_NOT_FOUND)},t.prototype.removeByCondition=function(t){var e=this;this._map.forEach((function(n,r){var i=n.filter((function(e){return!t(e)}));i.length>0?e._map.set(r,i):e._map.delete(r)}))},t.prototype.hasKey=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);return this._map.has(t)},t.prototype.clone=function(){var e=new t;return this._map.forEach((function(t,n){t.forEach((function(t){return e.add(n,t.clone())}))})),e},t.prototype.traverse=function(t){this._map.forEach((function(e,n){t(n,e)}))},t}();e.Lookup=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncContainerModule=e.ContainerModule=void 0;var r=n(7),i=function(t){this.id=r.id(),this.registry=t};e.ContainerModule=i;var o=function(t){this.id=r.id(),this.registry=t};e.AsyncContainerModule=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectable=void 0;var r=n(2),i=n(0);e.injectable=function(){return function(t){if(Reflect.hasOwnMetadata(i.PARAM_TYPES,t))throw new Error(r.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(i.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(i.PARAM_TYPES,e,t),t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tagged=void 0;var r=n(3),i=n(5);e.tagged=function(t,e){return function(n,o,a){var u=new r.Metadata(t,e);"number"==typeof a?i.tagParameter(n,o,a,u):i.tagProperty(n,o,u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.named=void 0;var r=n(0),i=n(3),o=n(5);e.named=function(t){return function(e,n,a){var u=new i.Metadata(r.NAMED_TAG,t);"number"==typeof a?o.tagParameter(e,n,a,u):o.tagProperty(e,n,u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.optional=void 0;var r=n(0),i=n(3),o=n(5);e.optional=function(){return function(t,e,n){var a=new i.Metadata(r.OPTIONAL_TAG,!0);"number"==typeof n?o.tagParameter(t,e,n,a):o.tagProperty(t,e,a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unmanaged=void 0;var r=n(0),i=n(3),o=n(5);e.unmanaged=function(){return function(t,e,n){var a=new i.Metadata(r.UNMANAGED_TAG,!0);o.tagParameter(t,e,n,a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiInject=void 0;var r=n(0),i=n(3),o=n(5);e.multiInject=function(t){return function(e,n,a){var u=new i.Metadata(r.MULTI_INJECT_TAG,t);"number"==typeof a?o.tagParameter(e,n,a,u):o.tagProperty(e,n,u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.targetName=void 0;var r=n(0),i=n(3),o=n(5);e.targetName=function(t){return function(e,n,a){var u=new i.Metadata(r.NAME_TAG,t);o.tagParameter(e,n,a,u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.postConstruct=void 0;var r=n(2),i=n(0),o=n(3);e.postConstruct=function(){return function(t,e,n){var a=new o.Metadata(i.POST_CONSTRUCT,e);if(Reflect.hasOwnMetadata(i.POST_CONSTRUCT,t.constructor))throw new Error(r.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(i.POST_CONSTRUCT,a,t.constructor)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=void 0;e.multiBindToService=function(t){return function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.forEach((function(n){return t.bind(n).toService(e)}))}}}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";n.r(e),n.d(e,"ManaSyringe",(function(){return r})),n.d(e,"Shape",(function(){return Os})),n.d(e,"LineCap",(function(){return Is})),n.d(e,"LineJoin",(function(){return Rs})),n.d(e,"TextTransform",(function(){return Ds})),n.d(e,"TextAlign",(function(){return Ls})),n.d(e,"CanvasConfig",(function(){return Vs})),n.d(e,"UnitType",(function(){return Bo})),n.d(e,"UnitCategory",(function(){return jo})),n.d(e,"ValueRange",(function(){return Fo})),n.d(e,"Nested",(function(){return Uo})),n.d(e,"ParenLess",(function(){return Go})),n.d(e,"CSSColorValue",(function(){return Ta})),n.d(e,"CSSKeywordValue",(function(){return Ea})),n.d(e,"CSSMathOperator",(function(){return ma})),n.d(e,"isComparison",(function(){return wa})),n.d(e,"BaseType",(function(){return ga})),n.d(e,"unitTypeToBaseType",(function(){return Ma})),n.d(e,"baseTypeToString",(function(){return ka})),n.d(e,"CSSNumericValueType",(function(){return Pa})),n.d(e,"CSSNumericValue",(function(){return xa})),n.d(e,"CSSUnitValue",(function(){return Oa})),n.d(e,"CSSMathValue",(function(){return Ia})),n.d(e,"CSSMathInvert",(function(){return Ra})),n.d(e,"CSSMathNegate",(function(){return Da})),n.d(e,"typeCheck",(function(){return La})),n.d(e,"CSSMathVariadic",(function(){return Ba})),n.d(e,"CSSMathMin",(function(){return ja})),n.d(e,"CSSMathMax",(function(){return Fa})),n.d(e,"CSSMathSum",(function(){return Ua})),n.d(e,"CSSMathProduct",(function(){return Ga})),n.d(e,"Opx",(function(){return za})),n.d(e,"Odeg",(function(){return qa})),n.d(e,"CSSRGB",(function(){return Wa})),n.d(e,"GradientPatternType",(function(){return Va})),n.d(e,"CSSGradientValue",(function(){return Ya})),n.d(e,"CSSStyleValueType",(function(){return ya})),n.d(e,"CSSStyleValue",(function(){return ba})),n.d(e,"CSSTransformValue",(function(){return Ka})),n.d(e,"CSSTranslate",(function(){return Xa})),n.d(e,"parseColor",(function(){return Nu})),n.d(e,"mergeColors",(function(){return Au})),n.d(e,"parseDimension",(function(){return Cu})),n.d(e,"parseLength",(function(){return _u})),n.d(e,"parserPercentage",(function(){return Ou})),n.d(e,"parseLengthOrPercentage",(function(){return Iu})),n.d(e,"parseAngle",(function(){return Ru})),n.d(e,"mergeDimensions",(function(){return Du})),n.d(e,"convertAngleUnit",(function(){return Lu})),n.d(e,"parseDimensionArray",(function(){return Vu})),n.d(e,"mergeDimensionList",(function(){return Bu})),n.d(e,"convertPercentUnit",(function(){return ju})),n.d(e,"numberToString",(function(){return Fu})),n.d(e,"parseNumber",(function(){return Uu})),n.d(e,"parseNumberList",(function(){return Gu})),n.d(e,"mergeNumbers",(function(){return zu})),n.d(e,"clampedMergeNumbers",(function(){return qu})),n.d(e,"mergeNumberLists",(function(){return Wu})),n.d(e,"parsePath",(function(){return Xs})),n.d(e,"mergePaths",(function(){return Js})),n.d(e,"parsePoints",(function(){return Qs})),n.d(e,"parseParam",(function(){return $s})),n.d(e,"parseFilter",(function(){return ec})),n.d(e,"parseTransform",(function(){return mh})),n.d(e,"mergeTransforms",(function(){return Th})),n.d(e,"parseTransformOrigin",(function(){return Eh})),n.d(e,"CSSPropertyLengthOrPercentage",(function(){return ql})),n.d(e,"CSSPropertyLocalPosition",(function(){return Wl})),n.d(e,"CSSPropertyOpacity",(function(){return Hl})),n.d(e,"CSSPropertyColor",(function(){return Yl})),n.d(e,"CSSPropertyFilter",(function(){return Kl})),n.d(e,"CSSPropertyLineDash",(function(){return Xl})),n.d(e,"CSSPropertyShadowBlur",(function(){return Zl})),n.d(e,"CSSPropertyOffsetPath",(function(){return Jl})),n.d(e,"CSSPropertyOffsetDistance",(function(){return Ql})),n.d(e,"CSSPropertyAnchor",(function(){return $l})),n.d(e,"CSSPropertyZIndex",(function(){return th})),n.d(e,"CSSPropertyTransform",(function(){return eh})),n.d(e,"CSSPropertyTransformOrigin",(function(){return nh})),n.d(e,"CSSPropertyPath",(function(){return rh})),n.d(e,"CSSPropertyPoints",(function(){return ih})),n.d(e,"CSSPropertyClipPath",(function(){return oh})),n.d(e,"CSSPropertyText",(function(){return ah})),n.d(e,"CSSPropertyTextTransform",(function(){return uh})),n.d(e,"CSS",(function(){return fh})),n.d(e,"LayoutRegistry",(function(){return Mh})),n.d(e,"PropertySyntax",(function(){return sh})),n.d(e,"BUILT_IN_PROPERTIES",(function(){return ch})),n.d(e,"StyleValueRegistryContribution",(function(){return lh})),n.d(e,"StyleValueRegistry",(function(){return hh})),n.d(e,"ElementEvent",(function(){return ko})),n.d(e,"DELEGATION_SPLITTER",(function(){return ac})),n.d(e,"EventTarget",(function(){return uc})),n.d(e,"Node",(function(){return sc})),n.d(e,"Element",(function(){return yc})),n.d(e,"Document",(function(){return Al})),n.d(e,"FederatedEvent",(function(){return zo})),n.d(e,"FederatedMouseEvent",(function(){return Cl})),n.d(e,"FederatedPointerEvent",(function(){return _l})),n.d(e,"FederatedWheelEvent",(function(){return Ol})),n.d(e,"Animation",(function(){return gc})),n.d(e,"AnimationEvent",(function(){return vc})),n.d(e,"AnimationEffectTiming",(function(){return ol})),n.d(e,"CustomEvent",(function(){return oc})),n.d(e,"MutationEvent",(function(){return qo})),n.d(e,"Registration",(function(){return Ll})),n.d(e,"MutationObserver",(function(){return Vl})),n.d(e,"MutationRecord",(function(){return Il})),n.d(e,"makeTiming",(function(){return cl})),n.d(e,"normalizeTimingInput",(function(){return ll})),n.d(e,"numericTimingToObject",(function(){return hl})),n.d(e,"KeyframeEffect",(function(){return dl})),n.d(e,"normalizeKeyframes",(function(){return al})),n.d(e,"compareAnimations",(function(){return bc})),n.d(e,"AnimationTimeline",(function(){return Tc})),n.d(e,"CustomElementRegistry",(function(){return zl})),n.d(e,"DefaultCamera",(function(){return Mf})),n.d(e,"CameraType",(function(){return tf})),n.d(e,"CameraTrackingMode",(function(){return ef})),n.d(e,"CameraProjectionMode",(function(){return nf})),n.d(e,"CameraEvent",(function(){return Pf})),n.d(e,"Camera",(function(){return Nf})),n.d(e,"DisplayObject",(function(){return vl})),n.d(e,"CustomElement",(function(){return ml})),n.d(e,"Circle",(function(){return gl})),n.d(e,"Ellipse",(function(){return bl})),n.d(e,"Group",(function(){return Tl})),n.d(e,"Image",(function(){return El})),n.d(e,"Line",(function(){return wl})),n.d(e,"Path",(function(){return Ml})),n.d(e,"Polygon",(function(){return kl})),n.d(e,"Polyline",(function(){return Pl})),n.d(e,"Rect",(function(){return xl})),n.d(e,"Text",(function(){return Sl})),n.d(e,"HTML",(function(){return Nl})),n.d(e,"Geometry",(function(){return cc})),n.d(e,"Renderable",(function(){return lc})),n.d(e,"Transform",(function(){return hc})),n.d(e,"Strategy",(function(){return nc})),n.d(e,"Cullable",(function(){return fc})),n.d(e,"Sortable",(function(){return pc})),n.d(e,"AbstractRenderer",(function(){return Af})),n.d(e,"CanvasEvent",(function(){return kf})),n.d(e,"Canvas",(function(){return jf})),n.d(e,"DisplayObjectPool",(function(){return Tt})),n.d(e,"sortByZIndex",(function(){return Kh})),n.d(e,"dirtifyToRoot",(function(){return Xh})),n.d(e,"SceneGraphService",(function(){return Jh})),n.d(e,"DefaultSceneGraphService",(function(){return Qh})),n.d(e,"ContextService",(function(){return $h})),n.d(e,"RenderReason",(function(){return Zh})),n.d(e,"RenderingContext",(function(){return rf})),n.d(e,"RenderingPluginContribution",(function(){return of})),n.d(e,"RenderingService",(function(){return af})),n.d(e,"EventService",(function(){return sf})),n.d(e,"SceneGraphSelectorFactory",(function(){return Ro})),n.d(e,"SceneGraphSelector",(function(){return Do})),n.d(e,"DefaultSceneGraphSelector",(function(){return Vo})),n.d(e,"TextService",(function(){return df})),n.d(e,"OffscreenCanvasCreator",(function(){return cf})),n.d(e,"GeometryUpdaterFactory",(function(){return rc})),n.d(e,"GeometryAABBUpdater",(function(){return ic})),n.d(e,"CircleUpdater",(function(){return yf})),n.d(e,"EllipseUpdater",(function(){return vf})),n.d(e,"RectUpdater",(function(){return mf})),n.d(e,"TextUpdater",(function(){return gf})),n.d(e,"LineUpdater",(function(){return bf})),n.d(e,"PolylineUpdater",(function(){return Tf})),n.d(e,"PathUpdater",(function(){return Ef})),n.d(e,"AABB",(function(){return To})),n.d(e,"BoundingSphere",(function(){return wo})),n.d(e,"Mask",(function(){return lo})),n.d(e,"Frustum",(function(){return Po})),n.d(e,"Plane",(function(){return Mo})),n.d(e,"Ray",(function(){return _o})),n.d(e,"Point",(function(){return Oo})),n.d(e,"Rectangle",(function(){return Io})),n.d(e,"DCHECK",(function(){return Wo})),n.d(e,"DCHECK_EQ",(function(){return Ho})),n.d(e,"DCHECK_NE",(function(){return Yo})),n.d(e,"isUndefined",(function(){return Ko})),n.d(e,"isNil",(function(){return Xo})),n.d(e,"isNumber",(function(){return Zo})),n.d(e,"isFunction",(function(){return Jo})),n.d(e,"isBoolean",(function(){return Qo})),n.d(e,"isObject",(function(){return $o})),n.d(e,"clamp",(function(){return ta})),n.d(e,"getAngle",(function(){return ea})),n.d(e,"createVec3",(function(){return na})),n.d(e,"deg2rad",(function(){return ra})),n.d(e,"rad2deg",(function(){return ia})),n.d(e,"grad2deg",(function(){return oa})),n.d(e,"deg2turn",(function(){return aa})),n.d(e,"turn2deg",(function(){return ua})),n.d(e,"getScaling",(function(){return sa})),n.d(e,"getTranslation",(function(){return ca})),n.d(e,"getRotationInRadians",(function(){return la})),n.d(e,"getEuler",(function(){return ha})),n.d(e,"fromRotationTranslationScale",(function(){return fa})),n.d(e,"makePerspective",(function(){return pa})),n.d(e,"decompose",(function(){return da})),n.d(e,"convertEffectInput",(function(){return xh})),n.d(e,"formatAttribute",(function(){return _h})),n.d(e,"equalizeSegments",(function(){return Fs})),n.d(e,"getDrawDirection",(function(){return Us})),n.d(e,"getPathArea",(function(){return zs})),n.d(e,"reverseCurve",(function(){return qs})),n.d(e,"clonePath",(function(){return Ws})),n.d(e,"getRotatedCurve",(function(){return Hs})),n.d(e,"convertToPath",(function(){return Ks})),n.d(e,"toFontString",(function(){return Ih})),n.d(e,"camelCase",(function(){return kh})),n.d(e,"isString",(function(){return Ph})),n.d(e,"MOUSE_POINTER_ID",(function(){return Rh})),n.d(e,"TOUCH_TO_POINTER",(function(){return Dh})),n.d(e,"cleanExistedCanvas",(function(){return Bh})),n.d(e,"isBrowser",(function(){return jh})),n.d(e,"Hook",(function(){return Uh})),n.d(e,"SyncTapHook",(function(){return Gh})),n.d(e,"AsyncTapHook",(function(){return zh})),n.d(e,"SyncHook",(function(){return qh})),n.d(e,"SyncWaterfallHook",(function(){return Wh})),n.d(e,"AsyncParallelHook",(function(){return Hh})),n.d(e,"AsyncSeriesWaterfallHook",(function(){return Yh}));var r={};n.r(r),n.d(r,"injectable",(function(){return N})),n.d(r,"singleton",(function(){return A})),n.d(r,"transient",(function(){return C})),n.d(r,"inject",(function(){return _})),n.d(r,"named",(function(){return O})),n.d(r,"postConstruct",(function(){return f.postConstruct})),n.d(r,"optional",(function(){return f.optional})),n.d(r,"unmanaged",(function(){return f.unmanaged})),n.d(r,"decorate",(function(){return f.decorate})),n.d(r,"Container",(function(){return it})),n.d(r,"GlobalContainer",(function(){return ot})),n.d(r,"register",(function(){return at})),n.d(r,"SyringeModule",(function(){return J})),n.d(r,"isSyringeModule",(function(){return Q})),n.d(r,"Module",(function(){return $})),n.d(r,"Provider",(function(){return F})),n.d(r,"DefaultContributionProvider",(function(){return Y})),n.d(r,"contrib",(function(){return ut})),n.d(r,"Contribution",(function(){return et})),n.d(r,"Syringe",(function(){return l})),n.d(r,"Utils",(function(){return h})),n.d(r,"OptionSymbol",(function(){return I})),n.d(r,"registerSideOption",(function(){return R}));var i={};n.r(i),n.d(i,"create",(function(){return kt})),n.d(i,"fromMat4",(function(){return Pt})),n.d(i,"clone",(function(){return xt})),n.d(i,"copy",(function(){return St})),n.d(i,"fromValues",(function(){return Nt})),n.d(i,"set",(function(){return At})),n.d(i,"identity",(function(){return Ct})),n.d(i,"transpose",(function(){return _t})),n.d(i,"invert",(function(){return Ot})),n.d(i,"adjoint",(function(){return It})),n.d(i,"determinant",(function(){return Rt})),n.d(i,"multiply",(function(){return Dt})),n.d(i,"translate",(function(){return Lt})),n.d(i,"rotate",(function(){return Vt})),n.d(i,"scale",(function(){return Bt})),n.d(i,"fromTranslation",(function(){return jt})),n.d(i,"fromRotation",(function(){return Ft})),n.d(i,"fromScaling",(function(){return Ut})),n.d(i,"fromMat2d",(function(){return Gt})),n.d(i,"fromQuat",(function(){return zt})),n.d(i,"normalFromMat4",(function(){return qt})),n.d(i,"projection",(function(){return Wt})),n.d(i,"str",(function(){return Ht})),n.d(i,"frob",(function(){return Yt})),n.d(i,"add",(function(){return Kt})),n.d(i,"subtract",(function(){return Xt})),n.d(i,"multiplyScalar",(function(){return Zt})),n.d(i,"multiplyScalarAndAdd",(function(){return Jt})),n.d(i,"exactEquals",(function(){return Qt})),n.d(i,"equals",(function(){return $t})),n.d(i,"mul",(function(){return te})),n.d(i,"sub",(function(){return ee}));var o={};n.r(o),n.d(o,"create",(function(){return ne})),n.d(o,"clone",(function(){return re})),n.d(o,"copy",(function(){return ie})),n.d(o,"fromValues",(function(){return oe})),n.d(o,"set",(function(){return ae})),n.d(o,"identity",(function(){return ue})),n.d(o,"transpose",(function(){return se})),n.d(o,"invert",(function(){return ce})),n.d(o,"adjoint",(function(){return le})),n.d(o,"determinant",(function(){return he})),n.d(o,"multiply",(function(){return fe})),n.d(o,"translate",(function(){return pe})),n.d(o,"scale",(function(){return de})),n.d(o,"rotate",(function(){return ye})),n.d(o,"rotateX",(function(){return ve})),n.d(o,"rotateY",(function(){return me})),n.d(o,"rotateZ",(function(){return ge})),n.d(o,"fromTranslation",(function(){return be})),n.d(o,"fromScaling",(function(){return Te})),n.d(o,"fromRotation",(function(){return Ee})),n.d(o,"fromXRotation",(function(){return we})),n.d(o,"fromYRotation",(function(){return Me})),n.d(o,"fromZRotation",(function(){return ke})),n.d(o,"fromRotationTranslation",(function(){return Pe})),n.d(o,"fromQuat2",(function(){return xe})),n.d(o,"getTranslation",(function(){return Se})),n.d(o,"getScaling",(function(){return Ne})),n.d(o,"getRotation",(function(){return Ae})),n.d(o,"fromRotationTranslationScale",(function(){return Ce})),n.d(o,"fromRotationTranslationScaleOrigin",(function(){return _e})),n.d(o,"fromQuat",(function(){return Oe})),n.d(o,"frustum",(function(){return Ie})),n.d(o,"perspectiveNO",(function(){return Re})),n.d(o,"perspective",(function(){return De})),n.d(o,"perspectiveZO",(function(){return Le})),n.d(o,"perspectiveFromFieldOfView",(function(){return Ve})),n.d(o,"orthoNO",(function(){return Be})),n.d(o,"ortho",(function(){return je})),n.d(o,"orthoZO",(function(){return Fe})),n.d(o,"lookAt",(function(){return Ue})),n.d(o,"targetTo",(function(){return Ge})),n.d(o,"str",(function(){return ze})),n.d(o,"frob",(function(){return qe})),n.d(o,"add",(function(){return We})),n.d(o,"subtract",(function(){return He})),n.d(o,"multiplyScalar",(function(){return Ye})),n.d(o,"multiplyScalarAndAdd",(function(){return Ke})),n.d(o,"exactEquals",(function(){return Xe})),n.d(o,"equals",(function(){return Ze})),n.d(o,"mul",(function(){return Je})),n.d(o,"sub",(function(){return Qe}));var a={};n.r(a),n.d(a,"create",(function(){return $e})),n.d(a,"clone",(function(){return tn})),n.d(a,"length",(function(){return en})),n.d(a,"fromValues",(function(){return nn})),n.d(a,"copy",(function(){return rn})),n.d(a,"set",(function(){return on})),n.d(a,"add",(function(){return an})),n.d(a,"subtract",(function(){return un})),n.d(a,"multiply",(function(){return sn})),n.d(a,"divide",(function(){return cn})),n.d(a,"ceil",(function(){return ln})),n.d(a,"floor",(function(){return hn})),n.d(a,"min",(function(){return fn})),n.d(a,"max",(function(){return pn})),n.d(a,"round",(function(){return dn})),n.d(a,"scale",(function(){return yn})),n.d(a,"scaleAndAdd",(function(){return vn})),n.d(a,"distance",(function(){return mn})),n.d(a,"squaredDistance",(function(){return gn})),n.d(a,"squaredLength",(function(){return bn})),n.d(a,"negate",(function(){return Tn})),n.d(a,"inverse",(function(){return En})),n.d(a,"normalize",(function(){return wn})),n.d(a,"dot",(function(){return Mn})),n.d(a,"cross",(function(){return kn})),n.d(a,"lerp",(function(){return Pn})),n.d(a,"hermite",(function(){return xn})),n.d(a,"bezier",(function(){return Sn})),n.d(a,"random",(function(){return Nn})),n.d(a,"transformMat4",(function(){return An})),n.d(a,"transformMat3",(function(){return Cn})),n.d(a,"transformQuat",(function(){return _n})),n.d(a,"rotateX",(function(){return On})),n.d(a,"rotateY",(function(){return In})),n.d(a,"rotateZ",(function(){return Rn})),n.d(a,"angle",(function(){return Dn})),n.d(a,"zero",(function(){return Ln})),n.d(a,"str",(function(){return Vn})),n.d(a,"exactEquals",(function(){return Bn})),n.d(a,"equals",(function(){return jn})),n.d(a,"sub",(function(){return Un})),n.d(a,"mul",(function(){return Gn})),n.d(a,"div",(function(){return zn})),n.d(a,"dist",(function(){return qn})),n.d(a,"sqrDist",(function(){return Wn})),n.d(a,"len",(function(){return Hn})),n.d(a,"sqrLen",(function(){return Yn})),n.d(a,"forEach",(function(){return Kn}));var u={};n.r(u),n.d(u,"create",(function(){return Xn})),n.d(u,"clone",(function(){return Zn})),n.d(u,"fromValues",(function(){return Jn})),n.d(u,"copy",(function(){return Qn})),n.d(u,"set",(function(){return $n})),n.d(u,"add",(function(){return tr})),n.d(u,"subtract",(function(){return er})),n.d(u,"multiply",(function(){return nr})),n.d(u,"divide",(function(){return rr})),n.d(u,"ceil",(function(){return ir})),n.d(u,"floor",(function(){return or})),n.d(u,"min",(function(){return ar})),n.d(u,"max",(function(){return ur})),n.d(u,"round",(function(){return sr})),n.d(u,"scale",(function(){return cr})),n.d(u,"scaleAndAdd",(function(){return lr})),n.d(u,"distance",(function(){return hr})),n.d(u,"squaredDistance",(function(){return fr})),n.d(u,"length",(function(){return pr})),n.d(u,"squaredLength",(function(){return dr})),n.d(u,"negate",(function(){return yr})),n.d(u,"inverse",(function(){return vr})),n.d(u,"normalize",(function(){return mr})),n.d(u,"dot",(function(){return gr})),n.d(u,"cross",(function(){return br})),n.d(u,"lerp",(function(){return Tr})),n.d(u,"random",(function(){return Er})),n.d(u,"transformMat4",(function(){return wr})),n.d(u,"transformQuat",(function(){return Mr})),n.d(u,"zero",(function(){return kr})),n.d(u,"str",(function(){return Pr})),n.d(u,"exactEquals",(function(){return xr})),n.d(u,"equals",(function(){return Sr})),n.d(u,"sub",(function(){return Nr})),n.d(u,"mul",(function(){return Ar})),n.d(u,"div",(function(){return Cr})),n.d(u,"dist",(function(){return _r})),n.d(u,"sqrDist",(function(){return Or})),n.d(u,"len",(function(){return Ir})),n.d(u,"sqrLen",(function(){return Rr})),n.d(u,"forEach",(function(){return Dr}));var s={};n.r(s),n.d(s,"create",(function(){return Lr})),n.d(s,"identity",(function(){return Vr})),n.d(s,"setAxisAngle",(function(){return Br})),n.d(s,"getAxisAngle",(function(){return jr})),n.d(s,"getAngle",(function(){return Fr})),n.d(s,"multiply",(function(){return Ur})),n.d(s,"rotateX",(function(){return Gr})),n.d(s,"rotateY",(function(){return zr})),n.d(s,"rotateZ",(function(){return qr})),n.d(s,"calculateW",(function(){return Wr})),n.d(s,"exp",(function(){return Hr})),n.d(s,"ln",(function(){return Yr})),n.d(s,"pow",(function(){return Kr})),n.d(s,"slerp",(function(){return Xr})),n.d(s,"random",(function(){return Zr})),n.d(s,"invert",(function(){return Jr})),n.d(s,"conjugate",(function(){return Qr})),n.d(s,"fromMat3",(function(){return $r})),n.d(s,"fromEuler",(function(){return ti})),n.d(s,"str",(function(){return ei})),n.d(s,"clone",(function(){return si})),n.d(s,"fromValues",(function(){return ci})),n.d(s,"copy",(function(){return li})),n.d(s,"set",(function(){return hi})),n.d(s,"add",(function(){return fi})),n.d(s,"mul",(function(){return pi})),n.d(s,"scale",(function(){return di})),n.d(s,"dot",(function(){return yi})),n.d(s,"lerp",(function(){return vi})),n.d(s,"length",(function(){return mi})),n.d(s,"len",(function(){return gi})),n.d(s,"squaredLength",(function(){return bi})),n.d(s,"sqrLen",(function(){return Ti})),n.d(s,"normalize",(function(){return Ei})),n.d(s,"exactEquals",(function(){return wi})),n.d(s,"equals",(function(){return Mi})),n.d(s,"rotationTo",(function(){return ki})),n.d(s,"sqlerp",(function(){return Pi})),n.d(s,"setAxes",(function(){return xi}));var c={};n.r(c),n.d(c,"create",(function(){return Si})),n.d(c,"clone",(function(){return Ni})),n.d(c,"fromValues",(function(){return Ai})),n.d(c,"copy",(function(){return Ci})),n.d(c,"set",(function(){return _i})),n.d(c,"add",(function(){return Oi})),n.d(c,"subtract",(function(){return Ii})),n.d(c,"multiply",(function(){return Ri})),n.d(c,"divide",(function(){return Di})),n.d(c,"ceil",(function(){return Li})),n.d(c,"floor",(function(){return Vi})),n.d(c,"min",(function(){return Bi})),n.d(c,"max",(function(){return ji})),n.d(c,"round",(function(){return Fi})),n.d(c,"scale",(function(){return Ui})),n.d(c,"scaleAndAdd",(function(){return Gi})),n.d(c,"distance",(function(){return zi})),n.d(c,"squaredDistance",(function(){return qi})),n.d(c,"length",(function(){return Wi})),n.d(c,"squaredLength",(function(){return Hi})),n.d(c,"negate",(function(){return Yi})),n.d(c,"inverse",(function(){return Ki})),n.d(c,"normalize",(function(){return Xi})),n.d(c,"dot",(function(){return Zi})),n.d(c,"cross",(function(){return Ji})),n.d(c,"lerp",(function(){return Qi})),n.d(c,"random",(function(){return $i})),n.d(c,"transformMat2",(function(){return to})),n.d(c,"transformMat2d",(function(){return eo})),n.d(c,"transformMat3",(function(){return no})),n.d(c,"transformMat4",(function(){return ro})),n.d(c,"rotate",(function(){return io})),n.d(c,"angle",(function(){return oo})),n.d(c,"zero",(function(){return ao})),n.d(c,"str",(function(){return uo})),n.d(c,"exactEquals",(function(){return so})),n.d(c,"equals",(function(){return co})),n.d(c,"len",(function(){return ho})),n.d(c,"sub",(function(){return fo})),n.d(c,"mul",(function(){return po})),n.d(c,"div",(function(){return yo})),n.d(c,"dist",(function(){return vo})),n.d(c,"sqrDist",(function(){return mo})),n.d(c,"sqrLen",(function(){return go})),n.d(c,"forEach",(function(){return bo}));n(12);var l,h,f=n(1);function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){return e.lifecycle===l.Lifecycle.singleton?function(t){return t.inSingletonScope()}(t):function(t){return t.inTransientScope()}(t)}function b(t,e){t.whenTargetNamed(w(e))}function T(t,e){return e.bind(M(t))}function E(t,e){if(e.isBound(M(t)))try{return e.rebind(M(t))}catch(n){return e.bind(M(t))}return e.bind(M(t))}function w(t){return h.isDefinedToken(t)?t.symbol:t}function M(t){return h.isDefinedToken(t)?t.symbol:t}!function(t){t.defineToken=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{multiple:!0};return new t.DefinedToken(e,n)};var e,n=y((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(this,t),this.prototype={},this.name=void 0,this.multiple=void 0,this.symbol=void 0;var r=n.multiple,i=void 0!==r&&r;this.name=e,this.symbol=Symbol(this.name),this.multiple=i}));t.DefinedToken=n,t.isModule=function(t){return!!t&&"object"===p(t)&&"id"in t},function(t){t.singleton="singleton",t.transient="transient"}(e=t.Lifecycle||(t.Lifecycle={})),t.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),t.DefaultOption={lifecycle:e.transient}}(l||(l={})),function(t){t.toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},t.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},t.isDefinedToken=function(t){return!!(t&&"object"===p(t)&&"symbol"in t&&"multiple"in t)},t.isInjectOption=function(t){return!(!t||"object"!==p(t)||!("token"in t))},t.isNamedToken=function(t){return!!(t&&"object"===p(t)&&"token"in t&&"named"in t)},t.isMultipleEnabled=function(e){return t.isDefinedToken(e)&&e.multiple}}(h||(h={}));var k=new f.Container;function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(Object(n),!0).forEach((function(e){S(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(f.injectable)();return function(n){Reflect.defineMetadata(l.ClassOptionSymbol,x(x({},t),{},{target:n}),n),e(n)}}function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return N(x(x({},t),{},{lifecycle:l.Lifecycle.singleton}))}function C(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return N(x(x({},t),{},{lifecycle:l.Lifecycle.transient}))}function _(t){return Object(f.inject)(M(t))}function O(t){return Object(f.named)(w(t))}var I=Symbol("SyringeOptionSymbol"),R=function(t,e){Reflect.defineMetadata(I,t,e)};function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function L(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){V(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function V(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var j=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.register=void 0,this.mutiple=void 0,this.register=e,this.token=n,this.option=r,this.rawToken=h.isNamedToken(n)?n.token:n,this.named=h.isNamedToken(n)?n.named:void 0,this.mutiple=!!this.named||h.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var e,n,r;return e=t,r=[{key:"resolveTarget",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var i=Reflect.getMetadata(I,n);i&&t.resolveOption(e,i)}catch(t){}if(h.isClass(n))if(r.useClass){var o=h.toArray(r.useClass);o.unshift(n),r.useClass=o}else r.useClass=[n];var a;try{a=Reflect.getMetadata(l.ClassOptionSymbol,n)}catch(t){}if((a=L(L({},a||{}),r)).token){var u=h.toArray(a.token);u.unshift(n),a.token=u}else a.token=[n];t.resolveOption(e,a)}catch(t){}}},{key:"resolveOption",value:function(e,n){var r,i,o,a,u,s,c,f,p=(r=L(L({},t.globalConfig),n),i=h.toArray(r.token),o=h.toArray(r.useClass),a=h.toArray(r.useDynamic),u=h.toArray(r.useFactory),s=h.toArray(r.contrib),c=r.lifecycle||l.Lifecycle.transient,f={token:i,useClass:o,lifecycle:s.length>0?l.Lifecycle.singleton:c,contrib:s,useDynamic:a,useFactory:u},"useValue"in r&&(f.useValue=r.useValue),f);(0!==p.useClass.length||0!==p.useDynamic.length||0!==p.useFactory.length||"useValue"in p)&&p.token.forEach((function(n){new t(e,n,L({},p)).resolve()}))}}],(n=[{key:"resolve",value:function(){var t=this,e=this.register;(function(t){return t&&"object"===m(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t})(e)&&(this.mutiple?this.resolveMutilple(e):(this.resolveMono(e),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(n){h.isMultipleEnabled(n)?T(n,e).toService(t.generalToken):E(n,e).toService(t.generalToken)}))))}},{key:"resolveMono",value:function(t){if("useValue"in this.option)return E(this.generalToken,t).toConstantValue(this.option.useValue);if(this.option.useDynamic.length>0){var e=this.option.useDynamic[this.option.useDynamic.length-1];return g(E(this.generalToken,t).toDynamicValue((function(t){var n=it.getContainer(t.container);return e({container:n})})),this.option)}if(this.option.useFactory.length>0){var n=this.option.useFactory[this.option.useFactory.length-1];return E(this.generalToken,t).toFactory((function(t){var e=it.getContainer(t.container);return n({container:e})}))}if(this.option.useClass.length>0){var r=this.option.useClass[this.option.useClass.length-1];return g(E(this.generalToken,t).to(r),this.option)}}},{key:"resolveMutilple",value:function(t){var e=this,n=this.option.useClass.map((function(n){return g(T(e.generalToken,t).to(n),e.option)})),r=this.option.useDynamic.map((function(n){return g(T(e.generalToken,t).toDynamicValue((function(t){var e=it.getContainer(t.container);return n({container:e})})),e.option)})),i=this.option.useFactory.map((function(n){return T(e.generalToken,t).toFactory((function(t){var e=it.getContainer(t.container);return n({container:e})}))})),o="useValue"in this.option?T(this.generalToken,t).toConstantValue(this.option.useValue):void 0;this.named&&(n.forEach((function(t){return e.named&&b(t,e.named)})),r.forEach((function(t){return e.named&&b(t,e.named)})),i.forEach((function(t){return e.named&&b(t,e.named)})),o&&b(o,this.named))}}])&&B(e.prototype,n),r&&B(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();j.globalConfig=l.DefaultOption;var F=l.defineToken("ContributionProvider");function U(t){return function(t){if(Array.isArray(t))return G(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return G(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(t,e)}(t)||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 G(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function q(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach((function(e){W(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function W(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Y=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.option={recursive:!1,cache:!0},this.services=void 0,this.serviceIdentifier=void 0,this.container=void 0,this.container=n,this.serviceIdentifier=e,r&&(this.option=q(q({},this.option),r))}var e,n,r;return e=t,(n=[{key:"setServices",value:function(t){for(var e=[],n=this.container;n;){if(n.isBound(this.serviceIdentifier)){var r=n.getAll(this.serviceIdentifier);e.push.apply(e,U(r))}n=t?n.parent:void 0}return e}},{key:"getContributions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=q(q({},this.option),t),n=e.cache,r=e.recursive;return n&&void 0!==this.services||(this.services=this.setServices(!!r)),this.services}}])&&H(e.prototype,n),r&&H(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function K(t,e){return{token:{token:F,named:t},useDynamic:function(n){return new Y(t,n.container,e)},lifecycle:l.Lifecycle.singleton}}function X(t,e,n){t({token:{token:F,named:e},useDynamic:function(t){return new Y(e,t.container,n)},lifecycle:l.Lifecycle.singleton})}function Z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var J=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(t,e,r,i){var o={bind:t,unbind:e,isBound:r,rebind:i},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.isInjectOption(t)?j.resolveOption(o,t):j.resolveTarget(o,t,e)};n.baseRegistry&&n.baseRegistry(a),n.optionCollection&&n.optionCollection.forEach((function(t){return a(t)}))},this.baseRegistry=e,this.inversifyModule=new f.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var e,n,r;return e=t,(n=[{key:"options",get:function(){return this.optionCollection||(this.optionCollection=[]),this.optionCollection}},{key:"register",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(e)})),this}},{key:"contribution",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(K(e))})),this}}])&&Z(e.prototype,n),r&&Z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Q(t){return t&&"inversifyModule"in t}function $(t){return new J(t)}function tt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var et,nt,rt=new Map,it=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=e||new f.Container,t.setContainer(this.container,this)}var e,n,r;return e=t,r=[{key:"setContainer",value:function(t,e){return rt.set(t.id,e)}},{key:"getContainer",value:function(e){var n=rt.get(e.id);if(!n){var r=new t(e);return t.setContainer(e,r),r}return n}},{key:"config",value:function(t){j.globalConfig=t}}],(n=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(Q(t)&&this.container.load(t.inversifyModule),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):(console.warn("Unsupported module."),{dispose:function(){}})}},{key:"unload",value:function(t){Q(t)&&(this.container.unload(t.inversifyModule),this.loadedModules=this.loadedModules.filter((function(e){return e!==t.id})))}},{key:"remove",value:function(t){return this.container.unbind(M(t))}},{key:"get",value:function(t){return this.container.get(M(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(M(t),w(e))}},{key:"getAll",value:function(t){return this.container.getAll(M(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(M(t),w(e))}},{key:"isBound",value:function(t){return this.container.isBound(M(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(M(t),w(e))}},{key:"createChild",value:function(){var e=new t(this.container.createChild());return e.parent=this,e}},{key:"register",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.isInjectOption(t)?j.resolveOption(this.container,t):j.resolveTarget(this.container,t,e)}}])&&tt(e.prototype,n),r&&tt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),ot=new it(k),at=ot.register.bind(ot),ut=function(t){return function(e,n,r){O(t)(e,n,r),_(F)(e,n,r)}};(nt=et||(et={})).Provider=F,nt.register=X;var st=n(6),ct=function(t,e){return(ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};
16
+ var n;!function(n){!function(r){var i="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),o=a(n);function a(t,e){return function(n,r){"function"!=typeof t[n]&&Object.defineProperty(t,n,{configurable:!0,writable:!0,value:r}),e&&e(n,r)}}void 0===i.Reflect?i.Reflect=n:o=a(i.Reflect,o),function(e){var n=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,u={__proto__:[]}instanceof Array,s=!a&&!u,c={create:a?function(){return I(Object.create(null))}:u?function(){return I({__proto__:null})}:function(){return I({})},has:s?function(t,e){return n.call(t,e)}:function(t,e){return e in t},get:s?function(t,e){return n.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},l=Object.getPrototypeOf(Function),h="object"==typeof t&&t.env&&"true"===t.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=h||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var t={},e=[],n=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[o]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var n=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var n=this._find(t,!0);return this._values[n]=e,this},e.prototype.delete=function(e){var n=this._find(e,!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--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new n(this._keys,this._values,r)},e.prototype.values=function(){return new n(this._keys,this._values,i)},e.prototype.entries=function(){return new n(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[o]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function i(t,e){return e}function a(t,e){return[t,e]}}():Map,p=h||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function t(){this._map=new f}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[o]=function(){return this.keys()},t}():Set,d=new(h||"function"!=typeof WeakMap?function(){var t=c.create(),e=r();return function(){function t(){this._key=r()}return t.prototype.has=function(t){var e=i(t,!1);return void 0!==e&&c.has(e,this._key)},t.prototype.get=function(t){var e=i(t,!1);return void 0!==e?c.get(e,this._key):void 0},t.prototype.set=function(t,e){return i(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=i(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=r()},t}();function r(){var e;do{e="@@WeakMap@@"+a()}while(c.has(t,e));return t[e]=!0,e}function i(t,r){if(!n.call(t,e)){if(!r)return;Object.defineProperty(t,e,{value:c.create()})}return t[e]}function o(t,e){for(var n=0;n<e;++n)t[n]=255*Math.random()|0;return t}function a(){var t,e=(t=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):o(new Uint8Array(t),t):o(new Array(t),t));e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",r=0;r<16;++r){var i=e[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}():WeakMap);function y(t,e,n){var r=d.get(t);if(E(r)){if(!n)return;r=new f,d.set(t,r)}var i=r.get(e);if(E(i)){if(!n)return;i=new f,r.set(e,i)}return i}function v(t,e,n){var r=y(e,n,!1);return!E(r)&&!!r.has(t)}function m(t,e,n){var r=y(e,n,!1);if(!E(r))return r.get(t)}function g(t,e,n,r){y(n,r,!0).set(t,e)}function b(t,e){var n=[],r=y(t,e,!1);if(E(r))return n;for(var i=function(t){var e=A(t,o);if(!S(e))throw new TypeError;var n=e.call(t);if(!M(n))throw new TypeError;return n}(r.keys()),a=0;;){var u=C(i);if(!u)return n.length=a,n;var s=u.value;try{n[a]=s}catch(t){try{_(i)}finally{throw t}}a++}}function T(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function E(t){return void 0===t}function w(t){return null===t}function M(t){return"object"==typeof t?null!==t:"function"==typeof t}function k(t,e){switch(T(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var n=3===e?"string":5===e?"number":"default",r=A(t,i);if(void 0!==r){var o=r.call(t,n);if(M(o))throw new TypeError;return o}return function(t,e){if("string"===e){var n=t.toString;if(S(n))if(!M(i=n.call(t)))return i;if(S(r=t.valueOf))if(!M(i=r.call(t)))return i}else{var r;if(S(r=t.valueOf))if(!M(i=r.call(t)))return i;var i,o=t.toString;if(S(o))if(!M(i=o.call(t)))return i}throw new TypeError}(t,"default"===n?"number":n)}function P(t){var e=k(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function x(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function S(t){return"function"==typeof t}function N(t){return"function"==typeof t}function A(t,e){var n=t[e];if(null!=n){if(!S(n))throw new TypeError;return n}}function C(t){var e=t.next();return!e.done&&e}function _(t){var e=t.return;e&&e.call(t)}function O(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===l)return e;if(e!==l)return e;var n=t.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return e;var i=r.constructor;return"function"!=typeof i||i===t?e:i}function I(t){return t.__=void 0,delete t.__,t}e("decorate",(function(t,e,n,r){if(E(n)){if(!x(t))throw new TypeError;if(!N(e))throw new TypeError;return function(t,e){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(e);if(!E(r)&&!w(r)){if(!N(r))throw new TypeError;e=r}}return e}(t,e)}if(!x(t))throw new TypeError;if(!M(e))throw new TypeError;if(!M(r)&&!E(r)&&!w(r))throw new TypeError;return w(r)&&(r=void 0),function(t,e,n,r){for(var i=t.length-1;i>=0;--i){var o=(0,t[i])(e,n,r);if(!E(o)&&!w(o)){if(!M(o))throw new TypeError;r=o}}return r}(t,e,n=P(n),r)})),e("metadata",(function(t,e){return function(n,r){if(!M(n))throw new TypeError;if(!E(r)&&!function(t){switch(T(t)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;g(t,e,n,r)}})),e("defineMetadata",(function(t,e,n,r){if(!M(n))throw new TypeError;return E(r)||(r=P(r)),g(t,e,n,r)})),e("hasMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=P(n)),function t(e,n,r){if(v(e,n,r))return!0;var i=O(n);return!w(i)&&t(e,i,r)}(t,e,n)})),e("hasOwnMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=P(n)),v(t,e,n)})),e("getMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=P(n)),function t(e,n,r){if(v(e,n,r))return m(e,n,r);var i=O(n);return w(i)?void 0:t(e,i,r)}(t,e,n)})),e("getOwnMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return E(n)||(n=P(n)),m(t,e,n)})),e("getMetadataKeys",(function(t,e){if(!M(t))throw new TypeError;return E(e)||(e=P(e)),function t(e,n){var r=b(e,n),i=O(e);if(null===i)return r;var o=t(i,n);if(o.length<=0)return r;if(r.length<=0)return o;for(var a=new p,u=[],s=0,c=r;s<c.length;s++){var l=c[s];a.has(l)||(a.add(l),u.push(l))}for(var h=0,f=o;h<f.length;h++){l=f[h];a.has(l)||(a.add(l),u.push(l))}return u}(t,e)})),e("getOwnMetadataKeys",(function(t,e){if(!M(t))throw new TypeError;return E(e)||(e=P(e)),b(t,e)})),e("deleteMetadata",(function(t,e,n){if(!M(e))throw new TypeError;E(n)||(n=P(n));var r=y(e,n,!1);if(E(r))return!1;if(!r.delete(t))return!1;if(r.size>0)return!0;var i=d.get(e);return i.delete(n),i.size>0||d.delete(e),!0}))}(o)}()}(n||(n={}))}).call(this,n(23),n(13))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReader=void 0;var r=n(0),i=function(){function t(){}return t.prototype.getConstructorMetadata=function(t){return{compilerGeneratedMetadata:Reflect.getMetadata(r.PARAM_TYPES,t),userGeneratedMetadata:Reflect.getMetadata(r.TAGGED,t)||{}}},t.prototype.getPropertiesMetadata=function(t){return Reflect.getMetadata(r.TAGGED_PROP,t)||[]},t}();e.MetadataReader=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStackOverflowExeption=void 0;var r=n(2);e.isStackOverflowExeption=function(t){return t instanceof RangeError||t.message===r.STACK_OVERFLOW}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inject=e.LazyServiceIdentifer=void 0;var r=n(2),i=n(0),o=n(3),a=n(5),u=function(){function t(t){this._cb=t}return t.prototype.unwrap=function(){return this._cb()},t}();e.LazyServiceIdentifer=u,e.inject=function(t){return function(e,n,u){if(void 0===t)throw new Error(r.UNDEFINED_INJECT_ANNOTATION(e.name));var s=new o.Metadata(i.INJECT_TAG,t);"number"==typeof u?a.tagParameter(e,n,u,s):a.tagProperty(e,n,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Target=void 0;var r=n(0),i=n(7),o=n(3),a=n(31),u=function(){function t(t,e,n,u){this.id=i.id(),this.type=t,this.serviceIdentifier=n,this.name=new a.QueryableString(e||""),this.metadata=new Array;var s=null;"string"==typeof u?s=new o.Metadata(r.NAMED_TAG,u):u instanceof o.Metadata&&(s=u),null!==s&&this.metadata.push(s)}return t.prototype.hasTag=function(t){for(var e=0,n=this.metadata;e<n.length;e++){if(n[e].key===t)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(r.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(t){return this.matchesTag(r.MULTI_INJECT_TAG)(t)},t.prototype.isNamed=function(){return this.hasTag(r.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some((function(t){return r.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))}))},t.prototype.isOptional=function(){return this.matchesTag(r.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(t){return t.key===r.NAMED_TAG}))[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(t){return r.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))})):null},t.prototype.matchesNamedTag=function(t){return this.matchesTag(r.NAMED_TAG)(t)},t.prototype.matchesTag=function(t){var e=this;return function(n){for(var r=0,i=e.metadata;r<i.length;r++){var o=i[r];if(o.key===t&&o.value===n)return!0}return!1}},t}();e.Target=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenOnSyntax=void 0;var r=n(9),i=n(10),o=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new i.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new r.BindingOnSyntax(this._binding)}return t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingWhenOnSyntax=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=void 0;var r=n(0),i=n(3),o=function(t,e){var n=t.parentRequest;return null!==n&&(!!e(n)||o(n,e))};e.traverseAncerstors=o;var a=function(t){return function(e){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(t)(e)};return n.metaData=new i.Metadata(t,e),n}};e.taggedConstraint=a;var u=a(r.NAMED_TAG);e.namedConstraint=u;e.typeConstraint=function(t){return function(e){var n=null;if(null!==e){if(n=e.bindings[0],"string"==typeof t)return n.serviceIdentifier===t;var r=e.bindings[0].implementationType;return t===r}return!1}}},,,,function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,c=[],l=!1,h=-1;function f(){l&&s&&(l=!1,s.length?c=s.concat(c):h=-1,c.length&&p())}function p(){if(!l){var t=u(f);l=!0;for(var e=c.length;e;){for(s=c,c=[];++h<e;)s&&s[h].run();h=-1,e=c.length}s=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||u(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;var a=n(25),u=n(2),s=n(4),c=n(0),l=n(14),h=n(26),f=n(33),p=n(35),d=n(7),y=n(8),v=n(38),m=n(39),g=function(){function t(t){this._appliedMiddleware=[];var e=t||{};if("object"!=typeof e)throw new Error(""+u.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===e.defaultScope)e.defaultScope=s.BindingScopeEnum.Transient;else if(e.defaultScope!==s.BindingScopeEnum.Singleton&&e.defaultScope!==s.BindingScopeEnum.Transient&&e.defaultScope!==s.BindingScopeEnum.Request)throw new Error(""+u.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===e.autoBindInjectable)e.autoBindInjectable=!1;else if("boolean"!=typeof e.autoBindInjectable)throw new Error(""+u.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===e.skipBaseClassChecks)e.skipBaseClassChecks=!1;else if("boolean"!=typeof e.skipBaseClassChecks)throw new Error(""+u.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:e.autoBindInjectable,defaultScope:e.defaultScope,skipBaseClassChecks:e.skipBaseClassChecks},this.id=d.id(),this._bindingDictionary=new m.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new l.MetadataReader}return t.merge=function(e,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var a=new t,u=o([e,n],r).map((function(t){return h.getBindingDictionary(t)})),s=h.getBindingDictionary(a);function c(t,e){t.traverse((function(t,n){n.forEach((function(t){e.add(t.serviceIdentifier,t.clone())}))}))}return u.forEach((function(t){c(t,s)})),a},t.prototype.load=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=this._getContainerModuleHelpersFactory(),r=0,i=t;r<i.length;r++){var o=i[r],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},t.prototype.loadAsync=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:e=this._getContainerModuleHelpersFactory(),n=0,r=t,i.label=1;case 1:return n<r.length?(o=r[n],a=e(o.id),[4,o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)]):[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},t.prototype.unload=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=function(t){return function(e){return e.moduleId===t}};e.forEach((function(e){var n=r(e.id);t._bindingDictionary.removeByCondition(n)}))},t.prototype.bind=function(t){var e=this.options.defaultScope||s.BindingScopeEnum.Transient,n=new a.Binding(t,e);return this._bindingDictionary.add(t,n),new p.BindingToSyntax(n)},t.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},t.prototype.unbind=function(t){try{this._bindingDictionary.remove(t)}catch(e){throw new Error(u.CANNOT_UNBIND+" "+y.getServiceIdentifierAsString(t))}},t.prototype.unbindAll=function(){this._bindingDictionary=new m.Lookup},t.prototype.isBound=function(t){var e=this._bindingDictionary.hasKey(t);return!e&&this.parent&&(e=this.parent.isBound(t)),e},t.prototype.isBoundNamed=function(t,e){return this.isBoundTagged(t,c.NAMED_TAG,e)},t.prototype.isBoundTagged=function(t,e,n){var r=!1;if(this._bindingDictionary.hasKey(t)){var i=this._bindingDictionary.get(t),o=h.createMockRequest(this,t,e,n);r=i.some((function(t){return t.constraint(o)}))}return!r&&this.parent&&(r=this.parent.isBoundTagged(t,e,n)),r},t.prototype.snapshot=function(){this._snapshots.push(v.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},t.prototype.restore=function(){var t=this._snapshots.pop();if(void 0===t)throw new Error(u.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=t.bindings,this._middleware=t.middleware},t.prototype.createChild=function(e){var n=new t(e||this.options);return n.parent=this,n},t.prototype.applyMiddleware=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._appliedMiddleware=this._appliedMiddleware.concat(t);var n=this._middleware?this._middleware:this._planAndResolve();this._middleware=t.reduce((function(t,e){return e(t)}),n)},t.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},t.prototype.get=function(t){return this._get(!1,!1,s.TargetTypeEnum.Variable,t)},t.prototype.getTagged=function(t,e,n){return this._get(!1,!1,s.TargetTypeEnum.Variable,t,e,n)},t.prototype.getNamed=function(t,e){return this.getTagged(t,c.NAMED_TAG,e)},t.prototype.getAll=function(t){return this._get(!0,!0,s.TargetTypeEnum.Variable,t)},t.prototype.getAllTagged=function(t,e,n){return this._get(!1,!0,s.TargetTypeEnum.Variable,t,e,n)},t.prototype.getAllNamed=function(t,e){return this.getAllTagged(t,c.NAMED_TAG,e)},t.prototype.resolve=function(t){var e=this.createChild();return e.bind(t).toSelf(),this._appliedMiddleware.forEach((function(t){e.applyMiddleware(t)})),e.get(t)},t.prototype._getContainerModuleHelpersFactory=function(){var t=this,e=function(t,e){t._binding.moduleId=e},n=function(n){return function(r){var i=t.rebind.bind(t)(r);return e(i,n),i}};return function(r){return{bindFunction:(i=r,function(n){var r=t.bind.bind(t)(n);return e(r,i),r}),isboundFunction:function(e){return t.isBound.bind(t)(e)},rebindFunction:n(r),unbindFunction:function(e){t.unbind.bind(t)(e)}};var i}},t.prototype._get=function(t,e,n,r,i,o){var a=null,s={avoidConstraints:t,contextInterceptor:function(t){return t},isMultiInject:e,key:i,serviceIdentifier:r,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(s)))throw new Error(u.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(s);return a},t.prototype._planAndResolve=function(){var t=this;return function(e){var n=h.plan(t._metadataReader,t,e.isMultiInject,e.targetType,e.serviceIdentifier,e.key,e.value,e.avoidConstraints);return n=e.contextInterceptor(n),f.resolve(n)}},t}();e.Container=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Binding=void 0;var r=n(4),i=n(7),o=function(){function t(t,e){this.id=i.id(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=r.BindingTypeEnum.Invalid,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===r.BindingScopeEnum.Singleton&&this.activated,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.cache=this.cache,e},t}();e.Binding=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBindingDictionary=e.createMockRequest=e.plan=void 0;var r=n(27),i=n(2),o=n(4),a=n(0),u=n(15),s=n(8),c=n(28),l=n(3),h=n(29),f=n(30),p=n(32),d=n(17);function y(t){return t._bindingDictionary}function v(t,e,n,o,a){var u=m(n.container,a.serviceIdentifier),c=[];return u.length===r.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof a.serviceIdentifier&&t.getConstructorMetadata(a.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(a.serviceIdentifier).toSelf(),u=m(n.container,a.serviceIdentifier)),c=e?u:u.filter((function(t){var e=new p.Request(t.serviceIdentifier,n,o,t,a);return t.constraint(e)})),function(t,e,n,o){switch(e.length){case r.BindingCount.NoBindingsAvailable:if(n.isOptional())return e;var a=s.getServiceIdentifierAsString(t),u=i.NOT_REGISTERED;throw u+=s.listMetadataForTarget(a,n),u+=s.listRegisteredBindingsForServiceIdentifier(o,a,m),new Error(u);case r.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return e;case r.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return e;a=s.getServiceIdentifierAsString(t),u=i.AMBIGUOUS_MATCH+" "+a;throw u+=s.listRegisteredBindingsForServiceIdentifier(o,a,m),new Error(u)}}(a.serviceIdentifier,c,a,n.container),c}function m(t,e){var n=[],r=y(t);return r.hasKey(e)?n=r.get(e):null!==t.parent&&(n=m(t.parent,e)),n}e.getBindingDictionary=y,e.plan=function(t,e,n,r,y,m,g,b){void 0===b&&(b=!1);var T=new c.Context(e),E=function(t,e,n,r,i,o){var u=t?a.MULTI_INJECT_TAG:a.INJECT_TAG,s=new l.Metadata(u,n),c=new d.Target(e,r,n,s);if(void 0!==i){var h=new l.Metadata(i,o);c.metadata.push(h)}return c}(n,r,y,"",m,g);try{return function t(e,n,r,a,u,s){var c,l;if(null===u){c=v(e,n,a,null,s),l=new p.Request(r,a,null,c,s);var d=new h.Plan(a,l);a.addPlan(d)}else c=v(e,n,a,u,s),l=u.addChildRequest(s.serviceIdentifier,c,s);c.forEach((function(n){var r=null;if(s.isArray())r=l.addChildRequest(n.serviceIdentifier,n,s);else{if(n.cache)return;r=l}if(n.type===o.BindingTypeEnum.Instance&&null!==n.implementationType){var u=f.getDependencies(e,n.implementationType);if(!a.container.options.skipBaseClassChecks){var c=f.getBaseClassDependencyCount(e,n.implementationType);if(u.length<c){var h=i.ARGUMENTS_LENGTH_MISMATCH(f.getFunctionName(n.implementationType));throw new Error(h)}}u.forEach((function(n){t(e,!1,n.serviceIdentifier,a,r,n)}))}}))}(t,b,y,T,null,E),T}catch(t){throw u.isStackOverflowExeption(t)&&T.plan&&s.circularDependencyToException(T.plan.rootRequest),t}},e.createMockRequest=function(t,e,n,r){var i=new d.Target(o.TargetTypeEnum.Variable,"",e,new l.Metadata(n,r)),a=new c.Context(t);return new p.Request(e,a,null,[],i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingCount=void 0;e.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var r=n(7),i=function(){function t(t){this.id=r.id(),this.container=t}return t.prototype.addPlan=function(t){this.plan=t},t.prototype.setCurrentRequest=function(t){this.currentRequest=t},t}();e.Context=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Plan=void 0;var r=function(t,e){this.parentContext=t,this.rootRequest=e};e.Plan=r},function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.getFunctionName=e.getBaseClassDependencyCount=e.getDependencies=void 0;var i=n(16),o=n(2),a=n(4),u=n(0),s=n(8);Object.defineProperty(e,"getFunctionName",{enumerable:!0,get:function(){return s.getFunctionName}});var c=n(17);function l(t,e,n,i){var u=t.getConstructorMetadata(n),s=u.compilerGeneratedMetadata;if(void 0===s){var l=o.MISSING_INJECTABLE_ANNOTATION+" "+e+".";throw new Error(l)}var p=u.userGeneratedMetadata,d=Object.keys(p),y=0===n.length&&d.length>0,v=d.length>n.length,m=function(t,e,n,r,i){for(var o=[],a=0;a<i;a++){var u=h(a,t,e,n,r);null!==u&&o.push(u)}return o}(i,e,s,p,y||v?d.length:n.length),g=function t(e,n){for(var i=e.getPropertiesMetadata(n),o=[],u=Object.keys(i),s=0,l=u;s<l.length;s++){var h=l[s],p=i[h],d=f(i[h]),y=d.targetName||h,v=d.inject||d.multiInject,m=new c.Target(a.TargetTypeEnum.ClassProperty,y,v);m.metadata=p,o.push(m)}var g=Object.getPrototypeOf(n.prototype).constructor;if(g!==Object){var b=t(e,g);o=r(r([],o),b)}return o}(t,n);return r(r([],m),g)}function h(t,e,n,r,u){var s=u[t.toString()]||[],l=f(s),h=!0!==l.unmanaged,p=r[t],d=l.inject||l.multiInject;if((p=d||p)instanceof i.LazyServiceIdentifer&&(p=p.unwrap()),h){if(!e&&(p===Object||p===Function||void 0===p)){var y=o.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".";throw new Error(y)}var v=new c.Target(a.TargetTypeEnum.ConstructorArgument,l.targetName,p);return v.metadata=s,v}return null}function f(t){var e={};return t.forEach((function(t){e[t.key.toString()]=t.value})),{inject:e[u.INJECT_TAG],multiInject:e[u.MULTI_INJECT_TAG],targetName:e[u.NAME_TAG],unmanaged:e[u.UNMANAGED_TAG]}}e.getDependencies=function(t,e){return l(t,s.getFunctionName(e),e,!1)},e.getBaseClassDependencyCount=function t(e,n){var r=Object.getPrototypeOf(n.prototype).constructor;if(r!==Object){var i=l(e,s.getFunctionName(r),r,!0),o=i.map((function(t){return t.metadata.filter((function(t){return t.key===u.UNMANAGED_TAG}))})),a=[].concat.apply([],o).length,c=i.length-a;return c>0?c:t(e,r)}return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryableString=void 0;var r=function(){function t(t){this.str=t}return t.prototype.startsWith=function(t){return 0===this.str.indexOf(t)},t.prototype.endsWith=function(t){var e,n=t.split("").reverse().join("");return e=this.str.split("").reverse().join(""),this.startsWith.call({str:e},n)},t.prototype.contains=function(t){return-1!==this.str.indexOf(t)},t.prototype.equals=function(t){return this.str===t},t.prototype.value=function(){return this.str},t}();e.QueryableString=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Request=void 0;var r=n(7),i=function(){function t(t,e,n,i,o){this.id=r.id(),this.serviceIdentifier=t,this.parentContext=e,this.parentRequest=n,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=null===n?new Map:null}return t.prototype.addChildRequest=function(e,n,r){var i=new t(e,this.parentContext,this,n,r);return this.childRequests.push(i),i},t}();e.Request=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=void 0;var r=n(2),i=n(4),o=n(15),a=n(8),u=n(34),s=function(t,e,n){try{return n()}catch(n){throw o.isStackOverflowExeption(n)?new Error(r.CIRCULAR_DEPENDENCY_IN_FACTORY(t,e.toString())):n}},c=function(t){return function(e){e.parentContext.setCurrentRequest(e);var n=e.bindings,o=e.childRequests,l=e.target&&e.target.isArray(),h=!(e.parentRequest&&e.parentRequest.target&&e.target&&e.parentRequest.target.matchesArray(e.target.serviceIdentifier));if(l&&h)return o.map((function(e){return c(t)(e)}));var f=null;if(!e.target.isOptional()||0!==n.length){var p=n[0],d=p.scope===i.BindingScopeEnum.Singleton,y=p.scope===i.BindingScopeEnum.Request;if(d&&p.activated)return p.cache;if(y&&null!==t&&t.has(p.id))return t.get(p.id);if(p.type===i.BindingTypeEnum.ConstantValue)f=p.cache,p.activated=!0;else if(p.type===i.BindingTypeEnum.Function)f=p.cache,p.activated=!0;else if(p.type===i.BindingTypeEnum.Constructor)f=p.implementationType;else if(p.type===i.BindingTypeEnum.DynamicValue&&null!==p.dynamicValue)f=s("toDynamicValue",p.serviceIdentifier,(function(){return p.dynamicValue(e.parentContext)}));else if(p.type===i.BindingTypeEnum.Factory&&null!==p.factory)f=s("toFactory",p.serviceIdentifier,(function(){return p.factory(e.parentContext)}));else if(p.type===i.BindingTypeEnum.Provider&&null!==p.provider)f=s("toProvider",p.serviceIdentifier,(function(){return p.provider(e.parentContext)}));else{if(p.type!==i.BindingTypeEnum.Instance||null===p.implementationType){var v=a.getServiceIdentifierAsString(e.serviceIdentifier);throw new Error(r.INVALID_BINDING_TYPE+" "+v)}f=u.resolveInstance(p.implementationType,o,c(t))}return"function"==typeof p.onActivation&&(f=p.onActivation(e.parentContext,f)),d&&(p.cache=f,p.activated=!0),y&&null!==t&&!t.has(p.id)&&t.set(p.id,f),f}}};e.resolve=function(t){return c(t.plan.rootRequest.requestScope)(t.plan.rootRequest)}},function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveInstance=void 0;var i=n(2),o=n(4),a=n(0);e.resolveInstance=function(t,e,n){var u,s,c=null;if(e.length>0){var l=e.filter((function(t){return null!==t.target&&t.target.type===o.TargetTypeEnum.ConstructorArgument})).map(n);s=l,c=function(t,e,n){var r=e.filter((function(t){return null!==t.target&&t.target.type===o.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(e,n){var r;r=e.target.name.value();var o=i[n];t[r]=o})),t}(c=new((u=t).bind.apply(u,r([void 0],s))),e,n)}else c=new t;return function(t,e){if(Reflect.hasMetadata(a.POST_CONSTRUCT,t)){var n=Reflect.getMetadata(a.POST_CONSTRUCT,t);try{e[n.value]()}catch(e){throw new Error(i.POST_CONSTRUCT_ERROR(t.name,e.message))}}}(t,c),c}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingToSyntax=void 0;var r=n(2),i=n(4),o=n(36),a=n(18),u=function(){function t(t){this._binding=t}return t.prototype.to=function(t){return this._binding.type=i.BindingTypeEnum.Instance,this._binding.implementationType=t,new o.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+r.INVALID_TO_SELF_VALUE);var t=this._binding.serviceIdentifier;return this.to(t)},t.prototype.toConstantValue=function(t){return this._binding.type=i.BindingTypeEnum.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(t){return this._binding.type=i.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new o.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(t){return this._binding.type=i.BindingTypeEnum.Constructor,this._binding.implementationType=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(t){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(t){if("function"!=typeof t)throw new Error(r.INVALID_FUNCTION_BINDING);var e=this.toConstantValue(t);return this._binding.type=i.BindingTypeEnum.Function,this._binding.scope=i.BindingScopeEnum.Singleton,e},t.prototype.toAutoFactory=function(t){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=function(e){return function(){return e.container.get(t)}},this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(t){return this._binding.type=i.BindingTypeEnum.Provider,this._binding.provider=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(t){this.toDynamicValue((function(e){return e.container.get(t)}))},t}();e.BindingToSyntax=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInWhenOnSyntax=void 0;var r=n(37),i=n(9),o=n(10),a=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new o.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new i.BindingOnSyntax(this._binding),this._bindingInSyntax=new r.BindingInSyntax(t)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingInWhenOnSyntax=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInSyntax=void 0;var r=n(4),i=n(18),o=function(){function t(t){this._binding=t}return t.prototype.inRequestScope=function(){return this._binding.scope=r.BindingScopeEnum.Request,new i.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=r.BindingScopeEnum.Singleton,new i.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=r.BindingScopeEnum.Transient,new i.BindingWhenOnSyntax(this._binding)},t}();e.BindingInSyntax=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerSnapshot=void 0;var r=function(){function t(){}return t.of=function(e,n){var r=new t;return r.bindings=e,r.middleware=n,r},t}();e.ContainerSnapshot=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lookup=void 0;var r=n(2),i=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(t,e){if(null==t)throw new Error(r.NULL_ARGUMENT);if(null==e)throw new Error(r.NULL_ARGUMENT);var n=this._map.get(t);void 0!==n?(n.push(e),this._map.set(t,n)):this._map.set(t,[e])},t.prototype.get=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);var e=this._map.get(t);if(void 0!==e)return e;throw new Error(r.KEY_NOT_FOUND)},t.prototype.remove=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);if(!this._map.delete(t))throw new Error(r.KEY_NOT_FOUND)},t.prototype.removeByCondition=function(t){var e=this;this._map.forEach((function(n,r){var i=n.filter((function(e){return!t(e)}));i.length>0?e._map.set(r,i):e._map.delete(r)}))},t.prototype.hasKey=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);return this._map.has(t)},t.prototype.clone=function(){var e=new t;return this._map.forEach((function(t,n){t.forEach((function(t){return e.add(n,t.clone())}))})),e},t.prototype.traverse=function(t){this._map.forEach((function(e,n){t(n,e)}))},t}();e.Lookup=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncContainerModule=e.ContainerModule=void 0;var r=n(7),i=function(t){this.id=r.id(),this.registry=t};e.ContainerModule=i;var o=function(t){this.id=r.id(),this.registry=t};e.AsyncContainerModule=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectable=void 0;var r=n(2),i=n(0);e.injectable=function(){return function(t){if(Reflect.hasOwnMetadata(i.PARAM_TYPES,t))throw new Error(r.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(i.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(i.PARAM_TYPES,e,t),t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tagged=void 0;var r=n(3),i=n(5);e.tagged=function(t,e){return function(n,o,a){var u=new r.Metadata(t,e);"number"==typeof a?i.tagParameter(n,o,a,u):i.tagProperty(n,o,u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.named=void 0;var r=n(0),i=n(3),o=n(5);e.named=function(t){return function(e,n,a){var u=new i.Metadata(r.NAMED_TAG,t);"number"==typeof a?o.tagParameter(e,n,a,u):o.tagProperty(e,n,u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.optional=void 0;var r=n(0),i=n(3),o=n(5);e.optional=function(){return function(t,e,n){var a=new i.Metadata(r.OPTIONAL_TAG,!0);"number"==typeof n?o.tagParameter(t,e,n,a):o.tagProperty(t,e,a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unmanaged=void 0;var r=n(0),i=n(3),o=n(5);e.unmanaged=function(){return function(t,e,n){var a=new i.Metadata(r.UNMANAGED_TAG,!0);o.tagParameter(t,e,n,a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiInject=void 0;var r=n(0),i=n(3),o=n(5);e.multiInject=function(t){return function(e,n,a){var u=new i.Metadata(r.MULTI_INJECT_TAG,t);"number"==typeof a?o.tagParameter(e,n,a,u):o.tagProperty(e,n,u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.targetName=void 0;var r=n(0),i=n(3),o=n(5);e.targetName=function(t){return function(e,n,a){var u=new i.Metadata(r.NAME_TAG,t);o.tagParameter(e,n,a,u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.postConstruct=void 0;var r=n(2),i=n(0),o=n(3);e.postConstruct=function(){return function(t,e,n){var a=new o.Metadata(i.POST_CONSTRUCT,e);if(Reflect.hasOwnMetadata(i.POST_CONSTRUCT,t.constructor))throw new Error(r.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(i.POST_CONSTRUCT,a,t.constructor)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=void 0;e.multiBindToService=function(t){return function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.forEach((function(n){return t.bind(n).toService(e)}))}}}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";n.r(e),n.d(e,"ManaSyringe",(function(){return r})),n.d(e,"Shape",(function(){return Os})),n.d(e,"LineCap",(function(){return Is})),n.d(e,"LineJoin",(function(){return Rs})),n.d(e,"TextTransform",(function(){return Ds})),n.d(e,"TextAlign",(function(){return Ls})),n.d(e,"CanvasConfig",(function(){return Vs})),n.d(e,"UnitType",(function(){return Bo})),n.d(e,"UnitCategory",(function(){return jo})),n.d(e,"ValueRange",(function(){return Fo})),n.d(e,"Nested",(function(){return Uo})),n.d(e,"ParenLess",(function(){return Go})),n.d(e,"CSSColorValue",(function(){return Ta})),n.d(e,"CSSKeywordValue",(function(){return Ea})),n.d(e,"CSSMathOperator",(function(){return ma})),n.d(e,"isComparison",(function(){return wa})),n.d(e,"BaseType",(function(){return ga})),n.d(e,"unitTypeToBaseType",(function(){return Ma})),n.d(e,"baseTypeToString",(function(){return ka})),n.d(e,"CSSNumericValueType",(function(){return Pa})),n.d(e,"CSSNumericValue",(function(){return xa})),n.d(e,"CSSUnitValue",(function(){return Oa})),n.d(e,"CSSMathValue",(function(){return Ia})),n.d(e,"CSSMathInvert",(function(){return Ra})),n.d(e,"CSSMathNegate",(function(){return Da})),n.d(e,"typeCheck",(function(){return La})),n.d(e,"CSSMathVariadic",(function(){return Ba})),n.d(e,"CSSMathMin",(function(){return ja})),n.d(e,"CSSMathMax",(function(){return Fa})),n.d(e,"CSSMathSum",(function(){return Ua})),n.d(e,"CSSMathProduct",(function(){return Ga})),n.d(e,"Opx",(function(){return za})),n.d(e,"Odeg",(function(){return qa})),n.d(e,"CSSRGB",(function(){return Wa})),n.d(e,"GradientPatternType",(function(){return Va})),n.d(e,"CSSGradientValue",(function(){return Ya})),n.d(e,"CSSStyleValueType",(function(){return ya})),n.d(e,"CSSStyleValue",(function(){return ba})),n.d(e,"CSSTransformValue",(function(){return Ka})),n.d(e,"CSSTranslate",(function(){return Xa})),n.d(e,"parseColor",(function(){return Nu})),n.d(e,"mergeColors",(function(){return Au})),n.d(e,"parseDimension",(function(){return Cu})),n.d(e,"parseLength",(function(){return _u})),n.d(e,"parserPercentage",(function(){return Ou})),n.d(e,"parseLengthOrPercentage",(function(){return Iu})),n.d(e,"parseAngle",(function(){return Ru})),n.d(e,"mergeDimensions",(function(){return Du})),n.d(e,"convertAngleUnit",(function(){return Lu})),n.d(e,"parseDimensionArray",(function(){return Vu})),n.d(e,"mergeDimensionList",(function(){return Bu})),n.d(e,"convertPercentUnit",(function(){return ju})),n.d(e,"numberToString",(function(){return Fu})),n.d(e,"parseNumber",(function(){return Uu})),n.d(e,"parseNumberList",(function(){return Gu})),n.d(e,"mergeNumbers",(function(){return zu})),n.d(e,"clampedMergeNumbers",(function(){return qu})),n.d(e,"mergeNumberLists",(function(){return Wu})),n.d(e,"parsePath",(function(){return Xs})),n.d(e,"mergePaths",(function(){return Js})),n.d(e,"parsePoints",(function(){return Qs})),n.d(e,"parseParam",(function(){return $s})),n.d(e,"parseFilter",(function(){return ec})),n.d(e,"parseTransform",(function(){return vh})),n.d(e,"mergeTransforms",(function(){return bh})),n.d(e,"parseTransformOrigin",(function(){return Th})),n.d(e,"CSSPropertyLengthOrPercentage",(function(){return ql})),n.d(e,"CSSPropertyLocalPosition",(function(){return Wl})),n.d(e,"CSSPropertyOpacity",(function(){return Hl})),n.d(e,"CSSPropertyColor",(function(){return Yl})),n.d(e,"CSSPropertyFilter",(function(){return Kl})),n.d(e,"CSSPropertyLineDash",(function(){return Xl})),n.d(e,"CSSPropertyShadowBlur",(function(){return Zl})),n.d(e,"CSSPropertyOffsetPath",(function(){return Jl})),n.d(e,"CSSPropertyOffsetDistance",(function(){return Ql})),n.d(e,"CSSPropertyAnchor",(function(){return $l})),n.d(e,"CSSPropertyZIndex",(function(){return th})),n.d(e,"CSSPropertyTransform",(function(){return eh})),n.d(e,"CSSPropertyTransformOrigin",(function(){return nh})),n.d(e,"CSSPropertyPath",(function(){return rh})),n.d(e,"CSSPropertyPoints",(function(){return ih})),n.d(e,"CSSPropertyClipPath",(function(){return oh})),n.d(e,"CSSPropertyText",(function(){return ah})),n.d(e,"CSSPropertyTextTransform",(function(){return uh})),n.d(e,"CSS",(function(){return hh})),n.d(e,"LayoutRegistry",(function(){return wh})),n.d(e,"PropertySyntax",(function(){return sh})),n.d(e,"BUILT_IN_PROPERTIES",(function(){return ch})),n.d(e,"StyleValueRegistry",(function(){return lh})),n.d(e,"ElementEvent",(function(){return ko})),n.d(e,"DELEGATION_SPLITTER",(function(){return ac})),n.d(e,"EventTarget",(function(){return uc})),n.d(e,"Node",(function(){return sc})),n.d(e,"Element",(function(){return yc})),n.d(e,"Document",(function(){return Al})),n.d(e,"FederatedEvent",(function(){return zo})),n.d(e,"FederatedMouseEvent",(function(){return Cl})),n.d(e,"FederatedPointerEvent",(function(){return _l})),n.d(e,"FederatedWheelEvent",(function(){return Ol})),n.d(e,"Animation",(function(){return gc})),n.d(e,"AnimationEvent",(function(){return vc})),n.d(e,"AnimationEffectTiming",(function(){return ol})),n.d(e,"CustomEvent",(function(){return oc})),n.d(e,"MutationEvent",(function(){return qo})),n.d(e,"Registration",(function(){return Ll})),n.d(e,"MutationObserver",(function(){return Vl})),n.d(e,"MutationRecord",(function(){return Il})),n.d(e,"makeTiming",(function(){return cl})),n.d(e,"normalizeTimingInput",(function(){return ll})),n.d(e,"numericTimingToObject",(function(){return hl})),n.d(e,"KeyframeEffect",(function(){return dl})),n.d(e,"normalizeKeyframes",(function(){return al})),n.d(e,"compareAnimations",(function(){return bc})),n.d(e,"AnimationTimeline",(function(){return Tc})),n.d(e,"CustomElementRegistry",(function(){return zl})),n.d(e,"DefaultCamera",(function(){return wf})),n.d(e,"CameraType",(function(){return $h})),n.d(e,"CameraTrackingMode",(function(){return tf})),n.d(e,"CameraProjectionMode",(function(){return ef})),n.d(e,"CameraEvent",(function(){return kf})),n.d(e,"Camera",(function(){return Sf})),n.d(e,"DisplayObject",(function(){return vl})),n.d(e,"CustomElement",(function(){return ml})),n.d(e,"Circle",(function(){return gl})),n.d(e,"Ellipse",(function(){return bl})),n.d(e,"Group",(function(){return Tl})),n.d(e,"Image",(function(){return El})),n.d(e,"Line",(function(){return wl})),n.d(e,"Path",(function(){return Ml})),n.d(e,"Polygon",(function(){return kl})),n.d(e,"Polyline",(function(){return Pl})),n.d(e,"Rect",(function(){return xl})),n.d(e,"Text",(function(){return Sl})),n.d(e,"HTML",(function(){return Nl})),n.d(e,"Geometry",(function(){return cc})),n.d(e,"Renderable",(function(){return lc})),n.d(e,"Transform",(function(){return hc})),n.d(e,"Strategy",(function(){return nc})),n.d(e,"Cullable",(function(){return fc})),n.d(e,"Sortable",(function(){return pc})),n.d(e,"AbstractRenderer",(function(){return Nf})),n.d(e,"CanvasEvent",(function(){return Mf})),n.d(e,"Canvas",(function(){return Bf})),n.d(e,"DisplayObjectPool",(function(){return Tt})),n.d(e,"sortByZIndex",(function(){return Yh})),n.d(e,"dirtifyToRoot",(function(){return Kh})),n.d(e,"SceneGraphService",(function(){return Zh})),n.d(e,"DefaultSceneGraphService",(function(){return Jh})),n.d(e,"ContextService",(function(){return Qh})),n.d(e,"RenderReason",(function(){return Xh})),n.d(e,"RenderingContext",(function(){return nf})),n.d(e,"RenderingPluginContribution",(function(){return rf})),n.d(e,"RenderingService",(function(){return of})),n.d(e,"EventService",(function(){return uf})),n.d(e,"SceneGraphSelectorFactory",(function(){return Ro})),n.d(e,"SceneGraphSelector",(function(){return Do})),n.d(e,"DefaultSceneGraphSelector",(function(){return Vo})),n.d(e,"TextService",(function(){return pf})),n.d(e,"OffscreenCanvasCreator",(function(){return sf})),n.d(e,"GeometryUpdaterFactory",(function(){return rc})),n.d(e,"GeometryAABBUpdater",(function(){return ic})),n.d(e,"CircleUpdater",(function(){return df})),n.d(e,"EllipseUpdater",(function(){return yf})),n.d(e,"RectUpdater",(function(){return vf})),n.d(e,"TextUpdater",(function(){return mf})),n.d(e,"LineUpdater",(function(){return gf})),n.d(e,"PolylineUpdater",(function(){return bf})),n.d(e,"PathUpdater",(function(){return Tf})),n.d(e,"AABB",(function(){return To})),n.d(e,"BoundingSphere",(function(){return wo})),n.d(e,"Mask",(function(){return lo})),n.d(e,"Frustum",(function(){return Po})),n.d(e,"Plane",(function(){return Mo})),n.d(e,"Ray",(function(){return _o})),n.d(e,"Point",(function(){return Oo})),n.d(e,"Rectangle",(function(){return Io})),n.d(e,"DCHECK",(function(){return Wo})),n.d(e,"DCHECK_EQ",(function(){return Ho})),n.d(e,"DCHECK_NE",(function(){return Yo})),n.d(e,"isUndefined",(function(){return Ko})),n.d(e,"isNil",(function(){return Xo})),n.d(e,"isNumber",(function(){return Zo})),n.d(e,"isFunction",(function(){return Jo})),n.d(e,"isBoolean",(function(){return Qo})),n.d(e,"isObject",(function(){return $o})),n.d(e,"clamp",(function(){return ta})),n.d(e,"getAngle",(function(){return ea})),n.d(e,"createVec3",(function(){return na})),n.d(e,"deg2rad",(function(){return ra})),n.d(e,"rad2deg",(function(){return ia})),n.d(e,"grad2deg",(function(){return oa})),n.d(e,"deg2turn",(function(){return aa})),n.d(e,"turn2deg",(function(){return ua})),n.d(e,"getScaling",(function(){return sa})),n.d(e,"getTranslation",(function(){return ca})),n.d(e,"getRotationInRadians",(function(){return la})),n.d(e,"getEuler",(function(){return ha})),n.d(e,"fromRotationTranslationScale",(function(){return fa})),n.d(e,"makePerspective",(function(){return pa})),n.d(e,"decompose",(function(){return da})),n.d(e,"convertEffectInput",(function(){return Ph})),n.d(e,"formatAttribute",(function(){return Ch})),n.d(e,"equalizeSegments",(function(){return Fs})),n.d(e,"getDrawDirection",(function(){return Us})),n.d(e,"getPathArea",(function(){return zs})),n.d(e,"reverseCurve",(function(){return qs})),n.d(e,"clonePath",(function(){return Ws})),n.d(e,"getRotatedCurve",(function(){return Hs})),n.d(e,"convertToPath",(function(){return Ks})),n.d(e,"toFontString",(function(){return Oh})),n.d(e,"camelCase",(function(){return Mh})),n.d(e,"isString",(function(){return kh})),n.d(e,"MOUSE_POINTER_ID",(function(){return Ih})),n.d(e,"TOUCH_TO_POINTER",(function(){return Rh})),n.d(e,"cleanExistedCanvas",(function(){return Vh})),n.d(e,"isBrowser",(function(){return Bh})),n.d(e,"Hook",(function(){return Fh})),n.d(e,"SyncTapHook",(function(){return Uh})),n.d(e,"AsyncTapHook",(function(){return Gh})),n.d(e,"SyncHook",(function(){return zh})),n.d(e,"SyncWaterfallHook",(function(){return qh})),n.d(e,"AsyncParallelHook",(function(){return Wh})),n.d(e,"AsyncSeriesWaterfallHook",(function(){return Hh}));var r={};n.r(r),n.d(r,"injectable",(function(){return N})),n.d(r,"singleton",(function(){return A})),n.d(r,"transient",(function(){return C})),n.d(r,"inject",(function(){return _})),n.d(r,"named",(function(){return O})),n.d(r,"postConstruct",(function(){return f.postConstruct})),n.d(r,"optional",(function(){return f.optional})),n.d(r,"unmanaged",(function(){return f.unmanaged})),n.d(r,"decorate",(function(){return f.decorate})),n.d(r,"Container",(function(){return it})),n.d(r,"GlobalContainer",(function(){return ot})),n.d(r,"register",(function(){return at})),n.d(r,"SyringeModule",(function(){return J})),n.d(r,"isSyringeModule",(function(){return Q})),n.d(r,"Module",(function(){return $})),n.d(r,"Provider",(function(){return F})),n.d(r,"DefaultContributionProvider",(function(){return Y})),n.d(r,"contrib",(function(){return ut})),n.d(r,"Contribution",(function(){return et})),n.d(r,"Syringe",(function(){return l})),n.d(r,"Utils",(function(){return h})),n.d(r,"OptionSymbol",(function(){return I})),n.d(r,"registerSideOption",(function(){return R}));var i={};n.r(i),n.d(i,"create",(function(){return kt})),n.d(i,"fromMat4",(function(){return Pt})),n.d(i,"clone",(function(){return xt})),n.d(i,"copy",(function(){return St})),n.d(i,"fromValues",(function(){return Nt})),n.d(i,"set",(function(){return At})),n.d(i,"identity",(function(){return Ct})),n.d(i,"transpose",(function(){return _t})),n.d(i,"invert",(function(){return Ot})),n.d(i,"adjoint",(function(){return It})),n.d(i,"determinant",(function(){return Rt})),n.d(i,"multiply",(function(){return Dt})),n.d(i,"translate",(function(){return Lt})),n.d(i,"rotate",(function(){return Vt})),n.d(i,"scale",(function(){return Bt})),n.d(i,"fromTranslation",(function(){return jt})),n.d(i,"fromRotation",(function(){return Ft})),n.d(i,"fromScaling",(function(){return Ut})),n.d(i,"fromMat2d",(function(){return Gt})),n.d(i,"fromQuat",(function(){return zt})),n.d(i,"normalFromMat4",(function(){return qt})),n.d(i,"projection",(function(){return Wt})),n.d(i,"str",(function(){return Ht})),n.d(i,"frob",(function(){return Yt})),n.d(i,"add",(function(){return Kt})),n.d(i,"subtract",(function(){return Xt})),n.d(i,"multiplyScalar",(function(){return Zt})),n.d(i,"multiplyScalarAndAdd",(function(){return Jt})),n.d(i,"exactEquals",(function(){return Qt})),n.d(i,"equals",(function(){return $t})),n.d(i,"mul",(function(){return te})),n.d(i,"sub",(function(){return ee}));var o={};n.r(o),n.d(o,"create",(function(){return ne})),n.d(o,"clone",(function(){return re})),n.d(o,"copy",(function(){return ie})),n.d(o,"fromValues",(function(){return oe})),n.d(o,"set",(function(){return ae})),n.d(o,"identity",(function(){return ue})),n.d(o,"transpose",(function(){return se})),n.d(o,"invert",(function(){return ce})),n.d(o,"adjoint",(function(){return le})),n.d(o,"determinant",(function(){return he})),n.d(o,"multiply",(function(){return fe})),n.d(o,"translate",(function(){return pe})),n.d(o,"scale",(function(){return de})),n.d(o,"rotate",(function(){return ye})),n.d(o,"rotateX",(function(){return ve})),n.d(o,"rotateY",(function(){return me})),n.d(o,"rotateZ",(function(){return ge})),n.d(o,"fromTranslation",(function(){return be})),n.d(o,"fromScaling",(function(){return Te})),n.d(o,"fromRotation",(function(){return Ee})),n.d(o,"fromXRotation",(function(){return we})),n.d(o,"fromYRotation",(function(){return Me})),n.d(o,"fromZRotation",(function(){return ke})),n.d(o,"fromRotationTranslation",(function(){return Pe})),n.d(o,"fromQuat2",(function(){return xe})),n.d(o,"getTranslation",(function(){return Se})),n.d(o,"getScaling",(function(){return Ne})),n.d(o,"getRotation",(function(){return Ae})),n.d(o,"fromRotationTranslationScale",(function(){return Ce})),n.d(o,"fromRotationTranslationScaleOrigin",(function(){return _e})),n.d(o,"fromQuat",(function(){return Oe})),n.d(o,"frustum",(function(){return Ie})),n.d(o,"perspectiveNO",(function(){return Re})),n.d(o,"perspective",(function(){return De})),n.d(o,"perspectiveZO",(function(){return Le})),n.d(o,"perspectiveFromFieldOfView",(function(){return Ve})),n.d(o,"orthoNO",(function(){return Be})),n.d(o,"ortho",(function(){return je})),n.d(o,"orthoZO",(function(){return Fe})),n.d(o,"lookAt",(function(){return Ue})),n.d(o,"targetTo",(function(){return Ge})),n.d(o,"str",(function(){return ze})),n.d(o,"frob",(function(){return qe})),n.d(o,"add",(function(){return We})),n.d(o,"subtract",(function(){return He})),n.d(o,"multiplyScalar",(function(){return Ye})),n.d(o,"multiplyScalarAndAdd",(function(){return Ke})),n.d(o,"exactEquals",(function(){return Xe})),n.d(o,"equals",(function(){return Ze})),n.d(o,"mul",(function(){return Je})),n.d(o,"sub",(function(){return Qe}));var a={};n.r(a),n.d(a,"create",(function(){return $e})),n.d(a,"clone",(function(){return tn})),n.d(a,"length",(function(){return en})),n.d(a,"fromValues",(function(){return nn})),n.d(a,"copy",(function(){return rn})),n.d(a,"set",(function(){return on})),n.d(a,"add",(function(){return an})),n.d(a,"subtract",(function(){return un})),n.d(a,"multiply",(function(){return sn})),n.d(a,"divide",(function(){return cn})),n.d(a,"ceil",(function(){return ln})),n.d(a,"floor",(function(){return hn})),n.d(a,"min",(function(){return fn})),n.d(a,"max",(function(){return pn})),n.d(a,"round",(function(){return dn})),n.d(a,"scale",(function(){return yn})),n.d(a,"scaleAndAdd",(function(){return vn})),n.d(a,"distance",(function(){return mn})),n.d(a,"squaredDistance",(function(){return gn})),n.d(a,"squaredLength",(function(){return bn})),n.d(a,"negate",(function(){return Tn})),n.d(a,"inverse",(function(){return En})),n.d(a,"normalize",(function(){return wn})),n.d(a,"dot",(function(){return Mn})),n.d(a,"cross",(function(){return kn})),n.d(a,"lerp",(function(){return Pn})),n.d(a,"hermite",(function(){return xn})),n.d(a,"bezier",(function(){return Sn})),n.d(a,"random",(function(){return Nn})),n.d(a,"transformMat4",(function(){return An})),n.d(a,"transformMat3",(function(){return Cn})),n.d(a,"transformQuat",(function(){return _n})),n.d(a,"rotateX",(function(){return On})),n.d(a,"rotateY",(function(){return In})),n.d(a,"rotateZ",(function(){return Rn})),n.d(a,"angle",(function(){return Dn})),n.d(a,"zero",(function(){return Ln})),n.d(a,"str",(function(){return Vn})),n.d(a,"exactEquals",(function(){return Bn})),n.d(a,"equals",(function(){return jn})),n.d(a,"sub",(function(){return Un})),n.d(a,"mul",(function(){return Gn})),n.d(a,"div",(function(){return zn})),n.d(a,"dist",(function(){return qn})),n.d(a,"sqrDist",(function(){return Wn})),n.d(a,"len",(function(){return Hn})),n.d(a,"sqrLen",(function(){return Yn})),n.d(a,"forEach",(function(){return Kn}));var u={};n.r(u),n.d(u,"create",(function(){return Xn})),n.d(u,"clone",(function(){return Zn})),n.d(u,"fromValues",(function(){return Jn})),n.d(u,"copy",(function(){return Qn})),n.d(u,"set",(function(){return $n})),n.d(u,"add",(function(){return tr})),n.d(u,"subtract",(function(){return er})),n.d(u,"multiply",(function(){return nr})),n.d(u,"divide",(function(){return rr})),n.d(u,"ceil",(function(){return ir})),n.d(u,"floor",(function(){return or})),n.d(u,"min",(function(){return ar})),n.d(u,"max",(function(){return ur})),n.d(u,"round",(function(){return sr})),n.d(u,"scale",(function(){return cr})),n.d(u,"scaleAndAdd",(function(){return lr})),n.d(u,"distance",(function(){return hr})),n.d(u,"squaredDistance",(function(){return fr})),n.d(u,"length",(function(){return pr})),n.d(u,"squaredLength",(function(){return dr})),n.d(u,"negate",(function(){return yr})),n.d(u,"inverse",(function(){return vr})),n.d(u,"normalize",(function(){return mr})),n.d(u,"dot",(function(){return gr})),n.d(u,"cross",(function(){return br})),n.d(u,"lerp",(function(){return Tr})),n.d(u,"random",(function(){return Er})),n.d(u,"transformMat4",(function(){return wr})),n.d(u,"transformQuat",(function(){return Mr})),n.d(u,"zero",(function(){return kr})),n.d(u,"str",(function(){return Pr})),n.d(u,"exactEquals",(function(){return xr})),n.d(u,"equals",(function(){return Sr})),n.d(u,"sub",(function(){return Nr})),n.d(u,"mul",(function(){return Ar})),n.d(u,"div",(function(){return Cr})),n.d(u,"dist",(function(){return _r})),n.d(u,"sqrDist",(function(){return Or})),n.d(u,"len",(function(){return Ir})),n.d(u,"sqrLen",(function(){return Rr})),n.d(u,"forEach",(function(){return Dr}));var s={};n.r(s),n.d(s,"create",(function(){return Lr})),n.d(s,"identity",(function(){return Vr})),n.d(s,"setAxisAngle",(function(){return Br})),n.d(s,"getAxisAngle",(function(){return jr})),n.d(s,"getAngle",(function(){return Fr})),n.d(s,"multiply",(function(){return Ur})),n.d(s,"rotateX",(function(){return Gr})),n.d(s,"rotateY",(function(){return zr})),n.d(s,"rotateZ",(function(){return qr})),n.d(s,"calculateW",(function(){return Wr})),n.d(s,"exp",(function(){return Hr})),n.d(s,"ln",(function(){return Yr})),n.d(s,"pow",(function(){return Kr})),n.d(s,"slerp",(function(){return Xr})),n.d(s,"random",(function(){return Zr})),n.d(s,"invert",(function(){return Jr})),n.d(s,"conjugate",(function(){return Qr})),n.d(s,"fromMat3",(function(){return $r})),n.d(s,"fromEuler",(function(){return ti})),n.d(s,"str",(function(){return ei})),n.d(s,"clone",(function(){return si})),n.d(s,"fromValues",(function(){return ci})),n.d(s,"copy",(function(){return li})),n.d(s,"set",(function(){return hi})),n.d(s,"add",(function(){return fi})),n.d(s,"mul",(function(){return pi})),n.d(s,"scale",(function(){return di})),n.d(s,"dot",(function(){return yi})),n.d(s,"lerp",(function(){return vi})),n.d(s,"length",(function(){return mi})),n.d(s,"len",(function(){return gi})),n.d(s,"squaredLength",(function(){return bi})),n.d(s,"sqrLen",(function(){return Ti})),n.d(s,"normalize",(function(){return Ei})),n.d(s,"exactEquals",(function(){return wi})),n.d(s,"equals",(function(){return Mi})),n.d(s,"rotationTo",(function(){return ki})),n.d(s,"sqlerp",(function(){return Pi})),n.d(s,"setAxes",(function(){return xi}));var c={};n.r(c),n.d(c,"create",(function(){return Si})),n.d(c,"clone",(function(){return Ni})),n.d(c,"fromValues",(function(){return Ai})),n.d(c,"copy",(function(){return Ci})),n.d(c,"set",(function(){return _i})),n.d(c,"add",(function(){return Oi})),n.d(c,"subtract",(function(){return Ii})),n.d(c,"multiply",(function(){return Ri})),n.d(c,"divide",(function(){return Di})),n.d(c,"ceil",(function(){return Li})),n.d(c,"floor",(function(){return Vi})),n.d(c,"min",(function(){return Bi})),n.d(c,"max",(function(){return ji})),n.d(c,"round",(function(){return Fi})),n.d(c,"scale",(function(){return Ui})),n.d(c,"scaleAndAdd",(function(){return Gi})),n.d(c,"distance",(function(){return zi})),n.d(c,"squaredDistance",(function(){return qi})),n.d(c,"length",(function(){return Wi})),n.d(c,"squaredLength",(function(){return Hi})),n.d(c,"negate",(function(){return Yi})),n.d(c,"inverse",(function(){return Ki})),n.d(c,"normalize",(function(){return Xi})),n.d(c,"dot",(function(){return Zi})),n.d(c,"cross",(function(){return Ji})),n.d(c,"lerp",(function(){return Qi})),n.d(c,"random",(function(){return $i})),n.d(c,"transformMat2",(function(){return to})),n.d(c,"transformMat2d",(function(){return eo})),n.d(c,"transformMat3",(function(){return no})),n.d(c,"transformMat4",(function(){return ro})),n.d(c,"rotate",(function(){return io})),n.d(c,"angle",(function(){return oo})),n.d(c,"zero",(function(){return ao})),n.d(c,"str",(function(){return uo})),n.d(c,"exactEquals",(function(){return so})),n.d(c,"equals",(function(){return co})),n.d(c,"len",(function(){return ho})),n.d(c,"sub",(function(){return fo})),n.d(c,"mul",(function(){return po})),n.d(c,"div",(function(){return yo})),n.d(c,"dist",(function(){return vo})),n.d(c,"sqrDist",(function(){return mo})),n.d(c,"sqrLen",(function(){return go})),n.d(c,"forEach",(function(){return bo}));n(12);var l,h,f=n(1);function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){return e.lifecycle===l.Lifecycle.singleton?function(t){return t.inSingletonScope()}(t):function(t){return t.inTransientScope()}(t)}function b(t,e){t.whenTargetNamed(w(e))}function T(t,e){return e.bind(M(t))}function E(t,e){if(e.isBound(M(t)))try{return e.rebind(M(t))}catch(n){return e.bind(M(t))}return e.bind(M(t))}function w(t){return h.isDefinedToken(t)?t.symbol:t}function M(t){return h.isDefinedToken(t)?t.symbol:t}!function(t){t.defineToken=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{multiple:!0};return new t.DefinedToken(e,n)};var e,n=y((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(this,t),this.prototype={},this.name=void 0,this.multiple=void 0,this.symbol=void 0;var r=n.multiple,i=void 0!==r&&r;this.name=e,this.symbol=Symbol(this.name),this.multiple=i}));t.DefinedToken=n,t.isModule=function(t){return!!t&&"object"===p(t)&&"id"in t},function(t){t.singleton="singleton",t.transient="transient"}(e=t.Lifecycle||(t.Lifecycle={})),t.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),t.DefaultOption={lifecycle:e.transient}}(l||(l={})),function(t){t.toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},t.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},t.isDefinedToken=function(t){return!!(t&&"object"===p(t)&&"symbol"in t&&"multiple"in t)},t.isInjectOption=function(t){return!(!t||"object"!==p(t)||!("token"in t))},t.isNamedToken=function(t){return!!(t&&"object"===p(t)&&"token"in t&&"named"in t)},t.isMultipleEnabled=function(e){return t.isDefinedToken(e)&&e.multiple}}(h||(h={}));var k=new f.Container;function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(Object(n),!0).forEach((function(e){S(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(f.injectable)();return function(n){Reflect.defineMetadata(l.ClassOptionSymbol,x(x({},t),{},{target:n}),n),e(n)}}function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return N(x(x({},t),{},{lifecycle:l.Lifecycle.singleton}))}function C(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return N(x(x({},t),{},{lifecycle:l.Lifecycle.transient}))}function _(t){return Object(f.inject)(M(t))}function O(t){return Object(f.named)(w(t))}var I=Symbol("SyringeOptionSymbol"),R=function(t,e){Reflect.defineMetadata(I,t,e)};function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function L(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){V(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function V(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var j=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.register=void 0,this.mutiple=void 0,this.register=e,this.token=n,this.option=r,this.rawToken=h.isNamedToken(n)?n.token:n,this.named=h.isNamedToken(n)?n.named:void 0,this.mutiple=!!this.named||h.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var e,n,r;return e=t,r=[{key:"resolveTarget",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var i=Reflect.getMetadata(I,n);i&&t.resolveOption(e,i)}catch(t){}if(h.isClass(n))if(r.useClass){var o=h.toArray(r.useClass);o.unshift(n),r.useClass=o}else r.useClass=[n];var a;try{a=Reflect.getMetadata(l.ClassOptionSymbol,n)}catch(t){}if((a=L(L({},a||{}),r)).token){var u=h.toArray(a.token);u.unshift(n),a.token=u}else a.token=[n];t.resolveOption(e,a)}catch(t){}}},{key:"resolveOption",value:function(e,n){var r,i,o,a,u,s,c,f,p=(r=L(L({},t.globalConfig),n),i=h.toArray(r.token),o=h.toArray(r.useClass),a=h.toArray(r.useDynamic),u=h.toArray(r.useFactory),s=h.toArray(r.contrib),c=r.lifecycle||l.Lifecycle.transient,f={token:i,useClass:o,lifecycle:s.length>0?l.Lifecycle.singleton:c,contrib:s,useDynamic:a,useFactory:u},"useValue"in r&&(f.useValue=r.useValue),f);(0!==p.useClass.length||0!==p.useDynamic.length||0!==p.useFactory.length||"useValue"in p)&&p.token.forEach((function(n){new t(e,n,L({},p)).resolve()}))}}],(n=[{key:"resolve",value:function(){var t=this,e=this.register;(function(t){return t&&"object"===m(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t})(e)&&(this.mutiple?this.resolveMutilple(e):(this.resolveMono(e),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(n){h.isMultipleEnabled(n)?T(n,e).toService(t.generalToken):E(n,e).toService(t.generalToken)}))))}},{key:"resolveMono",value:function(t){if("useValue"in this.option)return E(this.generalToken,t).toConstantValue(this.option.useValue);if(this.option.useDynamic.length>0){var e=this.option.useDynamic[this.option.useDynamic.length-1];return g(E(this.generalToken,t).toDynamicValue((function(t){var n=it.getContainer(t.container);return e({container:n})})),this.option)}if(this.option.useFactory.length>0){var n=this.option.useFactory[this.option.useFactory.length-1];return E(this.generalToken,t).toFactory((function(t){var e=it.getContainer(t.container);return n({container:e})}))}if(this.option.useClass.length>0){var r=this.option.useClass[this.option.useClass.length-1];return g(E(this.generalToken,t).to(r),this.option)}}},{key:"resolveMutilple",value:function(t){var e=this,n=this.option.useClass.map((function(n){return g(T(e.generalToken,t).to(n),e.option)})),r=this.option.useDynamic.map((function(n){return g(T(e.generalToken,t).toDynamicValue((function(t){var e=it.getContainer(t.container);return n({container:e})})),e.option)})),i=this.option.useFactory.map((function(n){return T(e.generalToken,t).toFactory((function(t){var e=it.getContainer(t.container);return n({container:e})}))})),o="useValue"in this.option?T(this.generalToken,t).toConstantValue(this.option.useValue):void 0;this.named&&(n.forEach((function(t){return e.named&&b(t,e.named)})),r.forEach((function(t){return e.named&&b(t,e.named)})),i.forEach((function(t){return e.named&&b(t,e.named)})),o&&b(o,this.named))}}])&&B(e.prototype,n),r&&B(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();j.globalConfig=l.DefaultOption;var F=l.defineToken("ContributionProvider");function U(t){return function(t){if(Array.isArray(t))return G(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return G(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(t,e)}(t)||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 G(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function q(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach((function(e){W(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function W(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Y=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.option={recursive:!1,cache:!0},this.services=void 0,this.serviceIdentifier=void 0,this.container=void 0,this.container=n,this.serviceIdentifier=e,r&&(this.option=q(q({},this.option),r))}var e,n,r;return e=t,(n=[{key:"setServices",value:function(t){for(var e=[],n=this.container;n;){if(n.isBound(this.serviceIdentifier)){var r=n.getAll(this.serviceIdentifier);e.push.apply(e,U(r))}n=t?n.parent:void 0}return e}},{key:"getContributions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=q(q({},this.option),t),n=e.cache,r=e.recursive;return n&&void 0!==this.services||(this.services=this.setServices(!!r)),this.services}}])&&H(e.prototype,n),r&&H(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function K(t,e){return{token:{token:F,named:t},useDynamic:function(n){return new Y(t,n.container,e)},lifecycle:l.Lifecycle.singleton}}function X(t,e,n){t({token:{token:F,named:e},useDynamic:function(t){return new Y(e,t.container,n)},lifecycle:l.Lifecycle.singleton})}function Z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var J=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(t,e,r,i){var o={bind:t,unbind:e,isBound:r,rebind:i},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.isInjectOption(t)?j.resolveOption(o,t):j.resolveTarget(o,t,e)};n.baseRegistry&&n.baseRegistry(a),n.optionCollection&&n.optionCollection.forEach((function(t){return a(t)}))},this.baseRegistry=e,this.inversifyModule=new f.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var e,n,r;return e=t,(n=[{key:"options",get:function(){return this.optionCollection||(this.optionCollection=[]),this.optionCollection}},{key:"register",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(e)})),this}},{key:"contribution",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(K(e))})),this}}])&&Z(e.prototype,n),r&&Z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Q(t){return t&&"inversifyModule"in t}function $(t){return new J(t)}function tt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var et,nt,rt=new Map,it=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=e||new f.Container,t.setContainer(this.container,this)}var e,n,r;return e=t,r=[{key:"setContainer",value:function(t,e){return rt.set(t.id,e)}},{key:"getContainer",value:function(e){var n=rt.get(e.id);if(!n){var r=new t(e);return t.setContainer(e,r),r}return n}},{key:"config",value:function(t){j.globalConfig=t}}],(n=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(Q(t)&&this.container.load(t.inversifyModule),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):(console.warn("Unsupported module."),{dispose:function(){}})}},{key:"unload",value:function(t){Q(t)&&(this.container.unload(t.inversifyModule),this.loadedModules=this.loadedModules.filter((function(e){return e!==t.id})))}},{key:"remove",value:function(t){return this.container.unbind(M(t))}},{key:"get",value:function(t){return this.container.get(M(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(M(t),w(e))}},{key:"getAll",value:function(t){return this.container.getAll(M(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(M(t),w(e))}},{key:"isBound",value:function(t){return this.container.isBound(M(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(M(t),w(e))}},{key:"createChild",value:function(){var e=new t(this.container.createChild());return e.parent=this,e}},{key:"register",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.isInjectOption(t)?j.resolveOption(this.container,t):j.resolveTarget(this.container,t,e)}}])&&tt(e.prototype,n),r&&tt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),ot=new it(k),at=ot.register.bind(ot),ut=function(t){return function(e,n,r){O(t)(e,n,r),_(F)(e,n,r)}};(nt=et||(et={})).Provider=F,nt.register=X;var st=n(6),ct=function(t,e){return(ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};
17
17
  /*! *****************************************************************************
18
18
  Copyright (c) Microsoft Corporation.
19
19
 
@@ -27,4 +27,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
27
27
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
28
28
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
29
29
  PERFORMANCE OF THIS SOFTWARE.
30
- ***************************************************************************** */function lt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ct(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ht=function(){return(ht=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function ft(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function pt(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function dt(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function yt(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))}function vt(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}Object.create;function mt(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function gt(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function bt(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}Object.create;var Tt=function(){function t(){this.pool={}}return t.prototype.getByEntity=function(t){return this.pool[t]},t.prototype.add=function(t,e){this.pool[t]=e},t.prototype.remove=function(t){delete this.pool[t]},t=pt([A()],t)}(),Et=1e-6,wt="undefined"!=typeof Float32Array?Float32Array:Array,Mt=Math.random;Math.PI;function kt(){var t=new wt(9);return wt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function Pt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function xt(t){var e=new wt(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function St(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function Nt(t,e,n,r,i,o,a,u,s){var c=new wt(9);return c[0]=t,c[1]=e,c[2]=n,c[3]=r,c[4]=i,c[5]=o,c[6]=a,c[7]=u,c[8]=s,c}function At(t,e,n,r,i,o,a,u,s,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=u,t[7]=s,t[8]=c,t}function Ct(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function _t(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function Ot(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],c=e[7],l=e[8],h=l*a-u*c,f=-l*o+u*s,p=c*o-a*s,d=n*h+r*f+i*p;return d?(d=1/d,t[0]=h*d,t[1]=(-l*r+i*c)*d,t[2]=(u*r-i*a)*d,t[3]=f*d,t[4]=(l*n-i*s)*d,t[5]=(-u*n+i*o)*d,t[6]=p*d,t[7]=(-c*n+r*s)*d,t[8]=(a*n-r*o)*d,t):null}function It(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],c=e[7],l=e[8];return t[0]=a*l-u*c,t[1]=i*c-r*l,t[2]=r*u-i*a,t[3]=u*s-o*l,t[4]=n*l-i*s,t[5]=i*o-n*u,t[6]=o*c-a*s,t[7]=r*s-n*c,t[8]=n*a-r*o,t}function Rt(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],u=t[6],s=t[7],c=t[8];return e*(c*o-a*s)+n*(-c*i+a*u)+r*(s*i-o*u)}function Dt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1],d=n[2],y=n[3],v=n[4],m=n[5],g=n[6],b=n[7],T=n[8];return t[0]=f*r+p*a+d*c,t[1]=f*i+p*u+d*l,t[2]=f*o+p*s+d*h,t[3]=y*r+v*a+m*c,t[4]=y*i+v*u+m*l,t[5]=y*o+v*s+m*h,t[6]=g*r+b*a+T*c,t[7]=g*i+b*u+T*l,t[8]=g*o+b*s+T*h,t}function Lt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=u,t[5]=s,t[6]=f*r+p*a+c,t[7]=f*i+p*u+l,t[8]=f*o+p*s+h,t}function Vt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*a,t[1]=p*i+f*u,t[2]=p*o+f*s,t[3]=p*a-f*r,t[4]=p*u-f*i,t[5]=p*s-f*o,t[6]=c,t[7]=l,t[8]=h,t}function Bt(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function jt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function Ft(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Ut(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Gt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}function zt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,u=r+r,s=i+i,c=n*a,l=r*a,h=r*u,f=i*a,p=i*u,d=i*s,y=o*a,v=o*u,m=o*s;return t[0]=1-h-d,t[3]=l-m,t[6]=f+v,t[1]=l+m,t[4]=1-c-d,t[7]=p-y,t[2]=f-v,t[5]=p+y,t[8]=1-c-h,t}function qt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],m=e[15],g=n*u-r*a,b=n*s-i*a,T=n*c-o*a,E=r*s-i*u,w=r*c-o*u,M=i*c-o*s,k=l*y-h*d,P=l*v-f*d,x=l*m-p*d,S=h*v-f*y,N=h*m-p*y,A=f*m-p*v,C=g*A-b*N+T*S+E*x-w*P+M*k;return C?(C=1/C,t[0]=(u*A-s*N+c*S)*C,t[1]=(s*x-a*A-c*P)*C,t[2]=(a*N-u*x+c*k)*C,t[3]=(i*N-r*A-o*S)*C,t[4]=(n*A-i*x+o*P)*C,t[5]=(r*x-n*N-o*k)*C,t[6]=(y*M-v*w+m*E)*C,t[7]=(v*T-d*M-m*b)*C,t[8]=(d*w-y*T+m*g)*C,t):null}function Wt(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function Ht(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function Yt(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function Kt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t}function Xt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function Zt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t}function Jt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t}function Qt(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]}function $t(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],u=t[5],s=t[6],c=t[7],l=t[8],h=e[0],f=e[1],p=e[2],d=e[3],y=e[4],v=e[5],m=e[6],g=e[7],b=e[8];return Math.abs(n-h)<=Et*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-f)<=Et*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-p)<=Et*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-d)<=Et*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-y)<=Et*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(u-v)<=Et*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(s-m)<=Et*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(c-g)<=Et*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(l-b)<=Et*Math.max(1,Math.abs(l),Math.abs(b))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var te=Dt,ee=Xt;function ne(){var t=new wt(16);return wt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function re(t){var e=new wt(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function ie(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function oe(t,e,n,r,i,o,a,u,s,c,l,h,f,p,d,y){var v=new wt(16);return v[0]=t,v[1]=e,v[2]=n,v[3]=r,v[4]=i,v[5]=o,v[6]=a,v[7]=u,v[8]=s,v[9]=c,v[10]=l,v[11]=h,v[12]=f,v[13]=p,v[14]=d,v[15]=y,v}function ae(t,e,n,r,i,o,a,u,s,c,l,h,f,p,d,y,v){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=u,t[7]=s,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=p,t[13]=d,t[14]=y,t[15]=v,t}function ue(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function se(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],u=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=u}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function ce(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],m=e[15],g=n*u-r*a,b=n*s-i*a,T=n*c-o*a,E=r*s-i*u,w=r*c-o*u,M=i*c-o*s,k=l*y-h*d,P=l*v-f*d,x=l*m-p*d,S=h*v-f*y,N=h*m-p*y,A=f*m-p*v,C=g*A-b*N+T*S+E*x-w*P+M*k;return C?(C=1/C,t[0]=(u*A-s*N+c*S)*C,t[1]=(i*N-r*A-o*S)*C,t[2]=(y*M-v*w+m*E)*C,t[3]=(f*w-h*M-p*E)*C,t[4]=(s*x-a*A-c*P)*C,t[5]=(n*A-i*x+o*P)*C,t[6]=(v*T-d*M-m*b)*C,t[7]=(l*M-f*T+p*b)*C,t[8]=(a*N-u*x+c*k)*C,t[9]=(r*x-n*N-o*k)*C,t[10]=(d*w-y*T+m*g)*C,t[11]=(h*T-l*w-p*g)*C,t[12]=(u*P-a*S-s*k)*C,t[13]=(n*S-r*P+i*k)*C,t[14]=(y*b-d*E-v*g)*C,t[15]=(l*E-h*b+f*g)*C,t):null}function le(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],m=e[15];return t[0]=u*(f*m-p*v)-h*(s*m-c*v)+y*(s*p-c*f),t[1]=-(r*(f*m-p*v)-h*(i*m-o*v)+y*(i*p-o*f)),t[2]=r*(s*m-c*v)-u*(i*m-o*v)+y*(i*c-o*s),t[3]=-(r*(s*p-c*f)-u*(i*p-o*f)+h*(i*c-o*s)),t[4]=-(a*(f*m-p*v)-l*(s*m-c*v)+d*(s*p-c*f)),t[5]=n*(f*m-p*v)-l*(i*m-o*v)+d*(i*p-o*f),t[6]=-(n*(s*m-c*v)-a*(i*m-o*v)+d*(i*c-o*s)),t[7]=n*(s*p-c*f)-a*(i*p-o*f)+l*(i*c-o*s),t[8]=a*(h*m-p*y)-l*(u*m-c*y)+d*(u*p-c*h),t[9]=-(n*(h*m-p*y)-l*(r*m-o*y)+d*(r*p-o*h)),t[10]=n*(u*m-c*y)-a*(r*m-o*y)+d*(r*c-o*u),t[11]=-(n*(u*p-c*h)-a*(r*p-o*h)+l*(r*c-o*u)),t[12]=-(a*(h*v-f*y)-l*(u*v-s*y)+d*(u*f-s*h)),t[13]=n*(h*v-f*y)-l*(r*v-i*y)+d*(r*f-i*h),t[14]=-(n*(u*v-s*y)-a*(r*v-i*y)+d*(r*s-i*u)),t[15]=n*(u*f-s*h)-a*(r*f-i*h)+l*(r*s-i*u),t}function he(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],u=t[6],s=t[7],c=t[8],l=t[9],h=t[10],f=t[11],p=t[12],d=t[13],y=t[14],v=t[15];return(e*a-n*o)*(h*v-f*y)-(e*u-r*o)*(l*v-f*d)+(e*s-i*o)*(l*y-h*d)+(n*u-r*a)*(c*v-f*p)-(n*s-i*a)*(c*y-h*p)+(r*s-i*u)*(c*d-l*p)}function fe(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],y=e[12],v=e[13],m=e[14],g=e[15],b=n[0],T=n[1],E=n[2],w=n[3];return t[0]=b*r+T*u+E*h+w*y,t[1]=b*i+T*s+E*f+w*v,t[2]=b*o+T*c+E*p+w*m,t[3]=b*a+T*l+E*d+w*g,b=n[4],T=n[5],E=n[6],w=n[7],t[4]=b*r+T*u+E*h+w*y,t[5]=b*i+T*s+E*f+w*v,t[6]=b*o+T*c+E*p+w*m,t[7]=b*a+T*l+E*d+w*g,b=n[8],T=n[9],E=n[10],w=n[11],t[8]=b*r+T*u+E*h+w*y,t[9]=b*i+T*s+E*f+w*v,t[10]=b*o+T*c+E*p+w*m,t[11]=b*a+T*l+E*d+w*g,b=n[12],T=n[13],E=n[14],w=n[15],t[12]=b*r+T*u+E*h+w*y,t[13]=b*i+T*s+E*f+w*v,t[14]=b*o+T*c+E*p+w*m,t[15]=b*a+T*l+E*d+w*g,t}function pe(t,e,n){var r,i,o,a,u,s,c,l,h,f,p,d,y=n[0],v=n[1],m=n[2];return e===t?(t[12]=e[0]*y+e[4]*v+e[8]*m+e[12],t[13]=e[1]*y+e[5]*v+e[9]*m+e[13],t[14]=e[2]*y+e[6]*v+e[10]*m+e[14],t[15]=e[3]*y+e[7]*v+e[11]*m+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=u,t[5]=s,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=p,t[11]=d,t[12]=r*y+u*v+h*m+e[12],t[13]=i*y+s*v+f*m+e[13],t[14]=o*y+c*v+p*m+e[14],t[15]=a*y+l*v+d*m+e[15]),t}function de(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ye(t,e,n,r){var i,o,a,u,s,c,l,h,f,p,d,y,v,m,g,b,T,E,w,M,k,P,x,S,N=r[0],A=r[1],C=r[2],_=Math.hypot(N,A,C);return _<Et?null:(N*=_=1/_,A*=_,C*=_,i=Math.sin(n),a=1-(o=Math.cos(n)),u=e[0],s=e[1],c=e[2],l=e[3],h=e[4],f=e[5],p=e[6],d=e[7],y=e[8],v=e[9],m=e[10],g=e[11],b=N*N*a+o,T=A*N*a+C*i,E=C*N*a-A*i,w=N*A*a-C*i,M=A*A*a+o,k=C*A*a+N*i,P=N*C*a+A*i,x=A*C*a-N*i,S=C*C*a+o,t[0]=u*b+h*T+y*E,t[1]=s*b+f*T+v*E,t[2]=c*b+p*T+m*E,t[3]=l*b+d*T+g*E,t[4]=u*w+h*M+y*k,t[5]=s*w+f*M+v*k,t[6]=c*w+p*M+m*k,t[7]=l*w+d*M+g*k,t[8]=u*P+h*x+y*S,t[9]=s*P+f*x+v*S,t[10]=c*P+p*x+m*S,t[11]=l*P+d*x+g*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function ve(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],u=e[6],s=e[7],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*r,t[5]=a*i+l*r,t[6]=u*i+h*r,t[7]=s*i+f*r,t[8]=c*i-o*r,t[9]=l*i-a*r,t[10]=h*i-u*r,t[11]=f*i-s*r,t}function me(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],u=e[2],s=e[3],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*r,t[1]=a*i-l*r,t[2]=u*i-h*r,t[3]=s*i-f*r,t[8]=o*r+c*i,t[9]=a*r+l*i,t[10]=u*r+h*i,t[11]=s*r+f*i,t}function ge(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],u=e[2],s=e[3],c=e[4],l=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*r,t[1]=a*i+l*r,t[2]=u*i+h*r,t[3]=s*i+f*r,t[4]=c*i-o*r,t[5]=l*i-a*r,t[6]=h*i-u*r,t[7]=f*i-s*r,t}function be(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Te(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Ee(t,e,n){var r,i,o,a=n[0],u=n[1],s=n[2],c=Math.hypot(a,u,s);return c<Et?null:(a*=c=1/c,u*=c,s*=c,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=u*a*o+s*r,t[2]=s*a*o-u*r,t[3]=0,t[4]=a*u*o-s*r,t[5]=u*u*o+i,t[6]=s*u*o+a*r,t[7]=0,t[8]=a*s*o+u*r,t[9]=u*s*o-a*r,t[10]=s*s*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function we(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Me(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ke(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Pe(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=r+r,s=i+i,c=o+o,l=r*u,h=r*s,f=r*c,p=i*s,d=i*c,y=o*c,v=a*u,m=a*s,g=a*c;return t[0]=1-(p+y),t[1]=h+g,t[2]=f-m,t[3]=0,t[4]=h-g,t[5]=1-(l+y),t[6]=d+v,t[7]=0,t[8]=f+m,t[9]=d-v,t[10]=1-(l+p),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function xe(t,e){var n=new wt(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=r*r+i*i+o*o+a*a;return h>0?(n[0]=2*(u*a+l*r+s*o-c*i)/h,n[1]=2*(s*a+l*i+c*r-u*o)/h,n[2]=2*(c*a+l*o+u*i-s*r)/h):(n[0]=2*(u*a+l*r+s*o-c*i),n[1]=2*(s*a+l*i+c*r-u*o),n[2]=2*(c*a+l*o+u*i-s*r)),Pe(t,e,n),t}function Se(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function Ne(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],u=e[6],s=e[8],c=e[9],l=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,u),t[2]=Math.hypot(s,c,l),t}function Ae(t,e){var n=new wt(3);Ne(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,u=e[1]*i,s=e[2]*o,c=e[4]*r,l=e[5]*i,h=e[6]*o,f=e[8]*r,p=e[9]*i,d=e[10]*o,y=a+l+d,v=0;return y>0?(v=2*Math.sqrt(y+1),t[3]=.25*v,t[0]=(h-p)/v,t[1]=(f-s)/v,t[2]=(u-c)/v):a>l&&a>d?(v=2*Math.sqrt(1+a-l-d),t[3]=(h-p)/v,t[0]=.25*v,t[1]=(u+c)/v,t[2]=(f+s)/v):l>d?(v=2*Math.sqrt(1+l-a-d),t[3]=(f-s)/v,t[0]=(u+c)/v,t[1]=.25*v,t[2]=(h+p)/v):(v=2*Math.sqrt(1+d-a-l),t[3]=(u-c)/v,t[0]=(f+s)/v,t[1]=(h+p)/v,t[2]=.25*v),t}function Ce(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=e[3],s=i+i,c=o+o,l=a+a,h=i*s,f=i*c,p=i*l,d=o*c,y=o*l,v=a*l,m=u*s,g=u*c,b=u*l,T=r[0],E=r[1],w=r[2];return t[0]=(1-(d+v))*T,t[1]=(f+b)*T,t[2]=(p-g)*T,t[3]=0,t[4]=(f-b)*E,t[5]=(1-(h+v))*E,t[6]=(y+m)*E,t[7]=0,t[8]=(p+g)*w,t[9]=(y-m)*w,t[10]=(1-(h+d))*w,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _e(t,e,n,r,i){var o=e[0],a=e[1],u=e[2],s=e[3],c=o+o,l=a+a,h=u+u,f=o*c,p=o*l,d=o*h,y=a*l,v=a*h,m=u*h,g=s*c,b=s*l,T=s*h,E=r[0],w=r[1],M=r[2],k=i[0],P=i[1],x=i[2],S=(1-(y+m))*E,N=(p+T)*E,A=(d-b)*E,C=(p-T)*w,_=(1-(f+m))*w,O=(v+g)*w,I=(d+b)*M,R=(v-g)*M,D=(1-(f+y))*M;return t[0]=S,t[1]=N,t[2]=A,t[3]=0,t[4]=C,t[5]=_,t[6]=O,t[7]=0,t[8]=I,t[9]=R,t[10]=D,t[11]=0,t[12]=n[0]+k-(S*k+C*P+I*x),t[13]=n[1]+P-(N*k+_*P+R*x),t[14]=n[2]+x-(A*k+O*P+D*x),t[15]=1,t}function Oe(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,u=r+r,s=i+i,c=n*a,l=r*a,h=r*u,f=i*a,p=i*u,d=i*s,y=o*a,v=o*u,m=o*s;return t[0]=1-h-d,t[1]=l+m,t[2]=f-v,t[3]=0,t[4]=l-m,t[5]=1-c-d,t[6]=p+y,t[7]=0,t[8]=f+v,t[9]=p-y,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Ie(t,e,n,r,i,o,a){var u=1/(n-e),s=1/(i-r),c=1/(o-a);return t[0]=2*o*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*s,t[6]=0,t[7]=0,t[8]=(n+e)*u,t[9]=(i+r)*s,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}function Re(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}var De=Re;function Le(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function Ve(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),u=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+u),c=2/(i+o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-u)*s*.5,t[9]=(i-o)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function Be(t,e,n,r,i,o,a){var u=1/(e-n),s=1/(r-i),c=1/(o-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*u,t[13]=(i+r)*s,t[14]=(a+o)*c,t[15]=1,t}var je=Be;function Fe(t,e,n,r,i,o,a){var u=1/(e-n),s=1/(r-i),c=1/(o-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+n)*u,t[13]=(i+r)*s,t[14]=o*c,t[15]=1,t}function Ue(t,e,n,r){var i,o,a,u,s,c,l,h,f,p,d=e[0],y=e[1],v=e[2],m=r[0],g=r[1],b=r[2],T=n[0],E=n[1],w=n[2];return Math.abs(d-T)<Et&&Math.abs(y-E)<Et&&Math.abs(v-w)<Et?ue(t):(l=d-T,h=y-E,f=v-w,i=g*(f*=p=1/Math.hypot(l,h,f))-b*(h*=p),o=b*(l*=p)-m*f,a=m*h-g*l,(p=Math.hypot(i,o,a))?(i*=p=1/p,o*=p,a*=p):(i=0,o=0,a=0),u=h*a-f*o,s=f*i-l*a,c=l*o-h*i,(p=Math.hypot(u,s,c))?(u*=p=1/p,s*=p,c*=p):(u=0,s=0,c=0),t[0]=i,t[1]=u,t[2]=l,t[3]=0,t[4]=o,t[5]=s,t[6]=h,t[7]=0,t[8]=a,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*d+o*y+a*v),t[13]=-(u*d+s*y+c*v),t[14]=-(l*d+h*y+f*v),t[15]=1,t)}function Ge(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=r[0],s=r[1],c=r[2],l=i-n[0],h=o-n[1],f=a-n[2],p=l*l+h*h+f*f;p>0&&(l*=p=1/Math.sqrt(p),h*=p,f*=p);var d=s*f-c*h,y=c*l-u*f,v=u*h-s*l;return(p=d*d+y*y+v*v)>0&&(d*=p=1/Math.sqrt(p),y*=p,v*=p),t[0]=d,t[1]=y,t[2]=v,t[3]=0,t[4]=h*v-f*y,t[5]=f*d-l*v,t[6]=l*y-h*d,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function ze(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function qe(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function We(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function He(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function Ye(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function Ke(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function Xe(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function Ze(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],u=t[5],s=t[6],c=t[7],l=t[8],h=t[9],f=t[10],p=t[11],d=t[12],y=t[13],v=t[14],m=t[15],g=e[0],b=e[1],T=e[2],E=e[3],w=e[4],M=e[5],k=e[6],P=e[7],x=e[8],S=e[9],N=e[10],A=e[11],C=e[12],_=e[13],O=e[14],I=e[15];return Math.abs(n-g)<=Et*Math.max(1,Math.abs(n),Math.abs(g))&&Math.abs(r-b)<=Et*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-T)<=Et*Math.max(1,Math.abs(i),Math.abs(T))&&Math.abs(o-E)<=Et*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(a-w)<=Et*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(u-M)<=Et*Math.max(1,Math.abs(u),Math.abs(M))&&Math.abs(s-k)<=Et*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(c-P)<=Et*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(l-x)<=Et*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-S)<=Et*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-N)<=Et*Math.max(1,Math.abs(f),Math.abs(N))&&Math.abs(p-A)<=Et*Math.max(1,Math.abs(p),Math.abs(A))&&Math.abs(d-C)<=Et*Math.max(1,Math.abs(d),Math.abs(C))&&Math.abs(y-_)<=Et*Math.max(1,Math.abs(y),Math.abs(_))&&Math.abs(v-O)<=Et*Math.max(1,Math.abs(v),Math.abs(O))&&Math.abs(m-I)<=Et*Math.max(1,Math.abs(m),Math.abs(I))}var Je=fe,Qe=He;function $e(){var t=new wt(3);return wt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function tn(t){var e=new wt(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function en(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function nn(t,e,n){var r=new wt(3);return r[0]=t,r[1]=e,r[2]=n,r}function rn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function on(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function an(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function un(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function sn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function cn(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function ln(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function hn(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function fn(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function pn(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function dn(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function yn(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function vn(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function mn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function gn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function bn(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function Tn(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function En(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function wn(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Mn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function kn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2];return t[0]=i*s-o*u,t[1]=o*a-r*s,t[2]=r*u-i*a,t}function Pn(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function xn(t,e,n,r,i,o){var a=o*o,u=a*(2*o-3)+1,s=a*(o-2)+o,c=a*(o-1),l=a*(3-2*o);return t[0]=e[0]*u+n[0]*s+r[0]*c+i[0]*l,t[1]=e[1]*u+n[1]*s+r[1]*c+i[1]*l,t[2]=e[2]*u+n[2]*s+r[2]*c+i[2]*l,t}function Sn(t,e,n,r,i,o){var a=1-o,u=a*a,s=o*o,c=u*a,l=3*o*u,h=3*s*a,f=s*o;return t[0]=e[0]*c+n[0]*l+r[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*l+r[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*l+r[2]*h+i[2]*f,t}function Nn(t,e){e=e||1;var n=2*Mt()*Math.PI,r=2*Mt()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}function An(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function Cn(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function _n(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],u=e[0],s=e[1],c=e[2],l=i*c-o*s,h=o*u-r*c,f=r*s-i*u,p=i*f-o*h,d=o*l-r*f,y=r*h-i*l,v=2*a;return l*=v,h*=v,f*=v,p*=2,d*=2,y*=2,t[0]=u+l+p,t[1]=s+h+d,t[2]=c+f+y,t}function On(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function In(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Rn(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Dn(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],u=e[2],s=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+u*u),c=s&&Mn(t,e)/s;return Math.acos(Math.min(Math.max(c,-1),1))}function Ln(t){return t[0]=0,t[1]=0,t[2]=0,t}function Vn(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Bn(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function jn(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],u=e[2];return Math.abs(n-o)<=Et*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=Et*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-u)<=Et*Math.max(1,Math.abs(i),Math.abs(u))}var Fn,Un=un,Gn=sn,zn=cn,qn=mn,Wn=gn,Hn=en,Yn=bn,Kn=(Fn=$e(),function(t,e,n,r,i,o){var a,u;for(e||(e=3),n||(n=0),u=r?Math.min(r*e+n,t.length):t.length,a=n;a<u;a+=e)Fn[0]=t[a],Fn[1]=t[a+1],Fn[2]=t[a+2],i(Fn,Fn,o),t[a]=Fn[0],t[a+1]=Fn[1],t[a+2]=Fn[2];return t});function Xn(){var t=new wt(4);return wt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zn(t){var e=new wt(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Jn(t,e,n,r){var i=new wt(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function Qn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function $n(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function tr(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function er(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function nr(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function rr(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function ir(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t}function or(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t}function ar(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}function ur(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}function sr(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function cr(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function lr(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t}function hr(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.hypot(n,r,i,o)}function fr(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}function pr(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function dr(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function yr(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function vr(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}function mr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function gr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function br(t,e,n,r){var i=n[0]*r[1]-n[1]*r[0],o=n[0]*r[2]-n[2]*r[0],a=n[0]*r[3]-n[3]*r[0],u=n[1]*r[2]-n[2]*r[1],s=n[1]*r[3]-n[3]*r[1],c=n[2]*r[3]-n[3]*r[2],l=e[0],h=e[1],f=e[2],p=e[3];return t[0]=h*c-f*s+p*u,t[1]=-l*c+f*a-p*o,t[2]=l*s-h*a+p*i,t[3]=-l*u+h*o-f*i,t}function Tr(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=u+r*(n[3]-u),t}function Er(t,e){var n,r,i,o,a,u;e=e||1;do{a=(n=2*Mt()-1)*n+(r=2*Mt()-1)*r}while(a>=1);do{u=(i=2*Mt()-1)*i+(o=2*Mt()-1)*o}while(u>=1);var s=Math.sqrt((1-a)/u);return t[0]=e*n,t[1]=e*r,t[2]=e*i*s,t[3]=e*o*s,t}function wr(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function Mr(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2],c=n[3],l=c*r+u*o-s*i,h=c*i+s*r-a*o,f=c*o+a*i-u*r,p=-a*r-u*i-s*o;return t[0]=l*c+p*-a+h*-s-f*-u,t[1]=h*c+p*-u+f*-a-l*-s,t[2]=f*c+p*-s+l*-u-h*-a,t[3]=e[3],t}function kr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function Pr(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function xr(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function Sr(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],u=e[1],s=e[2],c=e[3];return Math.abs(n-a)<=Et*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-u)<=Et*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(i-s)<=Et*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-c)<=Et*Math.max(1,Math.abs(o),Math.abs(c))}var Nr=er,Ar=nr,Cr=rr,_r=hr,Or=fr,Ir=pr,Rr=dr,Dr=function(){var t=Xn();return function(e,n,r,i,o,a){var u,s;for(n||(n=4),r||(r=0),s=i?Math.min(i*n+r,e.length):e.length,u=r;u<s;u+=n)t[0]=e[u],t[1]=e[u+1],t[2]=e[u+2],t[3]=e[u+3],o(t,t,a),e[u]=t[0],e[u+1]=t[1],e[u+2]=t[2],e[u+3]=t[3];return e}}();function Lr(){var t=new wt(4);return wt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Vr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Br(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function jr(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>Et?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function Fr(t,e){var n=yi(t,e);return Math.acos(2*n*n-1)}function Ur(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=n[0],s=n[1],c=n[2],l=n[3];return t[0]=r*l+a*u+i*c-o*s,t[1]=i*l+a*s+o*u-r*c,t[2]=o*l+a*c+r*s-i*u,t[3]=a*l-r*u-i*s-o*c,t}function Gr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),s=Math.cos(n);return t[0]=r*s+a*u,t[1]=i*s+o*u,t[2]=o*s-i*u,t[3]=a*s-r*u,t}function zr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),s=Math.cos(n);return t[0]=r*s-o*u,t[1]=i*s+a*u,t[2]=o*s+r*u,t[3]=a*s-i*u,t}function qr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),s=Math.cos(n);return t[0]=r*s+i*u,t[1]=i*s-r*u,t[2]=o*s+a*u,t[3]=a*s-o*u,t}function Wr(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function Hr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),u=Math.exp(o),s=a>0?u*Math.sin(a)/a:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=u*Math.cos(a),t}function Yr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),u=a>0?Math.atan2(a,o)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=.5*Math.log(n*n+r*r+i*i+o*o),t}function Kr(t,e,n){return Yr(t,e),di(t,t,n),Hr(t,t),t}function Xr(t,e,n,r){var i,o,a,u,s,c=e[0],l=e[1],h=e[2],f=e[3],p=n[0],d=n[1],y=n[2],v=n[3];return(o=c*p+l*d+h*y+f*v)<0&&(o=-o,p=-p,d=-d,y=-y,v=-v),1-o>Et?(i=Math.acos(o),a=Math.sin(i),u=Math.sin((1-r)*i)/a,s=Math.sin(r*i)/a):(u=1-r,s=r),t[0]=u*c+s*p,t[1]=u*l+s*d,t[2]=u*h+s*y,t[3]=u*f+s*v,t}function Zr(t){var e=Mt(),n=Mt(),r=Mt(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t}function Jr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,u=a?1/a:0;return t[0]=-n*u,t[1]=-r*u,t[2]=-i*u,t[3]=o*u,t}function Qr(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function $r(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}function ti(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),u=Math.sin(n),s=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return t[0]=o*s*l-a*u*c,t[1]=a*u*l+o*s*c,t[2]=a*s*c-o*u*l,t[3]=a*s*l+o*u*c,t}function ei(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var ni,ri,ii,oi,ai,ui,si=Zn,ci=Jn,li=Qn,hi=$n,fi=tr,pi=Ur,di=cr,yi=gr,vi=Tr,mi=pr,gi=mi,bi=dr,Ti=bi,Ei=mr,wi=xr,Mi=Sr,ki=(ni=$e(),ri=nn(1,0,0),ii=nn(0,1,0),function(t,e,n){var r=Mn(e,n);return r<-.999999?(kn(ni,ri,e),Hn(ni)<1e-6&&kn(ni,ii,e),wn(ni,ni),Br(t,ni,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(kn(ni,e,n),t[0]=ni[0],t[1]=ni[1],t[2]=ni[2],t[3]=1+r,Ei(t,t))}),Pi=(oi=Lr(),ai=Lr(),function(t,e,n,r,i,o){return Xr(oi,e,i,o),Xr(ai,n,r,o),Xr(t,oi,ai,2*o*(1-o)),t}),xi=(ui=kt(),function(t,e,n,r){return ui[0]=n[0],ui[3]=n[1],ui[6]=n[2],ui[1]=r[0],ui[4]=r[1],ui[7]=r[2],ui[2]=-e[0],ui[5]=-e[1],ui[8]=-e[2],Ei(t,$r(t,ui))});function Si(){var t=new wt(2);return wt!=Float32Array&&(t[0]=0,t[1]=0),t}function Ni(t){var e=new wt(2);return e[0]=t[0],e[1]=t[1],e}function Ai(t,e){var n=new wt(2);return n[0]=t,n[1]=e,n}function Ci(t,e){return t[0]=e[0],t[1]=e[1],t}function _i(t,e,n){return t[0]=e,t[1]=n,t}function Oi(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Ii(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Ri(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function Di(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function Li(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function Vi(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function Bi(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ji(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function Fi(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function Ui(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Gi(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function zi(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function qi(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function Wi(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function Hi(t){var e=t[0],n=t[1];return e*e+n*n}function Yi(t,e){return t[0]=-e[0],t[1]=-e[1],t}function Ki(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function Xi(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function Zi(t,e){return t[0]*e[0]+t[1]*e[1]}function Ji(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function Qi(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function $i(t,e){e=e||1;var n=2*Mt()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function to(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function eo(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function no(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function ro(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}function io(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),u=Math.cos(r);return t[0]=i*u-o*a+n[0],t[1]=i*a+o*u+n[1],t}function oo(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),u=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(u,-1),1))}function ao(t){return t[0]=0,t[1]=0,t}function uo(t){return"vec2("+t[0]+", "+t[1]+")"}function so(t,e){return t[0]===e[0]&&t[1]===e[1]}function co(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return Math.abs(n-i)<=Et*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=Et*Math.max(1,Math.abs(r),Math.abs(o))}var lo,ho=Wi,fo=Ii,po=Ri,yo=Di,vo=zi,mo=qi,go=Hi,bo=function(){var t=Si();return function(e,n,r,i,o,a){var u,s;for(n||(n=2),r||(r=0),s=i?Math.min(i*n+r,e.length):e.length,u=r;u<s;u+=n)t[0]=e[u],t[1]=e[u+1],o(t,t,a),e[u]=t[0],e[u+1]=t[1];return e}}(),To=function(){function t(t,e){this.min=a.create(),this.max=a.create(),this.update(t,e)}return t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){this.center=a.copy(a.create(),t||a.create()),this.halfExtents=a.copy(a.create(),e||a.fromValues(0,0,0)),this.min=a.sub(this.min,this.center,this.halfExtents),this.max=a.add(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){a.add(this.center,e,t),a.scale(this.center,this.center,.5),a.sub(this.halfExtents,e,t),a.scale(this.halfExtents,this.halfExtents,.5),a.copy(this.min,t),a.copy(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e))if(t.isEmpty(this))this.setMinMax(e.getMin(),e.getMax());else{var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,u=a[0],s=a[1],c=a[2],l=r-u,h=r+u,f=i-s,p=i+s,d=o-c,y=o+c,v=e.center,m=v[0],g=v[1],b=v[2],T=e.halfExtents,E=T[0],w=T[1],M=T[2],k=m-E,P=m+E,x=g-w,S=g+w,N=b-M,A=b+M;k<l&&(l=k),P>h&&(h=P),x<f&&(f=x),S>p&&(p=S),N<d&&(d=N),A>y&&(y=A),n[0]=.5*(l+h),n[1]=.5*(f+p),n[2]=.5*(d+y),a[0]=.5*(h-l),a[1]=.5*(p-f),a[2]=.5*(y-d),this.min[0]=l,this.min[1]=f,this.min[2]=d,this.max[0]=h,this.max[1]=p,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,u=e[0],s=e[4],c=e[8],l=e[1],h=e[5],f=e[9],p=e[2],d=e[6],y=e[10],v=Math.abs(u),m=Math.abs(s),g=Math.abs(c),b=Math.abs(l),T=Math.abs(h),E=Math.abs(f),w=Math.abs(p),M=Math.abs(d),k=Math.abs(y);a.set(n,e[12]+u*i[0]+s*i[1]+c*i[2],e[13]+l*i[0]+h*i[1]+f*i[2],e[14]+p*i[0]+d*i[1]+y*i[2]),a.set(r,v*o[0]+m*o[1]+g*o[2],b*o[0]+T*o[1]+E*o[2],w*o[0]+M*o[1]+k*o[2]),this.min=a.sub(this.min,n,r),this.max=a.add(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n=new t,r=a.max(a.create(),this.getMin(),e.getMin()),i=a.min(a.create(),this.getMax(),e.getMax());return n.setMinMax(r,i),n},t.prototype.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.prototype.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?a.copy(a.create(),this.min):272===t.pnVertexFlag?a.fromValues(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?a.fromValues(this.max[0],this.max[1],this.min[2]):a.fromValues(this.max[0],this.max[1],this.max[2])},t.prototype.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?a.copy(a.create(),this.max):272===t.pnVertexFlag?a.fromValues(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?a.fromValues(this.min[0],this.min[1],this.max[2]):a.fromValues(this.min[0],this.min[1],this.min[2])},t}(),Eo=a.create(),wo=function(){function t(t,e){this.center=t||a.create(),this.radius=e||.5}return t.prototype.containsPoint=function(t){return a.sub(Eo,t,this.center),a.length(Eo)<this.radius*this.radius},t.prototype.intersects=function(t){a.sub(Eo,t.center,this.center);var e=t.radius+this.radius;return a.length(Eo)<=e*e},t}(),Mo=function(){function t(t,e){this.distance=t||0,this.normal=e||a.fromValues(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return a.dot(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/a.len(this.normal);a.scale(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&a.lerp(n,t,e,i),o},t}();!function(t){t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE"}(lo||(lo={}));var ko,Po=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Mo)}return t.prototype.extractFromVPMatrix=function(t){var e=gt(t,16),n=e[0],r=e[1],i=e[2],o=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],y=e[12],v=e[13],m=e[14],g=e[15];a.set(this.planes[0].normal,o-n,l-u,d-h),this.planes[0].distance=g-y,a.set(this.planes[1].normal,o+n,l+u,d+h),this.planes[1].distance=g+y,a.set(this.planes[2].normal,o+r,l+s,d+f),this.planes[2].distance=g+v,a.set(this.planes[3].normal,o-r,l-s,d-f),this.planes[3].distance=g-v,a.set(this.planes[4].normal,o-i,l-c,d-p),this.planes[4].distance=g-m,a.set(this.planes[5].normal,o+i,l+c,d+p),this.planes[5].distance=g+m,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),xo=a.create(),So=a.create(),No=a.create(),Ao=a.create(),Co=a.create(),_o=function(){function t(t,e){this.origin=t||a.create(),this.direction=e||a.fromValues(0,0,-1)}return t.prototype.intersectsAABB=function(t,e){return e?this.intersectAABBWithIntersection(t,e):this.intersectsAABBWithoutIntersection(t)},t.prototype.intersectsSphere=function(t,e){var n=a.sub(xo,this.origin,t.center);a.normalize(So,a.copy(So,this.direction));var r=a.dot(n,So),i=a.dot(n,n)-t.radius*t.radius;if(i>0&&r>0)return null;var o=r*r-i;if(o<0)return!1;var u=Math.abs(-r-Math.sqrt(o));return e&&(a.copy(e,this.direction),a.scaleAndAdd(e,this.origin,e,u)),!0},t.prototype.intersectsPlane=function(t,e){var n=(t.distance-a.dot(t.normal,this.origin))/a.dot(t.normal,this.direction),r=n>=0;return r&&e&&a.scaleAndAdd(e,this.origin,this.direction,n),r},t.prototype.intersectsAABBWithoutIntersection=function(t){var e=xo,n=So,r=No,i=Ao,o=Co,u=this.direction;return a.sub(e,this.origin,t.center),a.set(i,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])),a.mul(r,e,u),!(i[0]>t.halfExtents[0]&&r[0]>=0||i[1]>t.halfExtents[1]&&r[1]>=0||i[2]>t.halfExtents[2]&&r[2]>=0)&&(a.set(o,Math.abs(u[0]),Math.abs(u[1]),Math.abs(u[2])),a.cross(n,u,e),a.set(n,Math.abs(n[0]),Math.abs(n[1]),Math.abs(n[2])),!(n[0]>t.halfExtents[1]*o[2]+t.halfExtents[2]*o[1]||n[1]>t.halfExtents[0]*o[2]+t.halfExtents[2]*o[0]||n[2]>t.halfExtents[0]*o[1]+t.halfExtents[1]*o[0]))},t.prototype.intersectAABBWithIntersection=function(t,e){var n=a.copy(a.create(),t.getMin());a.sub(n,n,this.origin);var r=a.copy(a.create(),t.getMax());a.sub(r,r,this.origin);var i=this.direction;0===i[0]?(n[0]=n[0]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[0]=r[0]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[0]/=i[0],r[0]/=i[0]),0===i[1]?(n[1]=n[1]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[1]=r[1]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[1]/=i[1],r[1]/=i[1]),0===i[2]?(n[2]=n[2]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[2]=r[2]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[2]/=i[2],r[2]/=i[2]);var o=a.set(No,Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.min(n[2],r[2])),u=a.set(Ao,Math.max(n[0],r[0]),Math.max(n[1],r[1]),Math.max(n[2],r[2])),s=Math.min(Math.min(u[0],u[1]),u[2]),c=Math.max(Math.max(o[0],o[1]),o[2]),l=s>=c&&c>=0;return l&&(a.copy(e,this.direction),a.scaleAndAdd(e,this.origin,e,c)),l},t}(),Oo=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Io=function(){function t(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),Ro=l.defineToken("SceneGraphSelectorFactory"),Do=l.defineToken("SceneGraphSelector",{multiple:!1}),Lo=/\[\s*name=(.*)\s*\]/,Vo=function(){function t(){}return t.prototype.selectOne=function(t,e){if(t.startsWith("."))return e.find((function(e){return e.className===t.substring(1)}));if(t.startsWith("#"))return e.find((function(e){return e.id===t.substring(1)}));if(t.startsWith("[name=")){var n=t.match(Lo);if(n&&n.length>1){var r=n[1].replace(/"/g,"");return e.find((function(t){return e!==t&&t.name===r}))}return null}return e.find((function(n){return e!==n&&n.nodeName===t}))},t.prototype.selectAll=function(t,e){if(t.startsWith("."))return e.findAll((function(n){return e!==n&&n.className===t.substring(1)}));if(t.startsWith("#"))return e.findAll((function(n){return e!==n&&n.id===t.substring(1)}));if(t.startsWith("[name=")){var n=t.match(Lo);if(n&&n.length>1){var r=n[1].replace(/"/g,"");return e.findAll((function(t){return e!==t&&t.name===r}))}return[]}return e.findAll((function(n){return e!==n&&n.nodeName===t}))},t.prototype.is=function(){return!0},t=pt([A({token:Do})],t)}();!function(t){t.DESTROY="destroy",t.ATTR_MODIFIED="DOMAttrModified",t.INSERTED="DOMNodeInserted",t.CHILD_INSERTED="child-inserted",t.REMOVED="removed",t.CHILD_REMOVED="child-removed",t.MOUNTED="DOMNodeInsertedIntoDocument",t.UNMOUNTED="DOMNodeRemovedFromDocument",t.BOUNDS_CHANGED="bounds-changed",t.GEOMETRY_BOUNDS_CHANGED="geometry-bounds-changed",t.RENDER_ORDER_CHANGED="render-order-changed"}(ko||(ko={}));var Bo,jo,Fo,Uo,Go,zo=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Oo,this.page=new Oo,this.canvas=new Oo,this.viewport=new Oo,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t}(),qo=function(t){function e(e,n,r,i,o,a,u,s){var c=t.call(this,null)||this;return c.relatedNode=n,c.prevValue=r,c.newValue=i,c.attrName=o,c.attrChange=a,c.prevParsedValue=u,c.newParsedValue=s,c.type=e,c}return lt(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(zo);function Wo(t){if(!t)throw new Error}function Ho(t,e){if(t!==e)throw new Error}function Yo(t,e){if(t===e)throw new Error}function Ko(t){return void 0===t}function Xo(t){return null==t}function Zo(t){return"number"==typeof t}function Jo(t){return"function"==typeof t}function Qo(t){return"boolean"==typeof t}function $o(t){return"[object Object]"===Object.prototype.toString.call(t)}function ta(t,e,n){return n?Math.min(t,e)===t?e:Math.max(t,n)===t?n:t:Math.max(t,e)===e?t:e}function ea(t){return void 0===t?0:t>360||t<-360?t%360:t}function na(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Zo(t)?a.fromValues(t,e,n):Array.isArray(t)&&3===t.length?a.clone(t):a.fromValues(t[0],t[1]||e,t[2]||n)}function ra(t){return t*(Math.PI/180)}function ia(t){return t*(180/Math.PI)}function oa(t){return(t%=400)<0&&(t+=400),t/400*360}function aa(t){return t/360}function ua(t){return 360*t}function sa(t,e){var n=e[0],r=e[1],i=e[3],o=e[4];return t[0]=Math.hypot(n,r),t[1]=Math.hypot(i,o),t}function ca(t,e){return t[0]=e[6],t[1]=e[7],t}function la(t){return Math.atan2(t[1],t[4])}function ha(t,e){return 16===e.length?function(t,e){var n,r,i=.5*Math.PI,u=gt(o.getScaling(a.create(),e),3),s=u[0],c=u[1],l=u[2],h=Math.asin(-e[2]/s);return h<i?h>-i?(n=Math.atan2(e[6]/c,e[10]/l),r=Math.atan2(e[1]/s,e[0]/s)):(r=0,n=-Math.atan2(e[4]/c,e[5]/c)):(r=0,n=Math.atan2(e[4]/c,e[5]/c)),t[0]=n,t[1]=h,t[2]=r,t}(t,e):function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=r*r,u=i*i,s=o*o,c=n*n+a+u+s,l=n*o-r*i;return l>.499995*c?(t[0]=Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):l<-.499995*c?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-o*r)),t[1]=Math.atan2(2*(n*o+r*i),1-2*(u+s)),t[2]=Math.atan2(2*(n*r+i*o),1-2*(a+u))),t}(t,e)}function fa(t,e,n,r,o){var a=Math.cos(t),u=Math.sin(t);return i.fromValues(r*a,o*u,0,-r*u,o*a,0,e,n,1)}function pa(t,e,n,r,i,o,a){var u=2*o/(n-e),s=2*o/(r-i),c=(n+e)/(n-e),l=(r+i)/(r-i),h=-(a+o)/(a-o),f=-2*a*o/(a-o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=c,t[9]=l,t[10]=h,t[11]=-1,t[12]=0,t[13]=0,t[14]=f,t[15]=0,t}function da(t){var e=t[0],n=t[3],r=t[1],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var u=Math.atan2(n,e);return[t[6],t[7],o,a,u]}!function(t){t[t.kUnknown=0]="kUnknown",t[t.kNumber=1]="kNumber",t[t.kPercentage=2]="kPercentage",t[t.kEms=3]="kEms",t[t.kExs=4]="kExs",t[t.kPixels=5]="kPixels",t[t.kCentimeters=6]="kCentimeters",t[t.kMillimeters=7]="kMillimeters",t[t.kInches=8]="kInches",t[t.kPoints=9]="kPoints",t[t.kPicas=10]="kPicas",t[t.kQuarterMillimeters=11]="kQuarterMillimeters",t[t.kViewportWidth=12]="kViewportWidth",t[t.kViewportHeight=13]="kViewportHeight",t[t.kViewportInlineSize=14]="kViewportInlineSize",t[t.kViewportBlockSize=15]="kViewportBlockSize",t[t.kViewportMin=16]="kViewportMin",t[t.kViewportMax=17]="kViewportMax",t[t.kSmallViewportWidth=18]="kSmallViewportWidth",t[t.kSmallViewportHeight=19]="kSmallViewportHeight",t[t.kSmallViewportInlineSize=20]="kSmallViewportInlineSize",t[t.kSmallViewportBlockSize=21]="kSmallViewportBlockSize",t[t.kSmallViewportMin=22]="kSmallViewportMin",t[t.kSmallViewportMax=23]="kSmallViewportMax",t[t.kLargeViewportWidth=24]="kLargeViewportWidth",t[t.kLargeViewportHeight=25]="kLargeViewportHeight",t[t.kLargeViewportInlineSize=26]="kLargeViewportInlineSize",t[t.kLargeViewportBlockSize=27]="kLargeViewportBlockSize",t[t.kLargeViewportMin=28]="kLargeViewportMin",t[t.kLargeViewportMax=29]="kLargeViewportMax",t[t.kDynamicViewportWidth=30]="kDynamicViewportWidth",t[t.kDynamicViewportHeight=31]="kDynamicViewportHeight",t[t.kDynamicViewportInlineSize=32]="kDynamicViewportInlineSize",t[t.kDynamicViewportBlockSize=33]="kDynamicViewportBlockSize",t[t.kDynamicViewportMin=34]="kDynamicViewportMin",t[t.kDynamicViewportMax=35]="kDynamicViewportMax",t[t.kContainerWidth=36]="kContainerWidth",t[t.kContainerHeight=37]="kContainerHeight",t[t.kContainerInlineSize=38]="kContainerInlineSize",t[t.kContainerBlockSize=39]="kContainerBlockSize",t[t.kContainerMin=40]="kContainerMin",t[t.kContainerMax=41]="kContainerMax",t[t.kRems=42]="kRems",t[t.kChs=43]="kChs",t[t.kUserUnits=44]="kUserUnits",t[t.kDegrees=45]="kDegrees",t[t.kRadians=46]="kRadians",t[t.kGradians=47]="kGradians",t[t.kTurns=48]="kTurns",t[t.kMilliseconds=49]="kMilliseconds",t[t.kSeconds=50]="kSeconds",t[t.kHertz=51]="kHertz",t[t.kKilohertz=52]="kKilohertz",t[t.kDotsPerPixel=53]="kDotsPerPixel",t[t.kDotsPerInch=54]="kDotsPerInch",t[t.kDotsPerCentimeter=55]="kDotsPerCentimeter",t[t.kFraction=56]="kFraction",t[t.kInteger=57]="kInteger",t[t.kQuirkyEms=58]="kQuirkyEms"}(Bo||(Bo={})),function(t){t[t.kUNumber=0]="kUNumber",t[t.kUPercent=1]="kUPercent",t[t.kULength=2]="kULength",t[t.kUAngle=3]="kUAngle",t[t.kUTime=4]="kUTime",t[t.kUFrequency=5]="kUFrequency",t[t.kUResolution=6]="kUResolution",t[t.kUOther=7]="kUOther"}(jo||(jo={})),function(t){t[t.kAll=0]="kAll",t[t.kNonNegative=1]="kNonNegative",t[t.kInteger=2]="kInteger",t[t.kNonNegativeInteger=3]="kNonNegativeInteger",t[t.kPositiveInteger=4]="kPositiveInteger"}(Fo||(Fo={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(Uo||(Uo={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(Go||(Go={}));var ya,va=[{name:"em",unit_type:Bo.kEms},{name:"px",unit_type:Bo.kPixels},{name:"deg",unit_type:Bo.kDegrees},{name:"rad",unit_type:Bo.kRadians},{name:"grad",unit_type:Bo.kGradians},{name:"ms",unit_type:Bo.kMilliseconds},{name:"s",unit_type:Bo.kSeconds},{name:"rem",unit_type:Bo.kRems},{name:"turn",unit_type:Bo.kTurns}];!function(t){t[t.kUnknownType=0]="kUnknownType",t[t.kUnparsedType=1]="kUnparsedType",t[t.kKeywordType=2]="kKeywordType",t[t.kUnitType=3]="kUnitType",t[t.kSumType=4]="kSumType",t[t.kProductType=5]="kProductType",t[t.kNegateType=6]="kNegateType",t[t.kInvertType=7]="kInvertType",t[t.kMinType=8]="kMinType",t[t.kMaxType=9]="kMaxType",t[t.kClampType=10]="kClampType",t[t.kTransformType=11]="kTransformType",t[t.kPositionType=12]="kPositionType",t[t.kURLImageType=13]="kURLImageType",t[t.kColorType=14]="kColorType",t[t.kUnsupportedColorType=15]="kUnsupportedColorType"}(ya||(ya={}));var ma,ga,ba=function(){function t(){}return t.parse=function(t,e){return[][0]},t.parseAll=function(t,e){return[]},t.unitFromName=function(t){return t?"number"===t?Bo.kNumber:"percent"===t||"%"===t?Bo.kPercentage:this.stringToUnitType(t):Bo.kUnknown},t.unitTypeToUnitCategory=function(t){switch(t){case Bo.kNumber:case Bo.kInteger:return jo.kUNumber;case Bo.kPercentage:return jo.kUPercent;case Bo.kPixels:case Bo.kCentimeters:case Bo.kMillimeters:case Bo.kQuarterMillimeters:case Bo.kInches:case Bo.kPoints:case Bo.kPicas:case Bo.kUserUnits:return jo.kULength;case Bo.kMilliseconds:case Bo.kSeconds:return jo.kUTime;case Bo.kDegrees:case Bo.kRadians:case Bo.kGradians:case Bo.kTurns:return jo.kUAngle;case Bo.kHertz:case Bo.kKilohertz:return jo.kUFrequency;case Bo.kDotsPerPixel:case Bo.kDotsPerInch:case Bo.kDotsPerCentimeter:return jo.kUResolution;default:return jo.kUOther}},t.unitTypeToString=function(t){switch(t){case Bo.kNumber:case Bo.kInteger:case Bo.kUserUnits:return"";case Bo.kPercentage:return"%";case Bo.kEms:case Bo.kQuirkyEms:return"em";case Bo.kRems:return"rem";case Bo.kPixels:return"px";case Bo.kDegrees:return"deg";case Bo.kRadians:return"rad";case Bo.kGradians:return"grad";case Bo.kMilliseconds:return"ms";case Bo.kSeconds:return"s";case Bo.kTurns:return"turn"}return""},t.stringToUnitType=function(t){return va.find((function(e){return e.name===t})).unit_type},t.canonicalUnitTypeForCategory=function(t){switch(t){case jo.kUNumber:return Bo.kNumber;case jo.kULength:return Bo.kPixels;case jo.kUPercent:return Bo.kUnknown;case jo.kUTime:return Bo.kSeconds;case jo.kUAngle:return Bo.kDegrees;case jo.kUFrequency:return Bo.kHertz;case jo.kUResolution:return Bo.kDotsPerPixel;default:return Bo.kUnknown}},t.conversionToCanonicalUnitsScaleFactor=function(t){var e=1;switch(t){case Bo.kPixels:case Bo.kUserUnits:case Bo.kDegrees:case Bo.kSeconds:case Bo.kHertz:break;case Bo.kMilliseconds:e=.001;break;case Bo.kCentimeters:case Bo.kDotsPerCentimeter:case Bo.kMillimeters:case Bo.kQuarterMillimeters:case Bo.kInches:case Bo.kDotsPerInch:case Bo.kPoints:case Bo.kPicas:break;case Bo.kRadians:e=180/Math.PI;break;case Bo.kGradians:e=.9;break;case Bo.kTurns:e=360;break;case Bo.kKilohertz:e=1e3}return e},t.isAngle=function(t){return t===Bo.kDegrees||t===Bo.kRadians||t===Bo.kGradians||t===Bo.kTurns},t.isViewportPercentageLength=function(t){return t>=Bo.kViewportWidth&&t<=Bo.kDynamicViewportMax},t.isContainerPercentageLength=function(t){return t>=Bo.kContainerWidth&&t<=Bo.kContainerMax},t.isLength=function(t){return t>=Bo.kEms&&t<=Bo.kUserUnits||t==Bo.kQuirkyEms},t.isRelativeUnit=function(t){return t===Bo.kPercentage||t===Bo.kEms||t===Bo.kExs||t===Bo.kRems||t===Bo.kChs||this.isViewportPercentageLength(t)||this.isContainerPercentageLength(t)},t.isTime=function(t){return t===Bo.kSeconds||t===Bo.kMilliseconds},t.isFrequency=function(t){return t==Bo.kHertz||t==Bo.kKilohertz},t.isResolution=function(t){return t>=Bo.kDotsPerPixel&&t<=Bo.kDotsPerCentimeter},t.isFlex=function(t){return t===Bo.kFraction},t.prototype.toString=function(){return this.buildCSSText(Uo.kNo,Go.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=ya.kUnitType&&this.getType()<=ya.kClampType},t}(),Ta=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return lt(e,t),e.prototype.getType=function(){return ya.kColorType},e.prototype.to=function(t){return this},e}(ba),Ea=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return lt(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return ya.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(ba);function wa(t){return t===ma.kMin||t===ma.kMax||t===ma.kClamp}function Ma(t){switch(Yo(t,Bo.kNumber),t){case Bo.kEms:case Bo.kExs:case Bo.kPixels:case Bo.kCentimeters:case Bo.kMillimeters:case Bo.kQuarterMillimeters:case Bo.kInches:case Bo.kPoints:case Bo.kPicas:case Bo.kUserUnits:case Bo.kViewportWidth:case Bo.kViewportHeight:case Bo.kViewportInlineSize:case Bo.kViewportBlockSize:case Bo.kViewportMin:case Bo.kViewportMax:case Bo.kSmallViewportWidth:case Bo.kSmallViewportHeight:case Bo.kSmallViewportInlineSize:case Bo.kSmallViewportBlockSize:case Bo.kSmallViewportMin:case Bo.kSmallViewportMax:case Bo.kLargeViewportWidth:case Bo.kLargeViewportHeight:case Bo.kLargeViewportInlineSize:case Bo.kLargeViewportBlockSize:case Bo.kLargeViewportMin:case Bo.kLargeViewportMax:case Bo.kDynamicViewportWidth:case Bo.kDynamicViewportHeight:case Bo.kDynamicViewportInlineSize:case Bo.kDynamicViewportBlockSize:case Bo.kDynamicViewportMin:case Bo.kDynamicViewportMax:case Bo.kContainerWidth:case Bo.kContainerHeight:case Bo.kContainerInlineSize:case Bo.kContainerBlockSize:case Bo.kContainerMin:case Bo.kContainerMax:case Bo.kRems:case Bo.kChs:return ga.kLength;case Bo.kMilliseconds:case Bo.kSeconds:return ga.kTime;case Bo.kDegrees:case Bo.kRadians:case Bo.kGradians:case Bo.kTurns:return ga.kAngle;case Bo.kHertz:case Bo.kKilohertz:return ga.kFrequency;case Bo.kDotsPerPixel:case Bo.kDotsPerInch:case Bo.kDotsPerCentimeter:return ga.kResolution;case Bo.kFraction:return ga.kFlex;case Bo.kPercentage:return ga.kPercent;default:return ga.kLength}}function ka(t){switch(t){case ga.kLength:return"length";case ga.kAngle:return"angle";case ga.kTime:return"time";case ga.kFrequency:return"frequency";case ga.kResolution:return"resolution";case ga.kFlex:return"flex";case ga.kPercent:return"percent"}return""}!function(t){t.kAdd="+",t.kSubtract="-",t.kMultiply="*",t.kDivide="/",t.kMin="min",t.kMax="max",t.kClamp="clamp",t.kInvalid=""}(ma||(ma={})),function(t){t[t.kLength=0]="kLength",t[t.kAngle=1]="kAngle",t[t.kTime=2]="kTime",t[t.kFrequency=3]="kFrequency",t[t.kResolution=4]="kResolution",t[t.kFlex=5]="kFlex",t[t.kPercent=6]="kPercent",t[t.kNumBaseTypes=7]="kNumBaseTypes"}(ga||(ga={}));var Pa=function(){function t(t,e){void 0===t&&(t=Bo.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=ga.kPercent,this.hasPercentHint=!1,this.exponents=new Array(ga.kNumBaseTypes).fill(0),t!==Bo.kNumber&&this.setExponent(Ma(t),e)}return t.prototype.applyPercentHint=function(t){Yo(t,ga.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(ga.kPercent)),this.setExponent(ga.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},t.prototype.hasNonZeroEntries=function(){return this.numNonZeroEntries>0},t.prototype.isOnlyNonZeroEntry=function(t,e){return Yo(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},t.prototype.exponent=function(t){return this.exponents[t]},t.prototype.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach((function(t){return-1*t})),t},t.prototype.matchesBaseType=function(t){return Yo(t,ga.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},t.prototype.matchesPercentage=function(){return this.isOnlyNonZeroEntry(ga.kPercent,1)},t.prototype.matchesBaseTypePercentage=function(t){return Yo(t,ga.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(ga.kPercent,1)},t.prototype.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},t.prototype.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(ga.kPercent,1)},t.add=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return!0,t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint),Ho(t.percentHint,e.percentHint);for(var r=0;r<ga.kNumBaseTypes;++r){var i=r;if(t.exponents[r]!==e.exponents[r]&&(i!==ga.kPercent&&(t.applyPercentHint(i),e.applyPercentHint(i)),t.exponents[r]!==e.exponents[r]))return!0,t}return!1,t},t.multiply=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return!0,t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<ga.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}return!1,t},t}(),xa=function(t){function e(e){var n=t.call(this)||this;return n.type_=e,n}return lt(e,t),e.fromNumberish=function(t){return"number"==typeof t?new Oa(t,Bo.kNumber):t},e.fromPercentish=function(t){return"number"==typeof t?new Oa(100*t,Bo.kPercentage):t},e.prototype.getType=function(){return ya.kUnknownType},e.prototype.equals=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=Sa(e);return r.every((function(e){return t.equals(e)}))},e.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);Na(ya.kSumType,n,this);var r=Ca(n,ma.kAdd);return r||Ua.create(n)},e.prototype.sub=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);n=n.map((function(t){return t.negate()})),Na(ya.kSumType,n,this);var r=Ca(n,ma.kAdd);return r||Ua.create(n)},e.prototype.mul=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);Na(ya.kProductType,n,this);var r=_a(n);return r||Ga.create(n)},e.prototype.div=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);n=n.map((function(t){return t.invert()})),Na(ya.kProductType,n,this);var r=_a(n);return r||Ga.create(n)},e.prototype.min=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);Na(ya.kMinType,n,this);var r=Ca(n,ma.kMin);return r||ja.create(n)},e.prototype.max=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);Na(ya.kMaxType,n,this);var r=Ca(n,ma.kMax);return r||Fa.create(n)},e.prototype.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;var n,r=Aa(e[0]);return r?(n="string"==typeof t?Oa.unitFromName(t):t,r.convertTo(n)):null},e.prototype.toSum=function(){for(var t,n,r,i,o,a,u=[],s=0;s<arguments.length;s++)u[s]=arguments[s];try{for(var c=mt(u),l=c.next();!l.done;l=c.next()){var h=l.value;if(!e.isValidUnit(e.unitFromName(h)))return null}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}var f=this.sumValue();if(!f.length)return null;var p=[];try{for(var d=mt(f),y=d.next();!y.done;y=d.next()){var v=y.value,m=Aa(v);if(!m)return null;p.push(m)}}catch(t){r={error:t}}finally{try{y&&!y.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}if(0===u.length){p.sort((function(t,e){return t.unit-e.unit}));var g=Ua.create(p);return Wo(!!g),g}var b=[],T=function(t){var n=e.unitFromName(t);Wo(e.isValidUnit(n));var r=p.reduce((function(t,e,r){if(e){var i=e.convertTo(n);i&&(t+=i.value,p[r]=null)}return t}),0);b.push(new Oa(r,n))};try{for(var E=mt(u),w=E.next();!w.done;w=E.next()){T(h=w.value)}}catch(t){o={error:t}}finally{try{w&&!w.done&&(a=E.return)&&a.call(E)}finally{if(o)throw o.error}}if(p.some((function(t){return!!t})))throw new Error("There were leftover terms that were not converted");return Ua.create(b)},e.prototype.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(ga.kLength);return e&&(t.length=e),(e=this.type_.exponent(ga.kAngle))&&(t.angle=e),(e=this.type_.exponent(ga.kTime))&&(t.time=e),(e=this.type_.exponent(ga.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(ga.kResolution))&&(t.resolution=e),(e=this.type_.exponent(ga.kFlex))&&(t.flex=e),(e=this.type_.exponent(ga.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=ka(this.type_.percentHint)),t},e.isValidUnit=function(t){return t!==Bo.kUserUnits&&!!(t===Bo.kNumber||t==Bo.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t)||this.isFrequency(t)||this.isResolution(t)||this.isFlex(t))},e.prototype.negate=function(){return Da.create(this)},e.prototype.invert=function(){return Ra.create(this)},e}(ba);function Sa(t){return t.map(xa.fromNumberish)}function Na(t,e,n){Wo(!!n),n.getType()===t?e.unshift.apply(e,bt([],gt(n.numericValues()),!1)):e.unshift(n)}function Aa(t){return 0===Object.keys(t.units).length?new Oa(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Oa(t.value,Number(Object.keys(t.units)[0])):null}function Ca(t,e){Wo(!!t.length);var n=t[0]instanceof Oa?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var o=t[i]instanceof Oa?t[i]:null;if(!o||o.unit!==n.unit)return null;e===ma.kAdd?r+=o.value:e===ma.kMax?r=Math.max(r,o.value):e===ma.kMin&&(r=Math.min(r,o.value))}return new Oa(r,n.unit)}function _a(t){Wo(!!t.length);for(var e=Bo.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof Oa?t[r]:null;if(!i)return null;if(i.unit!==Bo.kNumber){if(e!==Bo.kNumber)return null;e=i.unit}n*=i.value}return new Oa(n,e)}var Oa=function(t){function e(n,r){void 0===r&&(r=Bo.kNumber);var i,o=this;return i="string"==typeof r?e.unitFromName(r):r,Wo(e.isValidUnit(i)),(o=t.call(this,new Pa(i))||this).unit=i,o.value=n,o}return lt(e,t),e.toCanonicalUnit=function(t){return this.canonicalUnitTypeForCategory(this.unitTypeToUnitCategory(t))},e.toCanonicalUnitIfPossible=function(t){var e=this.toCanonicalUnit(t);return e===Bo.kUnknown?t:e},e.formatInfinityOrNaN=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(Wo(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},e.formatNumber=function(t,e){return void 0===e&&(e=""),t+e},e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=e.toCanonicalUnit(this.unit);if(n!==e.toCanonicalUnit(t)||n===Bo.kUnknown)return null;var r=ba.conversionToCanonicalUnitsScaleFactor(this.unit)/ba.conversionToCanonicalUnitsScaleFactor(t);return new e(this.value*r,t)},e.prototype.equals=function(t){var e=t;return this.value===e.value&&this.unit===e.unit},e.prototype.getType=function(){return ya.kUnitType},e.prototype.sumValue=function(){var t=[],n={};return this.unit!==Bo.kNumber&&(n[e.toCanonicalUnitIfPossible(this.unit)]=1),t.push({value:this.value*ba.conversionToCanonicalUnitsScaleFactor(this.unit),units:n}),t},e.prototype.negate=function(){return new e(-this.value,this.unit)},e.prototype.invert=function(){return this.unit===Bo.kNumber?0===this.value?null:new e(1/this.value,this.unit):Ra.create(this)},e.prototype.buildCSSText=function(t,n,r){var i;switch(this.unit){case Bo.kUnknown:break;case Bo.kInteger:i=Number(this.value).toFixed(0);break;case Bo.kNumber:case Bo.kPercentage:case Bo.kEms:case Bo.kQuirkyEms:case Bo.kExs:case Bo.kRems:case Bo.kChs:case Bo.kPixels:case Bo.kCentimeters:case Bo.kDotsPerPixel:case Bo.kDotsPerInch:case Bo.kDotsPerCentimeter:case Bo.kMillimeters:case Bo.kQuarterMillimeters:case Bo.kInches:case Bo.kPoints:case Bo.kPicas:case Bo.kUserUnits:case Bo.kDegrees:case Bo.kRadians:case Bo.kGradians:case Bo.kMilliseconds:case Bo.kSeconds:case Bo.kHertz:case Bo.kKilohertz:case Bo.kTurns:case Bo.kFraction:case Bo.kViewportWidth:case Bo.kViewportHeight:case Bo.kViewportInlineSize:case Bo.kViewportBlockSize:case Bo.kViewportMin:case Bo.kViewportMax:case Bo.kSmallViewportWidth:case Bo.kSmallViewportHeight:case Bo.kSmallViewportInlineSize:case Bo.kSmallViewportBlockSize:case Bo.kSmallViewportMin:case Bo.kSmallViewportMax:case Bo.kLargeViewportWidth:case Bo.kLargeViewportHeight:case Bo.kLargeViewportInlineSize:case Bo.kLargeViewportBlockSize:case Bo.kLargeViewportMin:case Bo.kLargeViewportMax:case Bo.kDynamicViewportWidth:case Bo.kDynamicViewportHeight:case Bo.kDynamicViewportInlineSize:case Bo.kDynamicViewportBlockSize:case Bo.kDynamicViewportMin:case Bo.kDynamicViewportMax:case Bo.kContainerWidth:case Bo.kContainerHeight:case Bo.kContainerInlineSize:case Bo.kContainerBlockSize:case Bo.kContainerMin:case Bo.kContainerMax:var o=this.value,a=e.unitTypeToString(this.unit);if(o<-999999||o>999999){var u=e.unitTypeToString(this.unit);i=!Number.isFinite(o)||Number.isNaN(o)?e.formatInfinityOrNaN(o,u):e.formatNumber(o,u)}else i="".concat(o).concat(a)}return r+=i},e}(xa),Ia=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.isUnitValue=function(){return!1},e}(xa),Ra=function(t){function e(e,n){var r=t.call(this,n)||this;return r.value=e,r.operator="invert",r}return lt(e,t),e.create=function(t){return new e(t,Pa.negateExponents(t.type_))},e.prototype.clone=function(){return new e(this.value,this.type_)},e.prototype.getType=function(){return ya.kInvertType},e.prototype.equals=function(t){if(t.getType()!==ya.kInvertType)return!1;var e=t;return this.value.equals(e.value)},e.prototype.sumValue=function(){var t=this.value.sumValue();return 0===t.length||1!==t.length||0===t[0].value?null:(Object.keys(t[0].units).forEach((function(e){t[0].units[e]*=-1})),t[0].value=1/t[0].value,t)},e.prototype.buildCSSText=function(t,e,n){return e==Go.kNo&&(n+=t===Uo.kYes?"(":"calc("),n+="1 / ",n=this.value.buildCSSText(Uo.kYes,Go.kNo,n),e===Go.kNo&&(n+=")"),n},e}(Ia),Da=function(t){function e(e,n){var r=t.call(this,n)||this;return r.value=e,r.operator="negate",r}return lt(e,t),e.create=function(t){return new e(t,t.type_)},e.prototype.clone=function(){return new e(this.value,this.type_)},e.prototype.getType=function(){return ya.kNegateType},e.prototype.equals=function(t){if(t.getType()!==ya.kNegateType)return!1;var e=t;return this.value.equals(e.value)},e.prototype.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach((function(t){t.value*=-1})),t)},e.prototype.buildCSSText=function(t,e,n){return e==Go.kNo&&(n+=t===Uo.kYes?"(":"calc("),n+="-",n=this.value.buildCSSText(Uo.kYes,Go.kNo,n),e===Go.kNo&&(n+=")"),n},e}(Ia);function La(t,e,n){for(var r=t[0].type_,i=1;i<t.length;i++)r=e(r,t[i].type_,!1);return r}var Va,Ba=function(t){function e(e,n){var r=t.call(this,n)||this;return r.values=e,r}return lt(e,t),e.prototype.numericValues=function(){return this.values},e.prototype.equals=function(t){return this.getType()===t.getType()&&this.values.every((function(e,n){return e.equals(t.values[n])}))},e}(Ia),ja=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="min",e}return lt(e,t),e.create=function(t){return new e(t,La(t,Pa.add))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return ya.kMinType},e.prototype.sumValue=function(){var t,e,n=this.numericValues()[0].sumValue();if(!n.length)return null;try{for(var r=mt(this.numericValues()),i=r.next();!i.done;i=r.next()){var o=i.value.sumValue();if(!o.length||JSON.stringify(o[0].units)!==JSON.stringify(n[0].units))return null;o[0].value<n[0].value&&(n=o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},e.prototype.buildCSSText=function(t,e,n){var r,i;n+="min(";var o=!0;try{for(var a=mt(this.numericValues()),u=a.next();!u.done;u=a.next()){var s=u.value;o||(n+=", "),o=!1,n=s.buildCSSText(Uo.kYes,Go.kYes,n)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n+=")"},e}(Ba),Fa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="max",e}return lt(e,t),e.create=function(t){return new e(t,La(t,Pa.add))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return ya.kMaxType},e.prototype.sumValue=function(){var t,e,n=this.numericValues()[0].sumValue();if(!n.length)return null;try{for(var r=mt(this.numericValues()),i=r.next();!i.done;i=r.next()){var o=i.value.sumValue();if(!o.length||JSON.stringify(o[0].units)!==JSON.stringify(n[0].units))return null;o[0].value<n[0].value&&(n=o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},e.prototype.buildCSSText=function(t,e,n){var r,i;n+="max(";var o=!0;try{for(var a=mt(this.numericValues()),u=a.next();!u.done;u=a.next()){var s=u.value;o||(n+=", "),o=!1,n=s.buildCSSText(Uo.kYes,Go.kYes,n)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n+=")"},e}(Ba),Ua=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="sum",e}return lt(e,t),e.create=function(t){return new e(t,La(t,Pa.add))},e.numericTypeFromUnitMap=function(t){var e=new Pa;return Object.keys(t).forEach((function(n){var r=t[n];e=Pa.multiply(e,new Pa(Number(n),r),!1),Wo(!0)})),e},e.canCreateNumericTypeFromSumValue=function(t){var e=this;Wo(!!t.length);var n=this.numericTypeFromUnitMap(t[0].units);return t.every((function(t){return Pa.add(n,e.numericTypeFromUnitMap(t.units),!1),!0}))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return ya.kSumType},e.prototype.sumValue=function(){var t=[];return this.numericValues().forEach((function(e){var n=e.sumValue();if(!n.length)return null;n.forEach((function(e){var n=t.findIndex((function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)}));-1===n?t.push(ht({},e)):t[n].value+=e.value}))})),e.canCreateNumericTypeFromSumValue(t)?t:null},e.prototype.buildCSSText=function(t,e,n){e==Go.kNo&&(n+=t===Uo.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Uo.kYes,Go.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];o.getType()===ya.kNegateType?(n+=" - ",n=o.value.buildCSSText(Uo.kYes,Go.kNo,n)):(n+=" + ",n=o.buildCSSText(Uo.kYes,Go.kNo,n))}return e===Go.kNo&&(n+=")"),n},e}(Ba),Ga=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="product",e}return lt(e,t),e.create=function(t){return new e(t,La(t,Pa.multiply))},e.multiplyUnitMaps=function(t,e){return Object.keys(e).forEach((function(n){Yo(e[n].value,0);var r=n in t?t[n].value:0;r+e[n].value===0?delete t[n]:t[n]=r+e[n].value})),t},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return ya.kProductType},e.prototype.sumValue=function(){var t=[{value:1,units:{}}];return this.numericValues().forEach((function(n){var r=n.sumValue();if(!r.length)return null;var i=[];t.forEach((function(t){r.forEach((function(n){i.push({value:t.value*n.value,units:e.multiplyUnitMaps(t.units,n.units)})}))})),t=i})),t},e.prototype.buildCSSText=function(t,e,n){e==Go.kNo&&(n+=t===Uo.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Uo.kYes,Go.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];o.getType()===ya.kInvertType?(n+=" / ",n=o.value.buildCSSText(Uo.kYes,Go.kNo,n)):(n+=" * ",n=o.buildCSSText(Uo.kYes,Go.kNo,n))}return e===Go.kNo&&(n+=")"),n},e}(Ba),za=new Oa(0,"px"),qa=new Oa(0,"deg"),Wa=function(t){function e(e,n,r,i,o){void 0===i&&(i=1),void 0===o&&(o=!1);var a=t.call(this,"rgb")||this;return a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}return lt(e,t),e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(Ta);!function(t){t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient",t[t.Pattern=3]="Pattern"}(Va||(Va={}));var Ha,Ya=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return lt(e,t),e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(t,e,n){var r="";return this.type===Va.LinearGradient?r="linear-gradient(".concat(this.value.steps.map((function(t){return t.join(",")})).join(","),")"):this.type===Va.RadialGradient?r="radial-gradient(".concat(this.value.steps.map((function(t){return t.join(",")})).join(","),")"):this.type===Va.Pattern&&(r="url(".concat(this.value.src,")")),n+r},e.prototype.getType=function(){return ya.kColorType},e}(ba),Ka=function(t){function e(e){var n=t.call(this)||this;return n.transforms=e,n.is2D=e.every((function(t){return t.is2D})),n.length=e.length,n}return lt(e,t),e.prototype.clone=function(){return new e(this.transforms)},e.prototype.getType=function(){return ya.kTransformType},e.prototype.buildCSSText=function(t,e,n){return n+""},e.prototype.toMatrix=function(){},e}(ba);!function(t){t[t.kMatrixType=0]="kMatrixType",t[t.kPerspectiveType=1]="kPerspectiveType",t[t.kRotationType=2]="kRotationType",t[t.kScaleType=3]="kScaleType",t[t.kSkewType=4]="kSkewType",t[t.kSkewXType=5]="kSkewXType",t[t.kSkewYType=6]="kSkewYType",t[t.kTranslationType=7]="kTranslationType"}(Ha||(Ha={}));var Xa=function(t){function e(e,n,r,i){var o=t.call(this,i)||this;return o.x=e,o.y=n,o.z=r,o}return lt(e,t),e.prototype.toMatrix=function(){return null},e}((function(t){this.is2D=t})),Za=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Ja(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Qa(){}var $a="\\s*([+-]?\\d+)\\s*",tu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",eu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nu=/^#([0-9a-f]{3,8})$/,ru=new RegExp("^rgb\\("+[$a,$a,$a]+"\\)$"),iu=new RegExp("^rgb\\("+[eu,eu,eu]+"\\)$"),ou=new RegExp("^rgba\\("+[$a,$a,$a,tu]+"\\)$"),au=new RegExp("^rgba\\("+[eu,eu,eu,tu]+"\\)$"),uu=new RegExp("^hsl\\("+[tu,eu,eu]+"\\)$"),su=new RegExp("^hsla\\("+[tu,eu,eu,tu]+"\\)$"),cu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function lu(){return this.rgb().formatHex()}function hu(){return this.rgb().formatRgb()}function fu(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=nu.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?pu(e):3===n?new vu(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?du(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?du(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ru.exec(t))?new vu(e[1],e[2],e[3],1):(e=iu.exec(t))?new vu(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ou.exec(t))?du(e[1],e[2],e[3],e[4]):(e=au.exec(t))?du(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=uu.exec(t))?Tu(e[1],e[2]/100,e[3]/100,1):(e=su.exec(t))?Tu(e[1],e[2]/100,e[3]/100,e[4]):cu.hasOwnProperty(t)?pu(cu[t]):"transparent"===t?new vu(NaN,NaN,NaN,0):null}function pu(t){return new vu(t>>16&255,t>>8&255,255&t,1)}function du(t,e,n,r){return r<=0&&(t=e=n=NaN),new vu(t,e,n,r)}function yu(t){return t instanceof Qa||(t=fu(t)),t?new vu((t=t.rgb()).r,t.g,t.b,t.opacity):new vu}function vu(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function mu(){return"#"+bu(this.r)+bu(this.g)+bu(this.b)}function gu(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function bu(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Tu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new wu(t,e,n,r)}function Eu(t){if(t instanceof wu)return new wu(t.h,t.s,t.l,t.opacity);if(t instanceof Qa||(t=fu(t)),!t)return new wu;if(t instanceof wu)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n<r):n===o?(r-e)/u+2:(e-n)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new wu(a,u,s,t.opacity)}function wu(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Mu(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Za(Qa,fu,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:lu,formatHex:lu,formatHsl:function(){return Eu(this).formatHsl()},formatRgb:hu,toString:hu}),Za(vu,(function(t,e,n,r){return 1===arguments.length?yu(t):new vu(t,e,n,null==r?1:r)}),Ja(Qa,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vu(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vu(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mu,formatHex:mu,formatRgb:gu,toString:gu})),Za(wu,(function(t,e,n,r){return 1===arguments.length?Eu(t):new wu(t,e,n,null==r?1:r)}),Ja(Qa,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new wu(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new wu(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new vu(Mu(t>=240?t-240:t+120,i,r),Mu(t,i,r),Mu(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var ku=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Pu=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,xu=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Su=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function Nu(t){if(void 0===t&&(t=""),"transparent"===t)return new Wa(0,0,0,0);"currentColor"===t&&(t="black");var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=function(t){var e,n=ku.exec(t);if(n){var r=parseFloat(n[1])%360*(Math.PI/180),i=(null===(e=n[2].match(Su))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[],o=gt([1,1],2),a=o[0],u=o[1],s=gt([0,0],2),c=s[0],l=s[1],h=void 0,f=void 0;r>=0&&r<.5*Math.PI?(h={x:c,y:l},f={x:a,y:u}):.5*Math.PI<=r&&r<Math.PI?(h={x:a,y:l},f={x:c,y:u}):Math.PI<=r&&r<1.5*Math.PI?(h={x:a,y:u},f={x:c,y:l}):(h={x:c,y:u},f={x:a,y:l});var p=Math.tan(r),d=p*p,y=(f.x-h.x+p*(f.y-h.y))/(d+1)+h.x,v=p*(f.x-h.x+p*(f.y-h.y))/(d+1)+h.y;return{x0:h.x,y0:h.y,x1:y,y1:v,steps:i,hash:t}}return null}(t);if(n)return new Ya(Va.LinearGradient,n)}else if("r"===e){var r=function(t){var e,n=Pu.exec(t);if(n){var r=parseFloat(n[1]),i=parseFloat(n[2]),o=parseFloat(n[3]),a=(null===(e=n[4].match(Su))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[];if(0===o){var u=n[4].match(Su);return u[u.length-1].split(":")[1]}return{x0:r,y0:i,r0:0,x1:.5,y1:.5,r1:o,steps:a,hash:t}}return null}(t);if(r){if(!Ph(r))return new Ya(Va.RadialGradient,r);t=r}}else if("p"===e){var i=function(t){var e=xu.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;case"n":n="no-repeat";break;default:n="no-repeat"}return{src:r,repetition:n,hash:t}}return null}(t);if(i)return new Ya(Va.Pattern,i)}var o=fu(t),a=[0,0,0,0];return null!==o&&(a[0]=o.r||0,a[1]=o.g||0,a[2]=o.b||0,a[3]=o.opacity),new(Wa.bind.apply(Wa,bt([void 0],gt(a),!1)))}function Au(t,e){if(t instanceof Wa&&e instanceof Wa)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(ta(e[n],0,255));return e[3]=ta(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function Cu(t,e){if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))&&"px".search(t)>=0)return new Oa(Number(e),"px");var n=[];e=e.replace(t,(function(t){return n.push(t),"U"+t}));var r="U("+t.source+")";return n.map((function(t){return new Oa(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)}))[0]}var _u=Cu.bind(null,new RegExp("px","g")),Ou=Cu.bind(null,new RegExp("%","g")),Iu=Cu.bind(null,new RegExp("px|%|em","g")),Ru=Cu.bind(null,new RegExp("deg|rad|grad|turn","g"));function Du(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,u=e.value||0;return(Oa.isLength(t.unit)||Oa.isLength(e.unit))&&(a=ju(t,i,n),u=ju(e,i,n),o="px"),(Oa.isAngle(t.unit)||Oa.isAngle(e.unit))&&(a=Lu(t),u=Lu(e),o="deg"),[a,u,function(t){return r&&(t=Math.max(t,0)),t+o}]}function Lu(t){var e=0;return t.unit===Bo.kDegrees?e=t.value:t.unit===Bo.kRadians?e=ia(Number(t.value)):t.unit===Bo.kTurns&&(e=ua(Number(t.value))),e}function Vu(t){return Ph(t)?t.split(" ").map((function(t){return Iu(t)})):t.map((function(t){return Iu(t.toString())}))}function Bu(t,e,n){if(t.length===e.length){var r=t[0].unit;return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t.map((function(t){return new Oa(t,r)})).join(" ")}]}}function ju(t,e,n){if(t.unit===Bo.kPixels)return Number(t.value);if(t.unit===Bo.kPercentage&&n){var r=n.getGeometryBounds(),i=0;return To.isEmpty(r)||(i=2*r.halfExtents[e]),Number(t.value)/100*i}return 0}function Fu(t){return t.toString()}function Uu(t){return"number"==typeof t?new Oa(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?new Oa(Number(t)):new Oa(0)}function Gu(t){return Ph(t)?t.split(" ").map(Uu):t.map(Uu)}function zu(t,e){return[t.value,e.value,Fu]}function qu(t,e){return function(n,r){return[n.value,r.value,function(n){return Fu(ta(n,t,e))}]}}function Wu(t,e){if(t.length==e.length)return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t}]}var Hu="\t\n\v\f\r   ᠎              \u2028\u2029",Yu=new RegExp("([a-z])["+Hu+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Hu+"]*,?["+Hu+"]*)+)","ig"),Ku=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Hu+"]*,?["+Hu+"]*","ig");var Xu=/[a-z]/;function Zu(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Ju(t){var e=function(t){if(!t)return null;if(Array.isArray(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(Yu,(function(t,r,i){var o=[],a=r.toLowerCase();if(i.replace(Ku,(function(t,e){e&&o.push(+e)})),"m"===a&&o.length>2&&(n.push([r].concat(o.splice(0,2))),a="l",r="m"===r?"l":"L"),"o"===a&&1===o.length&&n.push([r,o[0]]),"r"===a)n.push([r].concat(o));else for(;o.length>=e[a]&&(n.push([r].concat(o.splice(0,e[a]))),e[a]););return""})),n}(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,r=0;r<e.length;r++){var i=e[r][0];if(Xu.test(i)||["V","H","T","S"].indexOf(i)>=0){n=!0;break}}if(!n)return e;var o=[],a=0,u=0,s=0,c=0,l=0,h=e[0];"M"!==h[0]&&"m"!==h[0]||(s=a=+h[1],c=u=+h[2],l++,o[0]=["M",a,u]);r=l;for(var f=e.length;r<f;r++){var p=e[r],d=o[r-1],y=[],v=(i=p[0]).toUpperCase();if(i!==v)switch(y[0]=v,v){case"A":y[1]=p[1],y[2]=p[2],y[3]=p[3],y[4]=p[4],y[5]=p[5],y[6]=+p[6]+a,y[7]=+p[7]+u;break;case"V":y[1]=+p[1]+u;break;case"H":y[1]=+p[1]+a;break;case"M":s=+p[1]+a,c=+p[2]+u,y[1]=s,y[2]=c;break;default:for(var m=1,g=p.length;m<g;m++)y[m]=+p[m]+(m%2?a:u)}else y=e[r];switch(v){case"Z":a=+s,u=+c;break;case"H":y=["L",a=y[1],u];break;case"V":y=["L",a,u=y[1]];break;case"T":a=y[1],u=y[2];var b=Zu([d[1],d[2]],[d[3],d[4]]);y=["Q",b[0],b[1],a,u];break;case"S":a=y[y.length-2],u=y[y.length-1];var T=d.length,E=Zu([d[T-4],d[T-3]],[d[T-2],d[T-1]]);y=["C",E[0],E[1],y[1],y[2],a,u];break;case"M":s=y[y.length-2],c=y[y.length-1];break;default:a=y[y.length-2],u=y[y.length-1]}o.push(y)}return o}var Qu=2*Math.PI,$u=function(t,e,n,r,i,o,a){var u=t.x,s=t.y;return{x:r*(u*=e)-i*(s*=n)+o,y:i*u+r*s+a}},ts=function(t,e){var n=1.5707963267948966===e?.551915024494:-1.5707963267948966===e?-.551915024494:4/3*Math.tan(e/4),r=Math.cos(t),i=Math.sin(t),o=Math.cos(t+e),a=Math.sin(t+e);return[{x:r-i*n,y:i+r*n},{x:o+a*n,y:a-o*n},{x:o,y:a}]},es=function(t,e,n,r){var i=t*n+e*r;return i>1&&(i=1),i<-1&&(i=-1),(t*r-e*n<0?-1:1)*Math.acos(i)},ns=function(t){var e=t.px,n=t.py,r=t.cx,i=t.cy,o=t.rx,a=t.ry,u=t.xAxisRotation,s=void 0===u?0:u,c=t.largeArcFlag,l=void 0===c?0:c,h=t.sweepFlag,f=void 0===h?0:h,p=[];if(0===o||0===a)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];var d=Math.sin(s*Qu/360),y=Math.cos(s*Qu/360),v=y*(e-r)/2+d*(n-i)/2,m=-d*(e-r)/2+y*(n-i)/2;if(0===v&&0===m)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];o=Math.abs(o),a=Math.abs(a);var g=Math.pow(v,2)/Math.pow(o,2)+Math.pow(m,2)/Math.pow(a,2);g>1&&(o*=Math.sqrt(g),a*=Math.sqrt(g));var b=function(t,e,n,r,i,o,a,u,s,c,l,h){var f=Math.pow(i,2),p=Math.pow(o,2),d=Math.pow(l,2),y=Math.pow(h,2),v=f*p-f*y-p*d;v<0&&(v=0),v/=f*y+p*d;var m=(v=Math.sqrt(v)*(a===u?-1:1))*i/o*h,g=v*-o/i*l,b=c*m-s*g+(t+n)/2,T=s*m+c*g+(e+r)/2,E=(l-m)/i,w=(h-g)/o,M=(-l-m)/i,k=(-h-g)/o,P=es(1,0,E,w),x=es(E,w,M,k);return 0===u&&x>0&&(x-=Qu),1===u&&x<0&&(x+=Qu),[b,T,P,x]}(e,n,r,i,o,a,l,f,d,y,v,m),T=b[0],E=b[1],w=b[2],M=b[3],k=Math.abs(M)/(Qu/4);Math.abs(1-k)<1e-7&&(k=1);var P=Math.max(Math.ceil(k),1);M/=P;for(var x=0;x<P;x++)p.push(ts(w,M)),w+=M;return p.map((function(t){var e=$u(t[0],o,a,y,d,T,E),n=e.x,r=e.y,i=$u(t[1],o,a,y,d,T,E),u=i.x,s=i.y,c=$u(t[2],o,a,y,d,T,E);return{x1:n,y1:r,x2:u,y2:s,x:c.x,y:c.y}}))};function rs(t,e,n,r,i,o,a,u,s){return ns({px:t,py:e,cx:u,cy:s,rx:n,ry:r,xAxisRotation:i,largeArcFlag:o,sweepFlag:a}).reduce((function(t,e){var n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.x,u=e.y;return t.push(n,r,i,o,a,u),t}),[])}function is(t,e,n,r,i,o){return[1/3*t+2/3*n,1/3*e+2/3*r,1/3*i+2/3*n,1/3*o+2/3*r,i,o]}function os(t,e,n,r){return[t,e,n,r,n,r]}function as(t,e){"TQ".indexOf(t[0])<0&&(e.qx=null,e.qy=null);var n=t.slice(1),r=n[0],i=n[1];switch(t[0]){case"M":return e.x=r,e.y=i,t;case"A":return["C"].concat(rs.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"Q":return e.qx=r,e.qy=i,["C"].concat(is.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"L":return["C"].concat(os(e.x1,e.y1,t[1],t[2]));case"H":return["C"].concat(os(e.x1,e.y1,t[1],e.y1));case"V":return["C"].concat(os(e.x1,e.y1,e.x1,t[1]));case"Z":return["C"].concat(os(e.x1,e.y1,e.x,e.y))}return t}function us(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}var ss=Math.PI/180;function cs(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ls(t,e){return cs(t)*cs(e)?(t[0]*e[0]+t[1]*e[1])/(cs(t)*cs(e)):1}function hs(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ls(t,e))}function fs(t,e){return t[0]===e[0]&&t[1]===e[1]}function ps(t,e){var n,r,i=e[1],o=e[2],a=(n=function(t){return ss*t}(e[3]),r=2*Math.PI,(n%r+r)%r),u=e[4],s=e[5],c=t[0],l=t[1],h=e[6],f=e[7],p=Math.cos(a)*(c-h)/2+Math.sin(a)*(l-f)/2,d=-1*Math.sin(a)*(c-h)/2+Math.cos(a)*(l-f)/2,y=p*p/(i*i)+d*d/(o*o);y>1&&(i*=Math.sqrt(y),o*=Math.sqrt(y));var v=i*i*(d*d)+o*o*(p*p),m=v?Math.sqrt((i*i*(o*o)-v)/v):1;u===s&&(m*=-1),isNaN(m)&&(m=0);var g=o?m*i*d/o:0,b=i?m*-o*p/i:0,T=(c+h)/2+Math.cos(a)*g-Math.sin(a)*b,E=(l+f)/2+Math.sin(a)*g+Math.cos(a)*b,w=[(p-g)/i,(d-b)/o],M=[(-1*p-g)/i,(-1*d-b)/o],k=hs([1,0],w),P=hs(w,M);return ls(w,M)<=-1&&(P=Math.PI),ls(w,M)>=1&&(P=0),0===s&&P>0&&(P-=2*Math.PI),1===s&&P<0&&(P+=2*Math.PI),{cx:T,cy:E,rx:fs(t,[h,f])?0:i,ry:fs(t,[h,f])?0:o,startAngle:k,endAngle:k+P,xRotation:a,arcFlag:u,sweepFlag:s}}var ds=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,ys=/[^\s,]+/gi;function vs(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function ms(t){for(var e=[],n=null,r=null,i=null,o=0,a=(t=function(t){var e=t||[];return Array.isArray(e)?e:"string"==typeof e?((e=e.match(ds)).forEach((function(t,n){if((t=t.match(ys))[0].length>1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}t.forEach((function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}(t)).length,u=0;u<a;u++){var s=t[u];r=t[u+1];var c=s[0],l={command:c,prePoint:n,params:s,startTangent:null,endTangent:null};switch(c){case"M":i=[s[1],s[2]],o=u;break;case"A":var h=ps(n,s);l.arcParams=h}if("Z"===c)n=i,r=t[o+1];else{var f=s.length;n=[s[f-2],s[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),l.currentPoint=n,e[o]&&fs(n,e[o].currentPoint)&&(e[o].prePoint=l.prePoint);var p=r?[r[r.length-2],r[r.length-1]]:null;l.nextPoint=p;var d=l.prePoint;if(["L","H","V"].includes(c))l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]];else if("Q"===c){var y=[s[1],s[2]];l.startTangent=[d[0]-y[0],d[1]-y[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]]}else if("T"===c){y=vs((g=e[u-1]).currentPoint,d);"Q"===g.command?(l.command="Q",l.startTangent=[d[0]-y[0],d[1]-y[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]]):(l.command="TL",l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]])}else if("C"===c){var v=[s[1],s[2]],m=[s[3],s[4]];l.startTangent=[d[0]-v[0],d[1]-v[1]],l.endTangent=[n[0]-m[0],n[1]-m[1]],0===l.startTangent[0]&&0===l.startTangent[1]&&(l.startTangent=[v[0]-m[0],v[1]-m[1]]),0===l.endTangent[0]&&0===l.endTangent[1]&&(l.endTangent=[m[0]-v[0],m[1]-v[1]])}else if("S"===c){var g;v=vs((g=e[u-1]).currentPoint,d),m=[s[1],s[2]];"C"===g.command?(l.command="C",l.startTangent=[d[0]-v[0],d[1]-v[1]],l.endTangent=[n[0]-m[0],n[1]-m[1]]):(l.command="SQ",l.startTangent=[d[0]-m[0],d[1]-m[1]],l.endTangent=[n[0]-m[0],n[1]-m[1]])}else if("A"===c){var b=.001,T=l.arcParams||{},E=T.cx,w=void 0===E?0:E,M=T.cy,k=void 0===M?0:M,P=T.rx,x=void 0===P?0:P,S=T.ry,N=void 0===S?0:S,A=T.sweepFlag,C=void 0===A?0:A,_=T.startAngle,O=void 0===_?0:_,I=T.endAngle,R=void 0===I?0:I;0===C&&(b*=-1);var D=x*Math.cos(O-b)+w,L=N*Math.sin(O-b)+k;l.startTangent=[D-i[0],L-i[1]];var V=x*Math.cos(O+R+b)+w,B=N*Math.sin(O+R-b)+k;l.endTangent=[d[0]-V,d[1]-B]}e.push(l)}return e}function gs(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function bs(t,e){return Math.abs(t-e)<.001}function Ts(t,e){var n=Math.min.apply(Math,bt([],gt(t),!1)),r=Math.min.apply(Math,bt([],gt(e),!1));return{x:n,y:r,width:Math.max.apply(Math,bt([],gt(t),!1))-n,height:Math.max.apply(Math,bt([],gt(e),!1))-r}}function Es(t){return(t+2*Math.PI)%(2*Math.PI)}var ws={box:function(t,e,n,r){return Ts([t,n],[e,r])},length:function(t,e,n,r){return gs(t,e,n,r)},pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?gs(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?gs(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a=[n-t,r-e];if(c.exactEquals(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var u=[-a[1],a[0]];c.normalize(u,u);var s=[i-t,o-e];return Math.abs(c.dot(s,u))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Ms(t,e,n,r,i,o){var a=-1,u=1/0,s=[n,r],c=20;o&&o>200&&(c=o/10);for(var l=1/c,h=l/10,f=0;f<=c;f++){var p=f*l,d=[i.apply(void 0,bt([],gt(t.concat([p])),!1)),i.apply(void 0,bt([],gt(e.concat([p])),!1))];(g=gs(s[0],s[1],d[0],d[1]))<u&&(a=p,u=g)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}u=1/0;for(f=0;f<32&&!(h<1e-4);f++){var v=a-h,m=a+h,g=(d=[i.apply(void 0,bt([],gt(t.concat([v])),!1)),i.apply(void 0,bt([],gt(e.concat([v])),!1))],gs(s[0],s[1],d[0],d[1]));if(v>=0&&g<u)a=v,u=g;else{var b=[i.apply(void 0,bt([],gt(t.concat([m])),!1)),i.apply(void 0,bt([],gt(e.concat([m])),!1))],T=gs(s[0],s[1],b[0],b[1]);m<=1&&T<u?(a=m,u=T):h*=.5}}return{x:i.apply(void 0,bt([],gt(t.concat([a])),!1)),y:i.apply(void 0,bt([],gt(e.concat([a])),!1))}}function ks(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function Ps(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function xs(t,e,n,r){var i,o,a,u=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,c=3*e-3*t,l=[];if(bs(u,0))bs(s,0)||(i=-c/s)>=0&&i<=1&&l.push(i);else{var h=s*s-4*u*c;bs(h,0)?l.push(-s/(2*u)):h>0&&(o=(-s-(a=Math.sqrt(h)))/(2*u),(i=(-s+a)/(2*u))>=0&&i<=1&&l.push(i),o>=0&&o<=1&&l.push(o))}return l}function Ss(t,e,n,r,i,o,a,u,s){var c=ks(t,n,i,a,s),l=ks(e,r,o,u,s),h=ws.pointAt(t,e,n,r,s),f=ws.pointAt(n,r,i,o,s),p=ws.pointAt(i,o,a,u,s),d=ws.pointAt(h.x,h.y,f.x,f.y,s),y=ws.pointAt(f.x,f.y,p.x,p.y,s);return[[t,e,h.x,h.y,d.x,d.y,c,l],[c,l,y.x,y.y,p.x,p.y,a,u]]}function Ns(t,e,n,r,i,o,a,u,s){if(0===s)return function(t,e){for(var n=0,r=t.length,i=0;i<r;i++){n+=gs(t[i],e[i],t[(i+1)%r],e[(i+1)%r])}return n/2}([t,n,i,a],[e,r,o,u]);var c=Ss(t,e,n,r,i,o,a,u,.5),l=bt(bt([],gt(c[0]),!1),[s-1],!1),h=bt(bt([],gt(c[1]),!1),[s-1],!1);return Ns.apply(void 0,bt([],gt(l),!1))+Ns.apply(void 0,bt([],gt(h),!1))}var As={extrema:xs,box:function(t,e,n,r,i,o,a,u){for(var s=[t,a],c=[e,u],l=xs(t,n,i,a),h=xs(e,r,o,u),f=0;f<l.length;f++)s.push(ks(t,n,i,a,l[f]));for(f=0;f<h.length;f++)c.push(ks(e,r,o,u,h[f]));return Ts(s,c)},length:function(t,e,n,r,i,o,a,u){return Ns(t,e,n,r,i,o,a,u,3)},nearestPoint:function(t,e,n,r,i,o,a,u,s,c,l){return Ms([t,n,i,a],[e,r,o,u],s,c,ks,l)},pointDistance:function(t,e,n,r,i,o,a,u,s,c,l){var h=this.nearestPoint(t,e,n,r,i,o,a,u,s,c,l);return gs(h.x,h.y,s,c)},interpolationAt:ks,pointAt:function(t,e,n,r,i,o,a,u,s){return{x:ks(t,n,i,a,s),y:ks(e,r,o,u,s)}},divide:function(t,e,n,r,i,o,a,u,s){return Ss(t,e,n,r,i,o,a,u,s)},tangentAngle:function(t,e,n,r,i,o,a,u,s){var c=Ps(t,n,i,a,s),l=Ps(e,r,o,u,s);return Es(Math.atan2(l,c))}};function Cs(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=gs(r[0],r[1],i[0],i[1])}return e}var _s=function(t){return Cs(t)};var Os,Is,Rs,Ds,Ls;!function(t){t.GROUP="g",t.CIRCLE="circle",t.ELLIPSE="ellipse",t.IMAGE="image",t.RECT="rect",t.LINE="line",t.POLYLINE="polyline",t.POLYGON="polygon",t.TEXT="text",t.PATH="path",t.HTML="html"}(Os||(Os={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(Is||(Is={})),function(t){t.BEVEL="bevel",t.ROUND="round",t.MITER="miter"}(Rs||(Rs={})),function(t){t.CAPITALIZE="capitalize",t.UPPERCASE="uppercase",t.LOWERCASE="lowercase",t.NONE="none"}(Ds||(Ds={})),function(t){t.START="start",t.CENTER="center",t.END="end",t.LEFT="left",t.RIGHT="right"}(Ls||(Ls={}));var Vs=l.defineToken("CanvasConfig");function Bs(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function js(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?As.length.apply(As,bt([],gt(r),!1)):0;return{s:t,ss:e?i?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),a=Bs(n,r,e),u=Bs(r,i,e),s=Bs(i,o,e),c=Bs(a,u,e),l=Bs(u,s,e),h=Bs(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,s,o)]}(r):[t,t]:[t],l:i}}))}function Fs(t,e,n){var r=js(t),i=js(e),o=r.length,a=i.length,u=r.filter((function(t){return t.l})).length,s=i.filter((function(t){return t.l})).length,c=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,l=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,h=n||Math.max(o,a),f=[c,l],p=[h-o,h-a],d=0,y=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return d=n&&p[e]&&t.l>=f[e],p[e]-=d?1:0,d?t.ss:[t.s]})).flat()}));return y[0].length===y[1].length?y:Fs(y[0],y[1],h)}function Us(t){return zs(t)>=0}function Gs(t,e,n,r,i,o,a,u){return 3*((u-e)*(n+i)-(a-t)*(r+o)+r*(t-i)-n*(e-o)+u*(i+t/3)-a*(o+e/3))/20}function zs(t){var e=0,n=0,r=0,i=0,o=0;return t.map((function(t){var a;switch(t[0]){case"M":case"Z":return r="M"===t[0]?t[1]:r,i="M"===t[0]?t[2]:i,e=r,n=i,0;default:return o=Gs.apply(0,[e,n].concat(t.slice(1))),a=gt(t.slice(-2),2),e=a[0],n=a[1],o}})).reduce((function(t,e){return t+e}),0)}function qs(t){var e=t.slice(1).map((function(e,n,r){return n?r[n-1].slice(-2).concat(e.slice(1)):t[0].slice(1).concat(e.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map((function(t){return["C"].concat(t.slice(2))})))}function Ws(t){return t.map((function(t){return Array.isArray(t)?Ws(t):Number.isNaN(+t)?t:+t}))}function Hs(t,e){var n=t.length-1,r=[],i=0,o=function(t){var e=t.length,n=e-1;return t.map((function(r,i){return t.map((function(r,o){var a,u=i+o;return 0===o||t[u]&&"M"===t[u][0]?(a=t[u],["M"].concat(a.slice(-2))):(u>=e&&(u-=n),t[u])}))}))}(t);return o.forEach((function(o,a){t.slice(1).forEach((function(r,o){i+=function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}(t[(a+o)%n].slice(-2),e[o%n].slice(-2))})),r[a]=i,i=0})),o[r.indexOf(Math.min.apply(null,r))]}function Ys(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,u=n-t,s=n+t,c=r-e,l=r+e;return[["M",u,r],["C",u,r-a,n-o,c,n,c],["C",n+o,c,s,r-a,s,r],["C",s,r+a,n+o,l,n,l],["C",n-o,l,u,r+a,u,r],["Z"]]}function Ks(t){var e=t.getLocalTransform(),n=(t.style.anchor,[]);switch(t.nodeName){case Os.LINE:var r=t.parsedStyle,i=r.x1,o=r.y1,u=r.x2,s=r.y2;n=function(t,e,n,r){return[["M",t,e],["L",n,r]]}(i.value,o.value,u.value,s.value);break;case Os.CIRCLE:var c=t.parsedStyle,l=c.r,h=c.x,f=c.y;n=Ys(l.value,l.value,h.value,f.value);break;case Os.ELLIPSE:var p=t.parsedStyle,d=p.rx,y=p.ry,v=p.x,m=p.y;n=Ys(d.value,y.value,v.value,m.value);break;case Os.POLYLINE:case Os.POLYGON:n=function(t){return t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}))}(t.parsedStyle.points.points);break;case Os.RECT:var g=t.parsedStyle,b=g.width,T=g.height,E=g.x,w=g.y,M=g.radius;n=function(t,e,n,r,i){return i?[["M",n,i+r],["A",i,i,0,0,1,i+n,r],["L",t-i+n,r],["A",i,i,0,0,1,t+n,i+r],["L",t+n,e-i+r],["A",i,i,0,0,1,t-i+n,e+r],["L",i+n,e+r],["A",i,i,0,0,1,n,e-i+r],["Z"]]:[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(b.value,T.value,E.value,w.value,(null==M?void 0:M.value)||0);break;case Os.PATH:n=t.parsedStyle.path.curve}if(n.length)return function(t,e,n,r){var i=r.defX,o=void 0===i?0:i,u=r.defY,s=void 0===u?0:u;return t.reduce((function(t,n){var r="";if("M"===n[0]||"L"===n[0]){var i=a.fromValues(n[1]-o,n[2]-s,0);a.transformMat4(i,i,e),r="".concat(n[0]).concat(i[0],",").concat(i[1])}else if("Z"===n[0])r=n[0];else if("C"===n[0]){var u=a.fromValues(n[1]-o,n[2]-s,0),c=a.fromValues(n[3]-o,n[4]-s,0),l=a.fromValues(n[5]-o,n[6]-s,0);a.transformMat4(u,u,e),a.transformMat4(c,c,e),a.transformMat4(l,l,e),r="".concat(n[0]).concat(u[0],",").concat(u[1],",").concat(c[0],",").concat(c[1],",").concat(l[0],",").concat(l[1])}else if("A"===n[0]){var h=a.fromValues(n[6]-o,n[7]-s,0);a.transformMat4(h,h,e),r="".concat(n[0]).concat(n[1],",").concat(n[2],",").concat(n[3],",").concat(n[4],",").concat(n[5],",").concat(h[0],",").concat(h[1])}return t+r}),"")}(n,e,0,t.parsedStyle)}function Xs(t){var e=Ju(t),n=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=e.slice(),i=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}r.length>0&&n.push(r);return{polygons:e,polylines:n}}(r),o=i.polygons,a=i.polylines,u=gt(function(t,e){void 0===e&&(e=!1);for(var n,r,i=Ju(t),o={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},a=[],u="",s=i.length,c=[],l=0;l<s;l+=1)i[l]&&(u=i[l][0]),a[l]=u,i[l]=as(i[l],o),us(i,a,l),s=i.length,"Z"===u&&c.push(l),r=(n=i[l]).length,o.x1=+n[r-2],o.y1=+n[r-1],o.x2=+n[r-4]||o.x1,o.y2=+n[r-3]||o.y1;return e?[i,c]:i}(r,!0),2),s=u[0],c=u[1],l=ms(r),h=function(t){var e,n,r,i,o=0,a=0,u=[];if(!t)return{curveSegments:[],totalLength:o};if(t.forEach((function(e,n){r=t[n+1],i=e.length,r&&(o+=As.length(e[i-2],e[i-1],r[1],r[2],r[3],r[4],r[5],r[6])||0)})),0===o)return{curveSegments:[],totalLength:o};return t.forEach((function(s,c){r=t[c+1],i=s.length,r&&((e=[])[0]=a/o,n=As.length(s[i-2],s[i-1],r[1],r[2],r[3],r[4],r[5],r[6]),a+=n||0,e[1]=a/o,u.push(e))})),{curveSegments:u,totalLength:o}}(s);return{absolutePath:e,hasArc:n,segments:l,polygons:o,polylines:a,curve:s,totalLength:h.totalLength,curveSegments:h.curveSegments,zCommandIndexes:c,rect:Zs(s)}}function Zs(t){var e=0,n=0,r=[],i=[];t.forEach((function(t){var o=gt(t.slice(-2),2),a=o[0],u=o[1];if("M"===t[0])e=a,n=u,r.push(a),i.push(u);else if("C"===t[0]){var s=As.box.apply(As,bt([],gt([e,n].concat(t.slice(1))),!1));r=r.concat(s.x,s.x+s.width),i=i.concat(s.y,s.y+s.height),e=a,n=u}}));var o=Math.min.apply(0,r),a=Math.min.apply(0,i),u=Math.max.apply(0,r),s=Math.max.apply(0,i);return new Io(o,a,u-o,s-a)}function Js(t,e,n){var r=t.curve,i=e.curve,o=[r,i];r.length!==i.length&&(o=Fs(r,i));var a=Us(o[0])!==Us(o[1])?qs(o[0]):Ws(o[0]);return[a,Hs(o[1],a),function(t){return t}]}function Qs(t){if(Ph(t))return null;var e,n,r=[],i=0,o=_s(t);return t.forEach((function(a,u){t[u+1]&&((e=[0,0])[0]=i/o,n=ws.length(a[0],a[1],t[u+1][0],t[u+1][1]),i+=n,e[1]=i/o,r.push(e))})),{points:t,totalLength:o,segments:r}}var $s=Cu.bind(null,/deg|rad|grad|turn|px|%/g),tc=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function ec(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,tc.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return $s(t)||Nu(t)}))}),n.lastIndex===t.length)return r}return[]}var nc,rc=l.defineToken("GeometryUpdaterFactory"),ic=l.defineToken("GeometryAABBUpdater"),oc=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return lt(e,t),e}(zo),ac=":",uc=function(){function t(){this.emitter=new st.EventEmitter}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=Qo(n)&&n||$o(n)&&n.capture,i=$o(n)&&n.once,o=Jo(e)?void 0:e,a=!1,u="";if(t.indexOf(ac)>-1){var s=gt(t.split(ac),2),c=s[0];t=s[1],u=c,a=!0}if(t=r?"".concat(t,"capture"):t,e=Jo(e)?e:e.handleEvent,a){var l=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(null===(t=e[0].target)||void 0===t?void 0:t.name)===u&&l.apply(void 0,bt([],gt(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=Qo(n)&&n||$o(n)&&n.capture,i=Jo(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=Jo(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new oc(t,e))},t.prototype.dispatchEvent=function(t){var e,n;if(!(t instanceof zo))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var r=this.ownerDocument||this.document;return r&&(t.manager=(null===(e=r.defaultView)||void 0===e?void 0:e.getEventService())||null,t.defaultPrevented=!1,t.path=[],t.target=this,null===(n=t.manager)||void 0===n||n.dispatchEvent(t)),!t.defaultPrevented},t}(),sc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return lt(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===Os.TEXT&&(n+=this.style.text);try{for(var r=mt(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===Os.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach((function(t){e.removeChild(t,!0)})),this.nodeName===Os.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw new Error("Method not implemented.")},e.prototype.lookupNamespaceURI=function(t){throw new Error("Method not implemented.")},e.prototype.lookupPrefix=function(t){throw new Error("Method not implemented.")},e.prototype.normalize=function(){throw new Error("Method not implemented.")},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(t){var n;if(t===this)return 0;if(!(t instanceof e))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var r=t,i=this,o=[r],a=[i];null!==(n=r.parentNode)&&void 0!==n?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var u=o.length>a.length?o:a,s=u===o?a:o;if(u[u.length-s.length]===s[0])return u===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var c=u.length-s.length,l=s.length-1;l>=0;l--){var h=s[l],f=u[c+l];if(f!==h){var p=h.parentNode.childNodes;return p.indexOf(h)<p.indexOf(f)?s===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING:u===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t){t(this)||this.childNodes.forEach((function(e){e.forEach(t)}))},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(uc),cc=function(){function t(){}return t.tag="c-geometry",t}(),lc=function(){function t(){this.boundsDirty=!0,this.renderBoundsDirty=!0,this.dirty=!1}return t.tag="c-renderable",t}(),hc=function(){function t(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=a.fromValues(0,0,0),this.localRotation=s.fromValues(0,0,0,1),this.localScale=a.fromValues(1,1,1),this.localTransform=o.create(),this.position=a.fromValues(0,0,0),this.rotation=s.fromValues(0,0,0,1),this.scaling=a.fromValues(1,1,1),this.worldTransform=o.create(),this.origin=a.fromValues(0,0,0)}return t.tag="c-transform",t}();!function(t){t[t.Standard=0]="Standard"}(nc||(nc={}));var fc=function(){function t(){this.strategy=nc.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return t.prototype.isCulled=function(){return this.enable&&!this.visible},t.tag="c-cullable",t}(),pc=function(){function t(){this.dirty=!1,this.renderOrder=0}return t.tag="c-sortable",t}(),dc=0,yc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sceneGraphService=ot.get(Jh),e.entity=dc++,e.renderable=new lc,e.cullable=new fc,e.transformable=new hc,e.sortable=new pc,e.geometry=new cc,e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return lt(e,t),e.isElement=function(t){return!!t.getAttribute},Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter((function(t){return""!==t}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw new Error("Method not implemented.")},e.prototype.appendChild=function(t,e){return this.sceneGraphService.attach(t,this,e),this.emit(ko.CHILD_INSERTED,{child:t}),t.dispatchEvent(new qo(ko.INSERTED,this,"","","",0,"","")),t},e.prototype.insertBefore=function(t,e){if(e){var n=this.childNodes.indexOf(e);this.appendChild(t,n-1)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e,n){var r=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,r),e},e.prototype.removeChild=function(t,e){return void 0===e&&(e=!0),t.dispatchEvent(new qo(ko.REMOVED,this,"","","",0,"","")),e&&(t.emit(ko.DESTROY,{}),t.destroyed=!0),this.emit(ko.CHILD_REMOVED,{child:t}),this.sceneGraphService.detach(t),e&&t.emitter.removeAllListeners(),t},e.prototype.removeChildren=function(t){var e=this;void 0===t&&(t=!0),this.childNodes.slice().forEach((function(n){e.removeChild(n,t)}))},e.prototype.matches=function(t){return this.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return this.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return this.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return this.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return this.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.prototype.find=function(t){var e=this,n=null;return this.forEach((function(r){return!(r===e||!t(r))&&(n=r,!0)})),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach((function(r){r!==e&&t(r)&&n.push(r)})),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach((function(e,n){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(e,r+n+1)}))}},e.prototype.before=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this),i=gt(e),o=i[0],a=i.slice(1);this.parentNode.appendChild(o,r),(t=o).after.apply(t,bt([],gt(a),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,bt([],gt(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e){return t.appendChild(e)}))},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e,n){return t.appendChild(e,n)}))},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,bt([],gt(t),!1))},e.prototype.remove=function(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},e.prototype.destroy=function(){this.emit(ko.DESTROY,{}),this.remove(!1),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return this.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return this.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return this.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return this.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return this.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(t){var e=gt(_h(t.toString(),""),1)[0],n=this.attributes[e];return Xo(n)?null:n},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){void 0===n&&(n=!1),this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.getAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.getAttributeNodeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.hasAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.removeAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.removeAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.setAttributeNS=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.setAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.setAttributeNodeNS=function(t){throw new Error("Method not implemented.")},e.prototype.toggleAttribute=function(t,e){throw new Error("Method not implemented.")},e}(sc),vc=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return lt(e,t),e}(zo),mc=0,gc=function(){function t(t,e){this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(mc++),this._inEffect=!!this.effect.update(0),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(new Error)}})),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(new Error)}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),t=Number(t),isNaN(t))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this.totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){var t;return Number(null===(t=this.effect)||void 0===t?void 0:t.getComputedTiming().endTime)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this.totalDuration:0,this._startTime=this.totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else{if(!(this.totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this.totalDuration}},t.prototype.persist=function(){throw new Error("Method not implemented.")},t.prototype.addEventListener=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.removeEventListener=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.dispatchEvent=function(t){throw new Error("Method not implemented.")},t.prototype.commitStyles=function(){throw new Error("Method not implemented.")},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this.totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new vc(null,this,this.currentTime,t);setTimeout((function(){e.onfinish&&e.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new vc(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}();function bc(t,e){return Number(t.id)-Number(e.id)}var Tc=function(){function t(t){var e=this;this.document=t,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(bc),e.animations=e.tick(t,!0,e.animations)[0],n.forEach((function(e){e[1](t)})),e.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t){var e=new gc(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(bc),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)})),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF((function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()}))},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],u=[],s=[],c=[];return n.forEach((function(n){n.tick(t,e),n._inEffect?(u.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?s.push(n):c.push(n)})),(r=this.pendingEffects).push.apply(r,bt([],gt(a),!1)),(i=this.pendingEffects).push.apply(i,bt([],gt(u),!1)),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[s,c]},t}(),Ec="function"==typeof Float32Array,wc=function(t,e){return 1-3*e+3*t},Mc=function(t,e){return 3*e-6*t},kc=function(t){return 3*t},Pc=function(t,e,n){return((wc(e,n)*t+Mc(e,n))*t+kc(e))*t},xc=function(t,e,n){return 3*wc(e,n)*t*t+2*Mc(e,n)*t+kc(e)},Sc=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=Ec?new Float32Array(11):new Array(11),o=0;o<11;++o)i[o]=Pc(.1*o,t,n);var a=function(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=.1;--o;var a=r+.1*((e-i[o])/(i[o+1]-i[o])),u=xc(a,t,n);return u>=.001?function(t,e,n,r){for(var i=0;i<4;++i){var o=xc(e,n,r);if(0===o)return e;e-=(Pc(e,n,r)-t)/o}return e}(e,a,t,n):0===u?a:function(t,e,n,r,i){var o,a,u=0;do{(o=Pc(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&++u<10);return a}(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:Pc(a(t),e,r)}},Nc=function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-".concat(t.toLowerCase())}))).charAt(0)?t.substr(1):t},Ac=function(t,e,n){return Math.min(Math.max(t,e),n)},Cc=function(t){return Math.pow(t,2)},_c=function(t){return Math.pow(t,3)},Oc=function(t){return Math.pow(t,4)},Ic=function(t){return Math.pow(t,5)},Rc=function(t){return Math.pow(t,6)},Dc=function(t){return 1-Math.cos(t*Math.PI/2)},Lc=function(t){return 1-Math.sqrt(1-t*t)},Vc=function(t){return t*t*(3*t-2)},Bc=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},jc=function(t,e){void 0===e&&(e=[]);var n=gt(e,2),r=n[0],i=void 0===r?1:r,o=n[1],a=void 0===o?.5:o,u=Ac(Number(i),1,10),s=Ac(Number(a),.1,2);return 0===t||1===t?t:-u*Math.pow(2,10*(t-1))*Math.sin((t-1-s/(2*Math.PI)*Math.asin(1/u))*(2*Math.PI)/s)},Fc=function(t,e,n){void 0===e&&(e=[]);var r=gt(e,4),i=r[0],o=void 0===i?1:i,a=r[1],u=void 0===a?100:a,s=r[2],c=void 0===s?10:s,l=r[3],h=void 0===l?0:l;o=Ac(o,.1,1e3),u=Ac(u,.1,1e3),c=Ac(c,.1,1e3),h=Ac(h,.1,1e3);var f=Math.sqrt(u/o),p=c/(2*Math.sqrt(u*o)),d=p<1?f*Math.sqrt(1-p*p):0,y=p<1?(p*f-h)/d:-h+f,v=n?n*t/1e3:t;return v=p<1?Math.exp(-v*p*f)*(1*Math.cos(d*v)+y*Math.sin(d*v)):(1+y*v)*Math.exp(-v*f),0===t||1===t?t:1-v},Uc=(new Map,function(t,e){void 0===e&&(e=[]);var n=gt(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(Ac(t,0,1)*i)/i}),Gc=function(t,e){void 0===e&&(e=[]);var n=gt(e,4),r=n[0],i=n[1],o=n[2],a=n[3];return Sc(r,i,o,a)(t)},zc=Sc(.42,0,1,1),qc=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},Wc=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},Hc=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},Yc={steps:Uc,"step-start":function(t){return Uc(t,[1,"start"])},"step-end":function(t){return Uc(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Gc,ease:function(t){return Gc(t,[.25,.1,.25,1])},in:zc,out:qc(zc),"in-out":Wc(zc),"out-in":Hc(zc),"in-quad":Cc,"out-quad":qc(Cc),"in-out-quad":Wc(Cc),"out-in-quad":Hc(Cc),"in-cubic":_c,"out-cubic":qc(_c),"in-out-cubic":Wc(_c),"out-in-cubic":Hc(_c),"in-quart":Oc,"out-quart":qc(Oc),"in-out-quart":Wc(Oc),"out-in-quart":Hc(Oc),"in-quint":Ic,"out-quint":qc(Ic),"in-out-quint":Wc(Ic),"out-in-quint":Hc(Ic),"in-expo":Rc,"out-expo":qc(Rc),"in-out-expo":Wc(Rc),"out-in-expo":Hc(Rc),"in-sine":Dc,"out-sine":qc(Dc),"in-out-sine":Wc(Dc),"out-in-sine":Hc(Dc),"in-circ":Lc,"out-circ":qc(Lc),"in-out-circ":Wc(Lc),"out-in-circ":Hc(Lc),"in-back":Vc,"out-back":qc(Vc),"in-out-back":Wc(Vc),"out-in-back":Hc(Vc),"in-bounce":Bc,"out-bounce":qc(Bc),"in-out-bounce":Wc(Bc),"out-in-bounce":Hc(Bc),"in-elastic":jc,"out-elastic":qc(jc),"in-out-elastic":Wc(jc),"out-in-elastic":Hc(jc),spring:Fc,"spring-in":Fc,"spring-out":qc(Fc),"spring-in-out":Wc(Fc),"spring-out-in":Hc(Fc)},Kc=function(t){return Yc[function(t){return Nc(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||Yc.linear},Xc=function(t){return t};function Zc(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var Jc="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Qc=new RegExp("cubic-bezier\\("+Jc+","+Jc+","+Jc+","+Jc+"\\)"),$c=/steps\(\s*(\d+)\s*\)/,tl=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function el(t){var e=Qc.exec(t);if(e)return Sc.apply(void 0,bt([],gt(e.slice(1).map(Number)),!1));var n=$c.exec(t);if(n)return Zc(Number(n[1]),0);var r=tl.exec(t);return r?Zc(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):Kc(t)}function nl(t){return Math.abs(function(t){var e;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(t)/(t.playbackRate||1))}function rl(t,e,n){var r=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),i=function(t,e,n,r,i){switch(r){case 1:return"backwards"===e||"both"===e?0:null;case 3:return n-i;case 2:return"forwards"===e||"both"===e?t:null;case 0:return null}}(t,n.fill,e,r,n.delay);if(null===i)return null;var o="auto"===n.duration?0:n.duration,a=function(t,e,n,r,i){var o=i;return 0===t?1!==e&&(o+=n):o+=r/t,o}(o,r,n.iterations,i,n.iterationStart),u=function(t,e,n,r,i,o){var a=t===1/0?e%1:t%1;return 0!==a||2!==n||0===r||0===i&&0!==o||(a=1),a}(a,n.iterationStart,r,n.iterations,i,o),s=function(t,e,n,r){return 2===t&&e===1/0?1/0:1===n?Math.floor(r)-1:Math.floor(r)}(r,n.iterations,u,a),c=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,s,u);return n.currentIteration=s,n.progress=c,n.easingFunction(c)}var il={in:"ease-in",out:"ease-out","in-out":"ease-in-out","in-sine":"cubic-bezier(0.47, 0, 0.745, 0.715)","out-sine":"cubic-bezier(0.39, 0.575, 0.565, 1)","in-out-sine":"cubic-bezier(0.445, 0.05, 0.55, 0.95)","in-quad":"cubic-bezier(0.55, 0.085, 0.68, 0.53)","out-quad":"cubic-bezier(0.25, 0.46, 0.45, 0.94)","in-out-quad":"cubic-bezier(0.455, 0.03, 0.515, 0.955)","in-cubic":"cubic-bezier(0.55, 0.055, 0.675, 0.19)","out-cubic":"cubic-bezier(0.215, 0.61, 0.355, 1)","in-out-cubic":"cubic-bezier(0.645, 0.045, 0.355, 1)","in-quart":"cubic-bezier(0.895, 0.03, 0.685, 0.22)","out-quart":"cubic-bezier(0.165, 0.84, 0.44, 1)","in-out-quart":"cubic-bezier(0.77, 0, 0.175, 1)","in-quint":"cubic-bezier(0.755, 0.05, 0.855, 0.06)","out-quint":"cubic-bezier(0.23, 1, 0.32, 1)","in-out-quint":"cubic-bezier(0.86, 0, 0.07, 1)","in-expo":"cubic-bezier(0.95, 0.05, 0.795, 0.035)","out-expo":"cubic-bezier(0.19, 1, 0.22, 1)","in-out-expo":"cubic-bezier(1, 0, 0, 1)","in-circ":"cubic-bezier(0.6, 0.04, 0.98, 0.335)","out-circ":"cubic-bezier(0.075, 0.82, 0.165, 1)","in-out-circ":"cubic-bezier(0.785, 0.135, 0.15, 0.86)","in-back":"cubic-bezier(0.6, -0.28, 0.735, 0.045)","out-back":"cubic-bezier(0.175, 0.885, 0.32, 1.275)","in-out-back":"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},ol=(Object.keys(il),function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Xc,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=el(t),this._easing=t},enumerable:!1,configurable:!0}),t}());function al(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}return e.sort((function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)})),e}(t));for(var n=t.map((function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(i=Number(i),!isFinite(i))throw new Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw new Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(null!=a){if(a<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}else r=!1}return n=n.filter((function(t){return Number(t.offset)>=0&&Number(t.offset)<=1})),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var u=Number(n[a].computedOffset);if(null!=u&&null!=o){for(var s=1;s<a-i;s++)n[i+s].computedOffset=o+(u-o)*s/(a-i);i=a,o=u}}}(),n}var ul="backwards|forwards|both|none".split("|"),sl="reverse|alternate|alternate-reverse".split("|");function cl(t,e){var n=new ol;return e&&(n.fill="both",n.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(e){if(void 0!==t[e]&&null!==t[e]&&"auto"!==t[e]){if(("number"==typeof n[e]||"duration"===e)&&("number"!=typeof t[e]||isNaN(t[e])))return;if("fill"===e&&-1===ul.indexOf(t[e]))return;if("direction"===e&&-1===sl.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function ll(t,e){return cl(t=hl(null!=t?t:{duration:"auto"}),e)}function hl(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var fl,pl,dl=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=ll(n,!1),this.timing.effect=this,this.timing.activeDuration=nl(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=al(e,this.timing),this.interpolations=xh(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=rl(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=al(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach((function(n){e.timing=t[n]}))},t}(),yl={x:"",y:"",z:"",anchor:[0,0],opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transformOrigin:"",visibility:"",pointerEvents:"",lineCap:"",lineJoin:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:""},vl=function(t){function e(e){var n,r,i,o=this;return(o=t.call(this)||this).styleValueRegistry=ot.get(hh),o.activeAnimations=[],o.config=e,o.config.interactive=null!==(n=o.config.capture)&&void 0!==n?n:o.config.interactive,o.id=o.config.id||"",o.name=o.config.name||"",(o.config.className||o.config.class)&&(o.className=o.config.className||o.config.class),o.nodeName=o.config.type||Os.GROUP,o.config.style=ht(ht(ht(ht({},yl),{zIndex:null!==(r=o.config.zIndex)&&void 0!==r?r:0,interactive:null===(i=o.config.interactive)||void 0===i||i}),o.config.style),o.config.attrs),null!=o.config.visible&&(o.config.style.visibility=!1===o.config.visible?"hidden":"visible"),null!=o.config.interactive&&(o.config.style.pointerEvents=!1===o.config.interactive?"none":"auto"),o.style=new Proxy(ht(ht({},o.attributes),{setProperty:function(t,e){o.setAttribute(t,e)},getPropertyValue:function(t){return o.getAttribute(t)},removeProperty:function(t){o.removeAttribute(t)},item:function(){return""}}),{get:function(t,e){return e in t?t[e]:o.getAttribute(e)},set:function(t,e,n){return o.setAttribute(e,n),!0}}),o.initAttributes(o.config.style),ot.get(Tt).add(o.entity,o),o}return lt(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),ot.get(Tt).remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},e.prototype.cloneNode=function(t){var e=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:ht({},this.attributes)});return t&&this.children.forEach((function(n){var r=n.cloneNode(t);e.appendChild(r)})),e},e.prototype.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable;this.styleValueRegistry.processProperties(this,t),e.dirty=!0},e.prototype.setAttribute=function(e,n,r){void 0===r&&(r=!1);var i=gt(_h(e,n),2),o=i[0],a=i[1];Ko(n)||(r||a!=this.attributes[o])&&(this.internalSetAttribute(o,a),t.prototype.setAttribute.call(this,o,a))},e.prototype.internalSetAttribute=function(t,e,n){var r,i=this;void 0===n&&(n={});var o=this.renderable,a=this.attributes[t],u=this.parsedStyle[t];this.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&this.attributes.clipPathTargets.forEach((function(t){Xh(t),t.dispatchEvent(new qo(ko.ATTR_MODIFIED,t,i,i,"clipPath",qo.MODIFICATION,i,i))})),o.dirty=!0,this.dispatchEvent(new qo(ko.ATTR_MODIFIED,this,a,e,t,qo.MODIFICATION,u,this.parsedStyle[t]))},e.prototype.getBBox=function(){var t=this.getBounds(),e=gt(t.getMin(),2),n=e[0],r=e[1],i=gt(t.getMax(),2),o=i[0],a=i[1];return new Io(n,r,o-n,a-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setOrigin(this,na(t,e,n)),this},e.prototype.getOrigin=function(){return this.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setPosition(this,na(t,e,n)),this.syncLocalPosition(),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setLocalPosition(this,na(t,e,n)),this.syncLocalPosition(),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translate(this,na(t,e,n)),this.syncLocalPosition(),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translateLocal(this,na(t,e,n)),this.syncLocalPosition(),this},e.prototype.getPosition=function(){return this.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return this.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=na(t,e=e||t,n=n||t)),this.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=na(t,e=e||t,n=n||t)),this.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return this.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return this.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){var t=gt(ha(a.create(),this.sceneGraphService.getWorldTransform(this)),3);t[0],t[1];return ia(t[2])},e.prototype.getLocalEulerAngles=function(){var t=gt(ha(a.create(),this.sceneGraphService.getLocalRotation(this)),3);t[0],t[1];return ia(t[2])},e.prototype.setEulerAngles=function(t){return this.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return this.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return Xo(e)&&Xo(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return Xo(e)&&Xo(n)?this.sceneGraphService.rotate(this,0,0,t):this.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return this.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return this.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.getRotation=function(){return this.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return this.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalTransform=function(){return this.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return this.sceneGraphService.getWorldTransform(this)},e.prototype.resetLocalTransform=function(){this.sceneGraphService.resetLocalTransform(this)},e.prototype.syncLocalPosition=function(){var t=this.getLocalPosition();this.attributes.x=t[0],this.attributes.y=t[1],this.attributes.z=t[2],this.parsedStyle.x=new Oa(this.attributes.x,"px"),this.parsedStyle.y=new Oa(this.attributes.y,"px"),this.parsedStyle.z=new Oa(this.attributes.z,"px")},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r,i=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&(i=null===(r=this.attributes.clipPathTargets[0].ownerDocument)||void 0===r?void 0:r.timeline);return delete this.parsedStyle.transform,i?i.play(new dl(this,t,e)):null},e.prototype.show=function(){this.style.visibility="visible"},e.prototype.hide=function(){this.style.visibility="hidden"},e.prototype.isVisible=function(){var t,e;return"visible"===(null===(e=null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)||void 0===e?void 0:e.value)},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var t,e;return"none"!==(null===(e=null===(t=this.parsedStyle)||void 0===t?void 0:t.pointerEvents)||void 0===e?void 0:e.value)},e.prototype.isCulled=function(){return!(!this.cullable||!this.cullable.isCulled())},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,bt([],gt(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,bt([],gt(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))),!1))-1),this},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.getClip=function(){return this.style.clipPath||null},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=gt(e,2),i=r[0],o=r[1];return i?$o(i)?(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e.prototype.getMatrix=function(t){var e=t||this.getWorldTransform(),n=gt(o.getTranslation(a.create(),e),2),r=n[0],i=n[1],u=gt(o.getScaling(a.create(),e),2),c=u[0],l=u[1],h=o.getRotation(s.create(),e),f=gt(ha(a.create(),h),3),p=f[0],d=(f[1],f[2]);return fa(p||d,r,i,c,l)},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=gt(da(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setEulerAngles(a).setPosition(n,r).setLocalScale(i,o)},e.prototype.setLocalMatrix=function(t){var e=gt(da(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setLocalEulerAngles(a).setLocalPosition(n,r).setLocalScale(i,o)},e}(yc),ml=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.handleMounted=function(t){t.target===t.currentTarget&&n.connectedCallback&&n.connectedCallback()},n.handleUnmounted=function(t){t.target===t.currentTarget&&n.disconnectedCallback&&n.disconnectedCallback()},n.handleAttributeChanged=function(t){if(t.target===n){var e=t.attrName,r=t.prevValue,i=t.newValue;n.attributeChangedCallback&&n.attributeChangedCallback(e,r,i)}},n.attributeChangedCallback&&n.addEventListener(ko.ATTR_MODIFIED,n.handleAttributeChanged),n.connectedCallback&&n.addEventListener(ko.MOUNTED,n.handleMounted),n.disconnectedCallback&&n.addEventListener(ko.UNMOUNTED,n.handleUnmounted),n}return lt(e,t),e}(vl),gl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.CIRCLE,style:ht({r:"",anchor:[.5,.5],transformOrigin:"center",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(vl),bl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.ELLIPSE,style:ht({rx:"",ry:"",anchor:[.5,.5],transformOrigin:"center",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(vl),Tl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.GROUP,style:ht({width:"",height:""},n)},r))||this}return lt(e,t),e}(vl),El=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.IMAGE,style:ht({img:"",width:"",height:"",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(vl),wl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.LINE,style:ht({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,lineWidth:1,isBillboard:!1},n)},r))||this}return lt(e,t),e.prototype.getPoint=function(t){var e=this.parsedStyle,n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=ws.pointAt(n.value,r.value,i.value,o.value,t);return new Oo(a.x,a.y)},e.prototype.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,i=t.y2;return ws.length(e.value,n.value,r.value,i.value)},e}(vl),Ml=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.PATH,style:ht({path:"",lineWidth:1,miterLimit:4},n)},r))||this}return lt(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.path.totalLength},e.prototype.getPoint=function(t){var e=0,n=0,r=this.parsedStyle.path.curve;if(!this.parsedStyle.path.curveSegments.length)return r?new Oo(r[0][1],r[0][2]):null;this.parsedStyle.path.curveSegments.forEach((function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}));var i=r[n];if(Xo(i)||Xo(n))return null;var o=i.length,a=r[n+1],u=As.pointAt(i[o-2],i[o-1],a[1],a[2],a[3],a[4],a[5],a[6],e),s=u.x,c=u.y;return new Oo(s,c)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?(e.push([n[0]-i[0],n[1]-i[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?(n.push([i[0]-o[0],i[1]-o[1]]),n.push([i[0],i[1]])):(n.push([r[0],r[1]]),n.push([i[0],i[1]]))}return n},e}(vl),kl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.POLYGON,style:ht({points:[],miterLimit:4,lineWidth:1},n)},r))||this}return lt(e,t),e}(vl),Pl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.POLYLINE,style:ht({points:[],lineWidth:1,miterLimit:4},n)},r))||this}return lt(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPoint=function(t){var e=this.parsedStyle.points,n=e.points,r=e.segments,i=0,o=0;r.forEach((function(e,n){t>=e[0]&&t<=e[1]&&(i=(t-e[0])/(e[1]-e[0]),o=n)}));var a=ws.pointAt(n[o][0],n[o][1],n[o+1][0],n[o+1][1],i),u=a.x,s=a.y;return new Oo(u,s)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(vl),xl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.RECT,style:ht({width:"",height:"",radius:"",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(vl),Sl=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=ft(e,["style"]);return(n=t.call(this,ht({type:Os.TEXT,style:ht({text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",stroke:"black",letterSpacing:0,lineHeight:0,lineWidth:0,miterLimit:10,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0},r)},i))||this).LENGTHADJUST_SPACING=1,n.LENGTHADJUST_SPACINGANDGLYPHS=2,n.LENGTHADJUST_UNKNOWN=0,n}return lt(e,t),e.prototype.getCharNumAtPosition=function(t){throw new Error("Method not implemented.")},e.prototype.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},e.prototype.getEndPositionOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getExtentOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getNumberOfChars=function(){throw new Error("Method not implemented.")},e.prototype.getRotationOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getStartPositionOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getSubStringLength=function(t,e){throw new Error("Method not implemented.")},e.prototype.selectSubString=function(t,e){throw new Error("Method not implemented.")},e.prototype.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},e}(vl),Nl=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=ft(e,["style"]);return(n=t.call(this,ht({type:Os.HTML,style:ht({innerHTML:"",className:"",style:""},r)},i))||this).cullable.enable=!1,n}return lt(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(e=null===(t=this.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect();if(r){var i=n.left-r.left,o=n.top-r.top,u=new To;return u.setMinMax(a.fromValues(i,o,0),a.fromValues(i+n.width,o+n.height,0)),u}return null},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=o.invert(o.create(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!To.isEmpty(e)){var n=new To;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(vl),Al=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document",e.timeline=new Tc(e);var n={};return ch.forEach((function(t){var e=t.name,r=t.inherited,i=t.defaultValue;r&&i&&(n[e]=i)})),e.documentElement=new Tl({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return lt(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(t,e){var n=this.defaultView.customElements.get(t);return n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?Sl:Tl),new n(e)},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw new Error("Method not implemented.")},e.prototype.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},e.prototype.elementFromPoint=function(t,e){return yt(this,void 0,void 0,(function(){var n,r,i,o,a,u,s,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,u=o.height,r<0||i<0||r>a||i>u?[2,null]:(s=this.defaultView.viewport2Client({x:r,y:i}),c=s.x,l=s.y,[4,this.defaultView.getRenderingService().hooks.pick.callPromise({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:c,clientY:l},picked:[]})]);case 1:return[2,(h=f.sent().picked)&&h[0]||this.documentElement]}}))}))},e.prototype.elementsFromPoint=function(t,e){return yt(this,void 0,void 0,(function(){var n,r,i,o,a,u,s,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,u=o.height,r<0||i<0||r>a||i>u?[2,[]]:(s=this.defaultView.viewport2Client({x:r,y:i}),c=s.x,l=s.y,[4,this.defaultView.getRenderingService().hooks.pick.callPromise({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:c,clientY:l},picked:[]})]);case 1:return(h=f.sent().picked)[h.length-1]!==this.documentElement&&h.push(this.documentElement),[2,h]}}))}))},e.prototype.appendChild=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.insertBefore=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.removeChild=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.replaceChild=function(t,e,n){throw new Error("Use document.documentElement instead.")},e.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];throw new Error("Use document.documentElement instead.")},e.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];throw new Error("Use document.documentElement instead.")},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(sc),Cl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.client=new Oo,e.movement=new Oo,e.offset=new Oo,e.global=new Oo,e.screen=new Oo,e}return lt(e,t),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw new Error("Method not implemented.")},e}(zo),_l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return lt(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e}(Cl),Ol=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.DOM_DELTA_LINE=0,e.DOM_DELTA_PAGE=1,e.DOM_DELTA_PIXEL=2,e}return lt(e,t),e}(Cl),Il=function(){function t(t,e){this.type=t,this.target=e,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),Rl=0,Dl=new WeakMap,Ll=function(){function t(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return t.prototype.enqueue=function(t){var e,n=this.observer.records,r=n.length;if(n.length>0){var i=function(t,e){return t===e?t:pl&&function(t){return t===pl||t===fl}(t)?pl:null}(n[r-1],t);if(i)return void(n[r-1]=i)}else e=this.observer,Ul.push(e),Fl||(Fl=!0,"undefined"!=typeof globalThis?globalThis.setTimeout(Gl):Gl());n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(ko.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(ko.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(ko.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(ko.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(ko.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(ko.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=Dl.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}}),this)},t.prototype.handleEvent=function(t){var e,n;switch(t.stopImmediatePropagation(),t.type){case ko.ATTR_MODIFIED:var r=t.attrName,i=t.relatedNode.namespaceURI;n=t.target,(e=Bl("attributes",n)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===qo.ADDITION?null:t.prevValue;jl(n,(function(t){var n;if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(r)||-1!==t.attributeFilter.indexOf(i)))return t.attributeOldValue?(n=o,pl||((pl=Il.copy(fl)).oldValue=n,pl)):e}));break;case ko.REMOVED:case ko.INSERTED:n=t.relatedNode;var a=t.target,u=void 0,s=void 0;t.type===ko.INSERTED?(u=[a],s=[]):(u=[],s=[a]);var c=a.previousSibling,l=a.nextSibling;(e=Bl("childList",n)).addedNodes=u,e.removedNodes=s,e.previousSibling=c,e.nextSibling=l,jl(n,(function(t){if(t.childList)return e}))}fl=pl=void 0},t}(),Vl=function(){function t(t){this.callback=t,this.nodes=[],this.records=[],this.uid=Rl++}return t.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n,r=Dl.get(t);r||Dl.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new Ll(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},t.prototype.disconnect=function(){var t=this;this.nodes.forEach((function(e){for(var n=Dl.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}}),this),this.records=[]},t.prototype.takeRecords=function(){var t=this.records;return this.records=[],t},t}();function Bl(t,e){return fl=new Il(t,e)}function jl(t,e){for(var n=t;n;n=n.parentNode){var r=Dl.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var u=e(a);u&&o.enqueue(u)}}}}var Fl=!1,Ul=[];function Gl(){Fl=!1;var t=Ul;Ul=[],t.sort((function(t,e){return t.uid-e.uid}));var e=!1;t.forEach((function(t){var n=t.takeRecords();!function(t){t.nodes.forEach((function(e){var n=Dl.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&Gl()}var zl=function(){function t(){this.registry={},this.define(Os.CIRCLE,gl),this.define(Os.ELLIPSE,bl),this.define(Os.RECT,xl),this.define(Os.IMAGE,El),this.define(Os.LINE,wl),this.define(Os.GROUP,Tl),this.define(Os.PATH,Ml),this.define(Os.POLYGON,kl),this.define(Os.POLYLINE,Pl),this.define(Os.TEXT,Sl),this.define(Os.HTML,Nl)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),ql=function(){function t(){this.parser=Iu,this.mixer=Du}return t.prototype.calculator=function(t,e,n,r,i){return Oa.isRelativeUnit(n.unit)?n.unit===Bo.kPercentage||n.unit===Bo.kEms?new Oa(0,"px"):void 0:n.clone()},t.prototype.nameToBoundsIndex=function(t){return"x"===t||"cx"===t||"width"===t?0:"y"===t||"cy"===t||"height"===t?1:2},t.prototype.calculateUsedValueWithParentBounds=function(t,e){var n=t.parentElement.getGeometryBounds(),r=t.computedStyle[e].value;return new Oa(2*n.halfExtents[this.nameToBoundsIndex(e)]*r/100,"px")},t=pt([A()],t)}(),Wl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.parser=Iu,e.mixer=Du,e}return lt(e,t),e.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.x,r=e.y,i=e.z;t.setLocalPosition(n&&n.value||0,r&&r.value||0,i&&i.value||0)},e=pt([A()],e)}(ql),Hl=function(){function t(){this.parser=Uu,this.mixer=qu(0,1)}return t=pt([A()],t)}(),Yl=function(){function t(){this.parser=Nu,this.mixer=Au}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof Ea?new Wa(0,0,0,0,"none"===n.value):n},t=pt([A()],t)}(),Kl=function(){function t(){this.parser=ec}return t=pt([A()],t)}(),Xl=function(){function t(){this.parser=Vu,this.mixer=Bu}return t.prototype.calculator=function(t,e,n,r){return n&&1===n.length?[n[0],n[0]]:[n[0],n[1]]},t=pt([A()],t)}(),Zl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mixer=qu(0,1/0),e}return lt(e,t),e=pt([A()],e)}(ql),Jl=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(e&&e!==n&&e.style.offsetPathTargets){var i=e.style.offsetPathTargets.indexOf(r);e.style.offsetPathTargets.splice(i,1)}return n&&(n.style.offsetPathTargets||(n.style.offsetPathTargets=[]),n.style.offsetPathTargets.push(r)),n},t=pt([A()],t)}(),Ql=function(){function t(){this.parser=Uu,this.mixer=qu(0,1)}return t.prototype.postProcessor=function(t){if(t.attributes.offsetPath){var e=t.attributes.offsetPath.nodeName;if(e===Os.LINE||e===Os.PATH||e===Os.POLYLINE){var n=t.attributes.offsetPath.getPoint(t.parsedStyle.offsetDistance.value);n&&t.setLocalPosition(n.x,n.y)}}},t=pt([A()],t)}(),$l=function(){function t(){this.parser=Gu}return t.prototype.calculator=function(t,e,n,r){return 2===n.length?[n[0],n[1],new Oa(0)]:n},t=pt([A()],t)}(),th=function(){function t(){this.parser=Uu}return t.prototype.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0)}},t=pt([A()],t)}(),eh=function(){function t(){this.parser=mh,this.mixer=Th}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ea&&(n=[]),n.forEach((function(t){var i=t.t,o=(n||[]).find((function(t){return t.t===i})),a=(e||[]).find((function(t){return t.t===i}));if("scale"===i){var u=o&&o.d&&o.d.map((function(t){return t.value}))||[1,1],s=a&&a.d&&a.d.map((function(t){return t.value}))||[1,1];r.scaleLocal(u[0]/s[0],u[1]/s[1],1)}else if("scalex"===i){u=o&&o.d&&o.d.map((function(t){return t.value}))||[1],s=a&&a.d&&a.d.map((function(t){return t.value}))||[1];r.scaleLocal(u[0]/s[0],1,1)}else if("scaley"===i){u=o&&o.d&&o.d.map((function(t){return t.value}))||[1],s=a&&a.d&&a.d.map((function(t){return t.value}))||[1];r.scaleLocal(1,u[0]/s[0],1)}else if("scalez"===i){u=o&&o.d&&o.d.map((function(t){return t.value}))||[1],s=a&&a.d&&a.d.map((function(t){return t.value}))||[1];r.scaleLocal(1,1,u[0]/s[0])}else if("scale3d"===i){u=o&&o.d&&o.d.map((function(t){return t.value}))||[1,1,1],s=a&&a.d&&a.d.map((function(t){return t.value}))||[1,1,1];r.scaleLocal(u[0]/s[0],u[1]/s[1],u[2]/s[2])}else if("translate"===i){var c=o&&o.d||[za,za],l=a&&a.d||[za,za];r.translateLocal(c[0].value-l[0].value,c[1].value-l[1].value,0)}else if("translatex"===i){c=o&&o.d||[za],l=a&&a.d||[za];r.translateLocal(c[0].value-l[0].value,0,0)}else if("translatey"===i){c=o&&o.d||[za],l=a&&a.d||[za];r.translateLocal(0,c[0].value-l[0].value,0)}else if("translatez"===i){c=o&&o.d||[za],l=a&&a.d||[za];r.translateLocal(0,0,c[0].value-l[0].value)}else if("translate3d"===i){c=o&&o.d||[za,za,za],l=a&&a.d||[za,za,za];r.translateLocal(c[0].value-l[0].value,c[1].value-l[1].value,c[2].value-l[2].value)}else if("rotate"===i){var h=o&&o.d||[qa],f=a&&a.d||[qa];r.rotateLocal(0,0,h[0].value-f[0].value)}else if("rotatex"===i){h=o&&o.d||[qa],f=a&&a.d||[qa];r.rotateLocal(h[0].value-f[0].value,0,0)}else if("rotatey"===i){h=o&&o.d||[qa],f=a&&a.d||[qa];r.rotateLocal(0,h[0].value-f[0].value,0)}else if("rotatez"===i){h=o&&o.d||[qa],f=a&&a.d||[qa];r.rotateLocal(0,0,h[0].value-f[0].value)}})),n},t=pt([A()],t)}(),nh=function(){function t(){this.parser=Eh}return t=pt([A()],t)}(),rh=function(){function t(){this.parser=Xs,this.mixer=Js}return t.prototype.calculator=function(t,e,n){return n instanceof Ea?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,curveSegments:[],zCommandIndexes:[],rect:new Io(0,0,0,0)}:n},t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.x,r=e.y,i=e.z;t.setLocalPosition(n&&n.value||0,r&&r.value||0,i&&i.value||0)},t=pt([A()],t)}(),ih=function(){function t(){this.parser=Qs}return t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.x,r=e.y,i=e.z;t.setLocalPosition(n&&n.value||0,r&&r.value||0,i&&i.value||0)},t=pt([A()],t)}(),oh=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(e&&e!==n&&e.style.clipPathTargets){var i=e.style.clipPathTargets.indexOf(r);e.style.clipPathTargets.splice(i,1)}return n&&(n.style.clipPathTargets||(n.style.clipPathTargets=[]),n.style.clipPathTargets.push(r)),Xh(r),n},t=pt([A()],t)}(),ah=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ea?"unset"===n.value?"":n.value:n},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t=pt([A()],t)}(),uh=function(){function t(){}return t.prototype.postProcessor=function(t){if(t.nodeName===Os.TEXT){var e=t,n=e.parsedStyle.textTransform.value;n===Ds.CAPITALIZE?e.style.text=e.style.text.charAt(0).toUpperCase()+e.style.text.slice(1):n===Ds.LOWERCASE?e.style.text=e.style.text.toLowerCase():n===Ds.UPPERCASE&&(e.style.text=e.style.text.toUpperCase())}},t=pt([A()],t)}(),sh={COLOR:"<color>",PAINT:"<paint>",NUMBER:"<number>",LENGTH:"<length>",PERCENTAGE:"<percentage>",LENGTH_PERCENTAGE:"<length> | <percentage>"},ch=[{name:"display",keywords:["none"]},{name:"x",interpolable:!0,alias:["cx"],defaultValue:"0",syntax:sh.LENGTH_PERCENTAGE,handler:Wl},{name:"y",interpolable:!0,alias:["cy"],defaultValue:"0",syntax:sh.LENGTH_PERCENTAGE,handler:Wl},{name:"z",interpolable:!0,defaultValue:"0",syntax:sh.LENGTH_PERCENTAGE,handler:Wl},{name:"opacity",interpolable:!0,defaultValue:"1",syntax:sh.NUMBER,handler:Hl},{name:"fillOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:sh.NUMBER,handler:Hl},{name:"strokeOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:sh.NUMBER,handler:Hl},{name:"fill",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:sh.PAINT,handler:Yl},{name:"stroke",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:sh.PAINT,handler:Yl},{name:"shadowColor",interpolable:!0,syntax:sh.COLOR,handler:Yl},{name:"shadowOffsetX",interpolable:!0,layoutDependent:!0,syntax:sh.LENGTH_PERCENTAGE,handler:ql},{name:"shadowOffsetY",interpolable:!0,layoutDependent:!0,syntax:sh.LENGTH_PERCENTAGE,handler:ql},{name:"shadowBlur",interpolable:!0,layoutDependent:!0,handler:Zl},{name:"lineWidth",interpolable:!0,inherited:!0,defaultValue:"1",layoutDependent:!0,alias:["strokeWidth"],syntax:sh.LENGTH_PERCENTAGE,handler:ql},{name:"lineJoin",inherited:!0,layoutDependent:!0,alias:["strokeLinejoin"],keywords:["miter","bevel","round"],defaultValue:"miter"},{name:"lineCap",inherited:!0,layoutDependent:!0,alias:["strokeLinecap"],keywords:["butt","round","square"],defaultValue:"butt"},{name:"lineDash",interpolable:!0,inherited:!0,keywords:["none"],alias:["strokeDasharray"],handler:Xl},{name:"lineDashOffset",interpolable:!0,inherited:!0,defaultValue:"0",alias:["strokeDashoffset"],handler:ql},{name:"offsetPath",handler:Jl},{name:"offsetDistance",interpolable:!0,handler:Ql},{name:"dx",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:ql},{name:"dy",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:ql},{name:"zIndex",independent:!0,interpolable:!0,defaultValue:"0",keywords:["auto"],handler:th},{name:"visibility",keywords:["visible","hidden"],independent:!0,inherited:!0,defaultValue:"visible"},{name:"pointerEvents",inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"],defaultValue:"auto"},{name:"filter",independent:!0,layoutDependent:!0,handler:Kl},{name:"clipPath",handler:oh},{name:"transform",interpolable:!0,keywords:["none"],defaultValue:"none",handler:eh},{name:"transformOrigin",parsePriority:100,defaultValue:"left top",layoutDependent:!0,handler:nh},{name:"anchor",parsePriority:99,layoutDependent:!0,handler:$l},{name:"r",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:ql},{name:"rx",interpolable:!0,layoutDependent:!0,defaultValue:"auto",handler:ql},{name:"ry",interpolable:!0,layoutDependent:!0,defaultValue:"auto",handler:ql},{name:"width",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",handler:ql},{name:"height",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",handler:ql},{name:"radius",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:ql},{name:"x1",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"y1",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"z1",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"x2",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"y2",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"z2",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"path",interpolable:!0,layoutDependent:!0,defaultValue:"",handler:rh},{name:"points",layoutDependent:!0,handler:ih},{name:"text",layoutDependent:!0,handler:ah,defaultValue:""},{name:"textTransform",layoutDependent:!0,inherited:!0,keywords:["capitalize","uppercase","lowercase","none"],defaultValue:"none",handler:uh},{name:"font",layoutDependent:!0},{name:"fontSize",interpolable:!0,inherited:!0,defaultValue:"16px",layoutDependent:!0,handler:ql},{name:"fontFamily",layoutDependent:!0,inherited:!0,defaultValue:"sans-serif"},{name:"fontStyle",layoutDependent:!0,inherited:!0,keywords:["normal","italic","oblique"],defaultValue:"normal"},{name:"fontWeight",layoutDependent:!0,inherited:!0,keywords:["normal","bold","bolder","lighter"],defaultValue:"normal"},{name:"fontVariant",layoutDependent:!0,inherited:!0,keywords:["normal","small-caps"],defaultValue:"normal"},{name:"lineHeight",layoutDependent:!0},{name:"letterSpacing",layoutDependent:!0},{name:"wordWrap",layoutDependent:!0},{name:"wordWrapWidth",layoutDependent:!0},{name:"leading",layoutDependent:!0},{name:"textBaseline",layoutDependent:!0,inherited:!0,keywords:["top","hanging","middle","alphabetic","ideographic","bottom"],defaultValue:"alphabetic"},{name:"textAlign",layoutDependent:!0,inherited:!0,keywords:["start","center","end","left","right"],defaultValue:"start"},{name:"whiteSpace",layoutDependent:!0}],lh=l.defineToken("StyleValueRegistry"),hh=function(){function t(){this.dirty=!1,this.cache={},this.unresolvedProperties={},this.cascadeProperties={}}return t.prototype.init=function(){var t=this;ch.forEach((function(e){t.registerMetadata(e)}))},t.prototype.registerMetadata=function(t){var e=this;bt([t.name],gt(t.alias||[]),!1).forEach((function(n){e.cache[n]=t}))},t.prototype.getMetadata=function(t){return this.cache[t]},t.prototype.processProperties=function(t,e,n){var r=this;void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1});var i=n.skipUpdateAttribute,o=n.skipParse,a=!1;Object.keys(e).forEach((function(n){var o,u=gt(_h(n,e[n]),2),s=u[0],c=u[1];i||(t.attributes[s]=c),!a&&(null===(o=r.getMetadata(s))||void 0===o?void 0:o.layoutDependent)&&(a=!0)}));var u=Object.keys(e).sort((function(t,e){var n,i;return((null===(n=r.getMetadata(t))||void 0===n?void 0:n.parsePriority)||0)-((null===(i=r.getMetadata(e))||void 0===i?void 0:i.parsePriority)||0)}));o||u.forEach((function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e])}));var s=!1;u.forEach((function(e){e in t.computedStyle&&(s=r.computeProperty(e,t.computedStyle[e],t))})),s?this.dirty=!0:(a&&this.updateGeometry(t),u.forEach((function(e){e in t.parsedStyle&&r.postProcessProperty(e,t)})),u.forEach((function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach((function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})}))})))},t.prototype.parseProperty=function(t,e){var n=this.getMetadata(t),r=e;if(""===e&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)r=new Ea(e);else if(n){var i=n.keywords,o=n.handler;if(i&&i.indexOf(e)>-1)r=new Ea(e);else if(o){var a=ot.get(o);a&&a.parser&&(r=a.parser(e))}}return r},t.prototype.computeProperty=function(t,e,n){var r=this.getMetadata(t),i="g-root"===n.id,o=e instanceof ba?e.clone():e;if(r){var a=r.handler,u=r.inherited,s=r.defaultValue;if(e instanceof Ea){var c=e.value;if("unset"===c&&(c=u&&!i?"inherit":"initial"),"initial"===c)s&&(e=this.parseProperty(t,s));else if("inherit"===c){var l=this.tryToResolveProperty(n,t,{inherited:!0});return l?(n.parsedStyle[t]=l,!1):(this.addUnresolveProperty(n,t),!0)}}if(a){var h=ot.get(a);if(h&&h.calculator){var f=n.parsedStyle[t];o=h.calculator(t,f,e,n,this)}else o=e}else o=e}return n.parsedStyle[t]=o,!1},t.prototype.postProcessProperty=function(t,e){var n=this.getMetadata(t);if(n&&n.handler){var r=ot.get(n.handler);r&&r.postProcessor&&r.postProcessor(e)}},t.prototype.isPropertyResolved=function(t,e){return!this.unresolvedProperties[t.entity]||0===this.unresolvedProperties[t.entity].length||this.unresolvedProperties[t.entity].includes(e)},t.prototype.addUnresolveProperty=function(t,e){this.unresolvedProperties[t.entity]||(this.unresolvedProperties[t.entity]=[]),-1===this.unresolvedProperties[t.entity].indexOf(e)&&this.unresolvedProperties[t.entity].push(e)},t.prototype.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&this.isPropertyResolved(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];return(!(r instanceof Ea)||"unset"!==r.value&&"initial"!==r.value&&"inherit"!==r.value)&&(!(r instanceof Oa&&Oa.isRelativeUnit(r.unit))&&r)}return!1},t.prototype.recalc=function(t){var e=this.unresolvedProperties[t.entity];if(e&&e.length){var n={};e.forEach((function(e){n[e]=t.attributes[e]})),this.processProperties(t,n),delete this.unresolvedProperties[t.entity]}},t.prototype.updateGeometry=function(t){var e,n=ot.get(rc)(t.nodeName);if(n){var r=t.geometry;r.contentBounds||(r.contentBounds=new To),r.renderBounds||(r.renderBounds=new To);var i=t.parsedStyle,o=n.update(i,t),u=o.width,s=o.height,c=o.depth,l=void 0===c?0:c,h=o.x,f=void 0===h?0:h,p=o.y,d=void 0===p?0:p,y=o.offsetX,v=void 0===y?0:y,m=o.offsetY,g=void 0===m?0:m,b=o.offsetZ,T=void 0===b?0:b;t.nodeName!==Os.LINE&&t.nodeName!==Os.POLYLINE&&t.nodeName!==Os.POLYGON&&t.nodeName!==Os.PATH||(i.offsetX=f-(i.defX||0),i.offsetY=d-(i.defY||0),i.defX=f,i.defY=d,t.attributes.x+=i.offsetX,t.attributes.y+=i.offsetY,i.x=i.x.add(new Oa(i.offsetX,"px")),i.y=i.y.add(new Oa(i.offsetY,"px")));var E=a.fromValues(u/2,s/2,l/2),w=i,M=w.lineWidth,k=w.shadowColor,P=w.filter,x=void 0===P?[]:P,S=w.transformOrigin,N=i.anchor;t.nodeName===Os.TEXT&&delete i.anchor;var A=a.fromValues((1-2*(N&&N[0].value||0))*E[0]+v,(1-2*(N&&N[1].value||0))*E[1]+g,(1-2*(N&&(null===(e=N[2])||void 0===e?void 0:e.value)||0))*E[2]+T);if(r.contentBounds.update(A,E),M&&a.add(E,E,a.fromValues(M.value/2,M.value/2,0)),r.renderBounds.update(A,E),k){var C=r.renderBounds,_=C.min,O=C.max,I=i,R=I.shadowBlur,D=I.shadowOffsetX,L=I.shadowOffsetY,V=R&&R.value||0,B=D&&D.value||0,j=L&&L.value||0,F=_[0]-V+B,U=O[0]+V+B,G=_[1]-V+j,z=O[1]+V+j;_[0]=Math.min(_[0],F),O[0]=Math.max(O[0],U),_[1]=Math.min(_[1],G),O[1]=Math.max(O[1],z),r.renderBounds.setMinMax(_,O)}x.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,a.add(r.renderBounds.halfExtents,r.renderBounds.halfExtents,a.fromValues(i,i,0)))}else if("drop-shadow"===e){var o=n[0].value,u=n[1].value,s=n[2].value,c=r.renderBounds,l=c.min,h=c.max,f=l[0]-s+o,p=h[0]+s+o,d=l[1]-s+u,y=h[1]+s+u;l[0]=Math.min(l[0],f),h[0]=Math.max(h[0],p),l[1]=Math.min(l[1],d),h[1]=Math.max(h[1],y),r.renderBounds.setMinMax(l,h)}})),N=i.anchor;var q=ju(S[0],0,t),W=ju(S[1],1,t);q-=(N&&N[0].value||0)*r.contentBounds.halfExtents[0]*2,W-=(N&&N[1].value||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(q,W),t.emit(ko.GEOMETRY_BOUNDS_CHANGED,{}),Xh(t)}},t.prototype.isPropertyInheritable=function(t){var e=this.getMetadata(t);return!!e&&e.inherited},pt([Object(f.postConstruct)(),dt("design:type",Function),dt("design:paramtypes",[]),dt("design:returntype",void 0)],t.prototype,"init",null),t=pt([A({token:lh})],t)}(),fh={number:function(t){return new Oa(t)},percent:function(t){return new Oa(t,"%")},px:function(t){return new Oa(t,"px")},em:function(t){return new Oa(t,"em")},deg:function(t){return new Oa(t,"deg")},grad:function(t){return new Oa(t,"grad")},rad:function(t){return new Oa(t,"rad")},turn:function(t){return new Oa(t,"turn")},s:function(t){return new Oa(t,"s")},ms:function(t){return new Oa(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.initialValue;ot.get(hh).registerMetadata({name:e,inherited:n,defaultValue:r})},registerLayout:function(t){}},ph=null;function dh(t){return function(e){var n=0;return t.map((function(t){return t===ph?e[n++]:t}))}}function yh(t){return t}var vh={rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],scale:["Nn",dh([ph,ph,fh.number(1)]),yh],scalex:["N",dh([ph,fh.number(1),fh.number(1)]),dh([ph,fh.number(1)])],scaley:["N",dh([fh.number(1),ph,fh.number(1)]),dh([fh.number(1),ph])],scalez:["N",dh([fh.number(1),fh.number(1),ph])],scale3d:["NNN",yh],translate:["Tt",dh([ph,ph,za]),yh],translatex:["T",dh([ph,za,za]),dh([ph,za])],translatey:["T",dh([za,ph,za]),dh([za,ph])],translatez:["L",dh([za,za,ph])],translate3d:["TTL",yh]};function mh(t){if("none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];i=e.index+e[0].length;var o=e[1],a=vh[o];if(!a)return[];var u=e[2].split(","),s=a[0];if(s.length<u.length)return[];for(var c=[],l=0;l<s.length;l++){var h=u[l],f=s[l],p=void 0;if(void 0===(p=h?{A:function(t){return"0"===t.trim()?qa:Ru(t)},N:Uu,T:Iu,L:_u}[f.toUpperCase()](h):{a:qa,n:c[0],t:za}[f]))return[];c.push(p)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function gh(t){return t.replace(/[xy]/,"")}function bh(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function Th(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substr(0,5)?1:0;e.push({t:i,d:o.map((function(t){return"number"==typeof t?new Oa(a):new Oa(a,t.unit)}))})},o=0;o<t.length;o++)i(o)}var a,u,s=[],c=[],l=[];if(t.length!==e.length);else for(o=0;o<t.length;o++){var h=t[o].t,f=e[o].t,p=t[o].d,d=e[o].d,y=vh[h],v=vh[f],m=void 0;if(u=f,("perspective"!==(a=h)||"perspective"!==u)&&("matrix"!==a&&"matrix3d"!==a||"matrix"!==u&&"matrix3d"!==u)){if(h===f)m=h;else if(y[2]&&v[2]&&gh(h)===gh(f))m=gh(h),p=y[2](p),d=v[2](d);else{if(!y[1]||!v[1]||bh(h)!==bh(f))break;m=bh(h),p=y[1](p),d=v[1](d)}for(var g=[],b=[],T=[],E=0;E<p.length;E++){var w=(p[E].unit===Bo.kNumber?zu:Du)(p[E],d[E],n,!1,E);g[E]=w[0],b[E]=w[1],T.push(w[2])}s.push(g),c.push(b),l.push([m,T])}}if(r){var M=s;s=c,c=M}return[s,c,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return l[e][1][n](t)})).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),l[e][0]+"("+n+")"})).join(" ")}]}function Eh(t){if(Ph(t)){var e=t.split(" ");return 1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Iu(wh(e[0])),Iu(wh(e[1]))]}return[new Oa(t[0]||0,"px"),new Oa(t[1]||0,"px")]}function wh(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var Mh=function(){function t(){}return t=pt([A()],t)}();function kh(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}function Ph(t){return!Xo(t)&&"string"==typeof t}function xh(t,e,n){var r=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(Sh(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:el(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(t,e),i=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;o<i.length-1;o++){var a=o,u=o+1,s=i[a].computedOffset,c=i[u].computedOffset,l=s,h=c;0===o&&(l=-1/0,0===c&&(u=a)),o===i.length-2&&(h=1/0,1===s&&(a=u)),n.push({applyFrom:l,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[u].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:Ah(r,i[a].value,i[u].value,e)})}return n.sort((function(t,e){return t.startOffset-e.startOffset})),n}(r,n);return function(t,e){if(null!==e)i.filter((function(t){return e>=t.applyFrom&&e<t.applyTo})).forEach((function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.style[n.property]=n.interpolation(o)}));else for(var n in r)Sh(n)&&(t.style[n]=null)}}function Sh(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var Nh=function(t,e,n){return function(r){return n(function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var i=[],o=0;o<e.length;o++)i.push(t(e[o],n[o],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r))}};function Ah(t,e,n,r){var i=e,o=n,a=ot.get(hh).getMetadata(t);if(a&&a.handler&&a.interpolable){var u=ot.get(a.handler);if(u){u.parser&&(i=u.parser(e),o=u.parser(n));var s=u.mixer(i,o,r);if(s){var c=Nh.apply(void 0,bt([],gt(s),!1));return function(t){return 0===t?e:1===t?n:c(t)}}}}return Nh(!1,!0,(function(t){return t?n:e}))}var Ch={d:{alias:"path"},cx:{alias:"x"},cy:{alias:"y"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}};function _h(t,e){var n,r=kh(t),i=Ch[r];return[r=(null==i?void 0:i.alias)||r,(null===(n=null==i?void 0:i.values)||void 0===n?void 0:n[e])||e]}var Oh=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function Ih(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=Zo(e)?"".concat(e,"px"):e.toString(),u=Ph(n)?n.split(","):[n.value],s=u.length-1;s>=0;s--){var c=u[s].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&Oh.indexOf(c)<0&&(c='"'.concat(c,'"')),u[s]=c}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(u.join(","))}var Rh=1,Dh={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Lh={},Vh=0;function Bh(t,e){if(t){var n="string"==typeof t?t:t.id||Vh++;Lh[n]&&Lh[n].destroy(),Lh[n]=e}}var jh="undefined"!=typeof window&&void 0!==window.document;function Fh(t){var e=!1;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];e||(e=!0,t.apply(void 0,bt([],gt(n),!1)))}}var Uh=function(){function t(t){this.tapIdSeed=0,this.presetTapBucket=new Set,this.tapBuckets=new Map,this.tapOptionsCache=new Map,this.bucketHashcode=t}return t.prototype.exhaust=function(){this.presetTapBucket.clear(),this.tapBuckets.clear(),this.tapOptionsCache.clear()},t.prototype.destroy=function(){this.exhaust()},t.prototype.insertSyncTap=function(t,e){return this.tapping(t,e)},t.prototype.insertAsyncTap=function(t,e){return this.tapping((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e[e.length-1];try{t.apply(void 0,bt([],gt(e),!1))}catch(t){r(t)}}),e)},t.prototype.insertPromiseTap=function(t,e){return this.tapping((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.pop(),i=e;try{Promise.resolve(t.apply(void 0,bt([],gt(i),!1))).then((function(t){r(null,t)}),(function(t){r(t)}))}catch(t){r(t)}}),e)},t.prototype.invokeSeries=function(t,e){e||(e={}),"function"==typeof e.onComplete&&(e.onComplete=Fh(e.onComplete)),function t(e,n,r){var i;if(i="function"==typeof e.onComplete?e.onComplete:function(t,e){},r.length){var o=r.shift(),a=r,u=Array.from(n),s=bt(bt([],gt(n),!1),[function(n,r){null==n?void 0===r||!0!==e.shouldBail?(void 0!==r&&!0===e.shouldWaterfall&&(u[0]=r),t(e,u,a)):i(null,r):i(n)}],!1);o.fn.apply(o,bt([],gt(s),!1))}else e.shouldWaterfall?i(null,n[0]):i(null,void 0)}(e,t,Array.from(this.getBucketTaps(t)))},t.prototype.invokeParallel=function(t,e){e||(e={}),"function"==typeof e.onComplete&&(e.onComplete=Fh(e.onComplete)),function(t,e,n){var r,i,o;if(o="function"==typeof t.onComplete?t.onComplete:function(t,e){},n.length){var a=n.length,u=bt(bt([],gt(e),!1),[function(n,r){null==n?void 0===r||!0!==t.shouldBail?--a<=0&&o(null,e[0]):o(null,r):o(n)}],!1);try{for(var s=mt(n),c=s.next();!c.done;c=s.next()){var l=c.value;l.fn.apply(l,bt([],gt(u),!1))}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}else o(null,void 0)}(e,t,Array.from(this.getBucketTaps(t)))},t.prototype.invokeSynchronously=function(t,e){return e||(e={}),function(t,e,n){var r,i;if(!n.length)return t.shouldWaterfall?e[0]:void 0;var o=Array.from(e);try{for(var a=mt(n),u=a.next();!u.done;u=a.next()){var s=u.value.fn.apply(void 0,bt([],gt(o),!1));if(void 0!==s&&!0===t.shouldBail)return s;void 0!==s&&!0===t.shouldWaterfall&&(o[0]=s)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return t.shouldWaterfall?o[0]:void 0}(e,t,Array.from(this.getBucketTaps(t)))},t.prototype.getBucketTaps=function(t){var e,n,r=Array.from(this.presetTapBucket),i=[];if("function"==typeof this.bucketHashcode){var o=this.bucketHashcode.apply(this,bt([],gt(t),!1));this.tapBuckets.has(o)&&(i=Array.from(this.tapBuckets.get(o)))}var a=new Set(bt(bt([],gt(r),!1),gt(i),!1)),u=new Set;try{for(var s=mt(a),c=s.next();!c.done;c=s.next()){var l=c.value;u.add(this.tapOptionsCache.get(l))}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return u},t.prototype.tapping=function(t,e){var n=this,r=this.presetTapBucket;e&&(this.tapBuckets.has(e)||this.tapBuckets.set(e,new Set),r=this.tapBuckets.get(e));var i=this.generateTapId(),o={fn:t,bucket:e};return this.tapOptionsCache.set(i,o),r.add(i),function(){n.popoutTap(i)}},t.prototype.popoutTap=function(t){var e=this.tapOptionsCache.get(t);if(e){var n=e.bucket;n?this.tapBuckets.has(n)&&this.tapBuckets.get(n).delete(t):this.presetTapBucket.delete(t),this.tapOptionsCache.delete(t)}},t.prototype.generateTapId=function(){return"tap:".concat(++this.tapIdSeed,"?").concat(Date.now())},t}(),Gh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.tap=function(t,e){return this.insertSyncTap(t,e)},e}(Uh),zh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.tapAsync=function(t,e){return this.insertAsyncTap(t,e)},e.prototype.tapPromise=function(t,e){return this.insertPromiseTap(t,e)},e}(Uh),qh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.call=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.invokeSynchronously(t)},e}(Gh),Wh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.call=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.invokeSynchronously(t,{shouldWaterfall:!0})},e}(Gh),Hh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.callAsync=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.pop();this.invokeParallel(t,{onComplete:function(t){null!=t?n(t):n()}})},e.prototype.callPromise=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new Promise((function(n,r){t.invokeParallel(e,{onComplete:function(t,e){null!=t?r(t):n(e)}})}))},e}(zh),Yh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.callAsync=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.pop();this.invokeSeries(t,{shouldWaterfall:!0,onComplete:n})},e.prototype.callPromise=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new Promise((function(n,r){t.invokeSeries(e,{shouldWaterfall:!0,onComplete:function(t,e){null!=t?r(t):n(e)}})}))},e}(zh);function Kh(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function Xh(t,e){void 0===e&&(e=!1);for(var n=t;n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),n=n.parentNode}t.emit(ko.BOUNDS_CHANGED,{affectChildren:e})}var Zh,Jh=l.defineToken("SceneGraphService"),Qh=function(){function t(){var t,e,n,r,i,u=this;this.rotate=(t=s.create(),function(e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=a.fromValues(n,r,i));var o=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){var c=s.create();s.fromEuler(c,n[0],n[1],n[2]);var l=u.getRotation(e),h=u.getRotation(e.parentNode);s.copy(t,h),s.invert(t,t),s.multiply(c,t,c),s.multiply(o.localRotation,c,l),s.normalize(o.localRotation,o.localRotation),u.dirtifyLocal(e,o)}else u.rotateLocal(e,n)}),this.rotateLocal=(e=s.create(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=a.fromValues(n,r,i));var o=t.transformable;s.fromEuler(e,n[0],n[1],n[2]),s.mul(o.localRotation,o.localRotation,e),u.dirtifyLocal(t,o)}),this.setEulerAngles=(n=s.create(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=a.fromValues(e,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){s.fromEuler(o.localRotation,e[0],e[1],e[2]);var c=u.getRotation(t.parentNode);s.copy(n,s.invert(s.create(),c)),s.mul(o.localRotation,o.localRotation,n),u.dirtifyLocal(t,o)}else u.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;a.equals(e,a.create())||(a.transformQuat(e,e,i.localRotation),a.add(i.localPosition,i.localPosition,e),u.dirtifyLocal(t,i))},this.setPosition=(r=o.create(),function(t,e){var n=t.transformable;if(e=a.fromValues(e[0],e[1],e[2]||0),!a.equals(u.getPosition(t),e)){if(n.position=e,null!==t.parentNode&&t.parentNode.transformable){var i=t.parentNode.transformable;o.copy(r,i.worldTransform),o.invert(r,r),a.transformMat4(n.localPosition,e,r)}else a.copy(n.localPosition,e);u.dirtifyLocal(t,n)}}),this.translate=(i=a.create(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r)),a.equals(e,a.create())||(a.add(i,u.getPosition(t),e),u.setPosition(t,i))}),this.setRotation=function(){var t=s.create();return function(e,n,r,i,o){var a=e.transformable;if("number"==typeof n&&(n=s.fromValues(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable){var c=u.getRotation(e.parentNode);s.copy(t,c),s.invert(t,t),s.multiply(a.localRotation,t,n),s.normalize(a.localRotation,a.localRotation),u.dirtifyLocal(e,a)}else u.setLocalRotation(e,n)}}}return t.prototype.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},t.prototype.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},t.prototype.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,Xo(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var r=e.sortable;r&&(r.dirty=!0);var i=t.transformable;i&&this.dirtifyWorld(t,i),i.frozen&&this.unfreezeParentToRoot(t)},t.prototype.detach=function(t){if(t.parentNode){var e=t.transformable,n=t.parentNode.sortable;n&&(n.dirty=!0);var r=t.parentNode.childNodes.indexOf(t);r>-1&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;if(!a.equals(e,i.origin)){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;s.fromEuler(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.setLocalPosition=function(t,e){var n=t.transformable;e=a.fromValues(e[0],e[1],e[2]||0),a.equals(n.localPosition,e)||(a.copy(n.localPosition,e),this.dirtifyLocal(t,n))},t.prototype.scaleLocal=function(t,e){var n=t.transformable;a.multiply(n.localScale,n.localScale,a.fromValues(e[0],e[1],e[2]||1)),this.dirtifyLocal(t,n)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=a.fromValues(e[0],e[1],e[2]||n.localScale[2]);a.equals(r,n.localScale)||(a.copy(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=s.fromValues(e,n,r,i));var o=t.transformable;s.copy(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),Xh(t,!0)},t.prototype.getPosition=function(t){var e=t.transformable;return o.getTranslation(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return o.getRotation(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return o.getScaling(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(o.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.localTransform},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0])},t.prototype.getTransformedGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=this.getGeometryBounds(t,e);if(To.isEmpty(n))return null;var r=new To;return r.setFromTransformedAABB(n,this.getWorldTransform(t)),r},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry,r=e?n.renderBounds:n.contentBounds||null;return r&&new To(r.center,r.halfExtents)||new To},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=this.getTransformedGeometryBounds(t,e);t.childNodes.forEach((function(t){var r=n.getBounds(t,e);r&&(i?i.add(r):(i=new To).update(r.center,r.halfExtents))}));var o=t.style.clipPath;if(o){var a=this.getTransformedGeometryBounds(o,!0),u=void 0;a&&(u=new To).setFromTransformedAABB(a,this.getWorldTransform(t)),i?u&&(i=u.intersection(i)):i=u}return i&&(e?r.renderBounds=i:r.bounds=i),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,i||new To},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=o.create();t.parentNode.transformable&&(e=o.invert(o.create(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!To.isEmpty(n)){var r=new To;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);To.isEmpty(i)||(r=new To).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=gt(r.getMin(),2),u=a[0],s=a[1],c=gt(r.getMax(),2),l=c[0],h=c[1];return new Io(u+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),l-u,h-s)}return new Io((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach((function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}));var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),t.dispatchEvent(new qo(ko.ATTR_MODIFIED,t,null,null,"modelMatrix",qo.MODIFICATION,null,null))}},t.prototype.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(o.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?o.multiply(e.worldTransform,r.worldTransform,e.localTransform):o.copy(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},pt([_(Ro),dt("design:type",Function)],t.prototype,"sceneGraphSelectorFactory",void 0),t=pt([A()],t)}(),$h=l.defineToken("ContextService",{multiple:!1});!function(t){t[t.CAMERA_CHANGED=0]="CAMERA_CHANGED",t[t.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",t[t.NONE=2]="NONE"}(Zh||(Zh={}));var tf,ef,nf,rf=l.defineToken("RenderingContext"),of=l.defineToken("RenderingPluginContribution"),af=function(){function t(){this.inited=!1,this.stats={total:0,rendered:0,renderedOnscreen:0},this.zIndexCounter=0,this.hooks={init:new Hh,dirtycheck:new Wh,cull:new Wh,beginFrame:new qh,beforeRender:new qh,render:new qh,afterRender:new qh,endFrame:new qh,destroy:new qh,pick:new Yh,pointerDown:new qh,pointerUp:new qh,pointerMove:new qh,pointerOut:new qh,pointerOver:new qh,pointerCancel:new qh,pointerWheel:new qh}}return t.prototype.init=function(){return yt(this,void 0,void 0,(function(){var t=this;return vt(this,(function(e){switch(e.label){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach((function(e){e.apply(t)})),[4,this.hooks.init.callPromise()];case 1:return e.sent(),this.inited=!0,[2]}}))}))},t.prototype.getStats=function(){return this.stats},t.prototype.render=function(t){this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root),(this.renderingContext.dirty||t.renderer.getConfig().enableDirtyRectangleRendering&&1===this.stats.total)&&(this.renderingContext.dirty||this.hooks.beginFrame.call(),this.stats.renderedOnscreen=this.stats.rendered,this.hooks.endFrame.call(),this.renderingContext.dirty=!1),this.renderingContext.renderReasons.clear())},t.prototype.renderDisplayObject=function(t){var e=this;this.styleValueRegistry.recalc(t);var n=this.hooks.dirtycheck.call(t);n&&(this.hooks.cull.call(n),this.stats.rendered++,this.renderingContext.dirty||(this.renderingContext.dirty=!0,this.hooks.beginFrame.call()),this.hooks.beforeRender.call(n),this.hooks.render.call(n),this.hooks.afterRender.call(n),t.renderable.dirty=!1),t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var r=t.sortable,i=!1;r.dirty&&(r.sorted=t.childNodes.slice().sort(Kh),i=!0,r.dirty=!1),(r.sorted||t.childNodes).forEach((function(t){e.renderDisplayObject(t)})),i&&t.forEach((function(t){t.emit(ko.RENDER_ORDER_CHANGED,{renderOrder:t.sortable.renderOrder})}))},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call()},t.prototype.dirtify=function(){this.renderingContext.renderReasons.add(Zh.DISPLAY_OBJECT_CHANGED)},pt([ut(of),dt("design:type",Object)],t.prototype,"renderingPluginProvider",void 0),pt([_(rf),dt("design:type",Object)],t.prototype,"renderingContext",void 0),pt([_(Jh),dt("design:type",Object)],t.prototype,"sceneGraphService",void 0),pt([_(lh),dt("design:type",Function)],t.prototype,"styleValueRegistry",void 0),t=pt([A()],t)}(),uf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e}(zo),sf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cursor="default",e.mappingTable={},e.mappingState={trackingData:{}},e.eventPool=new Map,e.handleTouchEvent=function(t,n){return yt(e,void 0,void 0,(function(){var e,r,i,o,a,u,s,c,l,h,f,p,d,y;return vt(this,(function(v){switch(v.label){case 0:return[4,this.createTouchEvent(t)];case 1:e=v.sent(),r=[];try{for(i=mt(e.changedTouches),o=i.next();!o.done;o=i.next())a=o.value,-1===r.indexOf(a.target)&&r.push(a.target)}catch(t){f={error:t}}finally{try{o&&!o.done&&(p=i.return)&&p.call(i)}finally{if(f)throw f.error}}u=function(t){e.target=t,e.targetTouches=e.touches.filter((function(e){return e.target===t})),s.dispatchEvent(e,n),s.freeEvent(e)},s=this;try{for(c=mt(r),l=c.next();!l.done;l=c.next())h=l.value,u(h)}catch(t){d={error:t}}finally{try{l&&!l.done&&(y=c.return)&&y.call(c)}finally{if(d)throw d.error}}return[2]}}))}))},e.onTouchStart=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof _l?(this.handleTouchEvent(t,"touchstart"),[2]):[2]}))}))},e.onTouchMove=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof _l?(this.handleTouchEvent(t,"touchmove"),[2]):[2]}))}))},e.onTouchEnd=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof _l?(this.handleTouchEvent(t,"touchend"),[2]):[2]}))}))},e.onTouchCancel=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof _l?(this.handleTouchEvent(t,"touchcancel"),[2]):[2]}))}))},e.onPointerDown=function(t){return yt(e,void 0,void 0,(function(){var e,n;return vt(this,(function(r){switch(r.label){case 0:return t instanceof _l?[4,this.createPointerEvent(t)]:[2];case 1:return e=r.sent(),this.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType?this.dispatchEvent(e,"touchstart"):"mouse"!==e.pointerType&&"pen"!==e.pointerType||(n=2===e.button,this.dispatchEvent(e,n?"rightdown":"mousedown")),this.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),this.freeEvent(e),[2]}}))}))},e.onPointerUp=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o,a,u,s,c;return vt(this,(function(l){switch(l.label){case 0:return t instanceof _l?(e=performance.now(),[4,this.createPointerEvent(t)]):[2];case 1:if(n=l.sent(),this.dispatchEvent(n,"pointerup"),"touch"===n.pointerType?this.dispatchEvent(n,"touchend"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(u=2===n.button,this.dispatchEvent(n,u?"rightup":"mouseup")),r=this.trackingData(t.pointerId),i=this.findMountedTarget(r.pressTargetsByButton[t.button]),o=i,i&&!n.composedPath().includes(i)){for(a=i;a&&!n.composedPath().includes(a);)n.currentTarget=a,this.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType?this.notifyTarget(n,"touchendoutside"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(u=2===n.button,this.notifyTarget(n,u?"rightupoutside":"mouseupoutside")),sc.isNode(a)&&(a=a.parentNode);delete r.pressTargetsByButton[t.button],o=a}return o&&((s=this.clonePointerEvent(n,"click")).target=o,s.path=[],r.clicksByButton[t.button]||(r.clicksByButton[t.button]={clickCount:0,target:s.target,timeStamp:e}),(c=r.clicksByButton[t.button]).target===s.target&&e-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=s.target,c.timeStamp=e,s.detail=c.clickCount,"mouse"===s.pointerType||"touch"===s.pointerType?this.dispatchEvent(s,"click"):this.dispatchEvent(s,"pointertap"),this.freeEvent(s)),this.freeEvent(n),[2]}}))}))},e.onPointerMove=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o,a,u,s,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return t instanceof _l?[4,this.createPointerEvent(t)]:[2];case 1:return e=f.sent(),n="mouse"===e.pointerType||"pen"===e.pointerType,r=this.trackingData(t.pointerId),i=this.findMountedTarget(r.overTargets),r.overTargets&&i!==e.target?(o="mousemove"===t.type?"mouseout":"pointerout",[4,this.createPointerEvent(t,o,i||void 0)]):[3,5];case 2:return a=f.sent(),this.dispatchEvent(a,"pointerout"),n&&this.dispatchEvent(a,"mouseout"),e.composedPath().includes(i)?[3,4]:[4,this.createPointerEvent(t,"pointerleave",i||void 0)];case 3:for((u=f.sent()).eventPhase=u.AT_TARGET;u.target&&!e.composedPath().includes(u.target);)u.currentTarget=u.target,this.notifyTarget(u),n&&this.notifyTarget(u,"mouseleave"),sc.isNode(u.target)&&(u.target=u.target.parentNode);this.freeEvent(u),f.label=4;case 4:this.freeEvent(a),f.label=5;case 5:if(i!==e.target){for(s="mousemove"===t.type?"mouseover":"pointerover",c=this.clonePointerEvent(e,s),this.dispatchEvent(c,"pointerover"),n&&this.dispatchEvent(c,"mouseover"),l=i&&sc.isNode(i)&&i.parentNode;l&&l!==(sc.isNode(this.rootTarget)&&this.rootTarget.parentNode)&&l!==e.target;)l=l.parentNode;if(!l||l===(sc.isNode(this.rootTarget)&&this.rootTarget.parentNode)){for((h=this.clonePointerEvent(e,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==i&&h.target!==(sc.isNode(this.rootTarget)&&this.rootTarget.parentNode);)h.currentTarget=h.target,this.notifyTarget(h),n&&this.notifyTarget(h,"mouseenter"),sc.isNode(h.target)&&(h.target=h.target.parentNode);this.freeEvent(h)}this.freeEvent(c)}return this.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&this.dispatchEvent(e,"touchmove"),n&&(this.dispatchEvent(e,"mousemove"),this.cursor=this.getCursor(e.target)),r.overTargets=e.composedPath(),this.freeEvent(e),[2]}}))}))},e.onPointerOut=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o;return vt(this,(function(a){switch(a.label){case 0:return t instanceof _l?(e=this.trackingData(t.pointerId)).overTargets?(n="mouse"===t.pointerType||"pen"===t.pointerType,r=this.findMountedTarget(e.overTargets),[4,this.createPointerEvent(t,"pointerout",r||void 0)]):[3,3]:[2];case 1:return i=a.sent(),this.dispatchEvent(i),n&&this.dispatchEvent(i,"mouseout"),[4,this.createPointerEvent(t,"pointerleave",r||void 0)];case 2:for((o=a.sent()).eventPhase=o.AT_TARGET;o.target&&o.target!==(sc.isNode(this.rootTarget)&&this.rootTarget.parentNode);)o.currentTarget=o.target,this.notifyTarget(o),n&&this.notifyTarget(o,"mouseleave"),sc.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=null,this.freeEvent(i),this.freeEvent(o),a.label=3;case 3:return this.cursor=null,[2]}}))}))},e.onPointerOver=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return t instanceof _l?(e=this.trackingData(t.pointerId),[4,this.createPointerEvent(t)]):[2];case 1:for(n=o.sent(),r="mouse"===n.pointerType||"pen"===n.pointerType,this.dispatchEvent(n,"pointerover"),r&&this.dispatchEvent(n,"mouseover"),"mouse"===n.pointerType&&(this.cursor=this.getCursor(n.target)),(i=this.clonePointerEvent(n,"pointerenter")).eventPhase=i.AT_TARGET;i.target&&i.target!==(sc.isNode(this.rootTarget)&&this.rootTarget.parentNode);)i.currentTarget=i.target,this.notifyTarget(i),r&&this.notifyTarget(i,"mouseenter"),sc.isNode(i.target)&&(i.target=i.target.parentNode);return e.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(i),[2]}}))}))},e.onPointerUpOutside=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return t instanceof _l?(e=this.trackingData(t.pointerId),n=this.findMountedTarget(e.pressTargetsByButton[t.button]),[4,this.createPointerEvent(t)]):[2];case 1:if(r=o.sent(),n){for(i=n;i;)r.currentTarget=i,this.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?this.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||this.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),sc.isNode(i)&&(i=i.parentNode);delete e.pressTargetsByButton[t.button]}return this.freeEvent(r),[2]}}))}))},e.onWheel=function(t){return yt(e,void 0,void 0,(function(){var e;return vt(this,(function(n){switch(n.label){case 0:return t instanceof Ol?[4,this.createWheelEvent(t)]:[2];case 1:return e=n.sent(),this.dispatchEvent(e),this.freeEvent(e),[2]}}))}))},e}return lt(e,t),e.prototype.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("touchstart",this.onTouchStart),this.addEventMapping("touchmove",this.onTouchMove),this.addEventMapping("touchend",this.onTouchEnd),this.addEventMapping("touchcancel",this.onTouchCancel)},e.prototype.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new Oo(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.prototype.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new Oo(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.canvasConfig,u=i.width,s=i.height,c=r.getPerspectiveInverse(),l=r.getWorldTransform(),h=o.multiply(o.create(),l,c),f=a.fromValues(e/u*2-1,2*(1-n/s)-1,0);return a.transformMat4(f,f,h),new Oo(f[0],f[1])},e.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=o.multiply(o.create(),n,r),u=a.fromValues(t.x,t.y,0);a.transformMat4(u,u,i);var s=this.canvasConfig,c=s.width,l=s.height;return new Oo((u[0]+1)/2*c,(1-(u[1]+1)/2)*l)},e.prototype.setPickHandler=function(t){this.pickHandler=t},e.prototype.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))},e.prototype.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},e.prototype.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},e.prototype.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)sc.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},e.prototype.hitTest=function(t){return yt(this,void 0,void 0,(function(){var e,n,r,i,o;return vt(this,(function(a){switch(a.label){case 0:return e=t.viewportX,n=t.viewportY,r=this.canvasConfig,i=r.width,o=r.height,e<0||n<0||e>i||n>o?[2,null]:[4,this.pickHandler(t)];case 1:return[2,a.sent()||this.rootTarget||null]}}))}))},e.prototype.isNativeEventFromCanvas=function(t){var e,n=this.contextService.getDomElement(),r=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},e.prototype.pickTarget=function(t){return yt(this,void 0,void 0,(function(){return vt(this,(function(e){return[2,this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})]}))}))},e.prototype.createPointerEvent=function(t,e,n){return yt(this,void 0,void 0,(function(){var r,i,o,a,u;return vt(this,(function(s){switch(s.label){case 0:return r=this.allocateEvent(_l),this.copyPointerData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.nativeEvent=t.nativeEvent,i=this.isNativeEventFromCanvas(r),r.originalEvent=t,o=r,null==n?[3,1]:(a=n,[3,4]);case 1:return(u=i)?[4,this.pickTarget(r)]:[3,3];case 2:u=s.sent(),s.label=3;case 3:a=u,s.label=4;case 4:return o.target=a,"string"==typeof e&&(r.type=e),[2,r]}}))}))},e.prototype.createTouchEvent=function(t){return yt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u,s;return vt(this,(function(c){switch(c.label){case 0:(e=this.allocateEvent(uf)).isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.nativeEvent=t.nativeEvent,e.originalEvent=t,this.copyTouchData(t,e),i=0,c.label=1;case 1:return i<t.changedTouches.length?(o=t.changedTouches[i],a=this.isNativeEventFromCanvas(t),n=o,(r=a)?[4,this.pickTarget(o)]:[3,3]):[3,5];case 2:r=c.sent(),c.label=3;case 3:n.target=r,c.label=4;case 4:return i++,[3,1];case 5:i=0,c.label=6;case 6:return i<t.touches.length?(o=t.touches[i],a=this.isNativeEventFromCanvas(t),u=o,(s=a)?[4,this.pickTarget(o)]:[3,8]):[3,10];case 7:s=c.sent(),c.label=8;case 8:u.target=s,c.label=9;case 9:return i++,[3,6];case 10:return e.touches=t.touches,e.changedTouches=t.changedTouches,[2,e]}}))}))},e.prototype.createWheelEvent=function(t){return yt(this,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return e=this.allocateEvent(Ol),this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t,n=this.isNativeEventFromCanvas(e),r=e,(i=n)?[4,this.pickTarget(e)]:[3,2];case 1:i=o.sent(),o.label=2;case 2:return r.target=i,[2,e]}}))}))},e.prototype.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(_l);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.prototype.copyPointerData=function(t,e){t instanceof _l&&e instanceof _l&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.prototype.copyMouseData=function(t,e){t instanceof Cl&&e instanceof Cl&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.prototype.copyTouchData=function(t,e){return yt(this,void 0,void 0,(function(){return vt(this,(function(n){return e.altKey=t.altKey,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,[2]}))}))},e.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.prototype.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},e.prototype.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(!(r===this.rootTarget||sc.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.prototype.getCursor=function(t){for(var e=t;e;){var n=yc.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=sc.isNode(e)&&e.parentNode}},pt([_(rf),dt("design:type",Object)],e.prototype,"renderingContext",void 0),pt([_($h),dt("design:type",Object)],e.prototype,"contextService",void 0),pt([_(Vs),dt("design:type",Object)],e.prototype,"canvasConfig",void 0),pt([Object(f.postConstruct)(),dt("design:type",Function),dt("design:paramtypes",[]),dt("design:returntype",void 0)],e.prototype,"init",null),e=pt([A()],e)}(st.EventEmitter),cf=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t){if(this.canvas)return this.canvas;if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t=pt([A()],t)}(),lf={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},hf=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,ff=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),pf=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),df=function(){function t(){var t=this;this.cache={},this.shouldBreakByKinsokuShorui=function(e,n){return!t.isBreakingSpace(n)&&!(!e||!pf.exec(n)&&!ff.exec(e))},this.trimByKinsokuShorui=function(t){var e=bt([],gt(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t,e){if(this.cache[t])return this.cache[t];var n={ascent:0,descent:0,fontSize:0},r=this.offscreenCanvas.getOrCreateCanvas(e),i=this.offscreenCanvas.getOrCreateContext(e);i.font=t;var o=lf.MetricsString+lf.BaselineSymbol,a=Math.ceil(i.measureText(o).width),u=Math.ceil(i.measureText(lf.BaselineSymbol).width),s=lf.HeightMultiplier*u;u=u*lf.BaselineMultiplier|0,r.width=a,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,a,s),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,u);var c=i.getImageData(0,0,a||1,s||1).data,l=c.length,h=4*a,f=0,p=0,d=!1;for(f=0;f<u;++f){for(var y=0;y<h;y+=4)if(255!==c[p+y]){d=!0;break}if(d)break;p+=h}for(n.ascent=u-f,p=l-h,d=!1,f=s;f>u;--f){for(y=0;y<h;y+=4)if(255!==c[p+y]){d=!0;break}if(d)break;p-=h}return n.descent=f-u,n.fontSize=n.ascent+n.descent,this.cache[t]=n,n},t.prototype.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=void 0===o?0:o,u=e.lineWidth,s=e.textBaseline,c=e.textAlign,l=e.letterSpacing,h=void 0===l?0:l,f=e.leading,p=void 0===f?0:f,d=Ih(e),y=this.measureFont(d,n);0===y.fontSize&&(y.fontSize=r.value,y.ascent=r.value);var v=this.offscreenCanvas.getOrCreateContext(n);v.font=d;for(var m=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),g=new Array(m.length),b=0,T=0;T<m.length;T++){var E=v.measureText(m[T]).width+(m[T].length-1)*h;g[T]=E,b=Math.max(b,E)}var w=b+u.value,M=a||y.fontSize+u.value,k=Math.max(M,y.fontSize+u.value)+(m.length-1)*(M+p);M+=p;var P=0;return"middle"===s.value?P=-k/2:"bottom"===s.value||"alphabetic"===s.value||"ideographic"===s.value?P=-k:"top"!==s.value&&"hanging"!==s.value||(P=0),{font:d,width:w,height:k,lines:m,lineWidths:g,lineHeight:M,maxLineWidth:b,fontProperties:y,lineMetrics:g.map((function(t,e){var n=0;return"center"===c.value?n-=t/2:"right"!==c.value&&"end"!==c.value||(n-=t),new Io(n-u.value/2,P+e*M,t+u.value,M)}))}},t.prototype.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=void 0===i?0:i,a=e.letterSpacing,u=void 0===a?0:a,s=this.offscreenCanvas.getOrCreateContext(n),c=o+u,l=[],h=0,f=0,p={},d=function(t){return r.getFromCache(t,u,p,s)};return Array.from(t).forEach((function(e,n){var i=t[n-1],o=t[n+1],a=d(e);if(r.isNewline(e))return h++,f=0,void(l[h]="");if(f>0&&f+a>c){if(h++,f=0,l[h]="",r.isBreakingSpace(e))return;r.canBreakInLastChar(e)||(l=r.trimToBreakable(l),f=r.sumTextWidthByCache(l[h]||"",p)),r.shouldBreakByKinsokuShorui(e,o)&&(l=r.trimByKinsokuShorui(l),f+=d(i||""))}f+=a,l[h]=(l[h]||"")+e})),l.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&lf.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&lf.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=bt([],gt(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=r+1,a=r+(this.isBreakingSpace(i)?0:1);return e[e.length-1]+=n.slice(o,n.length),e[e.length-2]=n.slice(0,a),e},t.prototype.canBreakInLastChar=function(t){return!t||!hf.test(t)},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce((function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]}),0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!hf.test(t[e]))return e;return-1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},pt([_(cf),dt("design:type",cf)],t.prototype,"offscreenCanvas",void 0),t=pt([A()],t)}(),yf=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r,r=t.x,i=t.y;return{width:2*n.value,height:2*n.value,x:r.value||0,y:i.value||0}},t=pt([A({token:{token:ic,named:Os.CIRCLE}})],t)}(),vf=function(){function t(){}return t.prototype.update=function(t,e){var n=t.rx,r=t.ry,i=t.x,o=t.y;return{width:2*n.value,height:2*r.value,x:i.value||0,y:o.value||0}},t=pt([A({token:{token:ic,named:Os.ELLIPSE}})],t)}(),mf=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.x,i=t.y,o=t.width,a=t.height,u=0,s=0;return o instanceof Oa&&o.unit===Bo.kPixels&&(u=o.value),a instanceof Oa&&a.unit===Bo.kPixels&&(s=a.value),n&&!Ph(n)&&(u||(u=n.width),s||(s=n.height)),o instanceof Oa&&(o.value=u),a instanceof Oa&&(a.value=s),{width:u,height:s,x:r.value||0,y:i.value||0}},t=pt([A({token:[{token:ic,named:Os.RECT},{token:ic,named:Os.IMAGE},{token:ic,named:Os.GROUP}]})],t)}(),gf=function(){function t(){}return t.prototype.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,u=t.fontWeight,s=t.fontVariant;return n&&o&&a&&u&&s&&r&&i},t.prototype.update=function(t,e){var n,r,i=t.text,o=t.textAlign,u=t.lineWidth,s=t.textBaseline,c=t.x,l=t.y,h=t.dx,f=t.dy,p=((null===(r=null===(n=null==e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.getConfig())||{}).offscreenCanvas;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var d=this.textService.measureText(i,t,p);t.metrics=d;var y=d.width,v=d.height,m=d.lineHeight,g=d.fontProperties,b=a.fromValues(y/2,v/2,0),T=[0,1],E=0;"center"===o.value?(E=u.value/2,T=[.5,1]):"right"!==o.value&&"end"!==o.value||(E=u.value,T=[1,1]);var w=0;return"middle"===s.value?w=b[1]:"top"===s.value||"hanging"===s.value?w=2*b[1]:"alphabetic"===s.value?w=m-g.ascent:"bottom"!==s.value&&"ideographic"!==s.value||(w=0),h&&(E+=h.value),f&&(w+=f.value),t.anchor=[new Oa(T[0]),new Oa(T[1]),new Oa(0)],{width:2*b[0],height:2*b[1],x:c.value||0,y:l.value||0,offsetX:E,offsetY:w}},pt([_(df),dt("design:type",df)],t.prototype,"textService",void 0),t=pt([A({token:{token:ic,named:Os.TEXT}})],t)}(),bf=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e.value,r.value),a=Math.max(e.value,r.value),u=Math.min(n.value,i.value);return{width:a-o,height:Math.max(n.value,i.value)-u,x:o,y:u}},t=pt([A({token:{token:ic,named:Os.LINE}})],t)}(),Tf=function(){function t(){}return t.prototype.update=function(t){var e=t.points.points,n=Math.min.apply(Math,bt([],gt(e.map((function(t){return t[0]}))),!1)),r=Math.max.apply(Math,bt([],gt(e.map((function(t){return t[0]}))),!1)),i=Math.min.apply(Math,bt([],gt(e.map((function(t){return t[1]}))),!1));return{width:r-n,height:Math.max.apply(Math,bt([],gt(e.map((function(t){return t[1]}))),!1))-i,x:n,y:i}},t=pt([A({token:[{token:ic,named:Os.POLYLINE},{token:ic,named:Os.POLYGON}]})],t)}(),Ef=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect,n=e.x,r=e.y;return{width:e.width,height:e.height,x:n,y:r}},t=pt([A({token:{token:ic,named:Os.PATH}})],t)}(),wf=$((function(t){Object(f.decorate)(N(),st.EventEmitter),t(Tt),t(Vo),t({token:Ro,useFactory:function(t){return function(){return t.container.get(Do)}}}),t({token:Jh,useClass:Qh}),t(cf),t(df),t(yf),t(vf),t(mf),t(gf),t(bf),t(Tf),t(Ef),t({token:rc,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(ic,n)&&(e[n]=t.container.getNamed(ic,n)),e[n]}}}),t(Mh),t(hh),t(ql),t(Wl),t(Hl),t(Yl),t(Kl),t(Xl),t(Zl),t(Jl),t(Ql),t($l),t(th),t(eh),t(nh),t(rh),t(ih),t(oh),t(ah),t(uh)})),Mf=l.defineToken("DefaultCamera");!function(t){t[t.ORBITING=0]="ORBITING",t[t.EXPLORING=1]="EXPLORING",t[t.TRACKING=2]="TRACKING"}(tf||(tf={})),function(t){t[t.DEFAULT=0]="DEFAULT",t[t.ROTATIONAL=1]="ROTATIONAL",t[t.TRANSLATIONAL=2]="TRANSLATIONAL",t[t.CINEMATIC=3]="CINEMATIC"}(ef||(ef={})),function(t){t[t.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",t[t.PERSPECTIVE=1]="PERSPECTIVE"}(nf||(nf={}));var kf,Pf={UPDATED:"updated"},xf=Math.PI/180,Sf=180/Math.PI,Nf=function(t){function e(e,n){void 0===e&&(e=tf.EXPLORING),void 0===n&&(n=ef.DEFAULT);var r=t.call(this)||this;return r.matrix=o.create(),r.right=a.fromValues(1,0,0),r.up=a.fromValues(0,1,0),r.forward=a.fromValues(0,0,1),r.position=a.fromValues(0,0,1),r.focalPoint=a.fromValues(0,0,0),r.distanceVector=a.fromValues(0,0,-1),r.distance=1,r.azimuth=0,r.elevation=0,r.roll=0,r.relAzimuth=0,r.relElevation=0,r.relRoll=0,r.dollyingStep=0,r.maxDistance=1/0,r.minDistance=-1/0,r.zoom=1,r.rotateWorld=!1,r.fov=30,r.near=.1,r.far=1e3,r.aspect=1,r.projectionMatrix=o.create(),r.projectionMatrixInverse=o.create(),r.jitteredProjectionMatrix=void 0,r.enableUpdate=!0,r.type=tf.EXPLORING,r.trackingMode=ef.DEFAULT,r.projectionMode=nf.PERSPECTIVE,r.frustum=new Po,r.landmarks=[],r.orthoMatrix=o.create(),r.setType(e,n),r}return lt(e,t),e.prototype.isOrtho=function(){return this.projectionMode===nf.ORTHOGRAPHIC},e.prototype.getProjectionMode=function(){return this.projectionMode},e.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.prototype.getFrustum=function(){return this.frustum},e.prototype.getPosition=function(){return this.position},e.prototype.getFocalPoint=function(){return this.focalPoint},e.prototype.getDollyingStep=function(){return this.dollyingStep},e.prototype.getNear=function(){return this.near},e.prototype.getFar=function(){return this.far},e.prototype.getZoom=function(){return this.zoom},e.prototype.getOrthoMatrix=function(){return this.orthoMatrix},e.prototype.getView=function(){return this.view},e.prototype.setEnableUpdate=function(t){this.enableUpdate=t},e.prototype.setType=function(t,e){return this.type=t,this.type===tf.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===tf.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},e.prototype.setTrackingMode=function(t){if(this.type!==tf.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.prototype.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.prototype.getViewTransform=function(){return o.invert(o.create(),this.matrix)},e.prototype.getWorldTransform=function(){return this.matrix},e.prototype.jitterProjectionMatrix=function(t,e){var n=o.fromTranslation(o.create(),[t,e,0]);this.jitteredProjectionMatrix=o.multiply(o.create(),n,this.projectionMatrix)},e.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},e.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.prototype.setNear=function(t){return this.projectionMode===nf.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.prototype.setFar=function(t){return this.projectionMode===nf.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.prototype.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===nf.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.prototype.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===nf.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===nf.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===nf.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.prototype.setPerspective=function(t,e,n,r){var i;this.projectionMode=nf.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var u=this.near*Math.tan(.5*xf*this.fov)/this.zoom,s=2*u,c=this.aspect*s,l=-.5*c;if(null===(i=this.view)||void 0===i?void 0:i.enabled){var h=this.view.fullWidth,f=this.view.fullHeight;l+=this.view.offsetX*c/h,u-=this.view.offsetY*s/f,c*=this.view.width/h,s*=this.view.height/f}return pa(this.projectionMatrix,l,l+c,u,u-s,t,this.far),o.scale(this.projectionMatrix,this.projectionMatrix,a.fromValues(1,-1,1)),o.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.prototype.setOrthographic=function(t,e,n,r,i,u){var s;this.projectionMode=nf.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=u;var c=(this.rright-this.left)/(2*this.zoom),l=(this.top-this.bottom)/(2*this.zoom),h=(this.rright+this.left)/2,f=(this.top+this.bottom)/2,p=h-c,d=h+c,y=f+l,v=f-l;if(null===(s=this.view)||void 0===s?void 0:s.enabled){var m=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d=(p+=m*this.view.offsetX)+m*this.view.width,v=(y-=g*this.view.offsetY)-g*this.view.height}return o.ortho(this.projectionMatrix,p,d,v,y,i,u),o.scale(this.projectionMatrix,this.projectionMatrix,a.fromValues(1,-1,1)),o.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.prototype.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=na(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.prototype.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r=a.fromValues(0,1,0);if(this.focalPoint=na(t,e,n),this.trackingMode===ef.CINEMATIC){var i=a.subtract(a.create(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var u=a.length(i),s=Math.asin(e/u)*Sf,c=90+Math.atan2(n,t)*Sf,l=o.create();o.rotateY(l,l,c*xf),o.rotateX(l,l,s*xf),r=a.transformMat4(a.create(),[0,1,0],l)}return o.invert(this.matrix,o.lookAt(o.create(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.prototype.getDistance=function(){return this.distance},e.prototype.setDistance=function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=a.create();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},e.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},e.prototype.setMinDistance=function(t){return this.minDistance=t,this},e.prototype.setAzimuth=function(t){return this.azimuth=ea(t),this.computeMatrix(),this._getAxes(),this.type===tf.ORBITING||this.type===tf.EXPLORING?this._getPosition():this.type===tf.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getAzimuth=function(){return this.azimuth},e.prototype.setElevation=function(t){return this.elevation=ea(t),this.computeMatrix(),this._getAxes(),this.type===tf.ORBITING||this.type===tf.EXPLORING?this._getPosition():this.type===tf.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getElevation=function(){return this.elevation},e.prototype.setRoll=function(t){return this.roll=ea(t),this.computeMatrix(),this._getAxes(),this.type===tf.ORBITING||this.type===tf.EXPLORING?this._getPosition():this.type===tf.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getRoll=function(){return this.roll},e.prototype.rotate=function(t,e,n){if(this.relElevation=ea(e),this.relAzimuth=ea(t),this.relRoll=ea(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===tf.EXPLORING){var r=s.setAxisAngle(s.create(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*xf),i=s.setAxisAngle(s.create(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*xf),a=s.setAxisAngle(s.create(),[0,0,1],this.relRoll*xf),u=s.multiply(s.create(),i,r);u=s.multiply(s.create(),u,a);var c=o.fromQuat(o.create(),u);o.translate(this.matrix,this.matrix,[0,0,-this.distance]),o.multiply(this.matrix,this.matrix,c),o.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===tf.ORBITING||this.type===tf.EXPLORING?this._getPosition():this.type===tf.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=na(t,e,0),r=a.clone(this.position);return a.add(r,r,a.scale(a.create(),this.right,n[0])),a.add(r,r,a.scale(a.create(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=a.clone(this.position),r=this.dollyingStep,i=this.distance+t*this.dollyingStep;return r=Math.max(Math.min(i,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===tf.ORBITING||this.type===tf.EXPLORING?this._getDistance():this.type===tf.TRACKING&&a.add(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.createLandmark=function(t,n){void 0===n&&(n={});var r=n.position,i=void 0===r?this.position:r,u=n.focalPoint,s=void 0===u?this.focalPoint:u,c=n.roll,l=n.zoom,h=new e;h.setType(this.type,void 0),h.setPosition(i[0],i[1]||this.position[1],i[2]||this.position[2]),h.setFocalPoint(s[0],s[1]||this.focalPoint[1],s[2]||this.focalPoint[2]),h.setRoll(c||this.roll),h.setZoom(l||this.zoom);var f={name:t,matrix:o.clone(h.matrix),right:a.clone(h.right),up:a.clone(h.up),forward:a.clone(h.forward),position:a.clone(h.position),focalPoint:a.clone(h.focalPoint),distanceVector:a.clone(h.distanceVector),distance:h.distance,dollyingStep:h.dollyingStep,azimuth:h.azimuth,elevation:h.elevation,roll:h.roll,relAzimuth:h.relAzimuth,relElevation:h.relElevation,relRoll:h.relRoll,zoom:h.zoom};return this.landmarks.push(f),f},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=Ph(t)?this.landmarks.find((function(e){return e.name===t})):t;if(r){var i=Zo(e)?{duration:e}:e,o=i.easing,u=void 0===o?"linear":o,s=i.duration,c=void 0===s?100:s,l=i.easingFunction,h=void 0===l?void 0:l,f=i.onfinish,p=void 0===f?void 0:f;if(0===c)return this.syncFromLandmark(r),void(p&&p());void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID);var d,y=r.position,v=r.focalPoint,m=r.zoom,g=r.roll,b=h||el(u),T=function(){n.setFocalPoint(v),n.setPosition(y),n.setRoll(g),n.setZoom(m),n.computeMatrix(),n.triggerUpdate(),p&&p()};this.canvas.requestAnimationFrame((function t(e){void 0===d&&(d=e);var r=e-d;if(r>c)T();else{var i,o,u=b(r/c),s=a.create(),l=a.create();a.lerp(s,n.focalPoint,v,u),a.lerp(l,n.position,y,u),o=n.roll*(1-u)+g*u,i=n.zoom*(1-u)+m*u,n.setFocalPoint(s),n.setPosition(l),n.setRoll(o),n.setZoom(i),a.dist(s,v)+a.dist(l,y)<=.01?T():(n.computeMatrix(),n.triggerUpdate(),r<c&&(n.landmarkAnimationID=n.canvas.requestAnimationFrame(t)))}}))}},e.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.prototype.computeMatrix=function(){var t=s.setAxisAngle(s.create(),[0,0,1],this.roll*xf);o.identity(this.matrix);var e=s.setAxisAngle(s.create(),[1,0,0],(this.rotateWorld&&this.type!==tf.TRACKING||this.type===tf.TRACKING?1:-1)*this.elevation*xf),n=s.setAxisAngle(s.create(),[0,1,0],(this.rotateWorld&&this.type!==tf.TRACKING||this.type===tf.TRACKING?1:-1)*this.azimuth*xf),r=s.multiply(s.create(),n,e);r=s.multiply(s.create(),r,t);var i=o.fromQuat(o.create(),r);this.type===tf.ORBITING||this.type===tf.EXPLORING?(o.translate(this.matrix,this.matrix,this.focalPoint),o.multiply(this.matrix,this.matrix,i),o.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===tf.TRACKING&&(o.translate(this.matrix,this.matrix,this.position),o.multiply(this.matrix,this.matrix,i))},e.prototype._setPosition=function(t,e,n){this.position=na(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},e.prototype._getAxes=function(){a.copy(this.right,na(u.transformMat4(u.create(),[1,0,0,0],this.matrix))),a.copy(this.up,na(u.transformMat4(u.create(),[0,1,0,0],this.matrix))),a.copy(this.forward,na(u.transformMat4(u.create(),[0,0,1,0],this.matrix))),a.normalize(this.right,this.right),a.normalize(this.up,this.up),a.normalize(this.forward,this.forward)},e.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=a.length(this.distanceVector);if(0===r)return this.elevation=0,void(this.azimuth=0);this.type===tf.TRACKING||this.rotateWorld?(this.elevation=Math.asin(e/r)*Sf,this.azimuth=Math.atan2(-t,-n)*Sf):(this.elevation=-Math.asin(e/r)*Sf,this.azimuth=-Math.atan2(-t,-n)*Sf)},e.prototype._getPosition=function(){a.copy(this.position,na(u.transformMat4(u.create(),[0,0,0,1],this.matrix))),this._getDistance()},e.prototype._getFocalPoint=function(){a.transformMat3(this.distanceVector,[0,0,-this.distance],i.fromMat4(i.create(),this.matrix)),a.add(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e.prototype._getDistance=function(){this.distanceVector=a.subtract(a.create(),this.focalPoint,this.position),this.distance=a.length(this.distanceVector),this.dollyingStep=this.distance/100},e.prototype._getOrthoMatrix=function(){if(this.projectionMode===nf.ORTHOGRAPHIC){var t=this.position,e=s.setAxisAngle(s.create(),[0,0,1],-this.roll*Math.PI/180);o.fromRotationTranslationScaleOrigin(this.orthoMatrix,e,a.fromValues((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),a.fromValues(this.zoom,this.zoom,1),t)}},e.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=o.multiply(o.create(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.emit(Pf.UPDATED)}},e.prototype.syncFromLandmark=function(t){this.matrix=o.copy(this.matrix,t.matrix),this.right=a.copy(this.right,t.right),this.up=a.copy(this.up,t.up),this.forward=a.copy(this.forward,t.forward),this.position=a.copy(this.position,t.position),this.focalPoint=a.copy(this.focalPoint,t.focalPoint),this.distanceVector=a.copy(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(st.EventEmitter),Af=function(){function t(t){this.plugins=[],this.config=ht({enableDirtyCheck:!0,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableTAA:!1},t)}return t.prototype.registerPlugin=function(t){this.plugins.push(t)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}(),Cf=n(11),_f=function(){function t(){}return t.prototype.apply=function(t){var e=this;t.hooks.dirtycheck.tap((function(t){if(t){var n=e.canvasConfig.renderer.getConfig().enableDirtyCheck,r=t.renderable,i=e.renderingContext.renderReasons.has(Zh.CAMERA_CHANGED),o=e.renderingContext.dirty;return r.dirty||i||!n&&o?t:null}return t}))},pt([_(Vs),dt("design:type",Object)],t.prototype,"canvasConfig",void 0),pt([_(rf),dt("design:type",Object)],t.prototype,"renderingContext",void 0),t=pt([A({contrib:of})],t)}(),Of=l.defineToken("CullingStrategyContribution"),If=function(){function t(){}return t.prototype.apply=function(t){var e=this.strategyProvider.getContributions();t.hooks.cull.tap((function(t){if(t){var n=t.cullable;return 0===e.length?n.visible=!0:n.visible=e.every((function(e){return e.isVisible(t)})),!n.isCulled()&&t.isVisible()?t:null}return t})),t.hooks.afterRender.tap((function(t){t.cullable.visibilityPlaneMask=-1}))},pt([ut(Of),dt("design:type",Object)],t.prototype,"strategyProvider",void 0),t=pt([A({contrib:of})],t)}(),Rf=function(){function t(){}return t.prototype.apply=function(t){var e=this,n=function(e){e.target.renderable.dirty=!0,t.dirtify()},r=function(){t.dirtify()},i=function(n){var r=n.target;e.styleValueRegistry.recalc(r),Xh(r),t.dirtify()},o=function(e){Xh(e.target),t.dirtify()};t.hooks.init.tapPromise((function(){return yt(e,void 0,void 0,(function(){return vt(this,(function(t){return this.renderingContext.root.addEventListener(ko.MOUNTED,i),this.renderingContext.root.addEventListener(ko.UNMOUNTED,o),this.renderingContext.root.addEventListener(ko.ATTR_MODIFIED,n),this.renderingContext.root.addEventListener(ko.BOUNDS_CHANGED,r),[2]}))}))})),t.hooks.destroy.tap((function(){e.renderingContext.root.removeEventListener(ko.MOUNTED,i),e.renderingContext.root.removeEventListener(ko.UNMOUNTED,o),e.renderingContext.root.removeEventListener(ko.ATTR_MODIFIED,n),e.renderingContext.root.removeEventListener(ko.BOUNDS_CHANGED,r)}))},pt([_(rf),dt("design:type",Object)],t.prototype,"renderingContext",void 0),pt([_(lh),dt("design:type",Function)],t.prototype,"styleValueRegistry",void 0),t=pt([A({contrib:of})],t)}(),Df=[Os.CIRCLE,Os.ELLIPSE,Os.IMAGE,Os.RECT,Os.LINE,Os.POLYLINE,Os.POLYGON,Os.TEXT,Os.PATH,Os.HTML],Lf=function(){function t(){}return t.prototype.isVisible=function(t){var e,n,r=t.cullable;if(!r.enable)return!0;var i=t.getRenderBounds();if(To.isEmpty(i))return!1;var o=this.camera.getFrustum(),a=null===(n=null===(e=t.parentNode)||void 0===e?void 0:e.cullable)||void 0===n?void 0:n.visibilityPlaneMask;return r.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(t,i,a||lo.INDETERMINATE,o.planes),r.visible=r.visibilityPlaneMask!==lo.OUTSIDE,r.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===lo.OUTSIDE||n===lo.INSIDE)return n;for(var i=lo.INSIDE,o=Df.indexOf(t.nodeName)>-1,u=0,s=r.length;u<s;++u){var c=1<<u;if(0!=(n&c)&&(!o||4!==u&&5!==u)){var l=r[u],h=l.normal,f=l.distance;if(a.dot(h,e.getPositiveFarPoint(r[u]))+f<0)return lo.OUTSIDE;a.dot(h,e.getNegativeFarPoint(r[u]))+f<0&&(i|=c)}}return i},pt([_(Mf),dt("design:type",Nf)],t.prototype,"camera",void 0),t=pt([A({contrib:Of})],t)}(),Vf=function(){function t(){var t=this;this.autoPreventDefault=!0,this.rootPointerEvent=new _l(null),this.rootWheelEvent=new Ol(null),this.onPointerMove=function(e){var n,r,i=null===(r=null===(n=t.renderingContext.root)||void 0===n?void 0:n.ownerDocument)||void 0===r?void 0:r.defaultView;if(!i.supportTouchEvent||"touch"!==e.pointerType){var o=t.normalizeToPointerEvent(e,i),a=t.bootstrapEvent(t.rootPointerEvent,o,i);t.eventService.mapEvent(a),t.setCursor(t.eventService.cursor)}}}return t.prototype.apply=function(t){var e=this,n=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler((function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){switch(e.label){case 0:return[4,this.renderingService.hooks.pick.callPromise({position:t,picked:[],topmost:!0})];case 1:return[2,e.sent().picked[0]||null]}}))}))})),t.hooks.pointerWheel.tap((function(t){var n=e.normalizeWheelEvent(t);e.eventService.mapEvent(n)})),t.hooks.pointerDown.tap((function(t){if(!n.supportTouchEvent||"touch"!==t.pointerType){var r=e.normalizeToPointerEvent(t,n);if(e.autoPreventDefault&&r.isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();var i=e.bootstrapEvent(e.rootPointerEvent,r,n);e.eventService.mapEvent(i),e.setCursor(e.eventService.cursor)}})),t.hooks.pointerUp.tap((function(t){if(!n.supportTouchEvent||"touch"!==t.pointerType){var r=e.contextService.getDomElement(),i=r&&t.target&&t.target!==r&&r.contains&&!r.contains(t.target)?"outside":"",o=e.normalizeToPointerEvent(t,n),a=e.bootstrapEvent(e.rootPointerEvent,o,n);a.type+=i,e.eventService.mapEvent(a),e.setCursor(e.eventService.cursor)}})),t.hooks.pointerMove.tap(this.onPointerMove),t.hooks.pointerOver.tap(this.onPointerMove),t.hooks.pointerOut.tap(this.onPointerMove),t.hooks.pointerCancel.tap((function(t){if(!n.supportTouchEvent||"touch"!==t.pointerType){var r=e.normalizeToPointerEvent(t,n);if(e.autoPreventDefault&&r.isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();var i=e.bootstrapEvent(e.rootPointerEvent,r,n);e.eventService.mapEvent(i),e.setCursor(e.eventService.cursor)}}))},t.prototype.formatTouch=function(t){var e={nativeTouch:t,clientX:t.clientX,clientY:t.clientY,screenX:t.screenX,screenY:t.screenY,viewportX:0,viewportY:0,canvasX:0,canvasY:0,x:0,y:0,target:void 0,force:t.force,identifier:t.identifier,pageX:t.pageX,pageY:t.pageY,radiusX:t.radiusX,radiusY:t.radiusY,rotationAngle:t.rotationAngle},n=this.eventService.client2Viewport(new Oo(t.clientX,t.clientY)),r=n.x,i=n.y;e.viewportX=r,e.viewportY=i;var o=this.eventService.viewport2Canvas({x:r,y:i}),a=o.x,u=o.y;return e.canvasX=a,e.canvasY=u,e.x=a,e.y=u,e},t.prototype.bootstrapEvent=function(t,e,n){if(t.pointerType=e.pointerType,"touch"!==t.pointerType){var r=t;r.view=n,r.originalEvent=null,r.nativeEvent=e,r.pointerId=e.pointerId,r.width=e.width,r.height=e.height,r.isPrimary=e.isPrimary,r.pressure=e.pressure,r.tangentialPressure=e.tangentialPressure,r.tiltX=e.tiltX,r.tiltY=e.tiltY,r.twist=e.twist,this.transferMouseData(r,e);var i=this.eventService.client2Viewport(new Oo(e.clientX,e.clientY)),o=i.x,a=i.y;r.viewport.x=o,r.viewport.y=a;var u=this.eventService.viewport2Canvas(r.viewport),s=u.x,c=u.y;r.canvas.x=s,r.canvas.y=c,r.global.copyFrom(r.canvas),r.offset.copyFrom(r.canvas),r.isTrusted=e.isTrusted,"pointerleave"===r.type&&(r.type="pointerout"),r.type.startsWith("mouse")&&(r.type=r.type.replace("mouse","pointer"))}else{var l=t,h=e,f=[],p=[];if(h.changedTouches)for(var d=0;d<h.changedTouches.length;d++)f.push(this.formatTouch(h.changedTouches[d]));if(h.touches)for(d=0;d<h.touches.length;d++)p.push(this.formatTouch(h.touches[d]));l.nativeEvent=e,l.isTrusted=e.isTrusted,l.timeStamp=performance.now(),l.type=e.type,l.altKey=e.altKey,l.metaKey=e.metaKey,l.shiftKey=e.shiftKey,l.ctrlKey=e.ctrlKey,l.changedTouches=f,l.touches=p,l.targetTouches=[]}return t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.eventService.client2Viewport(new Oo(t.clientX,t.clientY)),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.eventService.viewport2Canvas(e.viewport),a=o.x,u=o.y;return e.canvas.x=a,e.canvas.y=u,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},t.prototype.normalizeToPointerEvent=function(t,e){if(e.isTouchEvent(t))return t.isNormalized=!0,t.pointerType="touch",t;if(e.isMouseEvent(t)){var n=t;return Ko(n.isPrimary)&&(n.isPrimary=!0),Ko(n.width)&&(n.width=1),Ko(n.height)&&(n.height=1),Ko(n.tiltX)&&(n.tiltX=0),Ko(n.tiltY)&&(n.tiltY=0),Ko(n.pointerType)&&(n.pointerType="mouse"),Ko(n.pointerId)&&(n.pointerId=Rh),Ko(n.pressure)&&(n.pressure=.5),Ko(n.twist)&&(n.twist=0),Ko(n.tangentialPressure)&&(n.tangentialPressure=0),n.isNormalized=!0,n}return t},pt([_(Vs),dt("design:type",Object)],t.prototype,"canvasConfig",void 0),pt([_($h),dt("design:type",Object)],t.prototype,"contextService",void 0),pt([_(af),dt("design:type",af)],t.prototype,"renderingService",void 0),pt([_(rf),dt("design:type",Object)],t.prototype,"renderingContext",void 0),pt([_(sf),dt("design:type",sf)],t.prototype,"eventService",void 0),t=pt([A({contrib:of})],t)}(),Bf=$((function(t){et.register(t,of,{cache:!1}),et.register(t,Of,{cache:!1}),t(af),t(sf),t(Vf),t(Rf),t(_f),t(If),t(Lf)}));!function(t){t.READY="ready",t.BEFORE_RENDER="beforerender",t.AFTER_RENDER="afterrender",t.BEFORE_DESTROY="beforedestroy",t.AFTER_DESTROY="afterdestroy",t.RESIZE="resize"}(kf||(kf={}));var jf=function(t){function e(e){var n=t.call(this)||this;n.container=ot.createChild(),n.Element=vl,n.inited=!1,n.document=new Al,n.document.defaultView=n,n.customElements=new zl;var r=e.container,i=e.canvas,o=e.offscreenCanvas,a=e.width,u=e.height,s=e.devicePixelRatio,c=e.renderer,l=e.background,h=e.requestAnimationFrame,f=e.cancelAnimationFrame,p=e.createImage,d=e.supportPointerEvent,y=e.supportTouchEvent,v=e.isTouchEvent,m=e.isMouseEvent;Bh(r,n);var g=a,b=u,T=s;return i&&(T=(T=s||jh&&window.devicePixelRatio||1)>=1?Math.ceil(T):1,g=a||i.width/T,b=u||i.height/T),n.devicePixelRatio=T,n.requestAnimationFrame=null!=h?h:Cf.b.bind(globalThis),n.cancelAnimationFrame=null!=f?f:Cf.a.bind(globalThis),n.supportTouchEvent=null!=y?y:"ontouchstart"in globalThis,n.supportPointerEvent=null!=d?d:!!globalThis.PointerEvent,n.isTouchEvent=null!=v?v:function(t){return n.supportTouchEvent&&t instanceof globalThis.TouchEvent},n.isMouseEvent=null!=m?m:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!n.supportPointerEvent||!(t instanceof globalThis.PointerEvent))},n.initRenderingContext({container:r,canvas:i,width:g,height:b,renderer:c,offscreenCanvas:o,devicePixelRatio:T,cursor:"default",background:l,createImage:p}),n.initDefaultCamera(g,b),n.initRenderer(c),n}return lt(e,t),e.prototype.initRenderingContext=function(t){var e=this;this.container.register({token:Vs,useValue:t}),this.container.register({token:rf,useValue:{root:this.document.documentElement,renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(ko.CHILD_INSERTED,(function(t){e.mountChildren(t.detail.child)})),this.document.documentElement.addEventListener(ko.CHILD_REMOVED,(function(t){e.unmountChildren(t.detail.child)}))},e.prototype.initDefaultCamera=function(t,e){var n=(new Nf).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3);n.canvas=this;var r=this.container.get(rf);n.on(Pf.UPDATED,(function(){r.renderReasons.add(Zh.CAMERA_CHANGED)})),this.container.register({token:Mf,useValue:n})},e.prototype.getConfig=function(){return this.container.get(Vs)},e.prototype.getContainer=function(){return this.container},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.container.get(Mf)},e.prototype.getContextService=function(){return this.container.get($h)},e.prototype.getEventService=function(){return this.eventService},e.prototype.getRenderingService=function(){return this.renderingService},e.prototype.getRenderingContext=function(){return this.container.get(rf)},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(this.readyPromise=new Promise((function(e){t.resolveReadyPromise=function(){e(t)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t){(void 0===t&&(t=!0),this.emit(kf.BEFORE_DESTROY,(function(){})),this.frameId)&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var e=this.getRoot();this.unmountChildren(e),t&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),this.emit(kf.AFTER_DESTROY,{})},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.container.get(Vs);n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.container.get(Mf),i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===nf.ORTHOGRAPHIC?r.setOrthographic(t/-2,t/2,e/2,e/-2,r.getNear(),r.getFar()):r.setAspect(t/e),this.emit(kf.RESIZE,{width:t,height:e})},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t,e){return void 0===e&&(e=!0),this.document.documentElement.removeChild(t,e)},e.prototype.removeChildren=function(t){void 0===t&&(t=!0),this.document.documentElement.removeChildren(t)},e.prototype.render=function(){(this.emit(kf.BEFORE_RENDER,{}),this.container.isBound(af))&&this.container.get(af).render(this.getConfig());this.emit(kf.AFTER_RENDER,{})},e.prototype.run=function(){var t=this;!function e(){t.render(),t.frameId=requestAnimationFrame(e)}()},e.prototype.initRenderer=function(t){var e=this;if(!t)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(t);var n=this.container.get($h);this.renderingService=this.container.get(af),this.eventService=this.container.get(sf),n.init(),this.renderingService.init().then((function(){e.emit(kf.READY,{}),e.readyPromise&&e.resolveReadyPromise(),e.inited=!0})),t.getConfig().enableAutoRendering&&this.run(),this.getRoot().forEach((function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)})),this.mountChildren(this.getRoot())},e.prototype.loadCommonContainerModule=function(){this.container.unload(Bf),this.container.load(Bf,!0)},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.init(e.container)}))},e.prototype.setRenderer=function(t){var e=this,n=this.getConfig();if(n.renderer!==t){var r=n.renderer;n.renderer=t,this.destroy(!1),null==r||r.getPlugins().reverse().forEach((function(t){t.destroy(e.container)})),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=this,n=[];t.forEach((function(t){t.isConnected&&n.push(t)})),n.reverse().forEach((function(t){t.emit(ko.UNMOUNTED,{}),t!==e.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}))},e.prototype.mountChildren=function(t){var e=this;t.forEach((function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.emit(ko.MOUNTED,{}))}))},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(uc);ot.load(wf)}])}));
30
+ ***************************************************************************** */function lt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ct(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ht=function(){return(ht=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function ft(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function pt(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function dt(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function yt(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))}function vt(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}Object.create;function mt(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function gt(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function bt(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}Object.create;var Tt=function(){function t(){this.pool={}}return t.prototype.getByEntity=function(t){return this.pool[t]},t.prototype.add=function(t,e){this.pool[t]=e},t.prototype.remove=function(t){delete this.pool[t]},t=pt([A()],t)}(),Et=1e-6,wt="undefined"!=typeof Float32Array?Float32Array:Array,Mt=Math.random;Math.PI;function kt(){var t=new wt(9);return wt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function Pt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function xt(t){var e=new wt(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function St(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function Nt(t,e,n,r,i,o,a,u,s){var c=new wt(9);return c[0]=t,c[1]=e,c[2]=n,c[3]=r,c[4]=i,c[5]=o,c[6]=a,c[7]=u,c[8]=s,c}function At(t,e,n,r,i,o,a,u,s,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=u,t[7]=s,t[8]=c,t}function Ct(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function _t(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function Ot(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],c=e[7],l=e[8],h=l*a-u*c,f=-l*o+u*s,p=c*o-a*s,d=n*h+r*f+i*p;return d?(d=1/d,t[0]=h*d,t[1]=(-l*r+i*c)*d,t[2]=(u*r-i*a)*d,t[3]=f*d,t[4]=(l*n-i*s)*d,t[5]=(-u*n+i*o)*d,t[6]=p*d,t[7]=(-c*n+r*s)*d,t[8]=(a*n-r*o)*d,t):null}function It(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],c=e[7],l=e[8];return t[0]=a*l-u*c,t[1]=i*c-r*l,t[2]=r*u-i*a,t[3]=u*s-o*l,t[4]=n*l-i*s,t[5]=i*o-n*u,t[6]=o*c-a*s,t[7]=r*s-n*c,t[8]=n*a-r*o,t}function Rt(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],u=t[6],s=t[7],c=t[8];return e*(c*o-a*s)+n*(-c*i+a*u)+r*(s*i-o*u)}function Dt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1],d=n[2],y=n[3],v=n[4],m=n[5],g=n[6],b=n[7],T=n[8];return t[0]=f*r+p*a+d*c,t[1]=f*i+p*u+d*l,t[2]=f*o+p*s+d*h,t[3]=y*r+v*a+m*c,t[4]=y*i+v*u+m*l,t[5]=y*o+v*s+m*h,t[6]=g*r+b*a+T*c,t[7]=g*i+b*u+T*l,t[8]=g*o+b*s+T*h,t}function Lt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=u,t[5]=s,t[6]=f*r+p*a+c,t[7]=f*i+p*u+l,t[8]=f*o+p*s+h,t}function Vt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*a,t[1]=p*i+f*u,t[2]=p*o+f*s,t[3]=p*a-f*r,t[4]=p*u-f*i,t[5]=p*s-f*o,t[6]=c,t[7]=l,t[8]=h,t}function Bt(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function jt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function Ft(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Ut(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Gt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}function zt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,u=r+r,s=i+i,c=n*a,l=r*a,h=r*u,f=i*a,p=i*u,d=i*s,y=o*a,v=o*u,m=o*s;return t[0]=1-h-d,t[3]=l-m,t[6]=f+v,t[1]=l+m,t[4]=1-c-d,t[7]=p-y,t[2]=f-v,t[5]=p+y,t[8]=1-c-h,t}function qt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],m=e[15],g=n*u-r*a,b=n*s-i*a,T=n*c-o*a,E=r*s-i*u,w=r*c-o*u,M=i*c-o*s,k=l*y-h*d,P=l*v-f*d,x=l*m-p*d,S=h*v-f*y,N=h*m-p*y,A=f*m-p*v,C=g*A-b*N+T*S+E*x-w*P+M*k;return C?(C=1/C,t[0]=(u*A-s*N+c*S)*C,t[1]=(s*x-a*A-c*P)*C,t[2]=(a*N-u*x+c*k)*C,t[3]=(i*N-r*A-o*S)*C,t[4]=(n*A-i*x+o*P)*C,t[5]=(r*x-n*N-o*k)*C,t[6]=(y*M-v*w+m*E)*C,t[7]=(v*T-d*M-m*b)*C,t[8]=(d*w-y*T+m*g)*C,t):null}function Wt(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function Ht(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function Yt(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function Kt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t}function Xt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function Zt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t}function Jt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t}function Qt(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]}function $t(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],u=t[5],s=t[6],c=t[7],l=t[8],h=e[0],f=e[1],p=e[2],d=e[3],y=e[4],v=e[5],m=e[6],g=e[7],b=e[8];return Math.abs(n-h)<=Et*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-f)<=Et*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-p)<=Et*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-d)<=Et*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-y)<=Et*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(u-v)<=Et*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(s-m)<=Et*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(c-g)<=Et*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(l-b)<=Et*Math.max(1,Math.abs(l),Math.abs(b))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var te=Dt,ee=Xt;function ne(){var t=new wt(16);return wt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function re(t){var e=new wt(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function ie(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function oe(t,e,n,r,i,o,a,u,s,c,l,h,f,p,d,y){var v=new wt(16);return v[0]=t,v[1]=e,v[2]=n,v[3]=r,v[4]=i,v[5]=o,v[6]=a,v[7]=u,v[8]=s,v[9]=c,v[10]=l,v[11]=h,v[12]=f,v[13]=p,v[14]=d,v[15]=y,v}function ae(t,e,n,r,i,o,a,u,s,c,l,h,f,p,d,y,v){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=u,t[7]=s,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=p,t[13]=d,t[14]=y,t[15]=v,t}function ue(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function se(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],u=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=u}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function ce(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],m=e[15],g=n*u-r*a,b=n*s-i*a,T=n*c-o*a,E=r*s-i*u,w=r*c-o*u,M=i*c-o*s,k=l*y-h*d,P=l*v-f*d,x=l*m-p*d,S=h*v-f*y,N=h*m-p*y,A=f*m-p*v,C=g*A-b*N+T*S+E*x-w*P+M*k;return C?(C=1/C,t[0]=(u*A-s*N+c*S)*C,t[1]=(i*N-r*A-o*S)*C,t[2]=(y*M-v*w+m*E)*C,t[3]=(f*w-h*M-p*E)*C,t[4]=(s*x-a*A-c*P)*C,t[5]=(n*A-i*x+o*P)*C,t[6]=(v*T-d*M-m*b)*C,t[7]=(l*M-f*T+p*b)*C,t[8]=(a*N-u*x+c*k)*C,t[9]=(r*x-n*N-o*k)*C,t[10]=(d*w-y*T+m*g)*C,t[11]=(h*T-l*w-p*g)*C,t[12]=(u*P-a*S-s*k)*C,t[13]=(n*S-r*P+i*k)*C,t[14]=(y*b-d*E-v*g)*C,t[15]=(l*E-h*b+f*g)*C,t):null}function le(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],m=e[15];return t[0]=u*(f*m-p*v)-h*(s*m-c*v)+y*(s*p-c*f),t[1]=-(r*(f*m-p*v)-h*(i*m-o*v)+y*(i*p-o*f)),t[2]=r*(s*m-c*v)-u*(i*m-o*v)+y*(i*c-o*s),t[3]=-(r*(s*p-c*f)-u*(i*p-o*f)+h*(i*c-o*s)),t[4]=-(a*(f*m-p*v)-l*(s*m-c*v)+d*(s*p-c*f)),t[5]=n*(f*m-p*v)-l*(i*m-o*v)+d*(i*p-o*f),t[6]=-(n*(s*m-c*v)-a*(i*m-o*v)+d*(i*c-o*s)),t[7]=n*(s*p-c*f)-a*(i*p-o*f)+l*(i*c-o*s),t[8]=a*(h*m-p*y)-l*(u*m-c*y)+d*(u*p-c*h),t[9]=-(n*(h*m-p*y)-l*(r*m-o*y)+d*(r*p-o*h)),t[10]=n*(u*m-c*y)-a*(r*m-o*y)+d*(r*c-o*u),t[11]=-(n*(u*p-c*h)-a*(r*p-o*h)+l*(r*c-o*u)),t[12]=-(a*(h*v-f*y)-l*(u*v-s*y)+d*(u*f-s*h)),t[13]=n*(h*v-f*y)-l*(r*v-i*y)+d*(r*f-i*h),t[14]=-(n*(u*v-s*y)-a*(r*v-i*y)+d*(r*s-i*u)),t[15]=n*(u*f-s*h)-a*(r*f-i*h)+l*(r*s-i*u),t}function he(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],u=t[6],s=t[7],c=t[8],l=t[9],h=t[10],f=t[11],p=t[12],d=t[13],y=t[14],v=t[15];return(e*a-n*o)*(h*v-f*y)-(e*u-r*o)*(l*v-f*d)+(e*s-i*o)*(l*y-h*d)+(n*u-r*a)*(c*v-f*p)-(n*s-i*a)*(c*y-h*p)+(r*s-i*u)*(c*d-l*p)}function fe(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],y=e[12],v=e[13],m=e[14],g=e[15],b=n[0],T=n[1],E=n[2],w=n[3];return t[0]=b*r+T*u+E*h+w*y,t[1]=b*i+T*s+E*f+w*v,t[2]=b*o+T*c+E*p+w*m,t[3]=b*a+T*l+E*d+w*g,b=n[4],T=n[5],E=n[6],w=n[7],t[4]=b*r+T*u+E*h+w*y,t[5]=b*i+T*s+E*f+w*v,t[6]=b*o+T*c+E*p+w*m,t[7]=b*a+T*l+E*d+w*g,b=n[8],T=n[9],E=n[10],w=n[11],t[8]=b*r+T*u+E*h+w*y,t[9]=b*i+T*s+E*f+w*v,t[10]=b*o+T*c+E*p+w*m,t[11]=b*a+T*l+E*d+w*g,b=n[12],T=n[13],E=n[14],w=n[15],t[12]=b*r+T*u+E*h+w*y,t[13]=b*i+T*s+E*f+w*v,t[14]=b*o+T*c+E*p+w*m,t[15]=b*a+T*l+E*d+w*g,t}function pe(t,e,n){var r,i,o,a,u,s,c,l,h,f,p,d,y=n[0],v=n[1],m=n[2];return e===t?(t[12]=e[0]*y+e[4]*v+e[8]*m+e[12],t[13]=e[1]*y+e[5]*v+e[9]*m+e[13],t[14]=e[2]*y+e[6]*v+e[10]*m+e[14],t[15]=e[3]*y+e[7]*v+e[11]*m+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=u,t[5]=s,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=p,t[11]=d,t[12]=r*y+u*v+h*m+e[12],t[13]=i*y+s*v+f*m+e[13],t[14]=o*y+c*v+p*m+e[14],t[15]=a*y+l*v+d*m+e[15]),t}function de(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ye(t,e,n,r){var i,o,a,u,s,c,l,h,f,p,d,y,v,m,g,b,T,E,w,M,k,P,x,S,N=r[0],A=r[1],C=r[2],_=Math.hypot(N,A,C);return _<Et?null:(N*=_=1/_,A*=_,C*=_,i=Math.sin(n),a=1-(o=Math.cos(n)),u=e[0],s=e[1],c=e[2],l=e[3],h=e[4],f=e[5],p=e[6],d=e[7],y=e[8],v=e[9],m=e[10],g=e[11],b=N*N*a+o,T=A*N*a+C*i,E=C*N*a-A*i,w=N*A*a-C*i,M=A*A*a+o,k=C*A*a+N*i,P=N*C*a+A*i,x=A*C*a-N*i,S=C*C*a+o,t[0]=u*b+h*T+y*E,t[1]=s*b+f*T+v*E,t[2]=c*b+p*T+m*E,t[3]=l*b+d*T+g*E,t[4]=u*w+h*M+y*k,t[5]=s*w+f*M+v*k,t[6]=c*w+p*M+m*k,t[7]=l*w+d*M+g*k,t[8]=u*P+h*x+y*S,t[9]=s*P+f*x+v*S,t[10]=c*P+p*x+m*S,t[11]=l*P+d*x+g*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function ve(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],u=e[6],s=e[7],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*r,t[5]=a*i+l*r,t[6]=u*i+h*r,t[7]=s*i+f*r,t[8]=c*i-o*r,t[9]=l*i-a*r,t[10]=h*i-u*r,t[11]=f*i-s*r,t}function me(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],u=e[2],s=e[3],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*r,t[1]=a*i-l*r,t[2]=u*i-h*r,t[3]=s*i-f*r,t[8]=o*r+c*i,t[9]=a*r+l*i,t[10]=u*r+h*i,t[11]=s*r+f*i,t}function ge(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],u=e[2],s=e[3],c=e[4],l=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*r,t[1]=a*i+l*r,t[2]=u*i+h*r,t[3]=s*i+f*r,t[4]=c*i-o*r,t[5]=l*i-a*r,t[6]=h*i-u*r,t[7]=f*i-s*r,t}function be(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Te(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Ee(t,e,n){var r,i,o,a=n[0],u=n[1],s=n[2],c=Math.hypot(a,u,s);return c<Et?null:(a*=c=1/c,u*=c,s*=c,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=u*a*o+s*r,t[2]=s*a*o-u*r,t[3]=0,t[4]=a*u*o-s*r,t[5]=u*u*o+i,t[6]=s*u*o+a*r,t[7]=0,t[8]=a*s*o+u*r,t[9]=u*s*o-a*r,t[10]=s*s*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function we(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Me(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ke(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Pe(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=r+r,s=i+i,c=o+o,l=r*u,h=r*s,f=r*c,p=i*s,d=i*c,y=o*c,v=a*u,m=a*s,g=a*c;return t[0]=1-(p+y),t[1]=h+g,t[2]=f-m,t[3]=0,t[4]=h-g,t[5]=1-(l+y),t[6]=d+v,t[7]=0,t[8]=f+m,t[9]=d-v,t[10]=1-(l+p),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function xe(t,e){var n=new wt(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=r*r+i*i+o*o+a*a;return h>0?(n[0]=2*(u*a+l*r+s*o-c*i)/h,n[1]=2*(s*a+l*i+c*r-u*o)/h,n[2]=2*(c*a+l*o+u*i-s*r)/h):(n[0]=2*(u*a+l*r+s*o-c*i),n[1]=2*(s*a+l*i+c*r-u*o),n[2]=2*(c*a+l*o+u*i-s*r)),Pe(t,e,n),t}function Se(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function Ne(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],u=e[6],s=e[8],c=e[9],l=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,u),t[2]=Math.hypot(s,c,l),t}function Ae(t,e){var n=new wt(3);Ne(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,u=e[1]*i,s=e[2]*o,c=e[4]*r,l=e[5]*i,h=e[6]*o,f=e[8]*r,p=e[9]*i,d=e[10]*o,y=a+l+d,v=0;return y>0?(v=2*Math.sqrt(y+1),t[3]=.25*v,t[0]=(h-p)/v,t[1]=(f-s)/v,t[2]=(u-c)/v):a>l&&a>d?(v=2*Math.sqrt(1+a-l-d),t[3]=(h-p)/v,t[0]=.25*v,t[1]=(u+c)/v,t[2]=(f+s)/v):l>d?(v=2*Math.sqrt(1+l-a-d),t[3]=(f-s)/v,t[0]=(u+c)/v,t[1]=.25*v,t[2]=(h+p)/v):(v=2*Math.sqrt(1+d-a-l),t[3]=(u-c)/v,t[0]=(f+s)/v,t[1]=(h+p)/v,t[2]=.25*v),t}function Ce(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=e[3],s=i+i,c=o+o,l=a+a,h=i*s,f=i*c,p=i*l,d=o*c,y=o*l,v=a*l,m=u*s,g=u*c,b=u*l,T=r[0],E=r[1],w=r[2];return t[0]=(1-(d+v))*T,t[1]=(f+b)*T,t[2]=(p-g)*T,t[3]=0,t[4]=(f-b)*E,t[5]=(1-(h+v))*E,t[6]=(y+m)*E,t[7]=0,t[8]=(p+g)*w,t[9]=(y-m)*w,t[10]=(1-(h+d))*w,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _e(t,e,n,r,i){var o=e[0],a=e[1],u=e[2],s=e[3],c=o+o,l=a+a,h=u+u,f=o*c,p=o*l,d=o*h,y=a*l,v=a*h,m=u*h,g=s*c,b=s*l,T=s*h,E=r[0],w=r[1],M=r[2],k=i[0],P=i[1],x=i[2],S=(1-(y+m))*E,N=(p+T)*E,A=(d-b)*E,C=(p-T)*w,_=(1-(f+m))*w,O=(v+g)*w,I=(d+b)*M,R=(v-g)*M,D=(1-(f+y))*M;return t[0]=S,t[1]=N,t[2]=A,t[3]=0,t[4]=C,t[5]=_,t[6]=O,t[7]=0,t[8]=I,t[9]=R,t[10]=D,t[11]=0,t[12]=n[0]+k-(S*k+C*P+I*x),t[13]=n[1]+P-(N*k+_*P+R*x),t[14]=n[2]+x-(A*k+O*P+D*x),t[15]=1,t}function Oe(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,u=r+r,s=i+i,c=n*a,l=r*a,h=r*u,f=i*a,p=i*u,d=i*s,y=o*a,v=o*u,m=o*s;return t[0]=1-h-d,t[1]=l+m,t[2]=f-v,t[3]=0,t[4]=l-m,t[5]=1-c-d,t[6]=p+y,t[7]=0,t[8]=f+v,t[9]=p-y,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Ie(t,e,n,r,i,o,a){var u=1/(n-e),s=1/(i-r),c=1/(o-a);return t[0]=2*o*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*s,t[6]=0,t[7]=0,t[8]=(n+e)*u,t[9]=(i+r)*s,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}function Re(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}var De=Re;function Le(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function Ve(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),u=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+u),c=2/(i+o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-u)*s*.5,t[9]=(i-o)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function Be(t,e,n,r,i,o,a){var u=1/(e-n),s=1/(r-i),c=1/(o-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*u,t[13]=(i+r)*s,t[14]=(a+o)*c,t[15]=1,t}var je=Be;function Fe(t,e,n,r,i,o,a){var u=1/(e-n),s=1/(r-i),c=1/(o-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+n)*u,t[13]=(i+r)*s,t[14]=o*c,t[15]=1,t}function Ue(t,e,n,r){var i,o,a,u,s,c,l,h,f,p,d=e[0],y=e[1],v=e[2],m=r[0],g=r[1],b=r[2],T=n[0],E=n[1],w=n[2];return Math.abs(d-T)<Et&&Math.abs(y-E)<Et&&Math.abs(v-w)<Et?ue(t):(l=d-T,h=y-E,f=v-w,i=g*(f*=p=1/Math.hypot(l,h,f))-b*(h*=p),o=b*(l*=p)-m*f,a=m*h-g*l,(p=Math.hypot(i,o,a))?(i*=p=1/p,o*=p,a*=p):(i=0,o=0,a=0),u=h*a-f*o,s=f*i-l*a,c=l*o-h*i,(p=Math.hypot(u,s,c))?(u*=p=1/p,s*=p,c*=p):(u=0,s=0,c=0),t[0]=i,t[1]=u,t[2]=l,t[3]=0,t[4]=o,t[5]=s,t[6]=h,t[7]=0,t[8]=a,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*d+o*y+a*v),t[13]=-(u*d+s*y+c*v),t[14]=-(l*d+h*y+f*v),t[15]=1,t)}function Ge(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=r[0],s=r[1],c=r[2],l=i-n[0],h=o-n[1],f=a-n[2],p=l*l+h*h+f*f;p>0&&(l*=p=1/Math.sqrt(p),h*=p,f*=p);var d=s*f-c*h,y=c*l-u*f,v=u*h-s*l;return(p=d*d+y*y+v*v)>0&&(d*=p=1/Math.sqrt(p),y*=p,v*=p),t[0]=d,t[1]=y,t[2]=v,t[3]=0,t[4]=h*v-f*y,t[5]=f*d-l*v,t[6]=l*y-h*d,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function ze(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function qe(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function We(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function He(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function Ye(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function Ke(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function Xe(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function Ze(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],u=t[5],s=t[6],c=t[7],l=t[8],h=t[9],f=t[10],p=t[11],d=t[12],y=t[13],v=t[14],m=t[15],g=e[0],b=e[1],T=e[2],E=e[3],w=e[4],M=e[5],k=e[6],P=e[7],x=e[8],S=e[9],N=e[10],A=e[11],C=e[12],_=e[13],O=e[14],I=e[15];return Math.abs(n-g)<=Et*Math.max(1,Math.abs(n),Math.abs(g))&&Math.abs(r-b)<=Et*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-T)<=Et*Math.max(1,Math.abs(i),Math.abs(T))&&Math.abs(o-E)<=Et*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(a-w)<=Et*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(u-M)<=Et*Math.max(1,Math.abs(u),Math.abs(M))&&Math.abs(s-k)<=Et*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(c-P)<=Et*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(l-x)<=Et*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-S)<=Et*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-N)<=Et*Math.max(1,Math.abs(f),Math.abs(N))&&Math.abs(p-A)<=Et*Math.max(1,Math.abs(p),Math.abs(A))&&Math.abs(d-C)<=Et*Math.max(1,Math.abs(d),Math.abs(C))&&Math.abs(y-_)<=Et*Math.max(1,Math.abs(y),Math.abs(_))&&Math.abs(v-O)<=Et*Math.max(1,Math.abs(v),Math.abs(O))&&Math.abs(m-I)<=Et*Math.max(1,Math.abs(m),Math.abs(I))}var Je=fe,Qe=He;function $e(){var t=new wt(3);return wt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function tn(t){var e=new wt(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function en(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function nn(t,e,n){var r=new wt(3);return r[0]=t,r[1]=e,r[2]=n,r}function rn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function on(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function an(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function un(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function sn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function cn(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function ln(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function hn(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function fn(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function pn(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function dn(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function yn(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function vn(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function mn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function gn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function bn(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function Tn(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function En(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function wn(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Mn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function kn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2];return t[0]=i*s-o*u,t[1]=o*a-r*s,t[2]=r*u-i*a,t}function Pn(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function xn(t,e,n,r,i,o){var a=o*o,u=a*(2*o-3)+1,s=a*(o-2)+o,c=a*(o-1),l=a*(3-2*o);return t[0]=e[0]*u+n[0]*s+r[0]*c+i[0]*l,t[1]=e[1]*u+n[1]*s+r[1]*c+i[1]*l,t[2]=e[2]*u+n[2]*s+r[2]*c+i[2]*l,t}function Sn(t,e,n,r,i,o){var a=1-o,u=a*a,s=o*o,c=u*a,l=3*o*u,h=3*s*a,f=s*o;return t[0]=e[0]*c+n[0]*l+r[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*l+r[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*l+r[2]*h+i[2]*f,t}function Nn(t,e){e=e||1;var n=2*Mt()*Math.PI,r=2*Mt()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}function An(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function Cn(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function _n(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],u=e[0],s=e[1],c=e[2],l=i*c-o*s,h=o*u-r*c,f=r*s-i*u,p=i*f-o*h,d=o*l-r*f,y=r*h-i*l,v=2*a;return l*=v,h*=v,f*=v,p*=2,d*=2,y*=2,t[0]=u+l+p,t[1]=s+h+d,t[2]=c+f+y,t}function On(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function In(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Rn(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Dn(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],u=e[2],s=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+u*u),c=s&&Mn(t,e)/s;return Math.acos(Math.min(Math.max(c,-1),1))}function Ln(t){return t[0]=0,t[1]=0,t[2]=0,t}function Vn(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Bn(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function jn(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],u=e[2];return Math.abs(n-o)<=Et*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=Et*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-u)<=Et*Math.max(1,Math.abs(i),Math.abs(u))}var Fn,Un=un,Gn=sn,zn=cn,qn=mn,Wn=gn,Hn=en,Yn=bn,Kn=(Fn=$e(),function(t,e,n,r,i,o){var a,u;for(e||(e=3),n||(n=0),u=r?Math.min(r*e+n,t.length):t.length,a=n;a<u;a+=e)Fn[0]=t[a],Fn[1]=t[a+1],Fn[2]=t[a+2],i(Fn,Fn,o),t[a]=Fn[0],t[a+1]=Fn[1],t[a+2]=Fn[2];return t});function Xn(){var t=new wt(4);return wt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zn(t){var e=new wt(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Jn(t,e,n,r){var i=new wt(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function Qn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function $n(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function tr(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function er(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function nr(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function rr(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function ir(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t}function or(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t}function ar(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}function ur(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}function sr(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function cr(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function lr(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t}function hr(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.hypot(n,r,i,o)}function fr(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}function pr(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function dr(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function yr(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function vr(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}function mr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function gr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function br(t,e,n,r){var i=n[0]*r[1]-n[1]*r[0],o=n[0]*r[2]-n[2]*r[0],a=n[0]*r[3]-n[3]*r[0],u=n[1]*r[2]-n[2]*r[1],s=n[1]*r[3]-n[3]*r[1],c=n[2]*r[3]-n[3]*r[2],l=e[0],h=e[1],f=e[2],p=e[3];return t[0]=h*c-f*s+p*u,t[1]=-l*c+f*a-p*o,t[2]=l*s-h*a+p*i,t[3]=-l*u+h*o-f*i,t}function Tr(t,e,n,r){var i=e[0],o=e[1],a=e[2],u=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=u+r*(n[3]-u),t}function Er(t,e){var n,r,i,o,a,u;e=e||1;do{a=(n=2*Mt()-1)*n+(r=2*Mt()-1)*r}while(a>=1);do{u=(i=2*Mt()-1)*i+(o=2*Mt()-1)*o}while(u>=1);var s=Math.sqrt((1-a)/u);return t[0]=e*n,t[1]=e*r,t[2]=e*i*s,t[3]=e*o*s,t}function wr(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function Mr(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2],c=n[3],l=c*r+u*o-s*i,h=c*i+s*r-a*o,f=c*o+a*i-u*r,p=-a*r-u*i-s*o;return t[0]=l*c+p*-a+h*-s-f*-u,t[1]=h*c+p*-u+f*-a-l*-s,t[2]=f*c+p*-s+l*-u-h*-a,t[3]=e[3],t}function kr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function Pr(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function xr(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function Sr(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],u=e[1],s=e[2],c=e[3];return Math.abs(n-a)<=Et*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-u)<=Et*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(i-s)<=Et*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-c)<=Et*Math.max(1,Math.abs(o),Math.abs(c))}var Nr=er,Ar=nr,Cr=rr,_r=hr,Or=fr,Ir=pr,Rr=dr,Dr=function(){var t=Xn();return function(e,n,r,i,o,a){var u,s;for(n||(n=4),r||(r=0),s=i?Math.min(i*n+r,e.length):e.length,u=r;u<s;u+=n)t[0]=e[u],t[1]=e[u+1],t[2]=e[u+2],t[3]=e[u+3],o(t,t,a),e[u]=t[0],e[u+1]=t[1],e[u+2]=t[2],e[u+3]=t[3];return e}}();function Lr(){var t=new wt(4);return wt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Vr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Br(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function jr(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>Et?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function Fr(t,e){var n=yi(t,e);return Math.acos(2*n*n-1)}function Ur(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=n[0],s=n[1],c=n[2],l=n[3];return t[0]=r*l+a*u+i*c-o*s,t[1]=i*l+a*s+o*u-r*c,t[2]=o*l+a*c+r*s-i*u,t[3]=a*l-r*u-i*s-o*c,t}function Gr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),s=Math.cos(n);return t[0]=r*s+a*u,t[1]=i*s+o*u,t[2]=o*s-i*u,t[3]=a*s-r*u,t}function zr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),s=Math.cos(n);return t[0]=r*s-o*u,t[1]=i*s+a*u,t[2]=o*s+r*u,t[3]=a*s-i*u,t}function qr(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],u=Math.sin(n),s=Math.cos(n);return t[0]=r*s+i*u,t[1]=i*s-r*u,t[2]=o*s+a*u,t[3]=a*s-o*u,t}function Wr(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function Hr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),u=Math.exp(o),s=a>0?u*Math.sin(a)/a:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=u*Math.cos(a),t}function Yr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),u=a>0?Math.atan2(a,o)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=.5*Math.log(n*n+r*r+i*i+o*o),t}function Kr(t,e,n){return Yr(t,e),di(t,t,n),Hr(t,t),t}function Xr(t,e,n,r){var i,o,a,u,s,c=e[0],l=e[1],h=e[2],f=e[3],p=n[0],d=n[1],y=n[2],v=n[3];return(o=c*p+l*d+h*y+f*v)<0&&(o=-o,p=-p,d=-d,y=-y,v=-v),1-o>Et?(i=Math.acos(o),a=Math.sin(i),u=Math.sin((1-r)*i)/a,s=Math.sin(r*i)/a):(u=1-r,s=r),t[0]=u*c+s*p,t[1]=u*l+s*d,t[2]=u*h+s*y,t[3]=u*f+s*v,t}function Zr(t){var e=Mt(),n=Mt(),r=Mt(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t}function Jr(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,u=a?1/a:0;return t[0]=-n*u,t[1]=-r*u,t[2]=-i*u,t[3]=o*u,t}function Qr(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function $r(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}function ti(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),u=Math.sin(n),s=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return t[0]=o*s*l-a*u*c,t[1]=a*u*l+o*s*c,t[2]=a*s*c-o*u*l,t[3]=a*s*l+o*u*c,t}function ei(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var ni,ri,ii,oi,ai,ui,si=Zn,ci=Jn,li=Qn,hi=$n,fi=tr,pi=Ur,di=cr,yi=gr,vi=Tr,mi=pr,gi=mi,bi=dr,Ti=bi,Ei=mr,wi=xr,Mi=Sr,ki=(ni=$e(),ri=nn(1,0,0),ii=nn(0,1,0),function(t,e,n){var r=Mn(e,n);return r<-.999999?(kn(ni,ri,e),Hn(ni)<1e-6&&kn(ni,ii,e),wn(ni,ni),Br(t,ni,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(kn(ni,e,n),t[0]=ni[0],t[1]=ni[1],t[2]=ni[2],t[3]=1+r,Ei(t,t))}),Pi=(oi=Lr(),ai=Lr(),function(t,e,n,r,i,o){return Xr(oi,e,i,o),Xr(ai,n,r,o),Xr(t,oi,ai,2*o*(1-o)),t}),xi=(ui=kt(),function(t,e,n,r){return ui[0]=n[0],ui[3]=n[1],ui[6]=n[2],ui[1]=r[0],ui[4]=r[1],ui[7]=r[2],ui[2]=-e[0],ui[5]=-e[1],ui[8]=-e[2],Ei(t,$r(t,ui))});function Si(){var t=new wt(2);return wt!=Float32Array&&(t[0]=0,t[1]=0),t}function Ni(t){var e=new wt(2);return e[0]=t[0],e[1]=t[1],e}function Ai(t,e){var n=new wt(2);return n[0]=t,n[1]=e,n}function Ci(t,e){return t[0]=e[0],t[1]=e[1],t}function _i(t,e,n){return t[0]=e,t[1]=n,t}function Oi(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Ii(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Ri(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function Di(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function Li(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function Vi(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function Bi(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ji(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function Fi(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function Ui(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Gi(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function zi(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function qi(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function Wi(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function Hi(t){var e=t[0],n=t[1];return e*e+n*n}function Yi(t,e){return t[0]=-e[0],t[1]=-e[1],t}function Ki(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function Xi(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function Zi(t,e){return t[0]*e[0]+t[1]*e[1]}function Ji(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function Qi(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function $i(t,e){e=e||1;var n=2*Mt()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function to(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function eo(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function no(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function ro(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}function io(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),u=Math.cos(r);return t[0]=i*u-o*a+n[0],t[1]=i*a+o*u+n[1],t}function oo(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),u=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(u,-1),1))}function ao(t){return t[0]=0,t[1]=0,t}function uo(t){return"vec2("+t[0]+", "+t[1]+")"}function so(t,e){return t[0]===e[0]&&t[1]===e[1]}function co(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return Math.abs(n-i)<=Et*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=Et*Math.max(1,Math.abs(r),Math.abs(o))}var lo,ho=Wi,fo=Ii,po=Ri,yo=Di,vo=zi,mo=qi,go=Hi,bo=function(){var t=Si();return function(e,n,r,i,o,a){var u,s;for(n||(n=2),r||(r=0),s=i?Math.min(i*n+r,e.length):e.length,u=r;u<s;u+=n)t[0]=e[u],t[1]=e[u+1],o(t,t,a),e[u]=t[0],e[u+1]=t[1];return e}}(),To=function(){function t(t,e){this.min=a.create(),this.max=a.create(),this.update(t,e)}return t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){this.center=a.copy(a.create(),t||a.create()),this.halfExtents=a.copy(a.create(),e||a.fromValues(0,0,0)),this.min=a.sub(this.min,this.center,this.halfExtents),this.max=a.add(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){a.add(this.center,e,t),a.scale(this.center,this.center,.5),a.sub(this.halfExtents,e,t),a.scale(this.halfExtents,this.halfExtents,.5),a.copy(this.min,t),a.copy(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e))if(t.isEmpty(this))this.setMinMax(e.getMin(),e.getMax());else{var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,u=a[0],s=a[1],c=a[2],l=r-u,h=r+u,f=i-s,p=i+s,d=o-c,y=o+c,v=e.center,m=v[0],g=v[1],b=v[2],T=e.halfExtents,E=T[0],w=T[1],M=T[2],k=m-E,P=m+E,x=g-w,S=g+w,N=b-M,A=b+M;k<l&&(l=k),P>h&&(h=P),x<f&&(f=x),S>p&&(p=S),N<d&&(d=N),A>y&&(y=A),n[0]=.5*(l+h),n[1]=.5*(f+p),n[2]=.5*(d+y),a[0]=.5*(h-l),a[1]=.5*(p-f),a[2]=.5*(y-d),this.min[0]=l,this.min[1]=f,this.min[2]=d,this.max[0]=h,this.max[1]=p,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,u=e[0],s=e[4],c=e[8],l=e[1],h=e[5],f=e[9],p=e[2],d=e[6],y=e[10],v=Math.abs(u),m=Math.abs(s),g=Math.abs(c),b=Math.abs(l),T=Math.abs(h),E=Math.abs(f),w=Math.abs(p),M=Math.abs(d),k=Math.abs(y);a.set(n,e[12]+u*i[0]+s*i[1]+c*i[2],e[13]+l*i[0]+h*i[1]+f*i[2],e[14]+p*i[0]+d*i[1]+y*i[2]),a.set(r,v*o[0]+m*o[1]+g*o[2],b*o[0]+T*o[1]+E*o[2],w*o[0]+M*o[1]+k*o[2]),this.min=a.sub(this.min,n,r),this.max=a.add(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n=new t,r=a.max(a.create(),this.getMin(),e.getMin()),i=a.min(a.create(),this.getMax(),e.getMax());return n.setMinMax(r,i),n},t.prototype.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.prototype.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?a.copy(a.create(),this.min):272===t.pnVertexFlag?a.fromValues(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?a.fromValues(this.max[0],this.max[1],this.min[2]):a.fromValues(this.max[0],this.max[1],this.max[2])},t.prototype.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?a.copy(a.create(),this.max):272===t.pnVertexFlag?a.fromValues(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?a.fromValues(this.min[0],this.min[1],this.max[2]):a.fromValues(this.min[0],this.min[1],this.min[2])},t}(),Eo=a.create(),wo=function(){function t(t,e){this.center=t||a.create(),this.radius=e||.5}return t.prototype.containsPoint=function(t){return a.sub(Eo,t,this.center),a.length(Eo)<this.radius*this.radius},t.prototype.intersects=function(t){a.sub(Eo,t.center,this.center);var e=t.radius+this.radius;return a.length(Eo)<=e*e},t}(),Mo=function(){function t(t,e){this.distance=t||0,this.normal=e||a.fromValues(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return a.dot(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/a.len(this.normal);a.scale(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&a.lerp(n,t,e,i),o},t}();!function(t){t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE"}(lo||(lo={}));var ko,Po=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Mo)}return t.prototype.extractFromVPMatrix=function(t){var e=gt(t,16),n=e[0],r=e[1],i=e[2],o=e[3],u=e[4],s=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],y=e[12],v=e[13],m=e[14],g=e[15];a.set(this.planes[0].normal,o-n,l-u,d-h),this.planes[0].distance=g-y,a.set(this.planes[1].normal,o+n,l+u,d+h),this.planes[1].distance=g+y,a.set(this.planes[2].normal,o+r,l+s,d+f),this.planes[2].distance=g+v,a.set(this.planes[3].normal,o-r,l-s,d-f),this.planes[3].distance=g-v,a.set(this.planes[4].normal,o-i,l-c,d-p),this.planes[4].distance=g-m,a.set(this.planes[5].normal,o+i,l+c,d+p),this.planes[5].distance=g+m,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),xo=a.create(),So=a.create(),No=a.create(),Ao=a.create(),Co=a.create(),_o=function(){function t(t,e){this.origin=t||a.create(),this.direction=e||a.fromValues(0,0,-1)}return t.prototype.intersectsAABB=function(t,e){return e?this.intersectAABBWithIntersection(t,e):this.intersectsAABBWithoutIntersection(t)},t.prototype.intersectsSphere=function(t,e){var n=a.sub(xo,this.origin,t.center);a.normalize(So,a.copy(So,this.direction));var r=a.dot(n,So),i=a.dot(n,n)-t.radius*t.radius;if(i>0&&r>0)return null;var o=r*r-i;if(o<0)return!1;var u=Math.abs(-r-Math.sqrt(o));return e&&(a.copy(e,this.direction),a.scaleAndAdd(e,this.origin,e,u)),!0},t.prototype.intersectsPlane=function(t,e){var n=(t.distance-a.dot(t.normal,this.origin))/a.dot(t.normal,this.direction),r=n>=0;return r&&e&&a.scaleAndAdd(e,this.origin,this.direction,n),r},t.prototype.intersectsAABBWithoutIntersection=function(t){var e=xo,n=So,r=No,i=Ao,o=Co,u=this.direction;return a.sub(e,this.origin,t.center),a.set(i,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])),a.mul(r,e,u),!(i[0]>t.halfExtents[0]&&r[0]>=0||i[1]>t.halfExtents[1]&&r[1]>=0||i[2]>t.halfExtents[2]&&r[2]>=0)&&(a.set(o,Math.abs(u[0]),Math.abs(u[1]),Math.abs(u[2])),a.cross(n,u,e),a.set(n,Math.abs(n[0]),Math.abs(n[1]),Math.abs(n[2])),!(n[0]>t.halfExtents[1]*o[2]+t.halfExtents[2]*o[1]||n[1]>t.halfExtents[0]*o[2]+t.halfExtents[2]*o[0]||n[2]>t.halfExtents[0]*o[1]+t.halfExtents[1]*o[0]))},t.prototype.intersectAABBWithIntersection=function(t,e){var n=a.copy(a.create(),t.getMin());a.sub(n,n,this.origin);var r=a.copy(a.create(),t.getMax());a.sub(r,r,this.origin);var i=this.direction;0===i[0]?(n[0]=n[0]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[0]=r[0]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[0]/=i[0],r[0]/=i[0]),0===i[1]?(n[1]=n[1]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[1]=r[1]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[1]/=i[1],r[1]/=i[1]),0===i[2]?(n[2]=n[2]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[2]=r[2]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[2]/=i[2],r[2]/=i[2]);var o=a.set(No,Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.min(n[2],r[2])),u=a.set(Ao,Math.max(n[0],r[0]),Math.max(n[1],r[1]),Math.max(n[2],r[2])),s=Math.min(Math.min(u[0],u[1]),u[2]),c=Math.max(Math.max(o[0],o[1]),o[2]),l=s>=c&&c>=0;return l&&(a.copy(e,this.direction),a.scaleAndAdd(e,this.origin,e,c)),l},t}(),Oo=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Io=function(){function t(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),Ro=l.defineToken("SceneGraphSelectorFactory"),Do=l.defineToken("SceneGraphSelector",{multiple:!1}),Lo=/\[\s*name=(.*)\s*\]/,Vo=function(){function t(){}return t.prototype.selectOne=function(t,e){if(t.startsWith("."))return e.find((function(e){return e.className===t.substring(1)}));if(t.startsWith("#"))return e.find((function(e){return e.id===t.substring(1)}));if(t.startsWith("[name=")){var n=t.match(Lo);if(n&&n.length>1){var r=n[1].replace(/"/g,"");return e.find((function(t){return e!==t&&t.name===r}))}return null}return e.find((function(n){return e!==n&&n.nodeName===t}))},t.prototype.selectAll=function(t,e){if(t.startsWith("."))return e.findAll((function(n){return e!==n&&n.className===t.substring(1)}));if(t.startsWith("#"))return e.findAll((function(n){return e!==n&&n.id===t.substring(1)}));if(t.startsWith("[name=")){var n=t.match(Lo);if(n&&n.length>1){var r=n[1].replace(/"/g,"");return e.findAll((function(t){return e!==t&&t.name===r}))}return[]}return e.findAll((function(n){return e!==n&&n.nodeName===t}))},t.prototype.is=function(){return!0},t=pt([A({token:Do})],t)}();!function(t){t.DESTROY="destroy",t.ATTR_MODIFIED="DOMAttrModified",t.INSERTED="DOMNodeInserted",t.CHILD_INSERTED="child-inserted",t.REMOVED="removed",t.CHILD_REMOVED="child-removed",t.MOUNTED="DOMNodeInsertedIntoDocument",t.UNMOUNTED="DOMNodeRemovedFromDocument",t.BOUNDS_CHANGED="bounds-changed",t.GEOMETRY_BOUNDS_CHANGED="geometry-bounds-changed",t.RENDER_ORDER_CHANGED="render-order-changed"}(ko||(ko={}));var Bo,jo,Fo,Uo,Go,zo=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Oo,this.page=new Oo,this.canvas=new Oo,this.viewport=new Oo,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t}(),qo=function(t){function e(e,n,r,i,o,a,u,s){var c=t.call(this,null)||this;return c.relatedNode=n,c.prevValue=r,c.newValue=i,c.attrName=o,c.attrChange=a,c.prevParsedValue=u,c.newParsedValue=s,c.type=e,c}return lt(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(zo);function Wo(t){if(!t)throw new Error}function Ho(t,e){if(t!==e)throw new Error}function Yo(t,e){if(t===e)throw new Error}function Ko(t){return void 0===t}function Xo(t){return null==t}function Zo(t){return"number"==typeof t}function Jo(t){return"function"==typeof t}function Qo(t){return"boolean"==typeof t}function $o(t){return"[object Object]"===Object.prototype.toString.call(t)}function ta(t,e,n){return n?Math.min(t,e)===t?e:Math.max(t,n)===t?n:t:Math.max(t,e)===e?t:e}function ea(t){return void 0===t?0:t>360||t<-360?t%360:t}function na(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Zo(t)?a.fromValues(t,e,n):Array.isArray(t)&&3===t.length?a.clone(t):a.fromValues(t[0],t[1]||e,t[2]||n)}function ra(t){return t*(Math.PI/180)}function ia(t){return t*(180/Math.PI)}function oa(t){return(t%=400)<0&&(t+=400),t/400*360}function aa(t){return t/360}function ua(t){return 360*t}function sa(t,e){var n=e[0],r=e[1],i=e[3],o=e[4];return t[0]=Math.hypot(n,r),t[1]=Math.hypot(i,o),t}function ca(t,e){return t[0]=e[6],t[1]=e[7],t}function la(t){return Math.atan2(t[1],t[4])}function ha(t,e){return 16===e.length?function(t,e){var n,r,i=.5*Math.PI,u=gt(o.getScaling(a.create(),e),3),s=u[0],c=u[1],l=u[2],h=Math.asin(-e[2]/s);return h<i?h>-i?(n=Math.atan2(e[6]/c,e[10]/l),r=Math.atan2(e[1]/s,e[0]/s)):(r=0,n=-Math.atan2(e[4]/c,e[5]/c)):(r=0,n=Math.atan2(e[4]/c,e[5]/c)),t[0]=n,t[1]=h,t[2]=r,t}(t,e):function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=r*r,u=i*i,s=o*o,c=n*n+a+u+s,l=n*o-r*i;return l>.499995*c?(t[0]=Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):l<-.499995*c?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-o*r)),t[1]=Math.atan2(2*(n*o+r*i),1-2*(u+s)),t[2]=Math.atan2(2*(n*r+i*o),1-2*(a+u))),t}(t,e)}function fa(t,e,n,r,o){var a=Math.cos(t),u=Math.sin(t);return i.fromValues(r*a,o*u,0,-r*u,o*a,0,e,n,1)}function pa(t,e,n,r,i,o,a){var u=2*o/(n-e),s=2*o/(r-i),c=(n+e)/(n-e),l=(r+i)/(r-i),h=-(a+o)/(a-o),f=-2*a*o/(a-o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=c,t[9]=l,t[10]=h,t[11]=-1,t[12]=0,t[13]=0,t[14]=f,t[15]=0,t}function da(t){var e=t[0],n=t[3],r=t[1],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var u=Math.atan2(n,e);return[t[6],t[7],o,a,u]}!function(t){t[t.kUnknown=0]="kUnknown",t[t.kNumber=1]="kNumber",t[t.kPercentage=2]="kPercentage",t[t.kEms=3]="kEms",t[t.kExs=4]="kExs",t[t.kPixels=5]="kPixels",t[t.kCentimeters=6]="kCentimeters",t[t.kMillimeters=7]="kMillimeters",t[t.kInches=8]="kInches",t[t.kPoints=9]="kPoints",t[t.kPicas=10]="kPicas",t[t.kQuarterMillimeters=11]="kQuarterMillimeters",t[t.kViewportWidth=12]="kViewportWidth",t[t.kViewportHeight=13]="kViewportHeight",t[t.kViewportInlineSize=14]="kViewportInlineSize",t[t.kViewportBlockSize=15]="kViewportBlockSize",t[t.kViewportMin=16]="kViewportMin",t[t.kViewportMax=17]="kViewportMax",t[t.kSmallViewportWidth=18]="kSmallViewportWidth",t[t.kSmallViewportHeight=19]="kSmallViewportHeight",t[t.kSmallViewportInlineSize=20]="kSmallViewportInlineSize",t[t.kSmallViewportBlockSize=21]="kSmallViewportBlockSize",t[t.kSmallViewportMin=22]="kSmallViewportMin",t[t.kSmallViewportMax=23]="kSmallViewportMax",t[t.kLargeViewportWidth=24]="kLargeViewportWidth",t[t.kLargeViewportHeight=25]="kLargeViewportHeight",t[t.kLargeViewportInlineSize=26]="kLargeViewportInlineSize",t[t.kLargeViewportBlockSize=27]="kLargeViewportBlockSize",t[t.kLargeViewportMin=28]="kLargeViewportMin",t[t.kLargeViewportMax=29]="kLargeViewportMax",t[t.kDynamicViewportWidth=30]="kDynamicViewportWidth",t[t.kDynamicViewportHeight=31]="kDynamicViewportHeight",t[t.kDynamicViewportInlineSize=32]="kDynamicViewportInlineSize",t[t.kDynamicViewportBlockSize=33]="kDynamicViewportBlockSize",t[t.kDynamicViewportMin=34]="kDynamicViewportMin",t[t.kDynamicViewportMax=35]="kDynamicViewportMax",t[t.kContainerWidth=36]="kContainerWidth",t[t.kContainerHeight=37]="kContainerHeight",t[t.kContainerInlineSize=38]="kContainerInlineSize",t[t.kContainerBlockSize=39]="kContainerBlockSize",t[t.kContainerMin=40]="kContainerMin",t[t.kContainerMax=41]="kContainerMax",t[t.kRems=42]="kRems",t[t.kChs=43]="kChs",t[t.kUserUnits=44]="kUserUnits",t[t.kDegrees=45]="kDegrees",t[t.kRadians=46]="kRadians",t[t.kGradians=47]="kGradians",t[t.kTurns=48]="kTurns",t[t.kMilliseconds=49]="kMilliseconds",t[t.kSeconds=50]="kSeconds",t[t.kHertz=51]="kHertz",t[t.kKilohertz=52]="kKilohertz",t[t.kDotsPerPixel=53]="kDotsPerPixel",t[t.kDotsPerInch=54]="kDotsPerInch",t[t.kDotsPerCentimeter=55]="kDotsPerCentimeter",t[t.kFraction=56]="kFraction",t[t.kInteger=57]="kInteger",t[t.kQuirkyEms=58]="kQuirkyEms"}(Bo||(Bo={})),function(t){t[t.kUNumber=0]="kUNumber",t[t.kUPercent=1]="kUPercent",t[t.kULength=2]="kULength",t[t.kUAngle=3]="kUAngle",t[t.kUTime=4]="kUTime",t[t.kUFrequency=5]="kUFrequency",t[t.kUResolution=6]="kUResolution",t[t.kUOther=7]="kUOther"}(jo||(jo={})),function(t){t[t.kAll=0]="kAll",t[t.kNonNegative=1]="kNonNegative",t[t.kInteger=2]="kInteger",t[t.kNonNegativeInteger=3]="kNonNegativeInteger",t[t.kPositiveInteger=4]="kPositiveInteger"}(Fo||(Fo={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(Uo||(Uo={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(Go||(Go={}));var ya,va=[{name:"em",unit_type:Bo.kEms},{name:"px",unit_type:Bo.kPixels},{name:"deg",unit_type:Bo.kDegrees},{name:"rad",unit_type:Bo.kRadians},{name:"grad",unit_type:Bo.kGradians},{name:"ms",unit_type:Bo.kMilliseconds},{name:"s",unit_type:Bo.kSeconds},{name:"rem",unit_type:Bo.kRems},{name:"turn",unit_type:Bo.kTurns}];!function(t){t[t.kUnknownType=0]="kUnknownType",t[t.kUnparsedType=1]="kUnparsedType",t[t.kKeywordType=2]="kKeywordType",t[t.kUnitType=3]="kUnitType",t[t.kSumType=4]="kSumType",t[t.kProductType=5]="kProductType",t[t.kNegateType=6]="kNegateType",t[t.kInvertType=7]="kInvertType",t[t.kMinType=8]="kMinType",t[t.kMaxType=9]="kMaxType",t[t.kClampType=10]="kClampType",t[t.kTransformType=11]="kTransformType",t[t.kPositionType=12]="kPositionType",t[t.kURLImageType=13]="kURLImageType",t[t.kColorType=14]="kColorType",t[t.kUnsupportedColorType=15]="kUnsupportedColorType"}(ya||(ya={}));var ma,ga,ba=function(){function t(){}return t.parse=function(t,e){return[][0]},t.parseAll=function(t,e){return[]},t.unitFromName=function(t){return t?"number"===t?Bo.kNumber:"percent"===t||"%"===t?Bo.kPercentage:this.stringToUnitType(t):Bo.kUnknown},t.unitTypeToUnitCategory=function(t){switch(t){case Bo.kNumber:case Bo.kInteger:return jo.kUNumber;case Bo.kPercentage:return jo.kUPercent;case Bo.kPixels:case Bo.kCentimeters:case Bo.kMillimeters:case Bo.kQuarterMillimeters:case Bo.kInches:case Bo.kPoints:case Bo.kPicas:case Bo.kUserUnits:return jo.kULength;case Bo.kMilliseconds:case Bo.kSeconds:return jo.kUTime;case Bo.kDegrees:case Bo.kRadians:case Bo.kGradians:case Bo.kTurns:return jo.kUAngle;case Bo.kHertz:case Bo.kKilohertz:return jo.kUFrequency;case Bo.kDotsPerPixel:case Bo.kDotsPerInch:case Bo.kDotsPerCentimeter:return jo.kUResolution;default:return jo.kUOther}},t.unitTypeToString=function(t){switch(t){case Bo.kNumber:case Bo.kInteger:case Bo.kUserUnits:return"";case Bo.kPercentage:return"%";case Bo.kEms:case Bo.kQuirkyEms:return"em";case Bo.kRems:return"rem";case Bo.kPixels:return"px";case Bo.kDegrees:return"deg";case Bo.kRadians:return"rad";case Bo.kGradians:return"grad";case Bo.kMilliseconds:return"ms";case Bo.kSeconds:return"s";case Bo.kTurns:return"turn"}return""},t.stringToUnitType=function(t){return va.find((function(e){return e.name===t})).unit_type},t.canonicalUnitTypeForCategory=function(t){switch(t){case jo.kUNumber:return Bo.kNumber;case jo.kULength:return Bo.kPixels;case jo.kUPercent:return Bo.kUnknown;case jo.kUTime:return Bo.kSeconds;case jo.kUAngle:return Bo.kDegrees;case jo.kUFrequency:return Bo.kHertz;case jo.kUResolution:return Bo.kDotsPerPixel;default:return Bo.kUnknown}},t.conversionToCanonicalUnitsScaleFactor=function(t){var e=1;switch(t){case Bo.kPixels:case Bo.kUserUnits:case Bo.kDegrees:case Bo.kSeconds:case Bo.kHertz:break;case Bo.kMilliseconds:e=.001;break;case Bo.kCentimeters:case Bo.kDotsPerCentimeter:case Bo.kMillimeters:case Bo.kQuarterMillimeters:case Bo.kInches:case Bo.kDotsPerInch:case Bo.kPoints:case Bo.kPicas:break;case Bo.kRadians:e=180/Math.PI;break;case Bo.kGradians:e=.9;break;case Bo.kTurns:e=360;break;case Bo.kKilohertz:e=1e3}return e},t.isAngle=function(t){return t===Bo.kDegrees||t===Bo.kRadians||t===Bo.kGradians||t===Bo.kTurns},t.isViewportPercentageLength=function(t){return t>=Bo.kViewportWidth&&t<=Bo.kDynamicViewportMax},t.isContainerPercentageLength=function(t){return t>=Bo.kContainerWidth&&t<=Bo.kContainerMax},t.isLength=function(t){return t>=Bo.kEms&&t<=Bo.kUserUnits||t==Bo.kQuirkyEms},t.isRelativeUnit=function(t){return t===Bo.kPercentage||t===Bo.kEms||t===Bo.kExs||t===Bo.kRems||t===Bo.kChs||this.isViewportPercentageLength(t)||this.isContainerPercentageLength(t)},t.isTime=function(t){return t===Bo.kSeconds||t===Bo.kMilliseconds},t.isFrequency=function(t){return t==Bo.kHertz||t==Bo.kKilohertz},t.isResolution=function(t){return t>=Bo.kDotsPerPixel&&t<=Bo.kDotsPerCentimeter},t.isFlex=function(t){return t===Bo.kFraction},t.prototype.toString=function(){return this.buildCSSText(Uo.kNo,Go.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=ya.kUnitType&&this.getType()<=ya.kClampType},t}(),Ta=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return lt(e,t),e.prototype.getType=function(){return ya.kColorType},e.prototype.to=function(t){return this},e}(ba),Ea=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return lt(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return ya.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(ba);function wa(t){return t===ma.kMin||t===ma.kMax||t===ma.kClamp}function Ma(t){switch(Yo(t,Bo.kNumber),t){case Bo.kEms:case Bo.kExs:case Bo.kPixels:case Bo.kCentimeters:case Bo.kMillimeters:case Bo.kQuarterMillimeters:case Bo.kInches:case Bo.kPoints:case Bo.kPicas:case Bo.kUserUnits:case Bo.kViewportWidth:case Bo.kViewportHeight:case Bo.kViewportInlineSize:case Bo.kViewportBlockSize:case Bo.kViewportMin:case Bo.kViewportMax:case Bo.kSmallViewportWidth:case Bo.kSmallViewportHeight:case Bo.kSmallViewportInlineSize:case Bo.kSmallViewportBlockSize:case Bo.kSmallViewportMin:case Bo.kSmallViewportMax:case Bo.kLargeViewportWidth:case Bo.kLargeViewportHeight:case Bo.kLargeViewportInlineSize:case Bo.kLargeViewportBlockSize:case Bo.kLargeViewportMin:case Bo.kLargeViewportMax:case Bo.kDynamicViewportWidth:case Bo.kDynamicViewportHeight:case Bo.kDynamicViewportInlineSize:case Bo.kDynamicViewportBlockSize:case Bo.kDynamicViewportMin:case Bo.kDynamicViewportMax:case Bo.kContainerWidth:case Bo.kContainerHeight:case Bo.kContainerInlineSize:case Bo.kContainerBlockSize:case Bo.kContainerMin:case Bo.kContainerMax:case Bo.kRems:case Bo.kChs:return ga.kLength;case Bo.kMilliseconds:case Bo.kSeconds:return ga.kTime;case Bo.kDegrees:case Bo.kRadians:case Bo.kGradians:case Bo.kTurns:return ga.kAngle;case Bo.kHertz:case Bo.kKilohertz:return ga.kFrequency;case Bo.kDotsPerPixel:case Bo.kDotsPerInch:case Bo.kDotsPerCentimeter:return ga.kResolution;case Bo.kFraction:return ga.kFlex;case Bo.kPercentage:return ga.kPercent;default:return ga.kLength}}function ka(t){switch(t){case ga.kLength:return"length";case ga.kAngle:return"angle";case ga.kTime:return"time";case ga.kFrequency:return"frequency";case ga.kResolution:return"resolution";case ga.kFlex:return"flex";case ga.kPercent:return"percent"}return""}!function(t){t.kAdd="+",t.kSubtract="-",t.kMultiply="*",t.kDivide="/",t.kMin="min",t.kMax="max",t.kClamp="clamp",t.kInvalid=""}(ma||(ma={})),function(t){t[t.kLength=0]="kLength",t[t.kAngle=1]="kAngle",t[t.kTime=2]="kTime",t[t.kFrequency=3]="kFrequency",t[t.kResolution=4]="kResolution",t[t.kFlex=5]="kFlex",t[t.kPercent=6]="kPercent",t[t.kNumBaseTypes=7]="kNumBaseTypes"}(ga||(ga={}));var Pa=function(){function t(t,e){void 0===t&&(t=Bo.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=ga.kPercent,this.hasPercentHint=!1,this.exponents=new Array(ga.kNumBaseTypes).fill(0),t!==Bo.kNumber&&this.setExponent(Ma(t),e)}return t.prototype.applyPercentHint=function(t){Yo(t,ga.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(ga.kPercent)),this.setExponent(ga.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},t.prototype.hasNonZeroEntries=function(){return this.numNonZeroEntries>0},t.prototype.isOnlyNonZeroEntry=function(t,e){return Yo(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},t.prototype.exponent=function(t){return this.exponents[t]},t.prototype.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach((function(t){return-1*t})),t},t.prototype.matchesBaseType=function(t){return Yo(t,ga.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},t.prototype.matchesPercentage=function(){return this.isOnlyNonZeroEntry(ga.kPercent,1)},t.prototype.matchesBaseTypePercentage=function(t){return Yo(t,ga.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(ga.kPercent,1)},t.prototype.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},t.prototype.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(ga.kPercent,1)},t.add=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return!0,t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint),Ho(t.percentHint,e.percentHint);for(var r=0;r<ga.kNumBaseTypes;++r){var i=r;if(t.exponents[r]!==e.exponents[r]&&(i!==ga.kPercent&&(t.applyPercentHint(i),e.applyPercentHint(i)),t.exponents[r]!==e.exponents[r]))return!0,t}return!1,t},t.multiply=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return!0,t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<ga.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}return!1,t},t}(),xa=function(t){function e(e){var n=t.call(this)||this;return n.type_=e,n}return lt(e,t),e.fromNumberish=function(t){return"number"==typeof t?new Oa(t,Bo.kNumber):t},e.fromPercentish=function(t){return"number"==typeof t?new Oa(100*t,Bo.kPercentage):t},e.prototype.getType=function(){return ya.kUnknownType},e.prototype.equals=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=Sa(e);return r.every((function(e){return t.equals(e)}))},e.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);Na(ya.kSumType,n,this);var r=Ca(n,ma.kAdd);return r||Ua.create(n)},e.prototype.sub=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);n=n.map((function(t){return t.negate()})),Na(ya.kSumType,n,this);var r=Ca(n,ma.kAdd);return r||Ua.create(n)},e.prototype.mul=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);Na(ya.kProductType,n,this);var r=_a(n);return r||Ga.create(n)},e.prototype.div=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);n=n.map((function(t){return t.invert()})),Na(ya.kProductType,n,this);var r=_a(n);return r||Ga.create(n)},e.prototype.min=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);Na(ya.kMinType,n,this);var r=Ca(n,ma.kMin);return r||ja.create(n)},e.prototype.max=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Sa(t);Na(ya.kMaxType,n,this);var r=Ca(n,ma.kMax);return r||Fa.create(n)},e.prototype.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;var n,r=Aa(e[0]);return r?(n="string"==typeof t?Oa.unitFromName(t):t,r.convertTo(n)):null},e.prototype.toSum=function(){for(var t,n,r,i,o,a,u=[],s=0;s<arguments.length;s++)u[s]=arguments[s];try{for(var c=mt(u),l=c.next();!l.done;l=c.next()){var h=l.value;if(!e.isValidUnit(e.unitFromName(h)))return null}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}var f=this.sumValue();if(!f.length)return null;var p=[];try{for(var d=mt(f),y=d.next();!y.done;y=d.next()){var v=y.value,m=Aa(v);if(!m)return null;p.push(m)}}catch(t){r={error:t}}finally{try{y&&!y.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}if(0===u.length){p.sort((function(t,e){return t.unit-e.unit}));var g=Ua.create(p);return Wo(!!g),g}var b=[],T=function(t){var n=e.unitFromName(t);Wo(e.isValidUnit(n));var r=p.reduce((function(t,e,r){if(e){var i=e.convertTo(n);i&&(t+=i.value,p[r]=null)}return t}),0);b.push(new Oa(r,n))};try{for(var E=mt(u),w=E.next();!w.done;w=E.next()){T(h=w.value)}}catch(t){o={error:t}}finally{try{w&&!w.done&&(a=E.return)&&a.call(E)}finally{if(o)throw o.error}}if(p.some((function(t){return!!t})))throw new Error("There were leftover terms that were not converted");return Ua.create(b)},e.prototype.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(ga.kLength);return e&&(t.length=e),(e=this.type_.exponent(ga.kAngle))&&(t.angle=e),(e=this.type_.exponent(ga.kTime))&&(t.time=e),(e=this.type_.exponent(ga.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(ga.kResolution))&&(t.resolution=e),(e=this.type_.exponent(ga.kFlex))&&(t.flex=e),(e=this.type_.exponent(ga.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=ka(this.type_.percentHint)),t},e.isValidUnit=function(t){return t!==Bo.kUserUnits&&!!(t===Bo.kNumber||t==Bo.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t)||this.isFrequency(t)||this.isResolution(t)||this.isFlex(t))},e.prototype.negate=function(){return Da.create(this)},e.prototype.invert=function(){return Ra.create(this)},e}(ba);function Sa(t){return t.map(xa.fromNumberish)}function Na(t,e,n){Wo(!!n),n.getType()===t?e.unshift.apply(e,bt([],gt(n.numericValues()),!1)):e.unshift(n)}function Aa(t){return 0===Object.keys(t.units).length?new Oa(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Oa(t.value,Number(Object.keys(t.units)[0])):null}function Ca(t,e){Wo(!!t.length);var n=t[0]instanceof Oa?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var o=t[i]instanceof Oa?t[i]:null;if(!o||o.unit!==n.unit)return null;e===ma.kAdd?r+=o.value:e===ma.kMax?r=Math.max(r,o.value):e===ma.kMin&&(r=Math.min(r,o.value))}return new Oa(r,n.unit)}function _a(t){Wo(!!t.length);for(var e=Bo.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof Oa?t[r]:null;if(!i)return null;if(i.unit!==Bo.kNumber){if(e!==Bo.kNumber)return null;e=i.unit}n*=i.value}return new Oa(n,e)}var Oa=function(t){function e(n,r){void 0===r&&(r=Bo.kNumber);var i,o=this;return i="string"==typeof r?e.unitFromName(r):r,Wo(e.isValidUnit(i)),(o=t.call(this,new Pa(i))||this).unit=i,o.value=n,o}return lt(e,t),e.toCanonicalUnit=function(t){return this.canonicalUnitTypeForCategory(this.unitTypeToUnitCategory(t))},e.toCanonicalUnitIfPossible=function(t){var e=this.toCanonicalUnit(t);return e===Bo.kUnknown?t:e},e.formatInfinityOrNaN=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(Wo(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},e.formatNumber=function(t,e){return void 0===e&&(e=""),t+e},e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=e.toCanonicalUnit(this.unit);if(n!==e.toCanonicalUnit(t)||n===Bo.kUnknown)return null;var r=ba.conversionToCanonicalUnitsScaleFactor(this.unit)/ba.conversionToCanonicalUnitsScaleFactor(t);return new e(this.value*r,t)},e.prototype.equals=function(t){var e=t;return this.value===e.value&&this.unit===e.unit},e.prototype.getType=function(){return ya.kUnitType},e.prototype.sumValue=function(){var t=[],n={};return this.unit!==Bo.kNumber&&(n[e.toCanonicalUnitIfPossible(this.unit)]=1),t.push({value:this.value*ba.conversionToCanonicalUnitsScaleFactor(this.unit),units:n}),t},e.prototype.negate=function(){return new e(-this.value,this.unit)},e.prototype.invert=function(){return this.unit===Bo.kNumber?0===this.value?null:new e(1/this.value,this.unit):Ra.create(this)},e.prototype.buildCSSText=function(t,n,r){var i;switch(this.unit){case Bo.kUnknown:break;case Bo.kInteger:i=Number(this.value).toFixed(0);break;case Bo.kNumber:case Bo.kPercentage:case Bo.kEms:case Bo.kQuirkyEms:case Bo.kExs:case Bo.kRems:case Bo.kChs:case Bo.kPixels:case Bo.kCentimeters:case Bo.kDotsPerPixel:case Bo.kDotsPerInch:case Bo.kDotsPerCentimeter:case Bo.kMillimeters:case Bo.kQuarterMillimeters:case Bo.kInches:case Bo.kPoints:case Bo.kPicas:case Bo.kUserUnits:case Bo.kDegrees:case Bo.kRadians:case Bo.kGradians:case Bo.kMilliseconds:case Bo.kSeconds:case Bo.kHertz:case Bo.kKilohertz:case Bo.kTurns:case Bo.kFraction:case Bo.kViewportWidth:case Bo.kViewportHeight:case Bo.kViewportInlineSize:case Bo.kViewportBlockSize:case Bo.kViewportMin:case Bo.kViewportMax:case Bo.kSmallViewportWidth:case Bo.kSmallViewportHeight:case Bo.kSmallViewportInlineSize:case Bo.kSmallViewportBlockSize:case Bo.kSmallViewportMin:case Bo.kSmallViewportMax:case Bo.kLargeViewportWidth:case Bo.kLargeViewportHeight:case Bo.kLargeViewportInlineSize:case Bo.kLargeViewportBlockSize:case Bo.kLargeViewportMin:case Bo.kLargeViewportMax:case Bo.kDynamicViewportWidth:case Bo.kDynamicViewportHeight:case Bo.kDynamicViewportInlineSize:case Bo.kDynamicViewportBlockSize:case Bo.kDynamicViewportMin:case Bo.kDynamicViewportMax:case Bo.kContainerWidth:case Bo.kContainerHeight:case Bo.kContainerInlineSize:case Bo.kContainerBlockSize:case Bo.kContainerMin:case Bo.kContainerMax:var o=this.value,a=e.unitTypeToString(this.unit);if(o<-999999||o>999999){var u=e.unitTypeToString(this.unit);i=!Number.isFinite(o)||Number.isNaN(o)?e.formatInfinityOrNaN(o,u):e.formatNumber(o,u)}else i="".concat(o).concat(a)}return r+=i},e}(xa),Ia=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.isUnitValue=function(){return!1},e}(xa),Ra=function(t){function e(e,n){var r=t.call(this,n)||this;return r.value=e,r.operator="invert",r}return lt(e,t),e.create=function(t){return new e(t,Pa.negateExponents(t.type_))},e.prototype.clone=function(){return new e(this.value,this.type_)},e.prototype.getType=function(){return ya.kInvertType},e.prototype.equals=function(t){if(t.getType()!==ya.kInvertType)return!1;var e=t;return this.value.equals(e.value)},e.prototype.sumValue=function(){var t=this.value.sumValue();return 0===t.length||1!==t.length||0===t[0].value?null:(Object.keys(t[0].units).forEach((function(e){t[0].units[e]*=-1})),t[0].value=1/t[0].value,t)},e.prototype.buildCSSText=function(t,e,n){return e==Go.kNo&&(n+=t===Uo.kYes?"(":"calc("),n+="1 / ",n=this.value.buildCSSText(Uo.kYes,Go.kNo,n),e===Go.kNo&&(n+=")"),n},e}(Ia),Da=function(t){function e(e,n){var r=t.call(this,n)||this;return r.value=e,r.operator="negate",r}return lt(e,t),e.create=function(t){return new e(t,t.type_)},e.prototype.clone=function(){return new e(this.value,this.type_)},e.prototype.getType=function(){return ya.kNegateType},e.prototype.equals=function(t){if(t.getType()!==ya.kNegateType)return!1;var e=t;return this.value.equals(e.value)},e.prototype.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach((function(t){t.value*=-1})),t)},e.prototype.buildCSSText=function(t,e,n){return e==Go.kNo&&(n+=t===Uo.kYes?"(":"calc("),n+="-",n=this.value.buildCSSText(Uo.kYes,Go.kNo,n),e===Go.kNo&&(n+=")"),n},e}(Ia);function La(t,e,n){for(var r=t[0].type_,i=1;i<t.length;i++)r=e(r,t[i].type_,!1);return r}var Va,Ba=function(t){function e(e,n){var r=t.call(this,n)||this;return r.values=e,r}return lt(e,t),e.prototype.numericValues=function(){return this.values},e.prototype.equals=function(t){return this.getType()===t.getType()&&this.values.every((function(e,n){return e.equals(t.values[n])}))},e}(Ia),ja=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="min",e}return lt(e,t),e.create=function(t){return new e(t,La(t,Pa.add))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return ya.kMinType},e.prototype.sumValue=function(){var t,e,n=this.numericValues()[0].sumValue();if(!n.length)return null;try{for(var r=mt(this.numericValues()),i=r.next();!i.done;i=r.next()){var o=i.value.sumValue();if(!o.length||JSON.stringify(o[0].units)!==JSON.stringify(n[0].units))return null;o[0].value<n[0].value&&(n=o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},e.prototype.buildCSSText=function(t,e,n){var r,i;n+="min(";var o=!0;try{for(var a=mt(this.numericValues()),u=a.next();!u.done;u=a.next()){var s=u.value;o||(n+=", "),o=!1,n=s.buildCSSText(Uo.kYes,Go.kYes,n)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n+=")"},e}(Ba),Fa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="max",e}return lt(e,t),e.create=function(t){return new e(t,La(t,Pa.add))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return ya.kMaxType},e.prototype.sumValue=function(){var t,e,n=this.numericValues()[0].sumValue();if(!n.length)return null;try{for(var r=mt(this.numericValues()),i=r.next();!i.done;i=r.next()){var o=i.value.sumValue();if(!o.length||JSON.stringify(o[0].units)!==JSON.stringify(n[0].units))return null;o[0].value<n[0].value&&(n=o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},e.prototype.buildCSSText=function(t,e,n){var r,i;n+="max(";var o=!0;try{for(var a=mt(this.numericValues()),u=a.next();!u.done;u=a.next()){var s=u.value;o||(n+=", "),o=!1,n=s.buildCSSText(Uo.kYes,Go.kYes,n)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n+=")"},e}(Ba),Ua=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="sum",e}return lt(e,t),e.create=function(t){return new e(t,La(t,Pa.add))},e.numericTypeFromUnitMap=function(t){var e=new Pa;return Object.keys(t).forEach((function(n){var r=t[n];e=Pa.multiply(e,new Pa(Number(n),r),!1),Wo(!0)})),e},e.canCreateNumericTypeFromSumValue=function(t){var e=this;Wo(!!t.length);var n=this.numericTypeFromUnitMap(t[0].units);return t.every((function(t){return Pa.add(n,e.numericTypeFromUnitMap(t.units),!1),!0}))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return ya.kSumType},e.prototype.sumValue=function(){var t=[];return this.numericValues().forEach((function(e){var n=e.sumValue();if(!n.length)return null;n.forEach((function(e){var n=t.findIndex((function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)}));-1===n?t.push(ht({},e)):t[n].value+=e.value}))})),e.canCreateNumericTypeFromSumValue(t)?t:null},e.prototype.buildCSSText=function(t,e,n){e==Go.kNo&&(n+=t===Uo.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Uo.kYes,Go.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];o.getType()===ya.kNegateType?(n+=" - ",n=o.value.buildCSSText(Uo.kYes,Go.kNo,n)):(n+=" + ",n=o.buildCSSText(Uo.kYes,Go.kNo,n))}return e===Go.kNo&&(n+=")"),n},e}(Ba),Ga=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="product",e}return lt(e,t),e.create=function(t){return new e(t,La(t,Pa.multiply))},e.multiplyUnitMaps=function(t,e){return Object.keys(e).forEach((function(n){Yo(e[n].value,0);var r=n in t?t[n].value:0;r+e[n].value===0?delete t[n]:t[n]=r+e[n].value})),t},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return ya.kProductType},e.prototype.sumValue=function(){var t=[{value:1,units:{}}];return this.numericValues().forEach((function(n){var r=n.sumValue();if(!r.length)return null;var i=[];t.forEach((function(t){r.forEach((function(n){i.push({value:t.value*n.value,units:e.multiplyUnitMaps(t.units,n.units)})}))})),t=i})),t},e.prototype.buildCSSText=function(t,e,n){e==Go.kNo&&(n+=t===Uo.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Uo.kYes,Go.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];o.getType()===ya.kInvertType?(n+=" / ",n=o.value.buildCSSText(Uo.kYes,Go.kNo,n)):(n+=" * ",n=o.buildCSSText(Uo.kYes,Go.kNo,n))}return e===Go.kNo&&(n+=")"),n},e}(Ba),za=new Oa(0,"px"),qa=new Oa(0,"deg"),Wa=function(t){function e(e,n,r,i,o){void 0===i&&(i=1),void 0===o&&(o=!1);var a=t.call(this,"rgb")||this;return a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}return lt(e,t),e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(Ta);!function(t){t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient",t[t.Pattern=3]="Pattern"}(Va||(Va={}));var Ha,Ya=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return lt(e,t),e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(t,e,n){var r="";return this.type===Va.LinearGradient?r="linear-gradient(".concat(this.value.steps.map((function(t){return t.join(",")})).join(","),")"):this.type===Va.RadialGradient?r="radial-gradient(".concat(this.value.steps.map((function(t){return t.join(",")})).join(","),")"):this.type===Va.Pattern&&(r="url(".concat(this.value.src,")")),n+r},e.prototype.getType=function(){return ya.kColorType},e}(ba),Ka=function(t){function e(e){var n=t.call(this)||this;return n.transforms=e,n.is2D=e.every((function(t){return t.is2D})),n.length=e.length,n}return lt(e,t),e.prototype.clone=function(){return new e(this.transforms)},e.prototype.getType=function(){return ya.kTransformType},e.prototype.buildCSSText=function(t,e,n){return n+""},e.prototype.toMatrix=function(){},e}(ba);!function(t){t[t.kMatrixType=0]="kMatrixType",t[t.kPerspectiveType=1]="kPerspectiveType",t[t.kRotationType=2]="kRotationType",t[t.kScaleType=3]="kScaleType",t[t.kSkewType=4]="kSkewType",t[t.kSkewXType=5]="kSkewXType",t[t.kSkewYType=6]="kSkewYType",t[t.kTranslationType=7]="kTranslationType"}(Ha||(Ha={}));var Xa=function(t){function e(e,n,r,i){var o=t.call(this,i)||this;return o.x=e,o.y=n,o.z=r,o}return lt(e,t),e.prototype.toMatrix=function(){return null},e}((function(t){this.is2D=t})),Za=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Ja(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Qa(){}var $a="\\s*([+-]?\\d+)\\s*",tu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",eu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nu=/^#([0-9a-f]{3,8})$/,ru=new RegExp("^rgb\\("+[$a,$a,$a]+"\\)$"),iu=new RegExp("^rgb\\("+[eu,eu,eu]+"\\)$"),ou=new RegExp("^rgba\\("+[$a,$a,$a,tu]+"\\)$"),au=new RegExp("^rgba\\("+[eu,eu,eu,tu]+"\\)$"),uu=new RegExp("^hsl\\("+[tu,eu,eu]+"\\)$"),su=new RegExp("^hsla\\("+[tu,eu,eu,tu]+"\\)$"),cu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function lu(){return this.rgb().formatHex()}function hu(){return this.rgb().formatRgb()}function fu(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=nu.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?pu(e):3===n?new vu(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?du(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?du(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ru.exec(t))?new vu(e[1],e[2],e[3],1):(e=iu.exec(t))?new vu(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ou.exec(t))?du(e[1],e[2],e[3],e[4]):(e=au.exec(t))?du(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=uu.exec(t))?Tu(e[1],e[2]/100,e[3]/100,1):(e=su.exec(t))?Tu(e[1],e[2]/100,e[3]/100,e[4]):cu.hasOwnProperty(t)?pu(cu[t]):"transparent"===t?new vu(NaN,NaN,NaN,0):null}function pu(t){return new vu(t>>16&255,t>>8&255,255&t,1)}function du(t,e,n,r){return r<=0&&(t=e=n=NaN),new vu(t,e,n,r)}function yu(t){return t instanceof Qa||(t=fu(t)),t?new vu((t=t.rgb()).r,t.g,t.b,t.opacity):new vu}function vu(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function mu(){return"#"+bu(this.r)+bu(this.g)+bu(this.b)}function gu(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function bu(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Tu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new wu(t,e,n,r)}function Eu(t){if(t instanceof wu)return new wu(t.h,t.s,t.l,t.opacity);if(t instanceof Qa||(t=fu(t)),!t)return new wu;if(t instanceof wu)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n<r):n===o?(r-e)/u+2:(e-n)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new wu(a,u,s,t.opacity)}function wu(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Mu(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Za(Qa,fu,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:lu,formatHex:lu,formatHsl:function(){return Eu(this).formatHsl()},formatRgb:hu,toString:hu}),Za(vu,(function(t,e,n,r){return 1===arguments.length?yu(t):new vu(t,e,n,null==r?1:r)}),Ja(Qa,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vu(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vu(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mu,formatHex:mu,formatRgb:gu,toString:gu})),Za(wu,(function(t,e,n,r){return 1===arguments.length?Eu(t):new wu(t,e,n,null==r?1:r)}),Ja(Qa,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new wu(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new wu(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new vu(Mu(t>=240?t-240:t+120,i,r),Mu(t,i,r),Mu(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var ku=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Pu=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,xu=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Su=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function Nu(t){if(void 0===t&&(t=""),"transparent"===t)return new Wa(0,0,0,0);"currentColor"===t&&(t="black");var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=function(t){var e,n=ku.exec(t);if(n){var r=parseFloat(n[1])%360*(Math.PI/180),i=(null===(e=n[2].match(Su))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[],o=gt([1,1],2),a=o[0],u=o[1],s=gt([0,0],2),c=s[0],l=s[1],h=void 0,f=void 0;r>=0&&r<.5*Math.PI?(h={x:c,y:l},f={x:a,y:u}):.5*Math.PI<=r&&r<Math.PI?(h={x:a,y:l},f={x:c,y:u}):Math.PI<=r&&r<1.5*Math.PI?(h={x:a,y:u},f={x:c,y:l}):(h={x:c,y:u},f={x:a,y:l});var p=Math.tan(r),d=p*p,y=(f.x-h.x+p*(f.y-h.y))/(d+1)+h.x,v=p*(f.x-h.x+p*(f.y-h.y))/(d+1)+h.y;return{x0:h.x,y0:h.y,x1:y,y1:v,steps:i,hash:t}}return null}(t);if(n)return new Ya(Va.LinearGradient,n)}else if("r"===e){var r=function(t){var e,n=Pu.exec(t);if(n){var r=parseFloat(n[1]),i=parseFloat(n[2]),o=parseFloat(n[3]),a=(null===(e=n[4].match(Su))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[];if(0===o){var u=n[4].match(Su);return u[u.length-1].split(":")[1]}return{x0:r,y0:i,r0:0,x1:.5,y1:.5,r1:o,steps:a,hash:t}}return null}(t);if(r){if(!kh(r))return new Ya(Va.RadialGradient,r);t=r}}else if("p"===e){var i=function(t){var e=xu.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;case"n":n="no-repeat";break;default:n="no-repeat"}return{src:r,repetition:n,hash:t}}return null}(t);if(i)return new Ya(Va.Pattern,i)}var o=fu(t),a=[0,0,0,0];return null!==o&&(a[0]=o.r||0,a[1]=o.g||0,a[2]=o.b||0,a[3]=o.opacity),new(Wa.bind.apply(Wa,bt([void 0],gt(a),!1)))}function Au(t,e){if(t instanceof Wa&&e instanceof Wa)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(ta(e[n],0,255));return e[3]=ta(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function Cu(t,e){if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))&&"px".search(t)>=0)return new Oa(Number(e),"px");var n=[];e=e.replace(t,(function(t){return n.push(t),"U"+t}));var r="U("+t.source+")";return n.map((function(t){return new Oa(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)}))[0]}var _u=Cu.bind(null,new RegExp("px","g")),Ou=Cu.bind(null,new RegExp("%","g")),Iu=Cu.bind(null,new RegExp("px|%|em","g")),Ru=Cu.bind(null,new RegExp("deg|rad|grad|turn","g"));function Du(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,u=e.value||0;return(Oa.isLength(t.unit)||Oa.isLength(e.unit))&&(a=ju(t,i,n),u=ju(e,i,n),o="px"),(Oa.isAngle(t.unit)||Oa.isAngle(e.unit))&&(a=Lu(t),u=Lu(e),o="deg"),[a,u,function(t){return r&&(t=Math.max(t,0)),t+o}]}function Lu(t){var e=0;return t.unit===Bo.kDegrees?e=t.value:t.unit===Bo.kRadians?e=ia(Number(t.value)):t.unit===Bo.kTurns&&(e=ua(Number(t.value))),e}function Vu(t){return kh(t)?t.split(" ").map((function(t){return Iu(t)})):t.map((function(t){return Iu(t.toString())}))}function Bu(t,e,n){if(t.length===e.length){var r=t[0].unit;return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t.map((function(t){return new Oa(t,r)})).join(" ")}]}}function ju(t,e,n){if(t.unit===Bo.kPixels)return Number(t.value);if(t.unit===Bo.kPercentage&&n){var r=n.getGeometryBounds(),i=0;return To.isEmpty(r)||(i=2*r.halfExtents[e]),Number(t.value)/100*i}return 0}function Fu(t){return t.toString()}function Uu(t){return"number"==typeof t?new Oa(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?new Oa(Number(t)):new Oa(0)}function Gu(t){return kh(t)?t.split(" ").map(Uu):t.map(Uu)}function zu(t,e){return[t.value,e.value,Fu]}function qu(t,e){return function(n,r){return[n.value,r.value,function(n){return Fu(ta(n,t,e))}]}}function Wu(t,e){if(t.length==e.length)return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t}]}var Hu="\t\n\v\f\r   ᠎              \u2028\u2029",Yu=new RegExp("([a-z])["+Hu+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Hu+"]*,?["+Hu+"]*)+)","ig"),Ku=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Hu+"]*,?["+Hu+"]*","ig");var Xu=/[a-z]/;function Zu(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Ju(t){var e=function(t){if(!t)return null;if(Array.isArray(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(Yu,(function(t,r,i){var o=[],a=r.toLowerCase();if(i.replace(Ku,(function(t,e){e&&o.push(+e)})),"m"===a&&o.length>2&&(n.push([r].concat(o.splice(0,2))),a="l",r="m"===r?"l":"L"),"o"===a&&1===o.length&&n.push([r,o[0]]),"r"===a)n.push([r].concat(o));else for(;o.length>=e[a]&&(n.push([r].concat(o.splice(0,e[a]))),e[a]););return""})),n}(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,r=0;r<e.length;r++){var i=e[r][0];if(Xu.test(i)||["V","H","T","S"].indexOf(i)>=0){n=!0;break}}if(!n)return e;var o=[],a=0,u=0,s=0,c=0,l=0,h=e[0];"M"!==h[0]&&"m"!==h[0]||(s=a=+h[1],c=u=+h[2],l++,o[0]=["M",a,u]);r=l;for(var f=e.length;r<f;r++){var p=e[r],d=o[r-1],y=[],v=(i=p[0]).toUpperCase();if(i!==v)switch(y[0]=v,v){case"A":y[1]=p[1],y[2]=p[2],y[3]=p[3],y[4]=p[4],y[5]=p[5],y[6]=+p[6]+a,y[7]=+p[7]+u;break;case"V":y[1]=+p[1]+u;break;case"H":y[1]=+p[1]+a;break;case"M":s=+p[1]+a,c=+p[2]+u,y[1]=s,y[2]=c;break;default:for(var m=1,g=p.length;m<g;m++)y[m]=+p[m]+(m%2?a:u)}else y=e[r];switch(v){case"Z":a=+s,u=+c;break;case"H":y=["L",a=y[1],u];break;case"V":y=["L",a,u=y[1]];break;case"T":a=y[1],u=y[2];var b=Zu([d[1],d[2]],[d[3],d[4]]);y=["Q",b[0],b[1],a,u];break;case"S":a=y[y.length-2],u=y[y.length-1];var T=d.length,E=Zu([d[T-4],d[T-3]],[d[T-2],d[T-1]]);y=["C",E[0],E[1],y[1],y[2],a,u];break;case"M":s=y[y.length-2],c=y[y.length-1];break;default:a=y[y.length-2],u=y[y.length-1]}o.push(y)}return o}var Qu=2*Math.PI,$u=function(t,e,n,r,i,o,a){var u=t.x,s=t.y;return{x:r*(u*=e)-i*(s*=n)+o,y:i*u+r*s+a}},ts=function(t,e){var n=1.5707963267948966===e?.551915024494:-1.5707963267948966===e?-.551915024494:4/3*Math.tan(e/4),r=Math.cos(t),i=Math.sin(t),o=Math.cos(t+e),a=Math.sin(t+e);return[{x:r-i*n,y:i+r*n},{x:o+a*n,y:a-o*n},{x:o,y:a}]},es=function(t,e,n,r){var i=t*n+e*r;return i>1&&(i=1),i<-1&&(i=-1),(t*r-e*n<0?-1:1)*Math.acos(i)},ns=function(t){var e=t.px,n=t.py,r=t.cx,i=t.cy,o=t.rx,a=t.ry,u=t.xAxisRotation,s=void 0===u?0:u,c=t.largeArcFlag,l=void 0===c?0:c,h=t.sweepFlag,f=void 0===h?0:h,p=[];if(0===o||0===a)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];var d=Math.sin(s*Qu/360),y=Math.cos(s*Qu/360),v=y*(e-r)/2+d*(n-i)/2,m=-d*(e-r)/2+y*(n-i)/2;if(0===v&&0===m)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];o=Math.abs(o),a=Math.abs(a);var g=Math.pow(v,2)/Math.pow(o,2)+Math.pow(m,2)/Math.pow(a,2);g>1&&(o*=Math.sqrt(g),a*=Math.sqrt(g));var b=function(t,e,n,r,i,o,a,u,s,c,l,h){var f=Math.pow(i,2),p=Math.pow(o,2),d=Math.pow(l,2),y=Math.pow(h,2),v=f*p-f*y-p*d;v<0&&(v=0),v/=f*y+p*d;var m=(v=Math.sqrt(v)*(a===u?-1:1))*i/o*h,g=v*-o/i*l,b=c*m-s*g+(t+n)/2,T=s*m+c*g+(e+r)/2,E=(l-m)/i,w=(h-g)/o,M=(-l-m)/i,k=(-h-g)/o,P=es(1,0,E,w),x=es(E,w,M,k);return 0===u&&x>0&&(x-=Qu),1===u&&x<0&&(x+=Qu),[b,T,P,x]}(e,n,r,i,o,a,l,f,d,y,v,m),T=b[0],E=b[1],w=b[2],M=b[3],k=Math.abs(M)/(Qu/4);Math.abs(1-k)<1e-7&&(k=1);var P=Math.max(Math.ceil(k),1);M/=P;for(var x=0;x<P;x++)p.push(ts(w,M)),w+=M;return p.map((function(t){var e=$u(t[0],o,a,y,d,T,E),n=e.x,r=e.y,i=$u(t[1],o,a,y,d,T,E),u=i.x,s=i.y,c=$u(t[2],o,a,y,d,T,E);return{x1:n,y1:r,x2:u,y2:s,x:c.x,y:c.y}}))};function rs(t,e,n,r,i,o,a,u,s){return ns({px:t,py:e,cx:u,cy:s,rx:n,ry:r,xAxisRotation:i,largeArcFlag:o,sweepFlag:a}).reduce((function(t,e){var n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.x,u=e.y;return t.push(n,r,i,o,a,u),t}),[])}function is(t,e,n,r,i,o){return[1/3*t+2/3*n,1/3*e+2/3*r,1/3*i+2/3*n,1/3*o+2/3*r,i,o]}function os(t,e,n,r){return[t,e,n,r,n,r]}function as(t,e){"TQ".indexOf(t[0])<0&&(e.qx=null,e.qy=null);var n=t.slice(1),r=n[0],i=n[1];switch(t[0]){case"M":return e.x=r,e.y=i,t;case"A":return["C"].concat(rs.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"Q":return e.qx=r,e.qy=i,["C"].concat(is.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"L":return["C"].concat(os(e.x1,e.y1,t[1],t[2]));case"H":return["C"].concat(os(e.x1,e.y1,t[1],e.y1));case"V":return["C"].concat(os(e.x1,e.y1,e.x1,t[1]));case"Z":return["C"].concat(os(e.x1,e.y1,e.x,e.y))}return t}function us(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}var ss=Math.PI/180;function cs(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ls(t,e){return cs(t)*cs(e)?(t[0]*e[0]+t[1]*e[1])/(cs(t)*cs(e)):1}function hs(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ls(t,e))}function fs(t,e){return t[0]===e[0]&&t[1]===e[1]}function ps(t,e){var n,r,i=e[1],o=e[2],a=(n=function(t){return ss*t}(e[3]),r=2*Math.PI,(n%r+r)%r),u=e[4],s=e[5],c=t[0],l=t[1],h=e[6],f=e[7],p=Math.cos(a)*(c-h)/2+Math.sin(a)*(l-f)/2,d=-1*Math.sin(a)*(c-h)/2+Math.cos(a)*(l-f)/2,y=p*p/(i*i)+d*d/(o*o);y>1&&(i*=Math.sqrt(y),o*=Math.sqrt(y));var v=i*i*(d*d)+o*o*(p*p),m=v?Math.sqrt((i*i*(o*o)-v)/v):1;u===s&&(m*=-1),isNaN(m)&&(m=0);var g=o?m*i*d/o:0,b=i?m*-o*p/i:0,T=(c+h)/2+Math.cos(a)*g-Math.sin(a)*b,E=(l+f)/2+Math.sin(a)*g+Math.cos(a)*b,w=[(p-g)/i,(d-b)/o],M=[(-1*p-g)/i,(-1*d-b)/o],k=hs([1,0],w),P=hs(w,M);return ls(w,M)<=-1&&(P=Math.PI),ls(w,M)>=1&&(P=0),0===s&&P>0&&(P-=2*Math.PI),1===s&&P<0&&(P+=2*Math.PI),{cx:T,cy:E,rx:fs(t,[h,f])?0:i,ry:fs(t,[h,f])?0:o,startAngle:k,endAngle:k+P,xRotation:a,arcFlag:u,sweepFlag:s}}var ds=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,ys=/[^\s,]+/gi;function vs(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function ms(t){for(var e=[],n=null,r=null,i=null,o=0,a=(t=function(t){var e=t||[];return Array.isArray(e)?e:"string"==typeof e?((e=e.match(ds)).forEach((function(t,n){if((t=t.match(ys))[0].length>1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}t.forEach((function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}(t)).length,u=0;u<a;u++){var s=t[u];r=t[u+1];var c=s[0],l={command:c,prePoint:n,params:s,startTangent:null,endTangent:null};switch(c){case"M":i=[s[1],s[2]],o=u;break;case"A":var h=ps(n,s);l.arcParams=h}if("Z"===c)n=i,r=t[o+1];else{var f=s.length;n=[s[f-2],s[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),l.currentPoint=n,e[o]&&fs(n,e[o].currentPoint)&&(e[o].prePoint=l.prePoint);var p=r?[r[r.length-2],r[r.length-1]]:null;l.nextPoint=p;var d=l.prePoint;if(["L","H","V"].includes(c))l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]];else if("Q"===c){var y=[s[1],s[2]];l.startTangent=[d[0]-y[0],d[1]-y[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]]}else if("T"===c){y=vs((g=e[u-1]).currentPoint,d);"Q"===g.command?(l.command="Q",l.startTangent=[d[0]-y[0],d[1]-y[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]]):(l.command="TL",l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]])}else if("C"===c){var v=[s[1],s[2]],m=[s[3],s[4]];l.startTangent=[d[0]-v[0],d[1]-v[1]],l.endTangent=[n[0]-m[0],n[1]-m[1]],0===l.startTangent[0]&&0===l.startTangent[1]&&(l.startTangent=[v[0]-m[0],v[1]-m[1]]),0===l.endTangent[0]&&0===l.endTangent[1]&&(l.endTangent=[m[0]-v[0],m[1]-v[1]])}else if("S"===c){var g;v=vs((g=e[u-1]).currentPoint,d),m=[s[1],s[2]];"C"===g.command?(l.command="C",l.startTangent=[d[0]-v[0],d[1]-v[1]],l.endTangent=[n[0]-m[0],n[1]-m[1]]):(l.command="SQ",l.startTangent=[d[0]-m[0],d[1]-m[1]],l.endTangent=[n[0]-m[0],n[1]-m[1]])}else if("A"===c){var b=.001,T=l.arcParams||{},E=T.cx,w=void 0===E?0:E,M=T.cy,k=void 0===M?0:M,P=T.rx,x=void 0===P?0:P,S=T.ry,N=void 0===S?0:S,A=T.sweepFlag,C=void 0===A?0:A,_=T.startAngle,O=void 0===_?0:_,I=T.endAngle,R=void 0===I?0:I;0===C&&(b*=-1);var D=x*Math.cos(O-b)+w,L=N*Math.sin(O-b)+k;l.startTangent=[D-i[0],L-i[1]];var V=x*Math.cos(O+R+b)+w,B=N*Math.sin(O+R-b)+k;l.endTangent=[d[0]-V,d[1]-B]}e.push(l)}return e}function gs(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function bs(t,e){return Math.abs(t-e)<.001}function Ts(t,e){var n=Math.min.apply(Math,bt([],gt(t),!1)),r=Math.min.apply(Math,bt([],gt(e),!1));return{x:n,y:r,width:Math.max.apply(Math,bt([],gt(t),!1))-n,height:Math.max.apply(Math,bt([],gt(e),!1))-r}}function Es(t){return(t+2*Math.PI)%(2*Math.PI)}var ws={box:function(t,e,n,r){return Ts([t,n],[e,r])},length:function(t,e,n,r){return gs(t,e,n,r)},pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?gs(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?gs(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a=[n-t,r-e];if(c.exactEquals(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var u=[-a[1],a[0]];c.normalize(u,u);var s=[i-t,o-e];return Math.abs(c.dot(s,u))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Ms(t,e,n,r,i,o){var a=-1,u=1/0,s=[n,r],c=20;o&&o>200&&(c=o/10);for(var l=1/c,h=l/10,f=0;f<=c;f++){var p=f*l,d=[i.apply(void 0,bt([],gt(t.concat([p])),!1)),i.apply(void 0,bt([],gt(e.concat([p])),!1))];(g=gs(s[0],s[1],d[0],d[1]))<u&&(a=p,u=g)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}u=1/0;for(f=0;f<32&&!(h<1e-4);f++){var v=a-h,m=a+h,g=(d=[i.apply(void 0,bt([],gt(t.concat([v])),!1)),i.apply(void 0,bt([],gt(e.concat([v])),!1))],gs(s[0],s[1],d[0],d[1]));if(v>=0&&g<u)a=v,u=g;else{var b=[i.apply(void 0,bt([],gt(t.concat([m])),!1)),i.apply(void 0,bt([],gt(e.concat([m])),!1))],T=gs(s[0],s[1],b[0],b[1]);m<=1&&T<u?(a=m,u=T):h*=.5}}return{x:i.apply(void 0,bt([],gt(t.concat([a])),!1)),y:i.apply(void 0,bt([],gt(e.concat([a])),!1))}}function ks(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function Ps(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function xs(t,e,n,r){var i,o,a,u=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,c=3*e-3*t,l=[];if(bs(u,0))bs(s,0)||(i=-c/s)>=0&&i<=1&&l.push(i);else{var h=s*s-4*u*c;bs(h,0)?l.push(-s/(2*u)):h>0&&(o=(-s-(a=Math.sqrt(h)))/(2*u),(i=(-s+a)/(2*u))>=0&&i<=1&&l.push(i),o>=0&&o<=1&&l.push(o))}return l}function Ss(t,e,n,r,i,o,a,u,s){var c=ks(t,n,i,a,s),l=ks(e,r,o,u,s),h=ws.pointAt(t,e,n,r,s),f=ws.pointAt(n,r,i,o,s),p=ws.pointAt(i,o,a,u,s),d=ws.pointAt(h.x,h.y,f.x,f.y,s),y=ws.pointAt(f.x,f.y,p.x,p.y,s);return[[t,e,h.x,h.y,d.x,d.y,c,l],[c,l,y.x,y.y,p.x,p.y,a,u]]}function Ns(t,e,n,r,i,o,a,u,s){if(0===s)return function(t,e){for(var n=0,r=t.length,i=0;i<r;i++){n+=gs(t[i],e[i],t[(i+1)%r],e[(i+1)%r])}return n/2}([t,n,i,a],[e,r,o,u]);var c=Ss(t,e,n,r,i,o,a,u,.5),l=bt(bt([],gt(c[0]),!1),[s-1],!1),h=bt(bt([],gt(c[1]),!1),[s-1],!1);return Ns.apply(void 0,bt([],gt(l),!1))+Ns.apply(void 0,bt([],gt(h),!1))}var As={extrema:xs,box:function(t,e,n,r,i,o,a,u){for(var s=[t,a],c=[e,u],l=xs(t,n,i,a),h=xs(e,r,o,u),f=0;f<l.length;f++)s.push(ks(t,n,i,a,l[f]));for(f=0;f<h.length;f++)c.push(ks(e,r,o,u,h[f]));return Ts(s,c)},length:function(t,e,n,r,i,o,a,u){return Ns(t,e,n,r,i,o,a,u,3)},nearestPoint:function(t,e,n,r,i,o,a,u,s,c,l){return Ms([t,n,i,a],[e,r,o,u],s,c,ks,l)},pointDistance:function(t,e,n,r,i,o,a,u,s,c,l){var h=this.nearestPoint(t,e,n,r,i,o,a,u,s,c,l);return gs(h.x,h.y,s,c)},interpolationAt:ks,pointAt:function(t,e,n,r,i,o,a,u,s){return{x:ks(t,n,i,a,s),y:ks(e,r,o,u,s)}},divide:function(t,e,n,r,i,o,a,u,s){return Ss(t,e,n,r,i,o,a,u,s)},tangentAngle:function(t,e,n,r,i,o,a,u,s){var c=Ps(t,n,i,a,s),l=Ps(e,r,o,u,s);return Es(Math.atan2(l,c))}};function Cs(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=gs(r[0],r[1],i[0],i[1])}return e}var _s=function(t){return Cs(t)};var Os,Is,Rs,Ds,Ls;!function(t){t.GROUP="g",t.CIRCLE="circle",t.ELLIPSE="ellipse",t.IMAGE="image",t.RECT="rect",t.LINE="line",t.POLYLINE="polyline",t.POLYGON="polygon",t.TEXT="text",t.PATH="path",t.HTML="html"}(Os||(Os={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(Is||(Is={})),function(t){t.BEVEL="bevel",t.ROUND="round",t.MITER="miter"}(Rs||(Rs={})),function(t){t.CAPITALIZE="capitalize",t.UPPERCASE="uppercase",t.LOWERCASE="lowercase",t.NONE="none"}(Ds||(Ds={})),function(t){t.START="start",t.CENTER="center",t.END="end",t.LEFT="left",t.RIGHT="right"}(Ls||(Ls={}));var Vs=l.defineToken("CanvasConfig");function Bs(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function js(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?As.length.apply(As,bt([],gt(r),!1)):0;return{s:t,ss:e?i?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),a=Bs(n,r,e),u=Bs(r,i,e),s=Bs(i,o,e),c=Bs(a,u,e),l=Bs(u,s,e),h=Bs(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,s,o)]}(r):[t,t]:[t],l:i}}))}function Fs(t,e,n){var r=js(t),i=js(e),o=r.length,a=i.length,u=r.filter((function(t){return t.l})).length,s=i.filter((function(t){return t.l})).length,c=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,l=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,h=n||Math.max(o,a),f=[c,l],p=[h-o,h-a],d=0,y=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return d=n&&p[e]&&t.l>=f[e],p[e]-=d?1:0,d?t.ss:[t.s]})).flat()}));return y[0].length===y[1].length?y:Fs(y[0],y[1],h)}function Us(t){return zs(t)>=0}function Gs(t,e,n,r,i,o,a,u){return 3*((u-e)*(n+i)-(a-t)*(r+o)+r*(t-i)-n*(e-o)+u*(i+t/3)-a*(o+e/3))/20}function zs(t){var e=0,n=0,r=0,i=0,o=0;return t.map((function(t){var a;switch(t[0]){case"M":case"Z":return r="M"===t[0]?t[1]:r,i="M"===t[0]?t[2]:i,e=r,n=i,0;default:return o=Gs.apply(0,[e,n].concat(t.slice(1))),a=gt(t.slice(-2),2),e=a[0],n=a[1],o}})).reduce((function(t,e){return t+e}),0)}function qs(t){var e=t.slice(1).map((function(e,n,r){return n?r[n-1].slice(-2).concat(e.slice(1)):t[0].slice(1).concat(e.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map((function(t){return["C"].concat(t.slice(2))})))}function Ws(t){return t.map((function(t){return Array.isArray(t)?Ws(t):Number.isNaN(+t)?t:+t}))}function Hs(t,e){var n=t.length-1,r=[],i=0,o=function(t){var e=t.length,n=e-1;return t.map((function(r,i){return t.map((function(r,o){var a,u=i+o;return 0===o||t[u]&&"M"===t[u][0]?(a=t[u],["M"].concat(a.slice(-2))):(u>=e&&(u-=n),t[u])}))}))}(t);return o.forEach((function(o,a){t.slice(1).forEach((function(r,o){i+=function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}(t[(a+o)%n].slice(-2),e[o%n].slice(-2))})),r[a]=i,i=0})),o[r.indexOf(Math.min.apply(null,r))]}function Ys(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,u=n-t,s=n+t,c=r-e,l=r+e;return[["M",u,r],["C",u,r-a,n-o,c,n,c],["C",n+o,c,s,r-a,s,r],["C",s,r+a,n+o,l,n,l],["C",n-o,l,u,r+a,u,r],["Z"]]}function Ks(t){var e=t.getLocalTransform(),n=(t.style.anchor,[]);switch(t.nodeName){case Os.LINE:var r=t.parsedStyle,i=r.x1,o=r.y1,u=r.x2,s=r.y2;n=function(t,e,n,r){return[["M",t,e],["L",n,r]]}(i.value,o.value,u.value,s.value);break;case Os.CIRCLE:var c=t.parsedStyle,l=c.r,h=c.x,f=c.y;n=Ys(l.value,l.value,h.value,f.value);break;case Os.ELLIPSE:var p=t.parsedStyle,d=p.rx,y=p.ry,v=p.x,m=p.y;n=Ys(d.value,y.value,v.value,m.value);break;case Os.POLYLINE:case Os.POLYGON:n=function(t){return t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}))}(t.parsedStyle.points.points);break;case Os.RECT:var g=t.parsedStyle,b=g.width,T=g.height,E=g.x,w=g.y,M=g.radius;n=function(t,e,n,r,i){return i?[["M",n,i+r],["A",i,i,0,0,1,i+n,r],["L",t-i+n,r],["A",i,i,0,0,1,t+n,i+r],["L",t+n,e-i+r],["A",i,i,0,0,1,t-i+n,e+r],["L",i+n,e+r],["A",i,i,0,0,1,n,e-i+r],["Z"]]:[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(b.value,T.value,E.value,w.value,(null==M?void 0:M.value)||0);break;case Os.PATH:n=t.parsedStyle.path.curve}if(n.length)return function(t,e,n,r){var i=r.defX,o=void 0===i?0:i,u=r.defY,s=void 0===u?0:u;return t.reduce((function(t,n){var r="";if("M"===n[0]||"L"===n[0]){var i=a.fromValues(n[1]-o,n[2]-s,0);a.transformMat4(i,i,e),r="".concat(n[0]).concat(i[0],",").concat(i[1])}else if("Z"===n[0])r=n[0];else if("C"===n[0]){var u=a.fromValues(n[1]-o,n[2]-s,0),c=a.fromValues(n[3]-o,n[4]-s,0),l=a.fromValues(n[5]-o,n[6]-s,0);a.transformMat4(u,u,e),a.transformMat4(c,c,e),a.transformMat4(l,l,e),r="".concat(n[0]).concat(u[0],",").concat(u[1],",").concat(c[0],",").concat(c[1],",").concat(l[0],",").concat(l[1])}else if("A"===n[0]){var h=a.fromValues(n[6]-o,n[7]-s,0);a.transformMat4(h,h,e),r="".concat(n[0]).concat(n[1],",").concat(n[2],",").concat(n[3],",").concat(n[4],",").concat(n[5],",").concat(h[0],",").concat(h[1])}return t+r}),"")}(n,e,0,t.parsedStyle)}function Xs(t){var e=Ju(t),n=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=e.slice(),i=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}r.length>0&&n.push(r);return{polygons:e,polylines:n}}(r),o=i.polygons,a=i.polylines,u=gt(function(t,e){void 0===e&&(e=!1);for(var n,r,i=Ju(t),o={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},a=[],u="",s=i.length,c=[],l=0;l<s;l+=1)i[l]&&(u=i[l][0]),a[l]=u,i[l]=as(i[l],o),us(i,a,l),s=i.length,"Z"===u&&c.push(l),r=(n=i[l]).length,o.x1=+n[r-2],o.y1=+n[r-1],o.x2=+n[r-4]||o.x1,o.y2=+n[r-3]||o.y1;return e?[i,c]:i}(r,!0),2),s=u[0],c=u[1],l=ms(r),h=function(t){var e,n,r,i,o=0,a=0,u=[];if(!t)return{curveSegments:[],totalLength:o};if(t.forEach((function(e,n){r=t[n+1],i=e.length,r&&(o+=As.length(e[i-2],e[i-1],r[1],r[2],r[3],r[4],r[5],r[6])||0)})),0===o)return{curveSegments:[],totalLength:o};return t.forEach((function(s,c){r=t[c+1],i=s.length,r&&((e=[])[0]=a/o,n=As.length(s[i-2],s[i-1],r[1],r[2],r[3],r[4],r[5],r[6]),a+=n||0,e[1]=a/o,u.push(e))})),{curveSegments:u,totalLength:o}}(s);return{absolutePath:e,hasArc:n,segments:l,polygons:o,polylines:a,curve:s,totalLength:h.totalLength,curveSegments:h.curveSegments,zCommandIndexes:c,rect:Zs(s)}}function Zs(t){var e=0,n=0,r=[],i=[];t.forEach((function(t){var o=gt(t.slice(-2),2),a=o[0],u=o[1];if("M"===t[0])e=a,n=u,r.push(a),i.push(u);else if("C"===t[0]){var s=As.box.apply(As,bt([],gt([e,n].concat(t.slice(1))),!1));r=r.concat(s.x,s.x+s.width),i=i.concat(s.y,s.y+s.height),e=a,n=u}}));var o=Math.min.apply(0,r),a=Math.min.apply(0,i),u=Math.max.apply(0,r),s=Math.max.apply(0,i);return new Io(o,a,u-o,s-a)}function Js(t,e,n){var r=t.curve,i=e.curve,o=[r,i];r.length!==i.length&&(o=Fs(r,i));var a=Us(o[0])!==Us(o[1])?qs(o[0]):Ws(o[0]);return[a,Hs(o[1],a),function(t){return t}]}function Qs(t){if(kh(t))return null;var e,n,r=[],i=0,o=_s(t);return t.forEach((function(a,u){t[u+1]&&((e=[0,0])[0]=i/o,n=ws.length(a[0],a[1],t[u+1][0],t[u+1][1]),i+=n,e[1]=i/o,r.push(e))})),{points:t,totalLength:o,segments:r}}var $s=Cu.bind(null,/deg|rad|grad|turn|px|%/g),tc=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function ec(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,tc.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return $s(t)||Nu(t)}))}),n.lastIndex===t.length)return r}return[]}var nc,rc=l.defineToken("GeometryUpdaterFactory"),ic=l.defineToken("GeometryAABBUpdater"),oc=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return lt(e,t),e}(zo),ac=":",uc=function(){function t(){this.emitter=new st.EventEmitter}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=Qo(n)&&n||$o(n)&&n.capture,i=$o(n)&&n.once,o=Jo(e)?void 0:e,a=!1,u="";if(t.indexOf(ac)>-1){var s=gt(t.split(ac),2),c=s[0];t=s[1],u=c,a=!0}if(t=r?"".concat(t,"capture"):t,e=Jo(e)?e:e.handleEvent,a){var l=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(null===(t=e[0].target)||void 0===t?void 0:t.name)===u&&l.apply(void 0,bt([],gt(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=Qo(n)&&n||$o(n)&&n.capture,i=Jo(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=Jo(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new oc(t,e))},t.prototype.dispatchEvent=function(t){var e,n;if(!(t instanceof zo))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var r=this.ownerDocument||this.document;return r&&(t.manager=(null===(e=r.defaultView)||void 0===e?void 0:e.getEventService())||null,t.defaultPrevented=!1,t.path=[],t.target=this,null===(n=t.manager)||void 0===n||n.dispatchEvent(t)),!t.defaultPrevented},t}(),sc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return lt(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===Os.TEXT&&(n+=this.style.text);try{for(var r=mt(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===Os.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach((function(t){e.removeChild(t,!0)})),this.nodeName===Os.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw new Error("Method not implemented.")},e.prototype.lookupNamespaceURI=function(t){throw new Error("Method not implemented.")},e.prototype.lookupPrefix=function(t){throw new Error("Method not implemented.")},e.prototype.normalize=function(){throw new Error("Method not implemented.")},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(t){var n;if(t===this)return 0;if(!(t instanceof e))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var r=t,i=this,o=[r],a=[i];null!==(n=r.parentNode)&&void 0!==n?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var u=o.length>a.length?o:a,s=u===o?a:o;if(u[u.length-s.length]===s[0])return u===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var c=u.length-s.length,l=s.length-1;l>=0;l--){var h=s[l],f=u[c+l];if(f!==h){var p=h.parentNode.childNodes;return p.indexOf(h)<p.indexOf(f)?s===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING:u===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t){t(this)||this.childNodes.forEach((function(e){e.forEach(t)}))},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(uc),cc=function(){function t(){}return t.tag="c-geometry",t}(),lc=function(){function t(){this.boundsDirty=!0,this.renderBoundsDirty=!0,this.dirty=!1}return t.tag="c-renderable",t}(),hc=function(){function t(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=a.fromValues(0,0,0),this.localRotation=s.fromValues(0,0,0,1),this.localScale=a.fromValues(1,1,1),this.localTransform=o.create(),this.position=a.fromValues(0,0,0),this.rotation=s.fromValues(0,0,0,1),this.scaling=a.fromValues(1,1,1),this.worldTransform=o.create(),this.origin=a.fromValues(0,0,0)}return t.tag="c-transform",t}();!function(t){t[t.Standard=0]="Standard"}(nc||(nc={}));var fc=function(){function t(){this.strategy=nc.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return t.prototype.isCulled=function(){return this.enable&&!this.visible},t.tag="c-cullable",t}(),pc=function(){function t(){this.dirty=!1,this.renderOrder=0}return t.tag="c-sortable",t}(),dc=0,yc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sceneGraphService=ot.get(Zh),e.entity=dc++,e.renderable=new lc,e.cullable=new fc,e.transformable=new hc,e.sortable=new pc,e.geometry=new cc,e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return lt(e,t),e.isElement=function(t){return!!t.getAttribute},Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter((function(t){return""!==t}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw new Error("Method not implemented.")},e.prototype.appendChild=function(t,e){return this.sceneGraphService.attach(t,this,e),this.emit(ko.CHILD_INSERTED,{child:t}),t.dispatchEvent(new qo(ko.INSERTED,this,"","","",0,"","")),t},e.prototype.insertBefore=function(t,e){if(e){var n=this.childNodes.indexOf(e);this.appendChild(t,n-1)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e,n){var r=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,r),e},e.prototype.removeChild=function(t,e){return void 0===e&&(e=!0),t.dispatchEvent(new qo(ko.REMOVED,this,"","","",0,"","")),e&&(t.emit(ko.DESTROY,{}),t.destroyed=!0),this.emit(ko.CHILD_REMOVED,{child:t}),this.sceneGraphService.detach(t),e&&t.emitter.removeAllListeners(),t},e.prototype.removeChildren=function(t){var e=this;void 0===t&&(t=!0),this.childNodes.slice().forEach((function(n){e.removeChild(n,t)}))},e.prototype.matches=function(t){return this.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return this.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return this.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return this.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return this.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.prototype.find=function(t){var e=this,n=null;return this.forEach((function(r){return!(r===e||!t(r))&&(n=r,!0)})),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach((function(r){r!==e&&t(r)&&n.push(r)})),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach((function(e,n){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(e,r+n+1)}))}},e.prototype.before=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this),i=gt(e),o=i[0],a=i.slice(1);this.parentNode.appendChild(o,r),(t=o).after.apply(t,bt([],gt(a),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,bt([],gt(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e){return t.appendChild(e)}))},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e,n){return t.appendChild(e,n)}))},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,bt([],gt(t),!1))},e.prototype.remove=function(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},e.prototype.destroy=function(){this.emit(ko.DESTROY,{}),this.remove(!1),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return this.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return this.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return this.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return this.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return this.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(t){var e=gt(Ch(t.toString(),""),1)[0],n=this.attributes[e];return Xo(n)?null:n},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){void 0===n&&(n=!1),this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.getAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.getAttributeNodeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.hasAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.removeAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.removeAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.setAttributeNS=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.setAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.setAttributeNodeNS=function(t){throw new Error("Method not implemented.")},e.prototype.toggleAttribute=function(t,e){throw new Error("Method not implemented.")},e}(sc),vc=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return lt(e,t),e}(zo),mc=0,gc=function(){function t(t,e){this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(mc++),this._inEffect=!!this.effect.update(0),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(new Error)}})),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(new Error)}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),t=Number(t),isNaN(t))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this.totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){var t;return Number(null===(t=this.effect)||void 0===t?void 0:t.getComputedTiming().endTime)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this.totalDuration:0,this._startTime=this.totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else{if(!(this.totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this.totalDuration}},t.prototype.persist=function(){throw new Error("Method not implemented.")},t.prototype.addEventListener=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.removeEventListener=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.dispatchEvent=function(t){throw new Error("Method not implemented.")},t.prototype.commitStyles=function(){throw new Error("Method not implemented.")},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this.totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new vc(null,this,this.currentTime,t);setTimeout((function(){e.onfinish&&e.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new vc(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}();function bc(t,e){return Number(t.id)-Number(e.id)}var Tc=function(){function t(t){var e=this;this.document=t,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(bc),e.animations=e.tick(t,!0,e.animations)[0],n.forEach((function(e){e[1](t)})),e.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t){var e=new gc(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(bc),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)})),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF((function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()}))},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],u=[],s=[],c=[];return n.forEach((function(n){n.tick(t,e),n._inEffect?(u.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?s.push(n):c.push(n)})),(r=this.pendingEffects).push.apply(r,bt([],gt(a),!1)),(i=this.pendingEffects).push.apply(i,bt([],gt(u),!1)),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[s,c]},t}(),Ec="function"==typeof Float32Array,wc=function(t,e){return 1-3*e+3*t},Mc=function(t,e){return 3*e-6*t},kc=function(t){return 3*t},Pc=function(t,e,n){return((wc(e,n)*t+Mc(e,n))*t+kc(e))*t},xc=function(t,e,n){return 3*wc(e,n)*t*t+2*Mc(e,n)*t+kc(e)},Sc=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=Ec?new Float32Array(11):new Array(11),o=0;o<11;++o)i[o]=Pc(.1*o,t,n);var a=function(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=.1;--o;var a=r+.1*((e-i[o])/(i[o+1]-i[o])),u=xc(a,t,n);return u>=.001?function(t,e,n,r){for(var i=0;i<4;++i){var o=xc(e,n,r);if(0===o)return e;e-=(Pc(e,n,r)-t)/o}return e}(e,a,t,n):0===u?a:function(t,e,n,r,i){var o,a,u=0;do{(o=Pc(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&++u<10);return a}(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:Pc(a(t),e,r)}},Nc=function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-".concat(t.toLowerCase())}))).charAt(0)?t.substr(1):t},Ac=function(t,e,n){return Math.min(Math.max(t,e),n)},Cc=function(t){return Math.pow(t,2)},_c=function(t){return Math.pow(t,3)},Oc=function(t){return Math.pow(t,4)},Ic=function(t){return Math.pow(t,5)},Rc=function(t){return Math.pow(t,6)},Dc=function(t){return 1-Math.cos(t*Math.PI/2)},Lc=function(t){return 1-Math.sqrt(1-t*t)},Vc=function(t){return t*t*(3*t-2)},Bc=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},jc=function(t,e){void 0===e&&(e=[]);var n=gt(e,2),r=n[0],i=void 0===r?1:r,o=n[1],a=void 0===o?.5:o,u=Ac(Number(i),1,10),s=Ac(Number(a),.1,2);return 0===t||1===t?t:-u*Math.pow(2,10*(t-1))*Math.sin((t-1-s/(2*Math.PI)*Math.asin(1/u))*(2*Math.PI)/s)},Fc=function(t,e,n){void 0===e&&(e=[]);var r=gt(e,4),i=r[0],o=void 0===i?1:i,a=r[1],u=void 0===a?100:a,s=r[2],c=void 0===s?10:s,l=r[3],h=void 0===l?0:l;o=Ac(o,.1,1e3),u=Ac(u,.1,1e3),c=Ac(c,.1,1e3),h=Ac(h,.1,1e3);var f=Math.sqrt(u/o),p=c/(2*Math.sqrt(u*o)),d=p<1?f*Math.sqrt(1-p*p):0,y=p<1?(p*f-h)/d:-h+f,v=n?n*t/1e3:t;return v=p<1?Math.exp(-v*p*f)*(1*Math.cos(d*v)+y*Math.sin(d*v)):(1+y*v)*Math.exp(-v*f),0===t||1===t?t:1-v},Uc=(new Map,function(t,e){void 0===e&&(e=[]);var n=gt(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(Ac(t,0,1)*i)/i}),Gc=function(t,e){void 0===e&&(e=[]);var n=gt(e,4),r=n[0],i=n[1],o=n[2],a=n[3];return Sc(r,i,o,a)(t)},zc=Sc(.42,0,1,1),qc=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},Wc=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},Hc=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},Yc={steps:Uc,"step-start":function(t){return Uc(t,[1,"start"])},"step-end":function(t){return Uc(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Gc,ease:function(t){return Gc(t,[.25,.1,.25,1])},in:zc,out:qc(zc),"in-out":Wc(zc),"out-in":Hc(zc),"in-quad":Cc,"out-quad":qc(Cc),"in-out-quad":Wc(Cc),"out-in-quad":Hc(Cc),"in-cubic":_c,"out-cubic":qc(_c),"in-out-cubic":Wc(_c),"out-in-cubic":Hc(_c),"in-quart":Oc,"out-quart":qc(Oc),"in-out-quart":Wc(Oc),"out-in-quart":Hc(Oc),"in-quint":Ic,"out-quint":qc(Ic),"in-out-quint":Wc(Ic),"out-in-quint":Hc(Ic),"in-expo":Rc,"out-expo":qc(Rc),"in-out-expo":Wc(Rc),"out-in-expo":Hc(Rc),"in-sine":Dc,"out-sine":qc(Dc),"in-out-sine":Wc(Dc),"out-in-sine":Hc(Dc),"in-circ":Lc,"out-circ":qc(Lc),"in-out-circ":Wc(Lc),"out-in-circ":Hc(Lc),"in-back":Vc,"out-back":qc(Vc),"in-out-back":Wc(Vc),"out-in-back":Hc(Vc),"in-bounce":Bc,"out-bounce":qc(Bc),"in-out-bounce":Wc(Bc),"out-in-bounce":Hc(Bc),"in-elastic":jc,"out-elastic":qc(jc),"in-out-elastic":Wc(jc),"out-in-elastic":Hc(jc),spring:Fc,"spring-in":Fc,"spring-out":qc(Fc),"spring-in-out":Wc(Fc),"spring-out-in":Hc(Fc)},Kc=function(t){return Yc[function(t){return Nc(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||Yc.linear},Xc=function(t){return t};function Zc(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var Jc="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Qc=new RegExp("cubic-bezier\\("+Jc+","+Jc+","+Jc+","+Jc+"\\)"),$c=/steps\(\s*(\d+)\s*\)/,tl=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function el(t){var e=Qc.exec(t);if(e)return Sc.apply(void 0,bt([],gt(e.slice(1).map(Number)),!1));var n=$c.exec(t);if(n)return Zc(Number(n[1]),0);var r=tl.exec(t);return r?Zc(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):Kc(t)}function nl(t){return Math.abs(function(t){var e;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(t)/(t.playbackRate||1))}function rl(t,e,n){var r=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),i=function(t,e,n,r,i){switch(r){case 1:return"backwards"===e||"both"===e?0:null;case 3:return n-i;case 2:return"forwards"===e||"both"===e?t:null;case 0:return null}}(t,n.fill,e,r,n.delay);if(null===i)return null;var o="auto"===n.duration?0:n.duration,a=function(t,e,n,r,i){var o=i;return 0===t?1!==e&&(o+=n):o+=r/t,o}(o,r,n.iterations,i,n.iterationStart),u=function(t,e,n,r,i,o){var a=t===1/0?e%1:t%1;return 0!==a||2!==n||0===r||0===i&&0!==o||(a=1),a}(a,n.iterationStart,r,n.iterations,i,o),s=function(t,e,n,r){return 2===t&&e===1/0?1/0:1===n?Math.floor(r)-1:Math.floor(r)}(r,n.iterations,u,a),c=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,s,u);return n.currentIteration=s,n.progress=c,n.easingFunction(c)}var il={in:"ease-in",out:"ease-out","in-out":"ease-in-out","in-sine":"cubic-bezier(0.47, 0, 0.745, 0.715)","out-sine":"cubic-bezier(0.39, 0.575, 0.565, 1)","in-out-sine":"cubic-bezier(0.445, 0.05, 0.55, 0.95)","in-quad":"cubic-bezier(0.55, 0.085, 0.68, 0.53)","out-quad":"cubic-bezier(0.25, 0.46, 0.45, 0.94)","in-out-quad":"cubic-bezier(0.455, 0.03, 0.515, 0.955)","in-cubic":"cubic-bezier(0.55, 0.055, 0.675, 0.19)","out-cubic":"cubic-bezier(0.215, 0.61, 0.355, 1)","in-out-cubic":"cubic-bezier(0.645, 0.045, 0.355, 1)","in-quart":"cubic-bezier(0.895, 0.03, 0.685, 0.22)","out-quart":"cubic-bezier(0.165, 0.84, 0.44, 1)","in-out-quart":"cubic-bezier(0.77, 0, 0.175, 1)","in-quint":"cubic-bezier(0.755, 0.05, 0.855, 0.06)","out-quint":"cubic-bezier(0.23, 1, 0.32, 1)","in-out-quint":"cubic-bezier(0.86, 0, 0.07, 1)","in-expo":"cubic-bezier(0.95, 0.05, 0.795, 0.035)","out-expo":"cubic-bezier(0.19, 1, 0.22, 1)","in-out-expo":"cubic-bezier(1, 0, 0, 1)","in-circ":"cubic-bezier(0.6, 0.04, 0.98, 0.335)","out-circ":"cubic-bezier(0.075, 0.82, 0.165, 1)","in-out-circ":"cubic-bezier(0.785, 0.135, 0.15, 0.86)","in-back":"cubic-bezier(0.6, -0.28, 0.735, 0.045)","out-back":"cubic-bezier(0.175, 0.885, 0.32, 1.275)","in-out-back":"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},ol=(Object.keys(il),function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Xc,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=el(t),this._easing=t},enumerable:!1,configurable:!0}),t}());function al(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}return e.sort((function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)})),e}(t));for(var n=t.map((function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(i=Number(i),!isFinite(i))throw new Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw new Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(null!=a){if(a<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}else r=!1}return n=n.filter((function(t){return Number(t.offset)>=0&&Number(t.offset)<=1})),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var u=Number(n[a].computedOffset);if(null!=u&&null!=o){for(var s=1;s<a-i;s++)n[i+s].computedOffset=o+(u-o)*s/(a-i);i=a,o=u}}}(),n}var ul="backwards|forwards|both|none".split("|"),sl="reverse|alternate|alternate-reverse".split("|");function cl(t,e){var n=new ol;return e&&(n.fill="both",n.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(e){if(void 0!==t[e]&&null!==t[e]&&"auto"!==t[e]){if(("number"==typeof n[e]||"duration"===e)&&("number"!=typeof t[e]||isNaN(t[e])))return;if("fill"===e&&-1===ul.indexOf(t[e]))return;if("direction"===e&&-1===sl.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function ll(t,e){return cl(t=hl(null!=t?t:{duration:"auto"}),e)}function hl(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var fl,pl,dl=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=ll(n,!1),this.timing.effect=this,this.timing.activeDuration=nl(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=al(e,this.timing),this.interpolations=Ph(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=rl(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=al(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach((function(n){e.timing=t[n]}))},t}(),yl={x:"",y:"",z:"",anchor:[0,0],opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transformOrigin:"",visibility:"",pointerEvents:"",lineCap:"",lineJoin:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:""},vl=function(t){function e(e){var n,r,i,o=this;return(o=t.call(this)||this).styleValueRegistry=ot.get(lh),o.activeAnimations=[],o.config=e,o.config.interactive=null!==(n=o.config.capture)&&void 0!==n?n:o.config.interactive,o.id=o.config.id||"",o.name=o.config.name||"",(o.config.className||o.config.class)&&(o.className=o.config.className||o.config.class),o.nodeName=o.config.type||Os.GROUP,o.config.style=ht(ht(ht(ht({},yl),{zIndex:null!==(r=o.config.zIndex)&&void 0!==r?r:0,interactive:null===(i=o.config.interactive)||void 0===i||i}),o.config.style),o.config.attrs),null!=o.config.visible&&(o.config.style.visibility=!1===o.config.visible?"hidden":"visible"),null!=o.config.interactive&&(o.config.style.pointerEvents=!1===o.config.interactive?"none":"auto"),o.style=new Proxy(ht(ht({},o.attributes),{setProperty:function(t,e){o.setAttribute(t,e)},getPropertyValue:function(t){return o.getAttribute(t)},removeProperty:function(t){o.removeAttribute(t)},item:function(){return""}}),{get:function(t,e){return e in t?t[e]:o.getAttribute(e)},set:function(t,e,n){return o.setAttribute(e,n),!0}}),o.initAttributes(o.config.style),ot.get(Tt).add(o.entity,o),o}return lt(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),ot.get(Tt).remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},e.prototype.cloneNode=function(t){var e=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:ht({},this.attributes)});return t&&this.children.forEach((function(n){var r=n.cloneNode(t);e.appendChild(r)})),e},e.prototype.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable;this.styleValueRegistry.processProperties(this,t),e.dirty=!0},e.prototype.setAttribute=function(e,n,r){void 0===r&&(r=!1);var i=gt(Ch(e,n),2),o=i[0],a=i[1];Ko(n)||(r||a!=this.attributes[o])&&(this.internalSetAttribute(o,a),t.prototype.setAttribute.call(this,o,a))},e.prototype.internalSetAttribute=function(t,e,n){var r,i=this;void 0===n&&(n={});var o=this.renderable,a=this.attributes[t],u=this.parsedStyle[t];this.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&this.attributes.clipPathTargets.forEach((function(t){Kh(t),t.dispatchEvent(new qo(ko.ATTR_MODIFIED,t,i,i,"clipPath",qo.MODIFICATION,i,i))})),o.dirty=!0,this.dispatchEvent(new qo(ko.ATTR_MODIFIED,this,a,e,t,qo.MODIFICATION,u,this.parsedStyle[t]))},e.prototype.getBBox=function(){var t=this.getBounds(),e=gt(t.getMin(),2),n=e[0],r=e[1],i=gt(t.getMax(),2),o=i[0],a=i[1];return new Io(n,r,o-n,a-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setOrigin(this,na(t,e,n)),this},e.prototype.getOrigin=function(){return this.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setPosition(this,na(t,e,n)),this.syncLocalPosition(),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setLocalPosition(this,na(t,e,n)),this.syncLocalPosition(),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translate(this,na(t,e,n)),this.syncLocalPosition(),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translateLocal(this,na(t,e,n)),this.syncLocalPosition(),this},e.prototype.getPosition=function(){return this.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return this.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=na(t,e=e||t,n=n||t)),this.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=na(t,e=e||t,n=n||t)),this.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return this.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return this.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){var t=gt(ha(a.create(),this.sceneGraphService.getWorldTransform(this)),3);t[0],t[1];return ia(t[2])},e.prototype.getLocalEulerAngles=function(){var t=gt(ha(a.create(),this.sceneGraphService.getLocalRotation(this)),3);t[0],t[1];return ia(t[2])},e.prototype.setEulerAngles=function(t){return this.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return this.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return Xo(e)&&Xo(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return Xo(e)&&Xo(n)?this.sceneGraphService.rotate(this,0,0,t):this.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return this.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return this.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.getRotation=function(){return this.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return this.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalTransform=function(){return this.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return this.sceneGraphService.getWorldTransform(this)},e.prototype.resetLocalTransform=function(){this.sceneGraphService.resetLocalTransform(this)},e.prototype.syncLocalPosition=function(){var t=this.getLocalPosition();this.attributes.x=t[0],this.attributes.y=t[1],this.attributes.z=t[2],this.parsedStyle.x=new Oa(this.attributes.x,"px"),this.parsedStyle.y=new Oa(this.attributes.y,"px"),this.parsedStyle.z=new Oa(this.attributes.z,"px")},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r,i=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&(i=null===(r=this.attributes.clipPathTargets[0].ownerDocument)||void 0===r?void 0:r.timeline);return delete this.parsedStyle.transform,i?i.play(new dl(this,t,e)):null},e.prototype.show=function(){this.style.visibility="visible"},e.prototype.hide=function(){this.style.visibility="hidden"},e.prototype.isVisible=function(){var t,e;return"visible"===(null===(e=null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)||void 0===e?void 0:e.value)},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var t,e;return"none"!==(null===(e=null===(t=this.parsedStyle)||void 0===t?void 0:t.pointerEvents)||void 0===e?void 0:e.value)},e.prototype.isCulled=function(){return!(!this.cullable||!this.cullable.isCulled())},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,bt([],gt(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,bt([],gt(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))),!1))-1),this},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.getClip=function(){return this.style.clipPath||null},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=gt(e,2),i=r[0],o=r[1];return i?$o(i)?(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e.prototype.getMatrix=function(t){var e=t||this.getWorldTransform(),n=gt(o.getTranslation(a.create(),e),2),r=n[0],i=n[1],u=gt(o.getScaling(a.create(),e),2),c=u[0],l=u[1],h=o.getRotation(s.create(),e),f=gt(ha(a.create(),h),3),p=f[0],d=(f[1],f[2]);return fa(p||d,r,i,c,l)},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=gt(da(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setEulerAngles(a).setPosition(n,r).setLocalScale(i,o)},e.prototype.setLocalMatrix=function(t){var e=gt(da(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setLocalEulerAngles(a).setLocalPosition(n,r).setLocalScale(i,o)},e}(yc),ml=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.handleMounted=function(t){t.target===t.currentTarget&&n.connectedCallback&&n.connectedCallback()},n.handleUnmounted=function(t){t.target===t.currentTarget&&n.disconnectedCallback&&n.disconnectedCallback()},n.handleAttributeChanged=function(t){if(t.target===n){var e=t.attrName,r=t.prevValue,i=t.newValue;n.attributeChangedCallback&&n.attributeChangedCallback(e,r,i)}},n.attributeChangedCallback&&n.addEventListener(ko.ATTR_MODIFIED,n.handleAttributeChanged),n.connectedCallback&&n.addEventListener(ko.MOUNTED,n.handleMounted),n.disconnectedCallback&&n.addEventListener(ko.UNMOUNTED,n.handleUnmounted),n}return lt(e,t),e}(vl),gl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.CIRCLE,style:ht({r:"",anchor:[.5,.5],transformOrigin:"center",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(vl),bl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.ELLIPSE,style:ht({rx:"",ry:"",anchor:[.5,.5],transformOrigin:"center",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(vl),Tl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.GROUP,style:ht({width:"",height:""},n)},r))||this}return lt(e,t),e}(vl),El=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.IMAGE,style:ht({img:"",width:"",height:"",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(vl),wl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.LINE,style:ht({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,lineWidth:1,isBillboard:!1},n)},r))||this}return lt(e,t),e.prototype.getPoint=function(t){var e=this.parsedStyle,n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=ws.pointAt(n.value,r.value,i.value,o.value,t);return new Oo(a.x,a.y)},e.prototype.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,i=t.y2;return ws.length(e.value,n.value,r.value,i.value)},e}(vl),Ml=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.PATH,style:ht({path:"",lineWidth:1,miterLimit:4},n)},r))||this}return lt(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.path.totalLength},e.prototype.getPoint=function(t){var e=0,n=0,r=this.parsedStyle.path.curve;if(!this.parsedStyle.path.curveSegments.length)return r?new Oo(r[0][1],r[0][2]):null;this.parsedStyle.path.curveSegments.forEach((function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}));var i=r[n];if(Xo(i)||Xo(n))return null;var o=i.length,a=r[n+1],u=As.pointAt(i[o-2],i[o-1],a[1],a[2],a[3],a[4],a[5],a[6],e),s=u.x,c=u.y;return new Oo(s,c)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?(e.push([n[0]-i[0],n[1]-i[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?(n.push([i[0]-o[0],i[1]-o[1]]),n.push([i[0],i[1]])):(n.push([r[0],r[1]]),n.push([i[0],i[1]]))}return n},e}(vl),kl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.POLYGON,style:ht({points:[],miterLimit:4,lineWidth:1},n)},r))||this}return lt(e,t),e}(vl),Pl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.POLYLINE,style:ht({points:[],lineWidth:1,miterLimit:4},n)},r))||this}return lt(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPoint=function(t){var e=this.parsedStyle.points,n=e.points,r=e.segments,i=0,o=0;r.forEach((function(e,n){t>=e[0]&&t<=e[1]&&(i=(t-e[0])/(e[1]-e[0]),o=n)}));var a=ws.pointAt(n[o][0],n[o][1],n[o+1][0],n[o+1][1],i),u=a.x,s=a.y;return new Oo(u,s)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(vl),xl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Os.RECT,style:ht({width:"",height:"",radius:"",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(vl),Sl=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=ft(e,["style"]);return(n=t.call(this,ht({type:Os.TEXT,style:ht({text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",stroke:"black",letterSpacing:0,lineHeight:0,lineWidth:0,miterLimit:10,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0},r)},i))||this).LENGTHADJUST_SPACING=1,n.LENGTHADJUST_SPACINGANDGLYPHS=2,n.LENGTHADJUST_UNKNOWN=0,n}return lt(e,t),e.prototype.getCharNumAtPosition=function(t){throw new Error("Method not implemented.")},e.prototype.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},e.prototype.getEndPositionOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getExtentOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getNumberOfChars=function(){throw new Error("Method not implemented.")},e.prototype.getRotationOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getStartPositionOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getSubStringLength=function(t,e){throw new Error("Method not implemented.")},e.prototype.selectSubString=function(t,e){throw new Error("Method not implemented.")},e.prototype.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},e}(vl),Nl=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=ft(e,["style"]);return(n=t.call(this,ht({type:Os.HTML,style:ht({innerHTML:"",className:"",style:""},r)},i))||this).cullable.enable=!1,n}return lt(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(e=null===(t=this.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect();if(r){var i=n.left-r.left,o=n.top-r.top,u=new To;return u.setMinMax(a.fromValues(i,o,0),a.fromValues(i+n.width,o+n.height,0)),u}return null},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=o.invert(o.create(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!To.isEmpty(e)){var n=new To;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(vl),Al=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document",e.timeline=new Tc(e);var n={};return ch.forEach((function(t){var e=t.name,r=t.inherited,i=t.defaultValue;r&&i&&(n[e]=i)})),e.documentElement=new Tl({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return lt(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(t,e){var n=this.defaultView.customElements.get(t);return n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?Sl:Tl),new n(e)},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw new Error("Method not implemented.")},e.prototype.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},e.prototype.elementFromPoint=function(t,e){return yt(this,void 0,void 0,(function(){var n,r,i,o,a,u,s,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,u=o.height,r<0||i<0||r>a||i>u?[2,null]:(s=this.defaultView.viewport2Client({x:r,y:i}),c=s.x,l=s.y,[4,this.defaultView.getRenderingService().hooks.pick.callPromise({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:c,clientY:l},picked:[]})]);case 1:return[2,(h=f.sent().picked)&&h[0]||this.documentElement]}}))}))},e.prototype.elementsFromPoint=function(t,e){return yt(this,void 0,void 0,(function(){var n,r,i,o,a,u,s,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,u=o.height,r<0||i<0||r>a||i>u?[2,[]]:(s=this.defaultView.viewport2Client({x:r,y:i}),c=s.x,l=s.y,[4,this.defaultView.getRenderingService().hooks.pick.callPromise({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:c,clientY:l},picked:[]})]);case 1:return(h=f.sent().picked)[h.length-1]!==this.documentElement&&h.push(this.documentElement),[2,h]}}))}))},e.prototype.appendChild=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.insertBefore=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.removeChild=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.replaceChild=function(t,e,n){throw new Error("Use document.documentElement instead.")},e.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];throw new Error("Use document.documentElement instead.")},e.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];throw new Error("Use document.documentElement instead.")},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(sc),Cl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.client=new Oo,e.movement=new Oo,e.offset=new Oo,e.global=new Oo,e.screen=new Oo,e}return lt(e,t),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw new Error("Method not implemented.")},e}(zo),_l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return lt(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e}(Cl),Ol=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.DOM_DELTA_LINE=0,e.DOM_DELTA_PAGE=1,e.DOM_DELTA_PIXEL=2,e}return lt(e,t),e}(Cl),Il=function(){function t(t,e){this.type=t,this.target=e,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),Rl=0,Dl=new WeakMap,Ll=function(){function t(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return t.prototype.enqueue=function(t){var e,n=this.observer.records,r=n.length;if(n.length>0){var i=function(t,e){return t===e?t:pl&&function(t){return t===pl||t===fl}(t)?pl:null}(n[r-1],t);if(i)return void(n[r-1]=i)}else e=this.observer,Ul.push(e),Fl||(Fl=!0,"undefined"!=typeof globalThis?globalThis.setTimeout(Gl):Gl());n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(ko.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(ko.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(ko.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(ko.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(ko.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(ko.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=Dl.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}}),this)},t.prototype.handleEvent=function(t){var e,n;switch(t.stopImmediatePropagation(),t.type){case ko.ATTR_MODIFIED:var r=t.attrName,i=t.relatedNode.namespaceURI;n=t.target,(e=Bl("attributes",n)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===qo.ADDITION?null:t.prevValue;jl(n,(function(t){var n;if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(r)||-1!==t.attributeFilter.indexOf(i)))return t.attributeOldValue?(n=o,pl||((pl=Il.copy(fl)).oldValue=n,pl)):e}));break;case ko.REMOVED:case ko.INSERTED:n=t.relatedNode;var a=t.target,u=void 0,s=void 0;t.type===ko.INSERTED?(u=[a],s=[]):(u=[],s=[a]);var c=a.previousSibling,l=a.nextSibling;(e=Bl("childList",n)).addedNodes=u,e.removedNodes=s,e.previousSibling=c,e.nextSibling=l,jl(n,(function(t){if(t.childList)return e}))}fl=pl=void 0},t}(),Vl=function(){function t(t){this.callback=t,this.nodes=[],this.records=[],this.uid=Rl++}return t.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n,r=Dl.get(t);r||Dl.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new Ll(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},t.prototype.disconnect=function(){var t=this;this.nodes.forEach((function(e){for(var n=Dl.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}}),this),this.records=[]},t.prototype.takeRecords=function(){var t=this.records;return this.records=[],t},t}();function Bl(t,e){return fl=new Il(t,e)}function jl(t,e){for(var n=t;n;n=n.parentNode){var r=Dl.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var u=e(a);u&&o.enqueue(u)}}}}var Fl=!1,Ul=[];function Gl(){Fl=!1;var t=Ul;Ul=[],t.sort((function(t,e){return t.uid-e.uid}));var e=!1;t.forEach((function(t){var n=t.takeRecords();!function(t){t.nodes.forEach((function(e){var n=Dl.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&Gl()}var zl=function(){function t(){this.registry={},this.define(Os.CIRCLE,gl),this.define(Os.ELLIPSE,bl),this.define(Os.RECT,xl),this.define(Os.IMAGE,El),this.define(Os.LINE,wl),this.define(Os.GROUP,Tl),this.define(Os.PATH,Ml),this.define(Os.POLYGON,kl),this.define(Os.POLYLINE,Pl),this.define(Os.TEXT,Sl),this.define(Os.HTML,Nl)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),ql=function(){function t(){this.parser=Iu,this.mixer=Du}return t.prototype.calculator=function(t,e,n,r,i){return Oa.isRelativeUnit(n.unit)?n.unit===Bo.kPercentage||n.unit===Bo.kEms?new Oa(0,"px"):void 0:n.clone()},t.prototype.nameToBoundsIndex=function(t){return"x"===t||"cx"===t||"width"===t?0:"y"===t||"cy"===t||"height"===t?1:2},t.prototype.calculateUsedValueWithParentBounds=function(t,e){var n=t.parentElement.getGeometryBounds(),r=t.computedStyle[e].value;return new Oa(2*n.halfExtents[this.nameToBoundsIndex(e)]*r/100,"px")},t=pt([A()],t)}(),Wl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.parser=Iu,e.mixer=Du,e}return lt(e,t),e.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.x,r=e.y,i=e.z;t.setLocalPosition(n&&n.value||0,r&&r.value||0,i&&i.value||0)},e=pt([A()],e)}(ql),Hl=function(){function t(){this.parser=Uu,this.mixer=qu(0,1)}return t=pt([A()],t)}(),Yl=function(){function t(){this.parser=Nu,this.mixer=Au}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof Ea?new Wa(0,0,0,0,"none"===n.value):n},t=pt([A()],t)}(),Kl=function(){function t(){this.parser=ec}return t=pt([A()],t)}(),Xl=function(){function t(){this.parser=Vu,this.mixer=Bu}return t.prototype.calculator=function(t,e,n,r){return n&&1===n.length?[n[0],n[0]]:[n[0],n[1]]},t=pt([A()],t)}(),Zl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mixer=qu(0,1/0),e}return lt(e,t),e=pt([A()],e)}(ql),Jl=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(e&&e!==n&&e.style.offsetPathTargets){var i=e.style.offsetPathTargets.indexOf(r);e.style.offsetPathTargets.splice(i,1)}return n&&(n.style.offsetPathTargets||(n.style.offsetPathTargets=[]),n.style.offsetPathTargets.push(r)),n},t=pt([A()],t)}(),Ql=function(){function t(){this.parser=Uu,this.mixer=qu(0,1)}return t.prototype.postProcessor=function(t){if(t.attributes.offsetPath){var e=t.attributes.offsetPath.nodeName;if(e===Os.LINE||e===Os.PATH||e===Os.POLYLINE){var n=t.attributes.offsetPath.getPoint(t.parsedStyle.offsetDistance.value);n&&t.setLocalPosition(n.x,n.y)}}},t=pt([A()],t)}(),$l=function(){function t(){this.parser=Gu}return t.prototype.calculator=function(t,e,n,r){return 2===n.length?[n[0],n[1],new Oa(0)]:n},t=pt([A()],t)}(),th=function(){function t(){this.parser=Uu}return t.prototype.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0)}},t=pt([A()],t)}(),eh=function(){function t(){this.parser=vh,this.mixer=bh}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ea&&(n=[]),n.forEach((function(t){var i=t.t,o=(n||[]).find((function(t){return t.t===i})),a=(e||[]).find((function(t){return t.t===i}));if("scale"===i){var u=o&&o.d&&o.d.map((function(t){return t.value}))||[1,1],s=a&&a.d&&a.d.map((function(t){return t.value}))||[1,1];r.scaleLocal(u[0]/s[0],u[1]/s[1],1)}else if("scalex"===i){u=o&&o.d&&o.d.map((function(t){return t.value}))||[1],s=a&&a.d&&a.d.map((function(t){return t.value}))||[1];r.scaleLocal(u[0]/s[0],1,1)}else if("scaley"===i){u=o&&o.d&&o.d.map((function(t){return t.value}))||[1],s=a&&a.d&&a.d.map((function(t){return t.value}))||[1];r.scaleLocal(1,u[0]/s[0],1)}else if("scalez"===i){u=o&&o.d&&o.d.map((function(t){return t.value}))||[1],s=a&&a.d&&a.d.map((function(t){return t.value}))||[1];r.scaleLocal(1,1,u[0]/s[0])}else if("scale3d"===i){u=o&&o.d&&o.d.map((function(t){return t.value}))||[1,1,1],s=a&&a.d&&a.d.map((function(t){return t.value}))||[1,1,1];r.scaleLocal(u[0]/s[0],u[1]/s[1],u[2]/s[2])}else if("translate"===i){var c=o&&o.d||[za,za],l=a&&a.d||[za,za];r.translateLocal(c[0].value-l[0].value,c[1].value-l[1].value,0)}else if("translatex"===i){c=o&&o.d||[za],l=a&&a.d||[za];r.translateLocal(c[0].value-l[0].value,0,0)}else if("translatey"===i){c=o&&o.d||[za],l=a&&a.d||[za];r.translateLocal(0,c[0].value-l[0].value,0)}else if("translatez"===i){c=o&&o.d||[za],l=a&&a.d||[za];r.translateLocal(0,0,c[0].value-l[0].value)}else if("translate3d"===i){c=o&&o.d||[za,za,za],l=a&&a.d||[za,za,za];r.translateLocal(c[0].value-l[0].value,c[1].value-l[1].value,c[2].value-l[2].value)}else if("rotate"===i){var h=o&&o.d||[qa],f=a&&a.d||[qa];r.rotateLocal(0,0,h[0].value-f[0].value)}else if("rotatex"===i){h=o&&o.d||[qa],f=a&&a.d||[qa];r.rotateLocal(h[0].value-f[0].value,0,0)}else if("rotatey"===i){h=o&&o.d||[qa],f=a&&a.d||[qa];r.rotateLocal(0,h[0].value-f[0].value,0)}else if("rotatez"===i){h=o&&o.d||[qa],f=a&&a.d||[qa];r.rotateLocal(0,0,h[0].value-f[0].value)}})),n},t=pt([A()],t)}(),nh=function(){function t(){this.parser=Th}return t=pt([A()],t)}(),rh=function(){function t(){this.parser=Xs,this.mixer=Js}return t.prototype.calculator=function(t,e,n){return n instanceof Ea?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,curveSegments:[],zCommandIndexes:[],rect:new Io(0,0,0,0)}:n},t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.x,r=e.y,i=e.z;t.setLocalPosition(n&&n.value||0,r&&r.value||0,i&&i.value||0)},t=pt([A()],t)}(),ih=function(){function t(){this.parser=Qs}return t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.x,r=e.y,i=e.z;t.setLocalPosition(n&&n.value||0,r&&r.value||0,i&&i.value||0)},t=pt([A()],t)}(),oh=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(e&&e!==n&&e.style.clipPathTargets){var i=e.style.clipPathTargets.indexOf(r);e.style.clipPathTargets.splice(i,1)}return n&&(n.style.clipPathTargets||(n.style.clipPathTargets=[]),n.style.clipPathTargets.push(r)),Kh(r),n},t=pt([A()],t)}(),ah=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ea?"unset"===n.value?"":n.value:n},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t=pt([A()],t)}(),uh=function(){function t(){}return t.prototype.postProcessor=function(t){if(t.nodeName===Os.TEXT){var e=t,n=e.parsedStyle.textTransform.value;n===Ds.CAPITALIZE?e.style.text=e.style.text.charAt(0).toUpperCase()+e.style.text.slice(1):n===Ds.LOWERCASE?e.style.text=e.style.text.toLowerCase():n===Ds.UPPERCASE&&(e.style.text=e.style.text.toUpperCase())}},t=pt([A()],t)}(),sh={COLOR:"<color>",PAINT:"<paint>",NUMBER:"<number>",LENGTH:"<length>",PERCENTAGE:"<percentage>",LENGTH_PERCENTAGE:"<length> | <percentage>"},ch=[{name:"display",keywords:["none"]},{name:"x",interpolable:!0,alias:["cx"],defaultValue:"0",syntax:sh.LENGTH_PERCENTAGE,handler:Wl},{name:"y",interpolable:!0,alias:["cy"],defaultValue:"0",syntax:sh.LENGTH_PERCENTAGE,handler:Wl},{name:"z",interpolable:!0,defaultValue:"0",syntax:sh.LENGTH_PERCENTAGE,handler:Wl},{name:"opacity",interpolable:!0,defaultValue:"1",syntax:sh.NUMBER,handler:Hl},{name:"fillOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:sh.NUMBER,handler:Hl},{name:"strokeOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:sh.NUMBER,handler:Hl},{name:"fill",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:sh.PAINT,handler:Yl},{name:"stroke",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:sh.PAINT,handler:Yl},{name:"shadowColor",interpolable:!0,syntax:sh.COLOR,handler:Yl},{name:"shadowOffsetX",interpolable:!0,layoutDependent:!0,syntax:sh.LENGTH_PERCENTAGE,handler:ql},{name:"shadowOffsetY",interpolable:!0,layoutDependent:!0,syntax:sh.LENGTH_PERCENTAGE,handler:ql},{name:"shadowBlur",interpolable:!0,layoutDependent:!0,handler:Zl},{name:"lineWidth",interpolable:!0,inherited:!0,defaultValue:"1",layoutDependent:!0,alias:["strokeWidth"],syntax:sh.LENGTH_PERCENTAGE,handler:ql},{name:"lineJoin",inherited:!0,layoutDependent:!0,alias:["strokeLinejoin"],keywords:["miter","bevel","round"],defaultValue:"miter"},{name:"lineCap",inherited:!0,layoutDependent:!0,alias:["strokeLinecap"],keywords:["butt","round","square"],defaultValue:"butt"},{name:"lineDash",interpolable:!0,inherited:!0,keywords:["none"],alias:["strokeDasharray"],handler:Xl},{name:"lineDashOffset",interpolable:!0,inherited:!0,defaultValue:"0",alias:["strokeDashoffset"],handler:ql},{name:"offsetPath",handler:Jl},{name:"offsetDistance",interpolable:!0,handler:Ql},{name:"dx",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:ql},{name:"dy",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:ql},{name:"zIndex",independent:!0,interpolable:!0,defaultValue:"0",keywords:["auto"],handler:th},{name:"visibility",keywords:["visible","hidden"],independent:!0,inherited:!0,defaultValue:"visible"},{name:"pointerEvents",inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"],defaultValue:"auto"},{name:"filter",independent:!0,layoutDependent:!0,handler:Kl},{name:"clipPath",handler:oh},{name:"transform",interpolable:!0,keywords:["none"],defaultValue:"none",handler:eh},{name:"transformOrigin",parsePriority:100,defaultValue:"left top",layoutDependent:!0,handler:nh},{name:"anchor",parsePriority:99,layoutDependent:!0,handler:$l},{name:"r",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:ql},{name:"rx",interpolable:!0,layoutDependent:!0,defaultValue:"auto",handler:ql},{name:"ry",interpolable:!0,layoutDependent:!0,defaultValue:"auto",handler:ql},{name:"width",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",handler:ql},{name:"height",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",handler:ql},{name:"radius",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:ql},{name:"x1",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"y1",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"z1",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"x2",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"y2",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"z2",interpolable:!0,layoutDependent:!0,handler:Wl},{name:"path",interpolable:!0,layoutDependent:!0,defaultValue:"",handler:rh},{name:"points",layoutDependent:!0,handler:ih},{name:"text",layoutDependent:!0,handler:ah,defaultValue:""},{name:"textTransform",layoutDependent:!0,inherited:!0,keywords:["capitalize","uppercase","lowercase","none"],defaultValue:"none",handler:uh},{name:"font",layoutDependent:!0},{name:"fontSize",interpolable:!0,inherited:!0,defaultValue:"16px",layoutDependent:!0,handler:ql},{name:"fontFamily",layoutDependent:!0,inherited:!0,defaultValue:"sans-serif"},{name:"fontStyle",layoutDependent:!0,inherited:!0,keywords:["normal","italic","oblique"],defaultValue:"normal"},{name:"fontWeight",layoutDependent:!0,inherited:!0,keywords:["normal","bold","bolder","lighter"],defaultValue:"normal"},{name:"fontVariant",layoutDependent:!0,inherited:!0,keywords:["normal","small-caps"],defaultValue:"normal"},{name:"lineHeight",layoutDependent:!0},{name:"letterSpacing",layoutDependent:!0},{name:"wordWrap",layoutDependent:!0},{name:"wordWrapWidth",layoutDependent:!0},{name:"leading",layoutDependent:!0},{name:"textBaseline",layoutDependent:!0,inherited:!0,keywords:["top","hanging","middle","alphabetic","ideographic","bottom"],defaultValue:"alphabetic"},{name:"textAlign",layoutDependent:!0,inherited:!0,keywords:["start","center","end","left","right"],defaultValue:"start"},{name:"whiteSpace",layoutDependent:!0}],lh=function(){function t(){this.dirty=!1,this.cache={},this.unresolvedProperties={},this.cascadeProperties={}}return t.prototype.init=function(){var t=this;ch.forEach((function(e){t.registerMetadata(e)}))},t.prototype.registerMetadata=function(t){var e=this;bt([t.name],gt(t.alias||[]),!1).forEach((function(n){e.cache[n]=t}))},t.prototype.getMetadata=function(t){return this.cache[t]},t.prototype.processProperties=function(t,e,n){var r=this;void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1});var i=n.skipUpdateAttribute,o=n.skipParse,a=!1;Object.keys(e).forEach((function(n){var o,u=gt(Ch(n,e[n]),2),s=u[0],c=u[1];i||(t.attributes[s]=c),!a&&(null===(o=r.getMetadata(s))||void 0===o?void 0:o.layoutDependent)&&(a=!0)}));var u=Object.keys(e).sort((function(t,e){var n,i;return((null===(n=r.getMetadata(t))||void 0===n?void 0:n.parsePriority)||0)-((null===(i=r.getMetadata(e))||void 0===i?void 0:i.parsePriority)||0)}));o||u.forEach((function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e])}));var s=!1;u.forEach((function(e){e in t.computedStyle&&(s=r.computeProperty(e,t.computedStyle[e],t))})),s?this.dirty=!0:(a&&this.updateGeometry(t),u.forEach((function(e){e in t.parsedStyle&&r.postProcessProperty(e,t)})),u.forEach((function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach((function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})}))})))},t.prototype.parseProperty=function(t,e){var n=this.getMetadata(t),r=e;if(""===e&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)r=new Ea(e);else if(n){var i=n.keywords,o=n.handler;if(i&&i.indexOf(e)>-1)r=new Ea(e);else if(o){var a=ot.get(o);a&&a.parser&&(r=a.parser(e))}}return r},t.prototype.computeProperty=function(t,e,n){var r=this.getMetadata(t),i="g-root"===n.id,o=e instanceof ba?e.clone():e;if(r){var a=r.handler,u=r.inherited,s=r.defaultValue;if(e instanceof Ea){var c=e.value;if("unset"===c&&(c=u&&!i?"inherit":"initial"),"initial"===c)s&&(e=this.parseProperty(t,s));else if("inherit"===c){var l=this.tryToResolveProperty(n,t,{inherited:!0});return l?(n.parsedStyle[t]=l,!1):(this.addUnresolveProperty(n,t),!0)}}if(a){var h=ot.get(a);if(h&&h.calculator){var f=n.parsedStyle[t];o=h.calculator(t,f,e,n,this)}else o=e}else o=e}return n.parsedStyle[t]=o,!1},t.prototype.postProcessProperty=function(t,e){var n=this.getMetadata(t);if(n&&n.handler){var r=ot.get(n.handler);r&&r.postProcessor&&r.postProcessor(e)}},t.prototype.isPropertyResolved=function(t,e){return!this.unresolvedProperties[t.entity]||0===this.unresolvedProperties[t.entity].length||this.unresolvedProperties[t.entity].includes(e)},t.prototype.addUnresolveProperty=function(t,e){this.unresolvedProperties[t.entity]||(this.unresolvedProperties[t.entity]=[]),-1===this.unresolvedProperties[t.entity].indexOf(e)&&this.unresolvedProperties[t.entity].push(e)},t.prototype.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&this.isPropertyResolved(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];return(!(r instanceof Ea)||"unset"!==r.value&&"initial"!==r.value&&"inherit"!==r.value)&&(!(r instanceof Oa&&Oa.isRelativeUnit(r.unit))&&r)}return!1},t.prototype.recalc=function(t){var e=this.unresolvedProperties[t.entity];if(e&&e.length){var n={};e.forEach((function(e){n[e]=t.attributes[e]})),this.processProperties(t,n),delete this.unresolvedProperties[t.entity]}},t.prototype.updateGeometry=function(t){var e,n=ot.get(rc)(t.nodeName);if(n){var r=t.geometry;r.contentBounds||(r.contentBounds=new To),r.renderBounds||(r.renderBounds=new To);var i=t.parsedStyle,o=n.update(i,t),u=o.width,s=o.height,c=o.depth,l=void 0===c?0:c,h=o.x,f=void 0===h?0:h,p=o.y,d=void 0===p?0:p,y=o.offsetX,v=void 0===y?0:y,m=o.offsetY,g=void 0===m?0:m,b=o.offsetZ,T=void 0===b?0:b;t.nodeName!==Os.LINE&&t.nodeName!==Os.POLYLINE&&t.nodeName!==Os.POLYGON&&t.nodeName!==Os.PATH||(i.offsetX=f-(i.defX||0),i.offsetY=d-(i.defY||0),i.defX=f,i.defY=d,t.attributes.x+=i.offsetX,t.attributes.y+=i.offsetY,i.x=i.x.add(new Oa(i.offsetX,"px")),i.y=i.y.add(new Oa(i.offsetY,"px")));var E=a.fromValues(u/2,s/2,l/2),w=i,M=w.lineWidth,k=w.shadowColor,P=w.filter,x=void 0===P?[]:P,S=w.transformOrigin,N=i.anchor;t.nodeName===Os.TEXT&&delete i.anchor;var A=a.fromValues((1-2*(N&&N[0].value||0))*E[0]+v,(1-2*(N&&N[1].value||0))*E[1]+g,(1-2*(N&&(null===(e=N[2])||void 0===e?void 0:e.value)||0))*E[2]+T);if(r.contentBounds.update(A,E),M&&a.add(E,E,a.fromValues(M.value/2,M.value/2,0)),r.renderBounds.update(A,E),k){var C=r.renderBounds,_=C.min,O=C.max,I=i,R=I.shadowBlur,D=I.shadowOffsetX,L=I.shadowOffsetY,V=R&&R.value||0,B=D&&D.value||0,j=L&&L.value||0,F=_[0]-V+B,U=O[0]+V+B,G=_[1]-V+j,z=O[1]+V+j;_[0]=Math.min(_[0],F),O[0]=Math.max(O[0],U),_[1]=Math.min(_[1],G),O[1]=Math.max(O[1],z),r.renderBounds.setMinMax(_,O)}x.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,a.add(r.renderBounds.halfExtents,r.renderBounds.halfExtents,a.fromValues(i,i,0)))}else if("drop-shadow"===e){var o=n[0].value,u=n[1].value,s=n[2].value,c=r.renderBounds,l=c.min,h=c.max,f=l[0]-s+o,p=h[0]+s+o,d=l[1]-s+u,y=h[1]+s+u;l[0]=Math.min(l[0],f),h[0]=Math.max(h[0],p),l[1]=Math.min(l[1],d),h[1]=Math.max(h[1],y),r.renderBounds.setMinMax(l,h)}})),N=i.anchor;var q=ju(S[0],0,t),W=ju(S[1],1,t);q-=(N&&N[0].value||0)*r.contentBounds.halfExtents[0]*2,W-=(N&&N[1].value||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(q,W),t.emit(ko.GEOMETRY_BOUNDS_CHANGED,{}),Kh(t)}},t.prototype.isPropertyInheritable=function(t){var e=this.getMetadata(t);return!!e&&e.inherited},pt([Object(f.postConstruct)(),dt("design:type",Function),dt("design:paramtypes",[]),dt("design:returntype",void 0)],t.prototype,"init",null),t=pt([A()],t)}(),hh={number:function(t){return new Oa(t)},percent:function(t){return new Oa(t,"%")},px:function(t){return new Oa(t,"px")},em:function(t){return new Oa(t,"em")},deg:function(t){return new Oa(t,"deg")},grad:function(t){return new Oa(t,"grad")},rad:function(t){return new Oa(t,"rad")},turn:function(t){return new Oa(t,"turn")},s:function(t){return new Oa(t,"s")},ms:function(t){return new Oa(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.initialValue;ot.get(lh).registerMetadata({name:e,inherited:n,defaultValue:r})},registerLayout:function(t){}},fh=null;function ph(t){return function(e){var n=0;return t.map((function(t){return t===fh?e[n++]:t}))}}function dh(t){return t}var yh={rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],scale:["Nn",ph([fh,fh,hh.number(1)]),dh],scalex:["N",ph([fh,hh.number(1),hh.number(1)]),ph([fh,hh.number(1)])],scaley:["N",ph([hh.number(1),fh,hh.number(1)]),ph([hh.number(1),fh])],scalez:["N",ph([hh.number(1),hh.number(1),fh])],scale3d:["NNN",dh],translate:["Tt",ph([fh,fh,za]),dh],translatex:["T",ph([fh,za,za]),ph([fh,za])],translatey:["T",ph([za,fh,za]),ph([za,fh])],translatez:["L",ph([za,za,fh])],translate3d:["TTL",dh]};function vh(t){if("none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];i=e.index+e[0].length;var o=e[1],a=yh[o];if(!a)return[];var u=e[2].split(","),s=a[0];if(s.length<u.length)return[];for(var c=[],l=0;l<s.length;l++){var h=u[l],f=s[l],p=void 0;if(void 0===(p=h?{A:function(t){return"0"===t.trim()?qa:Ru(t)},N:Uu,T:Iu,L:_u}[f.toUpperCase()](h):{a:qa,n:c[0],t:za}[f]))return[];c.push(p)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function mh(t){return t.replace(/[xy]/,"")}function gh(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function bh(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substr(0,5)?1:0;e.push({t:i,d:o.map((function(t){return"number"==typeof t?new Oa(a):new Oa(a,t.unit)}))})},o=0;o<t.length;o++)i(o)}var a,u,s=[],c=[],l=[];if(t.length!==e.length);else for(o=0;o<t.length;o++){var h=t[o].t,f=e[o].t,p=t[o].d,d=e[o].d,y=yh[h],v=yh[f],m=void 0;if(u=f,("perspective"!==(a=h)||"perspective"!==u)&&("matrix"!==a&&"matrix3d"!==a||"matrix"!==u&&"matrix3d"!==u)){if(h===f)m=h;else if(y[2]&&v[2]&&mh(h)===mh(f))m=mh(h),p=y[2](p),d=v[2](d);else{if(!y[1]||!v[1]||gh(h)!==gh(f))break;m=gh(h),p=y[1](p),d=v[1](d)}for(var g=[],b=[],T=[],E=0;E<p.length;E++){var w=(p[E].unit===Bo.kNumber?zu:Du)(p[E],d[E],n,!1,E);g[E]=w[0],b[E]=w[1],T.push(w[2])}s.push(g),c.push(b),l.push([m,T])}}if(r){var M=s;s=c,c=M}return[s,c,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return l[e][1][n](t)})).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),l[e][0]+"("+n+")"})).join(" ")}]}function Th(t){if(kh(t)){var e=t.split(" ");return 1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Iu(Eh(e[0])),Iu(Eh(e[1]))]}return[new Oa(t[0]||0,"px"),new Oa(t[1]||0,"px")]}function Eh(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var wh=function(){function t(){}return t=pt([A()],t)}();function Mh(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}function kh(t){return!Xo(t)&&"string"==typeof t}function Ph(t,e,n){var r=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(xh(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:el(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(t,e),i=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;o<i.length-1;o++){var a=o,u=o+1,s=i[a].computedOffset,c=i[u].computedOffset,l=s,h=c;0===o&&(l=-1/0,0===c&&(u=a)),o===i.length-2&&(h=1/0,1===s&&(a=u)),n.push({applyFrom:l,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[u].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:Nh(r,i[a].value,i[u].value,e)})}return n.sort((function(t,e){return t.startOffset-e.startOffset})),n}(r,n);return function(t,e){if(null!==e)i.filter((function(t){return e>=t.applyFrom&&e<t.applyTo})).forEach((function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.style[n.property]=n.interpolation(o)}));else for(var n in r)xh(n)&&(t.style[n]=null)}}function xh(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var Sh=function(t,e,n){return function(r){return n(function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var i=[],o=0;o<e.length;o++)i.push(t(e[o],n[o],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r))}};function Nh(t,e,n,r){var i=e,o=n,a=ot.get(lh).getMetadata(t);if(a&&a.handler&&a.interpolable){var u=ot.get(a.handler);if(u){u.parser&&(i=u.parser(e),o=u.parser(n));var s=u.mixer(i,o,r);if(s){var c=Sh.apply(void 0,bt([],gt(s),!1));return function(t){return 0===t?e:1===t?n:c(t)}}}}return Sh(!1,!0,(function(t){return t?n:e}))}var Ah={d:{alias:"path"},cx:{alias:"x"},cy:{alias:"y"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}};function Ch(t,e){var n,r=Mh(t),i=Ah[r];return[r=(null==i?void 0:i.alias)||r,(null===(n=null==i?void 0:i.values)||void 0===n?void 0:n[e])||e]}var _h=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function Oh(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=Zo(e)?"".concat(e,"px"):e.toString(),u=kh(n)?n.split(","):[n.value],s=u.length-1;s>=0;s--){var c=u[s].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&_h.indexOf(c)<0&&(c='"'.concat(c,'"')),u[s]=c}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(u.join(","))}var Ih=1,Rh={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Dh={},Lh=0;function Vh(t,e){if(t){var n="string"==typeof t?t:t.id||Lh++;Dh[n]&&Dh[n].destroy(),Dh[n]=e}}var Bh="undefined"!=typeof window&&void 0!==window.document;function jh(t){var e=!1;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];e||(e=!0,t.apply(void 0,bt([],gt(n),!1)))}}var Fh=function(){function t(t){this.tapIdSeed=0,this.presetTapBucket=new Set,this.tapBuckets=new Map,this.tapOptionsCache=new Map,this.bucketHashcode=t}return t.prototype.exhaust=function(){this.presetTapBucket.clear(),this.tapBuckets.clear(),this.tapOptionsCache.clear()},t.prototype.destroy=function(){this.exhaust()},t.prototype.insertSyncTap=function(t,e){return this.tapping(t,e)},t.prototype.insertAsyncTap=function(t,e){return this.tapping((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e[e.length-1];try{t.apply(void 0,bt([],gt(e),!1))}catch(t){r(t)}}),e)},t.prototype.insertPromiseTap=function(t,e){return this.tapping((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.pop(),i=e;try{Promise.resolve(t.apply(void 0,bt([],gt(i),!1))).then((function(t){r(null,t)}),(function(t){r(t)}))}catch(t){r(t)}}),e)},t.prototype.invokeSeries=function(t,e){e||(e={}),"function"==typeof e.onComplete&&(e.onComplete=jh(e.onComplete)),function t(e,n,r){var i;if(i="function"==typeof e.onComplete?e.onComplete:function(t,e){},r.length){var o=r.shift(),a=r,u=Array.from(n),s=bt(bt([],gt(n),!1),[function(n,r){null==n?void 0===r||!0!==e.shouldBail?(void 0!==r&&!0===e.shouldWaterfall&&(u[0]=r),t(e,u,a)):i(null,r):i(n)}],!1);o.fn.apply(o,bt([],gt(s),!1))}else e.shouldWaterfall?i(null,n[0]):i(null,void 0)}(e,t,Array.from(this.getBucketTaps(t)))},t.prototype.invokeParallel=function(t,e){e||(e={}),"function"==typeof e.onComplete&&(e.onComplete=jh(e.onComplete)),function(t,e,n){var r,i,o;if(o="function"==typeof t.onComplete?t.onComplete:function(t,e){},n.length){var a=n.length,u=bt(bt([],gt(e),!1),[function(n,r){null==n?void 0===r||!0!==t.shouldBail?--a<=0&&o(null,e[0]):o(null,r):o(n)}],!1);try{for(var s=mt(n),c=s.next();!c.done;c=s.next()){var l=c.value;l.fn.apply(l,bt([],gt(u),!1))}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}else o(null,void 0)}(e,t,Array.from(this.getBucketTaps(t)))},t.prototype.invokeSynchronously=function(t,e){return e||(e={}),function(t,e,n){var r,i;if(!n.length)return t.shouldWaterfall?e[0]:void 0;var o=Array.from(e);try{for(var a=mt(n),u=a.next();!u.done;u=a.next()){var s=u.value.fn.apply(void 0,bt([],gt(o),!1));if(void 0!==s&&!0===t.shouldBail)return s;void 0!==s&&!0===t.shouldWaterfall&&(o[0]=s)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return t.shouldWaterfall?o[0]:void 0}(e,t,Array.from(this.getBucketTaps(t)))},t.prototype.getBucketTaps=function(t){var e,n,r=Array.from(this.presetTapBucket),i=[];if("function"==typeof this.bucketHashcode){var o=this.bucketHashcode.apply(this,bt([],gt(t),!1));this.tapBuckets.has(o)&&(i=Array.from(this.tapBuckets.get(o)))}var a=new Set(bt(bt([],gt(r),!1),gt(i),!1)),u=new Set;try{for(var s=mt(a),c=s.next();!c.done;c=s.next()){var l=c.value;u.add(this.tapOptionsCache.get(l))}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return u},t.prototype.tapping=function(t,e){var n=this,r=this.presetTapBucket;e&&(this.tapBuckets.has(e)||this.tapBuckets.set(e,new Set),r=this.tapBuckets.get(e));var i=this.generateTapId(),o={fn:t,bucket:e};return this.tapOptionsCache.set(i,o),r.add(i),function(){n.popoutTap(i)}},t.prototype.popoutTap=function(t){var e=this.tapOptionsCache.get(t);if(e){var n=e.bucket;n?this.tapBuckets.has(n)&&this.tapBuckets.get(n).delete(t):this.presetTapBucket.delete(t),this.tapOptionsCache.delete(t)}},t.prototype.generateTapId=function(){return"tap:".concat(++this.tapIdSeed,"?").concat(Date.now())},t}(),Uh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.tap=function(t,e){return this.insertSyncTap(t,e)},e}(Fh),Gh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.tapAsync=function(t,e){return this.insertAsyncTap(t,e)},e.prototype.tapPromise=function(t,e){return this.insertPromiseTap(t,e)},e}(Fh),zh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.call=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.invokeSynchronously(t)},e}(Uh),qh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.call=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.invokeSynchronously(t,{shouldWaterfall:!0})},e}(Uh),Wh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.callAsync=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.pop();this.invokeParallel(t,{onComplete:function(t){null!=t?n(t):n()}})},e.prototype.callPromise=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new Promise((function(n,r){t.invokeParallel(e,{onComplete:function(t,e){null!=t?r(t):n(e)}})}))},e}(Gh),Hh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.callAsync=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.pop();this.invokeSeries(t,{shouldWaterfall:!0,onComplete:n})},e.prototype.callPromise=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new Promise((function(n,r){t.invokeSeries(e,{shouldWaterfall:!0,onComplete:function(t,e){null!=t?r(t):n(e)}})}))},e}(Gh);function Yh(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function Kh(t,e){void 0===e&&(e=!1);for(var n=t;n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),n=n.parentNode}t.emit(ko.BOUNDS_CHANGED,{affectChildren:e})}var Xh,Zh=l.defineToken("SceneGraphService"),Jh=function(){function t(){var t,e,n,r,i,u=this;this.rotate=(t=s.create(),function(e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=a.fromValues(n,r,i));var o=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){var c=s.create();s.fromEuler(c,n[0],n[1],n[2]);var l=u.getRotation(e),h=u.getRotation(e.parentNode);s.copy(t,h),s.invert(t,t),s.multiply(c,t,c),s.multiply(o.localRotation,c,l),s.normalize(o.localRotation,o.localRotation),u.dirtifyLocal(e,o)}else u.rotateLocal(e,n)}),this.rotateLocal=(e=s.create(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=a.fromValues(n,r,i));var o=t.transformable;s.fromEuler(e,n[0],n[1],n[2]),s.mul(o.localRotation,o.localRotation,e),u.dirtifyLocal(t,o)}),this.setEulerAngles=(n=s.create(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=a.fromValues(e,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){s.fromEuler(o.localRotation,e[0],e[1],e[2]);var c=u.getRotation(t.parentNode);s.copy(n,s.invert(s.create(),c)),s.mul(o.localRotation,o.localRotation,n),u.dirtifyLocal(t,o)}else u.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;a.equals(e,a.create())||(a.transformQuat(e,e,i.localRotation),a.add(i.localPosition,i.localPosition,e),u.dirtifyLocal(t,i))},this.setPosition=(r=o.create(),function(t,e){var n=t.transformable;if(e=a.fromValues(e[0],e[1],e[2]||0),!a.equals(u.getPosition(t),e)){if(n.position=e,null!==t.parentNode&&t.parentNode.transformable){var i=t.parentNode.transformable;o.copy(r,i.worldTransform),o.invert(r,r),a.transformMat4(n.localPosition,e,r)}else a.copy(n.localPosition,e);u.dirtifyLocal(t,n)}}),this.translate=(i=a.create(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r)),a.equals(e,a.create())||(a.add(i,u.getPosition(t),e),u.setPosition(t,i))}),this.setRotation=function(){var t=s.create();return function(e,n,r,i,o){var a=e.transformable;if("number"==typeof n&&(n=s.fromValues(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable){var c=u.getRotation(e.parentNode);s.copy(t,c),s.invert(t,t),s.multiply(a.localRotation,t,n),s.normalize(a.localRotation,a.localRotation),u.dirtifyLocal(e,a)}else u.setLocalRotation(e,n)}}}return t.prototype.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},t.prototype.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},t.prototype.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,Xo(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var r=e.sortable;r&&(r.dirty=!0);var i=t.transformable;i&&this.dirtifyWorld(t,i),i.frozen&&this.unfreezeParentToRoot(t)},t.prototype.detach=function(t){if(t.parentNode){var e=t.transformable,n=t.parentNode.sortable;n&&(n.dirty=!0);var r=t.parentNode.childNodes.indexOf(t);r>-1&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;if(!a.equals(e,i.origin)){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;s.fromEuler(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.setLocalPosition=function(t,e){var n=t.transformable;e=a.fromValues(e[0],e[1],e[2]||0),a.equals(n.localPosition,e)||(a.copy(n.localPosition,e),this.dirtifyLocal(t,n))},t.prototype.scaleLocal=function(t,e){var n=t.transformable;a.multiply(n.localScale,n.localScale,a.fromValues(e[0],e[1],e[2]||1)),this.dirtifyLocal(t,n)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=a.fromValues(e[0],e[1],e[2]||n.localScale[2]);a.equals(r,n.localScale)||(a.copy(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=s.fromValues(e,n,r,i));var o=t.transformable;s.copy(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),Kh(t,!0)},t.prototype.getPosition=function(t){var e=t.transformable;return o.getTranslation(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return o.getRotation(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return o.getScaling(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(o.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.localTransform},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0])},t.prototype.getTransformedGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=this.getGeometryBounds(t,e);if(To.isEmpty(n))return null;var r=new To;return r.setFromTransformedAABB(n,this.getWorldTransform(t)),r},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry,r=e?n.renderBounds:n.contentBounds||null;return r&&new To(r.center,r.halfExtents)||new To},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=this.getTransformedGeometryBounds(t,e);t.childNodes.forEach((function(t){var r=n.getBounds(t,e);r&&(i?i.add(r):(i=new To).update(r.center,r.halfExtents))}));var o=t.style.clipPath;if(o){var a=this.getTransformedGeometryBounds(o,!0),u=void 0;a&&(u=new To).setFromTransformedAABB(a,this.getWorldTransform(t)),i?u&&(i=u.intersection(i)):i=u}return i&&(e?r.renderBounds=i:r.bounds=i),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,i||new To},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=o.create();t.parentNode.transformable&&(e=o.invert(o.create(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!To.isEmpty(n)){var r=new To;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);To.isEmpty(i)||(r=new To).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=gt(r.getMin(),2),u=a[0],s=a[1],c=gt(r.getMax(),2),l=c[0],h=c[1];return new Io(u+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),l-u,h-s)}return new Io((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach((function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}));var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),t.dispatchEvent(new qo(ko.ATTR_MODIFIED,t,null,null,"modelMatrix",qo.MODIFICATION,null,null))}},t.prototype.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(o.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?o.multiply(e.worldTransform,r.worldTransform,e.localTransform):o.copy(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},pt([_(Ro),dt("design:type",Function)],t.prototype,"sceneGraphSelectorFactory",void 0),t=pt([A()],t)}(),Qh=l.defineToken("ContextService",{multiple:!1});!function(t){t[t.CAMERA_CHANGED=0]="CAMERA_CHANGED",t[t.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",t[t.NONE=2]="NONE"}(Xh||(Xh={}));var $h,tf,ef,nf=l.defineToken("RenderingContext"),rf=l.defineToken("RenderingPluginContribution"),of=function(){function t(){this.inited=!1,this.stats={total:0,rendered:0,renderedOnscreen:0},this.zIndexCounter=0,this.hooks={init:new Wh,dirtycheck:new qh,cull:new qh,beginFrame:new zh,beforeRender:new zh,render:new zh,afterRender:new zh,endFrame:new zh,destroy:new zh,pick:new Hh,pointerDown:new zh,pointerUp:new zh,pointerMove:new zh,pointerOut:new zh,pointerOver:new zh,pointerCancel:new zh,pointerWheel:new zh}}return t.prototype.init=function(){return yt(this,void 0,void 0,(function(){var t=this;return vt(this,(function(e){switch(e.label){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach((function(e){e.apply(t)})),[4,this.hooks.init.callPromise()];case 1:return e.sent(),this.inited=!0,[2]}}))}))},t.prototype.getStats=function(){return this.stats},t.prototype.render=function(t){this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root),(this.renderingContext.dirty||t.renderer.getConfig().enableDirtyRectangleRendering&&1===this.stats.total)&&(this.renderingContext.dirty||this.hooks.beginFrame.call(),this.stats.renderedOnscreen=this.stats.rendered,this.hooks.endFrame.call(),this.renderingContext.dirty=!1),this.renderingContext.renderReasons.clear())},t.prototype.renderDisplayObject=function(t){var e=this;this.styleValueRegistry.recalc(t);var n=this.hooks.dirtycheck.call(t);n&&(this.hooks.cull.call(n),this.stats.rendered++,this.renderingContext.dirty||(this.renderingContext.dirty=!0,this.hooks.beginFrame.call()),this.hooks.beforeRender.call(n),this.hooks.render.call(n),this.hooks.afterRender.call(n),t.renderable.dirty=!1),t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var r=t.sortable,i=!1;r.dirty&&(r.sorted=t.childNodes.slice().sort(Yh),i=!0,r.dirty=!1),(r.sorted||t.childNodes).forEach((function(t){e.renderDisplayObject(t)})),i&&t.forEach((function(t){t.emit(ko.RENDER_ORDER_CHANGED,{renderOrder:t.sortable.renderOrder})}))},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call()},t.prototype.dirtify=function(){this.renderingContext.renderReasons.add(Xh.DISPLAY_OBJECT_CHANGED)},pt([ut(rf),dt("design:type",Object)],t.prototype,"renderingPluginProvider",void 0),pt([_(nf),dt("design:type",Object)],t.prototype,"renderingContext",void 0),pt([_(Zh),dt("design:type",Object)],t.prototype,"sceneGraphService",void 0),pt([_(lh),dt("design:type",lh)],t.prototype,"styleValueRegistry",void 0),t=pt([A()],t)}(),af=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e}(zo),uf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cursor="default",e.mappingTable={},e.mappingState={trackingData:{}},e.eventPool=new Map,e.handleTouchEvent=function(t,n){return yt(e,void 0,void 0,(function(){var e,r,i,o,a,u,s,c,l,h,f,p,d,y;return vt(this,(function(v){switch(v.label){case 0:return[4,this.createTouchEvent(t)];case 1:e=v.sent(),r=[];try{for(i=mt(e.changedTouches),o=i.next();!o.done;o=i.next())a=o.value,-1===r.indexOf(a.target)&&r.push(a.target)}catch(t){f={error:t}}finally{try{o&&!o.done&&(p=i.return)&&p.call(i)}finally{if(f)throw f.error}}u=function(t){e.target=t,e.targetTouches=e.touches.filter((function(e){return e.target===t})),s.dispatchEvent(e,n),s.freeEvent(e)},s=this;try{for(c=mt(r),l=c.next();!l.done;l=c.next())h=l.value,u(h)}catch(t){d={error:t}}finally{try{l&&!l.done&&(y=c.return)&&y.call(c)}finally{if(d)throw d.error}}return[2]}}))}))},e.onTouchStart=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof _l?(this.handleTouchEvent(t,"touchstart"),[2]):[2]}))}))},e.onTouchMove=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof _l?(this.handleTouchEvent(t,"touchmove"),[2]):[2]}))}))},e.onTouchEnd=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof _l?(this.handleTouchEvent(t,"touchend"),[2]):[2]}))}))},e.onTouchCancel=function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){return t instanceof _l?(this.handleTouchEvent(t,"touchcancel"),[2]):[2]}))}))},e.onPointerDown=function(t){return yt(e,void 0,void 0,(function(){var e,n;return vt(this,(function(r){switch(r.label){case 0:return t instanceof _l?[4,this.createPointerEvent(t)]:[2];case 1:return e=r.sent(),this.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType?this.dispatchEvent(e,"touchstart"):"mouse"!==e.pointerType&&"pen"!==e.pointerType||(n=2===e.button,this.dispatchEvent(e,n?"rightdown":"mousedown")),this.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),this.freeEvent(e),[2]}}))}))},e.onPointerUp=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o,a,u,s,c;return vt(this,(function(l){switch(l.label){case 0:return t instanceof _l?(e=performance.now(),[4,this.createPointerEvent(t)]):[2];case 1:if(n=l.sent(),this.dispatchEvent(n,"pointerup"),"touch"===n.pointerType?this.dispatchEvent(n,"touchend"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(u=2===n.button,this.dispatchEvent(n,u?"rightup":"mouseup")),r=this.trackingData(t.pointerId),i=this.findMountedTarget(r.pressTargetsByButton[t.button]),o=i,i&&!n.composedPath().includes(i)){for(a=i;a&&!n.composedPath().includes(a);)n.currentTarget=a,this.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType?this.notifyTarget(n,"touchendoutside"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(u=2===n.button,this.notifyTarget(n,u?"rightupoutside":"mouseupoutside")),sc.isNode(a)&&(a=a.parentNode);delete r.pressTargetsByButton[t.button],o=a}return o&&((s=this.clonePointerEvent(n,"click")).target=o,s.path=[],r.clicksByButton[t.button]||(r.clicksByButton[t.button]={clickCount:0,target:s.target,timeStamp:e}),(c=r.clicksByButton[t.button]).target===s.target&&e-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=s.target,c.timeStamp=e,s.detail=c.clickCount,"mouse"===s.pointerType||"touch"===s.pointerType?this.dispatchEvent(s,"click"):this.dispatchEvent(s,"pointertap"),this.freeEvent(s)),this.freeEvent(n),[2]}}))}))},e.onPointerMove=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o,a,u,s,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return t instanceof _l?[4,this.createPointerEvent(t)]:[2];case 1:return e=f.sent(),n="mouse"===e.pointerType||"pen"===e.pointerType,r=this.trackingData(t.pointerId),i=this.findMountedTarget(r.overTargets),r.overTargets&&i!==e.target?(o="mousemove"===t.type?"mouseout":"pointerout",[4,this.createPointerEvent(t,o,i||void 0)]):[3,5];case 2:return a=f.sent(),this.dispatchEvent(a,"pointerout"),n&&this.dispatchEvent(a,"mouseout"),e.composedPath().includes(i)?[3,4]:[4,this.createPointerEvent(t,"pointerleave",i||void 0)];case 3:for((u=f.sent()).eventPhase=u.AT_TARGET;u.target&&!e.composedPath().includes(u.target);)u.currentTarget=u.target,this.notifyTarget(u),n&&this.notifyTarget(u,"mouseleave"),sc.isNode(u.target)&&(u.target=u.target.parentNode);this.freeEvent(u),f.label=4;case 4:this.freeEvent(a),f.label=5;case 5:if(i!==e.target){for(s="mousemove"===t.type?"mouseover":"pointerover",c=this.clonePointerEvent(e,s),this.dispatchEvent(c,"pointerover"),n&&this.dispatchEvent(c,"mouseover"),l=i&&sc.isNode(i)&&i.parentNode;l&&l!==(sc.isNode(this.rootTarget)&&this.rootTarget.parentNode)&&l!==e.target;)l=l.parentNode;if(!l||l===(sc.isNode(this.rootTarget)&&this.rootTarget.parentNode)){for((h=this.clonePointerEvent(e,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==i&&h.target!==(sc.isNode(this.rootTarget)&&this.rootTarget.parentNode);)h.currentTarget=h.target,this.notifyTarget(h),n&&this.notifyTarget(h,"mouseenter"),sc.isNode(h.target)&&(h.target=h.target.parentNode);this.freeEvent(h)}this.freeEvent(c)}return this.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&this.dispatchEvent(e,"touchmove"),n&&(this.dispatchEvent(e,"mousemove"),this.cursor=this.getCursor(e.target)),r.overTargets=e.composedPath(),this.freeEvent(e),[2]}}))}))},e.onPointerOut=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o;return vt(this,(function(a){switch(a.label){case 0:return t instanceof _l?(e=this.trackingData(t.pointerId)).overTargets?(n="mouse"===t.pointerType||"pen"===t.pointerType,r=this.findMountedTarget(e.overTargets),[4,this.createPointerEvent(t,"pointerout",r||void 0)]):[3,3]:[2];case 1:return i=a.sent(),this.dispatchEvent(i),n&&this.dispatchEvent(i,"mouseout"),[4,this.createPointerEvent(t,"pointerleave",r||void 0)];case 2:for((o=a.sent()).eventPhase=o.AT_TARGET;o.target&&o.target!==(sc.isNode(this.rootTarget)&&this.rootTarget.parentNode);)o.currentTarget=o.target,this.notifyTarget(o),n&&this.notifyTarget(o,"mouseleave"),sc.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=null,this.freeEvent(i),this.freeEvent(o),a.label=3;case 3:return this.cursor=null,[2]}}))}))},e.onPointerOver=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return t instanceof _l?(e=this.trackingData(t.pointerId),[4,this.createPointerEvent(t)]):[2];case 1:for(n=o.sent(),r="mouse"===n.pointerType||"pen"===n.pointerType,this.dispatchEvent(n,"pointerover"),r&&this.dispatchEvent(n,"mouseover"),"mouse"===n.pointerType&&(this.cursor=this.getCursor(n.target)),(i=this.clonePointerEvent(n,"pointerenter")).eventPhase=i.AT_TARGET;i.target&&i.target!==(sc.isNode(this.rootTarget)&&this.rootTarget.parentNode);)i.currentTarget=i.target,this.notifyTarget(i),r&&this.notifyTarget(i,"mouseenter"),sc.isNode(i.target)&&(i.target=i.target.parentNode);return e.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(i),[2]}}))}))},e.onPointerUpOutside=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return t instanceof _l?(e=this.trackingData(t.pointerId),n=this.findMountedTarget(e.pressTargetsByButton[t.button]),[4,this.createPointerEvent(t)]):[2];case 1:if(r=o.sent(),n){for(i=n;i;)r.currentTarget=i,this.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?this.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||this.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),sc.isNode(i)&&(i=i.parentNode);delete e.pressTargetsByButton[t.button]}return this.freeEvent(r),[2]}}))}))},e.onWheel=function(t){return yt(e,void 0,void 0,(function(){var e;return vt(this,(function(n){switch(n.label){case 0:return t instanceof Ol?[4,this.createWheelEvent(t)]:[2];case 1:return e=n.sent(),this.dispatchEvent(e),this.freeEvent(e),[2]}}))}))},e}return lt(e,t),e.prototype.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("touchstart",this.onTouchStart),this.addEventMapping("touchmove",this.onTouchMove),this.addEventMapping("touchend",this.onTouchEnd),this.addEventMapping("touchcancel",this.onTouchCancel)},e.prototype.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new Oo(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.prototype.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new Oo(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.canvasConfig,u=i.width,s=i.height,c=r.getPerspectiveInverse(),l=r.getWorldTransform(),h=o.multiply(o.create(),l,c),f=a.fromValues(e/u*2-1,2*(1-n/s)-1,0);return a.transformMat4(f,f,h),new Oo(f[0],f[1])},e.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=o.multiply(o.create(),n,r),u=a.fromValues(t.x,t.y,0);a.transformMat4(u,u,i);var s=this.canvasConfig,c=s.width,l=s.height;return new Oo((u[0]+1)/2*c,(1-(u[1]+1)/2)*l)},e.prototype.setPickHandler=function(t){this.pickHandler=t},e.prototype.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))},e.prototype.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},e.prototype.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},e.prototype.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)sc.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},e.prototype.hitTest=function(t){return yt(this,void 0,void 0,(function(){var e,n,r,i,o;return vt(this,(function(a){switch(a.label){case 0:return e=t.viewportX,n=t.viewportY,r=this.canvasConfig,i=r.width,o=r.height,e<0||n<0||e>i||n>o?[2,null]:[4,this.pickHandler(t)];case 1:return[2,a.sent()||this.rootTarget||null]}}))}))},e.prototype.isNativeEventFromCanvas=function(t){var e,n=this.contextService.getDomElement(),r=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},e.prototype.pickTarget=function(t){return yt(this,void 0,void 0,(function(){return vt(this,(function(e){return[2,this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})]}))}))},e.prototype.createPointerEvent=function(t,e,n){return yt(this,void 0,void 0,(function(){var r,i,o,a,u;return vt(this,(function(s){switch(s.label){case 0:return r=this.allocateEvent(_l),this.copyPointerData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.nativeEvent=t.nativeEvent,i=this.isNativeEventFromCanvas(r),r.originalEvent=t,o=r,null==n?[3,1]:(a=n,[3,4]);case 1:return(u=i)?[4,this.pickTarget(r)]:[3,3];case 2:u=s.sent(),s.label=3;case 3:a=u,s.label=4;case 4:return o.target=a,"string"==typeof e&&(r.type=e),[2,r]}}))}))},e.prototype.createTouchEvent=function(t){return yt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u,s;return vt(this,(function(c){switch(c.label){case 0:(e=this.allocateEvent(af)).isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.nativeEvent=t.nativeEvent,e.originalEvent=t,this.copyTouchData(t,e),i=0,c.label=1;case 1:return i<t.changedTouches.length?(o=t.changedTouches[i],a=this.isNativeEventFromCanvas(t),n=o,(r=a)?[4,this.pickTarget(o)]:[3,3]):[3,5];case 2:r=c.sent(),c.label=3;case 3:n.target=r,c.label=4;case 4:return i++,[3,1];case 5:i=0,c.label=6;case 6:return i<t.touches.length?(o=t.touches[i],a=this.isNativeEventFromCanvas(t),u=o,(s=a)?[4,this.pickTarget(o)]:[3,8]):[3,10];case 7:s=c.sent(),c.label=8;case 8:u.target=s,c.label=9;case 9:return i++,[3,6];case 10:return e.touches=t.touches,e.changedTouches=t.changedTouches,[2,e]}}))}))},e.prototype.createWheelEvent=function(t){return yt(this,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return e=this.allocateEvent(Ol),this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t,n=this.isNativeEventFromCanvas(e),r=e,(i=n)?[4,this.pickTarget(e)]:[3,2];case 1:i=o.sent(),o.label=2;case 2:return r.target=i,[2,e]}}))}))},e.prototype.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(_l);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.prototype.copyPointerData=function(t,e){t instanceof _l&&e instanceof _l&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.prototype.copyMouseData=function(t,e){t instanceof Cl&&e instanceof Cl&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.prototype.copyTouchData=function(t,e){return yt(this,void 0,void 0,(function(){return vt(this,(function(n){return e.altKey=t.altKey,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,[2]}))}))},e.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.prototype.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},e.prototype.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(!(r===this.rootTarget||sc.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.prototype.getCursor=function(t){for(var e=t;e;){var n=yc.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=sc.isNode(e)&&e.parentNode}},pt([_(nf),dt("design:type",Object)],e.prototype,"renderingContext",void 0),pt([_(Qh),dt("design:type",Object)],e.prototype,"contextService",void 0),pt([_(Vs),dt("design:type",Object)],e.prototype,"canvasConfig",void 0),pt([Object(f.postConstruct)(),dt("design:type",Function),dt("design:paramtypes",[]),dt("design:returntype",void 0)],e.prototype,"init",null),e=pt([A()],e)}(st.EventEmitter),sf=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t){if(this.canvas)return this.canvas;if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t=pt([A()],t)}(),cf={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},lf=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,hf=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),ff=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),pf=function(){function t(){var t=this;this.cache={},this.shouldBreakByKinsokuShorui=function(e,n){return!t.isBreakingSpace(n)&&!(!e||!ff.exec(n)&&!hf.exec(e))},this.trimByKinsokuShorui=function(t){var e=bt([],gt(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t,e){if(this.cache[t])return this.cache[t];var n={ascent:0,descent:0,fontSize:0},r=this.offscreenCanvas.getOrCreateCanvas(e),i=this.offscreenCanvas.getOrCreateContext(e);i.font=t;var o=cf.MetricsString+cf.BaselineSymbol,a=Math.ceil(i.measureText(o).width),u=Math.ceil(i.measureText(cf.BaselineSymbol).width),s=cf.HeightMultiplier*u;u=u*cf.BaselineMultiplier|0,r.width=a,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,a,s),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,u);var c=i.getImageData(0,0,a||1,s||1).data,l=c.length,h=4*a,f=0,p=0,d=!1;for(f=0;f<u;++f){for(var y=0;y<h;y+=4)if(255!==c[p+y]){d=!0;break}if(d)break;p+=h}for(n.ascent=u-f,p=l-h,d=!1,f=s;f>u;--f){for(y=0;y<h;y+=4)if(255!==c[p+y]){d=!0;break}if(d)break;p-=h}return n.descent=f-u,n.fontSize=n.ascent+n.descent,this.cache[t]=n,n},t.prototype.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=void 0===o?0:o,u=e.lineWidth,s=e.textBaseline,c=e.textAlign,l=e.letterSpacing,h=void 0===l?0:l,f=e.leading,p=void 0===f?0:f,d=Oh(e),y=this.measureFont(d,n);0===y.fontSize&&(y.fontSize=r.value,y.ascent=r.value);var v=this.offscreenCanvas.getOrCreateContext(n);v.font=d;for(var m=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),g=new Array(m.length),b=0,T=0;T<m.length;T++){var E=v.measureText(m[T]).width+(m[T].length-1)*h;g[T]=E,b=Math.max(b,E)}var w=b+u.value,M=a||y.fontSize+u.value,k=Math.max(M,y.fontSize+u.value)+(m.length-1)*(M+p);M+=p;var P=0;return"middle"===s.value?P=-k/2:"bottom"===s.value||"alphabetic"===s.value||"ideographic"===s.value?P=-k:"top"!==s.value&&"hanging"!==s.value||(P=0),{font:d,width:w,height:k,lines:m,lineWidths:g,lineHeight:M,maxLineWidth:b,fontProperties:y,lineMetrics:g.map((function(t,e){var n=0;return"center"===c.value?n-=t/2:"right"!==c.value&&"end"!==c.value||(n-=t),new Io(n-u.value/2,P+e*M,t+u.value,M)}))}},t.prototype.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=void 0===i?0:i,a=e.letterSpacing,u=void 0===a?0:a,s=this.offscreenCanvas.getOrCreateContext(n),c=o+u,l=[],h=0,f=0,p={},d=function(t){return r.getFromCache(t,u,p,s)};return Array.from(t).forEach((function(e,n){var i=t[n-1],o=t[n+1],a=d(e);if(r.isNewline(e))return h++,f=0,void(l[h]="");if(f>0&&f+a>c){if(h++,f=0,l[h]="",r.isBreakingSpace(e))return;r.canBreakInLastChar(e)||(l=r.trimToBreakable(l),f=r.sumTextWidthByCache(l[h]||"",p)),r.shouldBreakByKinsokuShorui(e,o)&&(l=r.trimByKinsokuShorui(l),f+=d(i||""))}f+=a,l[h]=(l[h]||"")+e})),l.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&cf.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&cf.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=bt([],gt(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=r+1,a=r+(this.isBreakingSpace(i)?0:1);return e[e.length-1]+=n.slice(o,n.length),e[e.length-2]=n.slice(0,a),e},t.prototype.canBreakInLastChar=function(t){return!t||!lf.test(t)},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce((function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]}),0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!lf.test(t[e]))return e;return-1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},pt([_(sf),dt("design:type",sf)],t.prototype,"offscreenCanvas",void 0),t=pt([A()],t)}(),df=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r,r=t.x,i=t.y;return{width:2*n.value,height:2*n.value,x:r.value||0,y:i.value||0}},t=pt([A({token:{token:ic,named:Os.CIRCLE}})],t)}(),yf=function(){function t(){}return t.prototype.update=function(t,e){var n=t.rx,r=t.ry,i=t.x,o=t.y;return{width:2*n.value,height:2*r.value,x:i.value||0,y:o.value||0}},t=pt([A({token:{token:ic,named:Os.ELLIPSE}})],t)}(),vf=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.x,i=t.y,o=t.width,a=t.height,u=0,s=0;return o instanceof Oa&&o.unit===Bo.kPixels&&(u=o.value),a instanceof Oa&&a.unit===Bo.kPixels&&(s=a.value),n&&!kh(n)&&(u||(u=n.width),s||(s=n.height)),o instanceof Oa&&(o.value=u),a instanceof Oa&&(a.value=s),{width:u,height:s,x:r.value||0,y:i.value||0}},t=pt([A({token:[{token:ic,named:Os.RECT},{token:ic,named:Os.IMAGE},{token:ic,named:Os.GROUP}]})],t)}(),mf=function(){function t(){}return t.prototype.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,u=t.fontWeight,s=t.fontVariant;return n&&o&&a&&u&&s&&r&&i},t.prototype.update=function(t,e){var n,r,i=t.text,o=t.textAlign,u=t.lineWidth,s=t.textBaseline,c=t.x,l=t.y,h=t.dx,f=t.dy,p=((null===(r=null===(n=null==e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.getConfig())||{}).offscreenCanvas;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var d=this.textService.measureText(i,t,p);t.metrics=d;var y=d.width,v=d.height,m=d.lineHeight,g=d.fontProperties,b=a.fromValues(y/2,v/2,0),T=[0,1],E=0;"center"===o.value?(E=u.value/2,T=[.5,1]):"right"!==o.value&&"end"!==o.value||(E=u.value,T=[1,1]);var w=0;return"middle"===s.value?w=b[1]:"top"===s.value||"hanging"===s.value?w=2*b[1]:"alphabetic"===s.value?w=m-g.ascent:"bottom"!==s.value&&"ideographic"!==s.value||(w=0),h&&(E+=h.value),f&&(w+=f.value),t.anchor=[new Oa(T[0]),new Oa(T[1]),new Oa(0)],{width:2*b[0],height:2*b[1],x:c.value||0,y:l.value||0,offsetX:E,offsetY:w}},pt([_(pf),dt("design:type",pf)],t.prototype,"textService",void 0),t=pt([A({token:{token:ic,named:Os.TEXT}})],t)}(),gf=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e.value,r.value),a=Math.max(e.value,r.value),u=Math.min(n.value,i.value);return{width:a-o,height:Math.max(n.value,i.value)-u,x:o,y:u}},t=pt([A({token:{token:ic,named:Os.LINE}})],t)}(),bf=function(){function t(){}return t.prototype.update=function(t){var e=t.points.points,n=Math.min.apply(Math,bt([],gt(e.map((function(t){return t[0]}))),!1)),r=Math.max.apply(Math,bt([],gt(e.map((function(t){return t[0]}))),!1)),i=Math.min.apply(Math,bt([],gt(e.map((function(t){return t[1]}))),!1));return{width:r-n,height:Math.max.apply(Math,bt([],gt(e.map((function(t){return t[1]}))),!1))-i,x:n,y:i}},t=pt([A({token:[{token:ic,named:Os.POLYLINE},{token:ic,named:Os.POLYGON}]})],t)}(),Tf=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect,n=e.x,r=e.y;return{width:e.width,height:e.height,x:n,y:r}},t=pt([A({token:{token:ic,named:Os.PATH}})],t)}(),Ef=$((function(t){Object(f.decorate)(N(),st.EventEmitter),t(Tt),t(Vo),t({token:Ro,useFactory:function(t){return function(){return t.container.get(Do)}}}),t({token:Zh,useClass:Jh}),t(sf),t(pf),t(df),t(yf),t(vf),t(mf),t(gf),t(bf),t(Tf),t({token:rc,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(ic,n)&&(e[n]=t.container.getNamed(ic,n)),e[n]}}}),t(wh),t(lh),t(ql),t(Wl),t(Hl),t(Yl),t(Kl),t(Xl),t(Zl),t(Jl),t(Ql),t($l),t(th),t(eh),t(nh),t(rh),t(ih),t(oh),t(ah),t(uh)})),wf=l.defineToken("DefaultCamera");!function(t){t[t.ORBITING=0]="ORBITING",t[t.EXPLORING=1]="EXPLORING",t[t.TRACKING=2]="TRACKING"}($h||($h={})),function(t){t[t.DEFAULT=0]="DEFAULT",t[t.ROTATIONAL=1]="ROTATIONAL",t[t.TRANSLATIONAL=2]="TRANSLATIONAL",t[t.CINEMATIC=3]="CINEMATIC"}(tf||(tf={})),function(t){t[t.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",t[t.PERSPECTIVE=1]="PERSPECTIVE"}(ef||(ef={}));var Mf,kf={UPDATED:"updated"},Pf=Math.PI/180,xf=180/Math.PI,Sf=function(t){function e(e,n){void 0===e&&(e=$h.EXPLORING),void 0===n&&(n=tf.DEFAULT);var r=t.call(this)||this;return r.matrix=o.create(),r.right=a.fromValues(1,0,0),r.up=a.fromValues(0,1,0),r.forward=a.fromValues(0,0,1),r.position=a.fromValues(0,0,1),r.focalPoint=a.fromValues(0,0,0),r.distanceVector=a.fromValues(0,0,-1),r.distance=1,r.azimuth=0,r.elevation=0,r.roll=0,r.relAzimuth=0,r.relElevation=0,r.relRoll=0,r.dollyingStep=0,r.maxDistance=1/0,r.minDistance=-1/0,r.zoom=1,r.rotateWorld=!1,r.fov=30,r.near=.1,r.far=1e3,r.aspect=1,r.projectionMatrix=o.create(),r.projectionMatrixInverse=o.create(),r.jitteredProjectionMatrix=void 0,r.enableUpdate=!0,r.type=$h.EXPLORING,r.trackingMode=tf.DEFAULT,r.projectionMode=ef.PERSPECTIVE,r.frustum=new Po,r.landmarks=[],r.orthoMatrix=o.create(),r.setType(e,n),r}return lt(e,t),e.prototype.isOrtho=function(){return this.projectionMode===ef.ORTHOGRAPHIC},e.prototype.getProjectionMode=function(){return this.projectionMode},e.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.prototype.getFrustum=function(){return this.frustum},e.prototype.getPosition=function(){return this.position},e.prototype.getFocalPoint=function(){return this.focalPoint},e.prototype.getDollyingStep=function(){return this.dollyingStep},e.prototype.getNear=function(){return this.near},e.prototype.getFar=function(){return this.far},e.prototype.getZoom=function(){return this.zoom},e.prototype.getOrthoMatrix=function(){return this.orthoMatrix},e.prototype.getView=function(){return this.view},e.prototype.setEnableUpdate=function(t){this.enableUpdate=t},e.prototype.setType=function(t,e){return this.type=t,this.type===$h.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===$h.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},e.prototype.setTrackingMode=function(t){if(this.type!==$h.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.prototype.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.prototype.getViewTransform=function(){return o.invert(o.create(),this.matrix)},e.prototype.getWorldTransform=function(){return this.matrix},e.prototype.jitterProjectionMatrix=function(t,e){var n=o.fromTranslation(o.create(),[t,e,0]);this.jitteredProjectionMatrix=o.multiply(o.create(),n,this.projectionMatrix)},e.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},e.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.prototype.setNear=function(t){return this.projectionMode===ef.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.prototype.setFar=function(t){return this.projectionMode===ef.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.prototype.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===ef.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.prototype.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===ef.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===ef.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===ef.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.prototype.setPerspective=function(t,e,n,r){var i;this.projectionMode=ef.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var u=this.near*Math.tan(.5*Pf*this.fov)/this.zoom,s=2*u,c=this.aspect*s,l=-.5*c;if(null===(i=this.view)||void 0===i?void 0:i.enabled){var h=this.view.fullWidth,f=this.view.fullHeight;l+=this.view.offsetX*c/h,u-=this.view.offsetY*s/f,c*=this.view.width/h,s*=this.view.height/f}return pa(this.projectionMatrix,l,l+c,u,u-s,t,this.far),o.scale(this.projectionMatrix,this.projectionMatrix,a.fromValues(1,-1,1)),o.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.prototype.setOrthographic=function(t,e,n,r,i,u){var s;this.projectionMode=ef.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=u;var c=(this.rright-this.left)/(2*this.zoom),l=(this.top-this.bottom)/(2*this.zoom),h=(this.rright+this.left)/2,f=(this.top+this.bottom)/2,p=h-c,d=h+c,y=f+l,v=f-l;if(null===(s=this.view)||void 0===s?void 0:s.enabled){var m=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d=(p+=m*this.view.offsetX)+m*this.view.width,v=(y-=g*this.view.offsetY)-g*this.view.height}return o.ortho(this.projectionMatrix,p,d,v,y,i,u),o.scale(this.projectionMatrix,this.projectionMatrix,a.fromValues(1,-1,1)),o.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.prototype.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=na(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.prototype.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r=a.fromValues(0,1,0);if(this.focalPoint=na(t,e,n),this.trackingMode===tf.CINEMATIC){var i=a.subtract(a.create(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var u=a.length(i),s=Math.asin(e/u)*xf,c=90+Math.atan2(n,t)*xf,l=o.create();o.rotateY(l,l,c*Pf),o.rotateX(l,l,s*Pf),r=a.transformMat4(a.create(),[0,1,0],l)}return o.invert(this.matrix,o.lookAt(o.create(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.prototype.getDistance=function(){return this.distance},e.prototype.setDistance=function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=a.create();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},e.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},e.prototype.setMinDistance=function(t){return this.minDistance=t,this},e.prototype.setAzimuth=function(t){return this.azimuth=ea(t),this.computeMatrix(),this._getAxes(),this.type===$h.ORBITING||this.type===$h.EXPLORING?this._getPosition():this.type===$h.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getAzimuth=function(){return this.azimuth},e.prototype.setElevation=function(t){return this.elevation=ea(t),this.computeMatrix(),this._getAxes(),this.type===$h.ORBITING||this.type===$h.EXPLORING?this._getPosition():this.type===$h.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getElevation=function(){return this.elevation},e.prototype.setRoll=function(t){return this.roll=ea(t),this.computeMatrix(),this._getAxes(),this.type===$h.ORBITING||this.type===$h.EXPLORING?this._getPosition():this.type===$h.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getRoll=function(){return this.roll},e.prototype.rotate=function(t,e,n){if(this.relElevation=ea(e),this.relAzimuth=ea(t),this.relRoll=ea(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===$h.EXPLORING){var r=s.setAxisAngle(s.create(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*Pf),i=s.setAxisAngle(s.create(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*Pf),a=s.setAxisAngle(s.create(),[0,0,1],this.relRoll*Pf),u=s.multiply(s.create(),i,r);u=s.multiply(s.create(),u,a);var c=o.fromQuat(o.create(),u);o.translate(this.matrix,this.matrix,[0,0,-this.distance]),o.multiply(this.matrix,this.matrix,c),o.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===$h.ORBITING||this.type===$h.EXPLORING?this._getPosition():this.type===$h.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=na(t,e,0),r=a.clone(this.position);return a.add(r,r,a.scale(a.create(),this.right,n[0])),a.add(r,r,a.scale(a.create(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=a.clone(this.position),r=this.dollyingStep,i=this.distance+t*this.dollyingStep;return r=Math.max(Math.min(i,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===$h.ORBITING||this.type===$h.EXPLORING?this._getDistance():this.type===$h.TRACKING&&a.add(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.createLandmark=function(t,n){void 0===n&&(n={});var r=n.position,i=void 0===r?this.position:r,u=n.focalPoint,s=void 0===u?this.focalPoint:u,c=n.roll,l=n.zoom,h=new e;h.setType(this.type,void 0),h.setPosition(i[0],i[1]||this.position[1],i[2]||this.position[2]),h.setFocalPoint(s[0],s[1]||this.focalPoint[1],s[2]||this.focalPoint[2]),h.setRoll(c||this.roll),h.setZoom(l||this.zoom);var f={name:t,matrix:o.clone(h.matrix),right:a.clone(h.right),up:a.clone(h.up),forward:a.clone(h.forward),position:a.clone(h.position),focalPoint:a.clone(h.focalPoint),distanceVector:a.clone(h.distanceVector),distance:h.distance,dollyingStep:h.dollyingStep,azimuth:h.azimuth,elevation:h.elevation,roll:h.roll,relAzimuth:h.relAzimuth,relElevation:h.relElevation,relRoll:h.relRoll,zoom:h.zoom};return this.landmarks.push(f),f},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=kh(t)?this.landmarks.find((function(e){return e.name===t})):t;if(r){var i=Zo(e)?{duration:e}:e,o=i.easing,u=void 0===o?"linear":o,s=i.duration,c=void 0===s?100:s,l=i.easingFunction,h=void 0===l?void 0:l,f=i.onfinish,p=void 0===f?void 0:f;if(0===c)return this.syncFromLandmark(r),void(p&&p());void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID);var d,y=r.position,v=r.focalPoint,m=r.zoom,g=r.roll,b=h||el(u),T=function(){n.setFocalPoint(v),n.setPosition(y),n.setRoll(g),n.setZoom(m),n.computeMatrix(),n.triggerUpdate(),p&&p()};this.canvas.requestAnimationFrame((function t(e){void 0===d&&(d=e);var r=e-d;if(r>c)T();else{var i,o,u=b(r/c),s=a.create(),l=a.create();a.lerp(s,n.focalPoint,v,u),a.lerp(l,n.position,y,u),o=n.roll*(1-u)+g*u,i=n.zoom*(1-u)+m*u,n.setFocalPoint(s),n.setPosition(l),n.setRoll(o),n.setZoom(i),a.dist(s,v)+a.dist(l,y)<=.01?T():(n.computeMatrix(),n.triggerUpdate(),r<c&&(n.landmarkAnimationID=n.canvas.requestAnimationFrame(t)))}}))}},e.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.prototype.computeMatrix=function(){var t=s.setAxisAngle(s.create(),[0,0,1],this.roll*Pf);o.identity(this.matrix);var e=s.setAxisAngle(s.create(),[1,0,0],(this.rotateWorld&&this.type!==$h.TRACKING||this.type===$h.TRACKING?1:-1)*this.elevation*Pf),n=s.setAxisAngle(s.create(),[0,1,0],(this.rotateWorld&&this.type!==$h.TRACKING||this.type===$h.TRACKING?1:-1)*this.azimuth*Pf),r=s.multiply(s.create(),n,e);r=s.multiply(s.create(),r,t);var i=o.fromQuat(o.create(),r);this.type===$h.ORBITING||this.type===$h.EXPLORING?(o.translate(this.matrix,this.matrix,this.focalPoint),o.multiply(this.matrix,this.matrix,i),o.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===$h.TRACKING&&(o.translate(this.matrix,this.matrix,this.position),o.multiply(this.matrix,this.matrix,i))},e.prototype._setPosition=function(t,e,n){this.position=na(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},e.prototype._getAxes=function(){a.copy(this.right,na(u.transformMat4(u.create(),[1,0,0,0],this.matrix))),a.copy(this.up,na(u.transformMat4(u.create(),[0,1,0,0],this.matrix))),a.copy(this.forward,na(u.transformMat4(u.create(),[0,0,1,0],this.matrix))),a.normalize(this.right,this.right),a.normalize(this.up,this.up),a.normalize(this.forward,this.forward)},e.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=a.length(this.distanceVector);if(0===r)return this.elevation=0,void(this.azimuth=0);this.type===$h.TRACKING||this.rotateWorld?(this.elevation=Math.asin(e/r)*xf,this.azimuth=Math.atan2(-t,-n)*xf):(this.elevation=-Math.asin(e/r)*xf,this.azimuth=-Math.atan2(-t,-n)*xf)},e.prototype._getPosition=function(){a.copy(this.position,na(u.transformMat4(u.create(),[0,0,0,1],this.matrix))),this._getDistance()},e.prototype._getFocalPoint=function(){a.transformMat3(this.distanceVector,[0,0,-this.distance],i.fromMat4(i.create(),this.matrix)),a.add(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e.prototype._getDistance=function(){this.distanceVector=a.subtract(a.create(),this.focalPoint,this.position),this.distance=a.length(this.distanceVector),this.dollyingStep=this.distance/100},e.prototype._getOrthoMatrix=function(){if(this.projectionMode===ef.ORTHOGRAPHIC){var t=this.position,e=s.setAxisAngle(s.create(),[0,0,1],-this.roll*Math.PI/180);o.fromRotationTranslationScaleOrigin(this.orthoMatrix,e,a.fromValues((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),a.fromValues(this.zoom,this.zoom,1),t)}},e.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=o.multiply(o.create(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.emit(kf.UPDATED)}},e.prototype.syncFromLandmark=function(t){this.matrix=o.copy(this.matrix,t.matrix),this.right=a.copy(this.right,t.right),this.up=a.copy(this.up,t.up),this.forward=a.copy(this.forward,t.forward),this.position=a.copy(this.position,t.position),this.focalPoint=a.copy(this.focalPoint,t.focalPoint),this.distanceVector=a.copy(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(st.EventEmitter),Nf=function(){function t(t){this.plugins=[],this.config=ht({enableDirtyCheck:!0,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableTAA:!1},t)}return t.prototype.registerPlugin=function(t){this.plugins.push(t)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}(),Af=n(11),Cf=function(){function t(){}return t.prototype.apply=function(t){var e=this;t.hooks.dirtycheck.tap((function(t){if(t){var n=e.canvasConfig.renderer.getConfig().enableDirtyCheck,r=t.renderable,i=e.renderingContext.renderReasons.has(Xh.CAMERA_CHANGED),o=e.renderingContext.dirty;return r.dirty||i||!n&&o?t:null}return t}))},pt([_(Vs),dt("design:type",Object)],t.prototype,"canvasConfig",void 0),pt([_(nf),dt("design:type",Object)],t.prototype,"renderingContext",void 0),t=pt([A({contrib:rf})],t)}(),_f=l.defineToken("CullingStrategyContribution"),Of=function(){function t(){}return t.prototype.apply=function(t){var e=this.strategyProvider.getContributions();t.hooks.cull.tap((function(t){if(t){var n=t.cullable;return 0===e.length?n.visible=!0:n.visible=e.every((function(e){return e.isVisible(t)})),!n.isCulled()&&t.isVisible()?t:null}return t})),t.hooks.afterRender.tap((function(t){t.cullable.visibilityPlaneMask=-1}))},pt([ut(_f),dt("design:type",Object)],t.prototype,"strategyProvider",void 0),t=pt([A({contrib:rf})],t)}(),If=function(){function t(){}return t.prototype.apply=function(t){var e=this,n=function(e){e.target.renderable.dirty=!0,t.dirtify()},r=function(){t.dirtify()},i=function(n){var r=n.target;e.styleValueRegistry.recalc(r),console.log(r),Kh(r),t.dirtify()},o=function(e){Kh(e.target),t.dirtify()};t.hooks.init.tapPromise((function(){return yt(e,void 0,void 0,(function(){return vt(this,(function(t){return this.renderingContext.root.addEventListener(ko.MOUNTED,i),this.renderingContext.root.addEventListener(ko.UNMOUNTED,o),this.renderingContext.root.addEventListener(ko.ATTR_MODIFIED,n),this.renderingContext.root.addEventListener(ko.BOUNDS_CHANGED,r),[2]}))}))})),t.hooks.destroy.tap((function(){e.renderingContext.root.removeEventListener(ko.MOUNTED,i),e.renderingContext.root.removeEventListener(ko.UNMOUNTED,o),e.renderingContext.root.removeEventListener(ko.ATTR_MODIFIED,n),e.renderingContext.root.removeEventListener(ko.BOUNDS_CHANGED,r)}))},pt([_(nf),dt("design:type",Object)],t.prototype,"renderingContext",void 0),pt([_(lh),dt("design:type",lh)],t.prototype,"styleValueRegistry",void 0),t=pt([A({contrib:rf})],t)}(),Rf=[Os.CIRCLE,Os.ELLIPSE,Os.IMAGE,Os.RECT,Os.LINE,Os.POLYLINE,Os.POLYGON,Os.TEXT,Os.PATH,Os.HTML],Df=function(){function t(){}return t.prototype.isVisible=function(t){var e,n,r=t.cullable;if(!r.enable)return!0;var i=t.getRenderBounds();if(To.isEmpty(i))return!1;var o=this.camera.getFrustum(),a=null===(n=null===(e=t.parentNode)||void 0===e?void 0:e.cullable)||void 0===n?void 0:n.visibilityPlaneMask;return r.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(t,i,a||lo.INDETERMINATE,o.planes),r.visible=r.visibilityPlaneMask!==lo.OUTSIDE,r.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===lo.OUTSIDE||n===lo.INSIDE)return n;for(var i=lo.INSIDE,o=Rf.indexOf(t.nodeName)>-1,u=0,s=r.length;u<s;++u){var c=1<<u;if(0!=(n&c)&&(!o||4!==u&&5!==u)){var l=r[u],h=l.normal,f=l.distance;if(a.dot(h,e.getPositiveFarPoint(r[u]))+f<0)return lo.OUTSIDE;a.dot(h,e.getNegativeFarPoint(r[u]))+f<0&&(i|=c)}}return i},pt([_(wf),dt("design:type",Sf)],t.prototype,"camera",void 0),t=pt([A({contrib:_f})],t)}(),Lf=function(){function t(){var t=this;this.autoPreventDefault=!0,this.rootPointerEvent=new _l(null),this.rootWheelEvent=new Ol(null),this.onPointerMove=function(e){var n,r,i=null===(r=null===(n=t.renderingContext.root)||void 0===n?void 0:n.ownerDocument)||void 0===r?void 0:r.defaultView;if(!i.supportTouchEvent||"touch"!==e.pointerType){var o=t.normalizeToPointerEvent(e,i),a=t.bootstrapEvent(t.rootPointerEvent,o,i);t.eventService.mapEvent(a),t.setCursor(t.eventService.cursor)}}}return t.prototype.apply=function(t){var e=this,n=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler((function(t){return yt(e,void 0,void 0,(function(){return vt(this,(function(e){switch(e.label){case 0:return[4,this.renderingService.hooks.pick.callPromise({position:t,picked:[],topmost:!0})];case 1:return[2,e.sent().picked[0]||null]}}))}))})),t.hooks.pointerWheel.tap((function(t){var n=e.normalizeWheelEvent(t);e.eventService.mapEvent(n)})),t.hooks.pointerDown.tap((function(t){if(!n.supportTouchEvent||"touch"!==t.pointerType){var r=e.normalizeToPointerEvent(t,n);if(e.autoPreventDefault&&r.isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();var i=e.bootstrapEvent(e.rootPointerEvent,r,n);e.eventService.mapEvent(i),e.setCursor(e.eventService.cursor)}})),t.hooks.pointerUp.tap((function(t){if(!n.supportTouchEvent||"touch"!==t.pointerType){var r=e.contextService.getDomElement(),i=r&&t.target&&t.target!==r&&r.contains&&!r.contains(t.target)?"outside":"",o=e.normalizeToPointerEvent(t,n),a=e.bootstrapEvent(e.rootPointerEvent,o,n);a.type+=i,e.eventService.mapEvent(a),e.setCursor(e.eventService.cursor)}})),t.hooks.pointerMove.tap(this.onPointerMove),t.hooks.pointerOver.tap(this.onPointerMove),t.hooks.pointerOut.tap(this.onPointerMove),t.hooks.pointerCancel.tap((function(t){if(!n.supportTouchEvent||"touch"!==t.pointerType){var r=e.normalizeToPointerEvent(t,n);if(e.autoPreventDefault&&r.isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();var i=e.bootstrapEvent(e.rootPointerEvent,r,n);e.eventService.mapEvent(i),e.setCursor(e.eventService.cursor)}}))},t.prototype.formatTouch=function(t){var e={nativeTouch:t,clientX:t.clientX,clientY:t.clientY,screenX:t.screenX,screenY:t.screenY,viewportX:0,viewportY:0,canvasX:0,canvasY:0,x:0,y:0,target:void 0,force:t.force,identifier:t.identifier,pageX:t.pageX,pageY:t.pageY,radiusX:t.radiusX,radiusY:t.radiusY,rotationAngle:t.rotationAngle},n=this.eventService.client2Viewport(new Oo(t.clientX,t.clientY)),r=n.x,i=n.y;e.viewportX=r,e.viewportY=i;var o=this.eventService.viewport2Canvas({x:r,y:i}),a=o.x,u=o.y;return e.canvasX=a,e.canvasY=u,e.x=a,e.y=u,e},t.prototype.bootstrapEvent=function(t,e,n){if(t.pointerType=e.pointerType,"touch"!==t.pointerType){var r=t;r.view=n,r.originalEvent=null,r.nativeEvent=e,r.pointerId=e.pointerId,r.width=e.width,r.height=e.height,r.isPrimary=e.isPrimary,r.pressure=e.pressure,r.tangentialPressure=e.tangentialPressure,r.tiltX=e.tiltX,r.tiltY=e.tiltY,r.twist=e.twist,this.transferMouseData(r,e);var i=this.eventService.client2Viewport(new Oo(e.clientX,e.clientY)),o=i.x,a=i.y;r.viewport.x=o,r.viewport.y=a;var u=this.eventService.viewport2Canvas(r.viewport),s=u.x,c=u.y;r.canvas.x=s,r.canvas.y=c,r.global.copyFrom(r.canvas),r.offset.copyFrom(r.canvas),r.isTrusted=e.isTrusted,"pointerleave"===r.type&&(r.type="pointerout"),r.type.startsWith("mouse")&&(r.type=r.type.replace("mouse","pointer"))}else{var l=t,h=e,f=[],p=[];if(h.changedTouches)for(var d=0;d<h.changedTouches.length;d++)f.push(this.formatTouch(h.changedTouches[d]));if(h.touches)for(d=0;d<h.touches.length;d++)p.push(this.formatTouch(h.touches[d]));l.nativeEvent=e,l.isTrusted=e.isTrusted,l.timeStamp=performance.now(),l.type=e.type,l.altKey=e.altKey,l.metaKey=e.metaKey,l.shiftKey=e.shiftKey,l.ctrlKey=e.ctrlKey,l.changedTouches=f,l.touches=p,l.targetTouches=[]}return t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.eventService.client2Viewport(new Oo(t.clientX,t.clientY)),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.eventService.viewport2Canvas(e.viewport),a=o.x,u=o.y;return e.canvas.x=a,e.canvas.y=u,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},t.prototype.normalizeToPointerEvent=function(t,e){if(e.isTouchEvent(t))return t.isNormalized=!0,t.pointerType="touch",t;if(e.isMouseEvent(t)){var n=t;return Ko(n.isPrimary)&&(n.isPrimary=!0),Ko(n.width)&&(n.width=1),Ko(n.height)&&(n.height=1),Ko(n.tiltX)&&(n.tiltX=0),Ko(n.tiltY)&&(n.tiltY=0),Ko(n.pointerType)&&(n.pointerType="mouse"),Ko(n.pointerId)&&(n.pointerId=Ih),Ko(n.pressure)&&(n.pressure=.5),Ko(n.twist)&&(n.twist=0),Ko(n.tangentialPressure)&&(n.tangentialPressure=0),n.isNormalized=!0,n}return t},pt([_(Vs),dt("design:type",Object)],t.prototype,"canvasConfig",void 0),pt([_(Qh),dt("design:type",Object)],t.prototype,"contextService",void 0),pt([_(of),dt("design:type",of)],t.prototype,"renderingService",void 0),pt([_(nf),dt("design:type",Object)],t.prototype,"renderingContext",void 0),pt([_(uf),dt("design:type",uf)],t.prototype,"eventService",void 0),t=pt([A({contrib:rf})],t)}(),Vf=$((function(t){et.register(t,rf,{cache:!1}),et.register(t,_f,{cache:!1}),t(of),t(uf),t(Lf),t(If),t(Cf),t(Of),t(Df)}));!function(t){t.READY="ready",t.BEFORE_RENDER="beforerender",t.AFTER_RENDER="afterrender",t.BEFORE_DESTROY="beforedestroy",t.AFTER_DESTROY="afterdestroy",t.RESIZE="resize"}(Mf||(Mf={}));var Bf=function(t){function e(e){var n=t.call(this)||this;n.container=ot.createChild(),n.Element=vl,n.inited=!1,n.document=new Al,n.document.defaultView=n,n.customElements=new zl;var r=e.container,i=e.canvas,o=e.offscreenCanvas,a=e.width,u=e.height,s=e.devicePixelRatio,c=e.renderer,l=e.background,h=e.requestAnimationFrame,f=e.cancelAnimationFrame,p=e.createImage,d=e.supportPointerEvent,y=e.supportTouchEvent,v=e.isTouchEvent,m=e.isMouseEvent;Vh(r,n);var g=a,b=u,T=s;return i&&(T=(T=s||Bh&&window.devicePixelRatio||1)>=1?Math.ceil(T):1,g=a||i.width/T,b=u||i.height/T),n.devicePixelRatio=T,n.requestAnimationFrame=null!=h?h:Af.b.bind(globalThis),n.cancelAnimationFrame=null!=f?f:Af.a.bind(globalThis),n.supportTouchEvent=null!=y?y:"ontouchstart"in globalThis,n.supportPointerEvent=null!=d?d:!!globalThis.PointerEvent,n.isTouchEvent=null!=v?v:function(t){return n.supportTouchEvent&&t instanceof globalThis.TouchEvent},n.isMouseEvent=null!=m?m:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!n.supportPointerEvent||!(t instanceof globalThis.PointerEvent))},n.initRenderingContext({container:r,canvas:i,width:g,height:b,renderer:c,offscreenCanvas:o,devicePixelRatio:T,cursor:"default",background:l,createImage:p}),n.initDefaultCamera(g,b),n.initRenderer(c),n}return lt(e,t),e.prototype.initRenderingContext=function(t){var e=this;this.container.register({token:Vs,useValue:t}),this.container.register({token:nf,useValue:{root:this.document.documentElement,renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(ko.CHILD_INSERTED,(function(t){e.mountChildren(t.detail.child)})),this.document.documentElement.addEventListener(ko.CHILD_REMOVED,(function(t){e.unmountChildren(t.detail.child)}))},e.prototype.initDefaultCamera=function(t,e){var n=(new Sf).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3);n.canvas=this;var r=this.container.get(nf);n.on(kf.UPDATED,(function(){r.renderReasons.add(Xh.CAMERA_CHANGED)})),this.container.register({token:wf,useValue:n})},e.prototype.getConfig=function(){return this.container.get(Vs)},e.prototype.getContainer=function(){return this.container},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.container.get(wf)},e.prototype.getContextService=function(){return this.container.get(Qh)},e.prototype.getEventService=function(){return this.eventService},e.prototype.getRenderingService=function(){return this.renderingService},e.prototype.getRenderingContext=function(){return this.container.get(nf)},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(this.readyPromise=new Promise((function(e){t.resolveReadyPromise=function(){e(t)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t){(void 0===t&&(t=!0),this.emit(Mf.BEFORE_DESTROY,(function(){})),this.frameId)&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var e=this.getRoot();this.unmountChildren(e),t&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),this.emit(Mf.AFTER_DESTROY,{})},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.container.get(Vs);n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.container.get(wf),i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===ef.ORTHOGRAPHIC?r.setOrthographic(t/-2,t/2,e/2,e/-2,r.getNear(),r.getFar()):r.setAspect(t/e),this.emit(Mf.RESIZE,{width:t,height:e})},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t,e){return void 0===e&&(e=!0),this.document.documentElement.removeChild(t,e)},e.prototype.removeChildren=function(t){void 0===t&&(t=!0),this.document.documentElement.removeChildren(t)},e.prototype.render=function(){(this.emit(Mf.BEFORE_RENDER,{}),this.container.isBound(of))&&this.container.get(of).render(this.getConfig());this.emit(Mf.AFTER_RENDER,{})},e.prototype.run=function(){var t=this;!function e(){t.render(),t.frameId=requestAnimationFrame(e)}()},e.prototype.initRenderer=function(t){var e=this;if(!t)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(t);var n=this.container.get(Qh);this.renderingService=this.container.get(of),this.eventService=this.container.get(uf),n.init(),this.renderingService.init().then((function(){e.emit(Mf.READY,{}),e.readyPromise&&e.resolveReadyPromise(),e.inited=!0})),t.getConfig().enableAutoRendering&&this.run(),this.getRoot().forEach((function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)})),this.mountChildren(this.getRoot())},e.prototype.loadCommonContainerModule=function(){this.container.unload(Vf),this.container.load(Vf,!0)},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.init(e.container)}))},e.prototype.setRenderer=function(t){var e=this,n=this.getConfig();if(n.renderer!==t){var r=n.renderer;n.renderer=t,this.destroy(!1),null==r||r.getPlugins().reverse().forEach((function(t){t.destroy(e.container)})),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=this,n=[];t.forEach((function(t){t.isConnected&&n.push(t)})),n.reverse().forEach((function(t){t.emit(ko.UNMOUNTED,{}),t!==e.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}))},e.prototype.mountChildren=function(t){var e=this;t.forEach((function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.emit(ko.MOUNTED,{}))}))},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(uc);ot.load(Ef)}])}));