@drayman/elements 1.4.27 → 1.4.28
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.
- package/README.md +0 -1
- package/dist/datepicker/main.js +1 -1
- package/dist/menu/main.js +1 -1
- package/dist/number-field/main.js +1 -1
- package/dist/table/main.js +1 -1
- package/dist/types/checkbox/src/app/models/checkbox-options.d.ts +0 -0
- package/dist/types/claviz-charts/src/app/models/claviz-charts-options.d.ts +0 -0
- package/dist/types/datepicker/src/app/models/datepicker-options.d.ts +0 -0
- package/dist/types/file-uploader/src/app/models/file-uploader-options.d.ts +0 -0
- package/dist/types/menu/src/app/models/menu-options.d.ts +0 -0
- package/dist/types/nebula/src/app/models/nebula-options.d.ts +0 -0
- package/dist/types/ngx-charts/src/app/models/ngx-charts-options.d.ts +0 -0
- package/dist/types/ngx-graph/src/app/models/ngx-graph-options.d.ts +0 -0
- package/dist/types/number-field/src/app/models/number-field-options.d.ts +0 -0
- package/dist/types/pdf-viewer/src/app/models/pdf-viewer-options.d.ts +0 -0
- package/dist/types/radio-group/src/app/models/radio-group-options.d.ts +0 -0
- package/dist/types/select/src/app/models/select-options.d.ts +0 -0
- package/dist/types/shared/models/autocomplete-options-base.d.ts +0 -0
- package/dist/types/shared/models/button-options-base.d.ts +0 -0
- package/dist/types/shared/models/button-options.d.ts +0 -0
- package/dist/types/shared/models/field-options-base.d.ts +0 -0
- package/dist/types/shared/models/input-field-options-base.d.ts +0 -0
- package/dist/types/shared/models/input-mask-options-base.d.ts +0 -0
- package/dist/types/table/src/app/models/table-options.d.ts +0 -0
- package/dist/types/text-field/src/app/models/text-field-options.d.ts +0 -0
- package/dist/types/textarea-field/src/app/models/textarea-field-options.d.ts +0 -0
- package/dist/types/timepicker/src/app/models/timepicker-options.d.ts +0 -0
- package/dist/types/youtube-player/src/app/models/youtube-player-options.d.ts +0 -0
- package/package.json +2 -10
- package/types/index.d.ts +0 -14
- package/dist/picasso/3rdpartylicenses.txt +0 -399
- package/dist/picasso/favicon.ico +0 -0
- package/dist/picasso/main.js +0 -1
- package/dist/picasso/polyfills.js +0 -1
- package/dist/picasso/styles.css +0 -0
- package/dist/pivot-grid/3rdpartylicenses.txt +0 -418
- package/dist/pivot-grid/favicon.ico +0 -0
- package/dist/pivot-grid/main.js +0 -1
- package/dist/pivot-grid/polyfills.js +0 -1
- package/dist/pivot-grid/styles.css +0 -0
- package/dist/types/picasso/src/app/models/picasso-options.d.ts +0 -3
- package/dist/types/pivot-grid/src/app/models/pivot-grid-options.d.ts +0 -62
package/dist/picasso/main.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,(function(e){return t[e]}).bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}({0:function(t,e,n){t.exports=n("zUnb")},"4Xgz":function(t,e,n){"use strict";var r,i,s;"undefined"!=typeof window&&window,i=[n("MXs6")],void 0===(s="function"==typeof(r=function(t){var e=function(){var e,n={},r=[];function i(t){t||(t=document.documentElement);var e=window.getComputedStyle(t,null).fontSize;return parseFloat(e)||16}function s(t,e){var n=e.split(/\d/),r=n[n.length-1];switch(e=parseFloat(e),r){case"px":return e;case"em":return e*i(t);case"rem":return e*i();case"vw":return e*document.documentElement.clientWidth/100;case"vh":return e*document.documentElement.clientHeight/100;case"vmin":case"vmax":var s=document.documentElement.clientWidth/100,o=document.documentElement.clientHeight/100;return e*(0,Math["vmin"===r?"min":"max"])(s,o);default:return e}}function o(t,e){var r,i,o,a,l,c,u,h;this.element=t;var d=["min-width","min-height","max-width","max-height"];this.call=function(){for(r in o=function(t){if(!t.getBoundingClientRect)return{width:t.offsetWidth,height:t.offsetHeight};var e=t.getBoundingClientRect();return{width:Math.round(e.width),height:Math.round(e.height)}}(this.element),c={},n[e])n[e].hasOwnProperty(r)&&(a=s(this.element,(i=n[e][r]).value),l="width"===i.property?o.width:o.height,u="","min"===i.mode&&l>=a&&(u+=i.value),"max"===i.mode&&l<=a&&(u+=i.value),c[h=i.mode+"-"+i.property]||(c[h]=""),u&&-1===(" "+c[h]+" ").indexOf(" "+u+" ")&&(c[h]+=" "+u));for(var t in d)d.hasOwnProperty(t)&&(c[d[t]]?this.element.setAttribute(d[t],c[d[t]].substr(1)):this.element.removeAttribute(d[t]))}}function a(e,n){e.elementQueriesSetupInformation||(e.elementQueriesSetupInformation=new o(e,n)),e.elementQueriesSensor||(e.elementQueriesSensor=new t(e,(function(){e.elementQueriesSetupInformation.call()})))}function l(t,i,s,o){if(void 0===n[t]){n[t]=[];var a=r.length;e.innerHTML+="\n"+t+" {animation: 0.1s element-queries;}",e.innerHTML+="\n"+t+" > .resize-sensor {min-width: "+a+"px;}",r.push(t)}n[t].push({mode:i,property:s,value:o})}function c(t){var e;if(document.querySelectorAll&&(e=t?t.querySelectorAll.bind(t):document.querySelectorAll.bind(document)),e||"undefined"==typeof $$||(e=$$),e||"undefined"==typeof jQuery||(e=jQuery),!e)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return e}function u(e){var n=[],r=[],i=[],s=0,o=-1,a=[];for(var l in e.children)if(e.children.hasOwnProperty(l)&&e.children[l].tagName&&"img"===e.children[l].tagName.toLowerCase()){n.push(e.children[l]);var c=e.children[l].getAttribute("min-width")||e.children[l].getAttribute("data-min-width"),u=e.children[l].getAttribute("data-src")||e.children[l].getAttribute("url");i.push(u),r.push({minWidth:c}),c?e.children[l].style.display="none":(s=n.length-1,e.children[l].style.display="block")}function h(){var t,l=!1;for(t in n)n.hasOwnProperty(t)&&r[t].minWidth&&e.offsetWidth>r[t].minWidth&&(l=t);if(l||(l=s),o!==l)if(a[l])n[o].style.display="none",n[l].style.display="block",o=l;else{var c=new Image;c.onload=function(){n[l].src=i[l],n[o].style.display="none",n[l].style.display="block",a[l]=!0,o=l},c.src=i[l]}else n[l].src=i[l]}o=s,e.resizeSensorInstance=new t(e,h),h()}var h=/,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/gim,d=/\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/gim;function f(t){var e,n,r,i;for(t=t.replace(/'/g,'"');null!==(e=h.exec(t));)for(n=e[1]+e[3],r=e[2];null!==(i=d.exec(r));)l(n,i[1],i[2],i[3])}function p(t){var e="";if(t)if("string"==typeof t)-1===(t=t.toLowerCase()).indexOf("min-width")&&-1===t.indexOf("max-width")||f(t);else for(var n=0,r=t.length;n<r;n++)1===t[n].type?-1!==(e=t[n].selectorText||t[n].cssText).indexOf("min-height")||-1!==e.indexOf("max-height")?f(e):-1===e.indexOf("min-width")&&-1===e.indexOf("max-width")||f(e):4===t[n].type?p(t[n].cssRules||t[n].rules):3===t[n].type&&t[n].styleSheet.hasOwnProperty("cssRules")&&p(t[n].styleSheet.cssRules)}var y=!1;this.init=function(){var n="animationstart";void 0!==document.documentElement.style.webkitAnimationName?n="webkitAnimationStart":void 0!==document.documentElement.style.MozAnimationName?n="mozanimationstart":void 0!==document.documentElement.style.OAnimationName&&(n="oanimationstart"),document.body.addEventListener(n,(function(e){var n=e.target,i=n&&window.getComputedStyle(n,null),s=i&&i.getPropertyValue("animation-name");if(s&&-1!==s.indexOf("element-queries")){n.elementQueriesSensor=new t(n,(function(){n.elementQueriesSetupInformation&&n.elementQueriesSetupInformation.call()}));var o=window.getComputedStyle(n.resizeSensor,null).getPropertyValue("min-width");o=parseInt(o.replace("px","")),a(e.target,r[o])}})),y||((e=document.createElement("style")).type="text/css",e.innerHTML="[responsive-image] > img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}",e.innerHTML+="\n@keyframes element-queries { 0% { visibility: inherit; } }",document.getElementsByTagName("head")[0].appendChild(e),y=!0);for(var i=0,s=document.styleSheets.length;i<s;i++)try{document.styleSheets[i].href&&0===document.styleSheets[i].href.indexOf("file://")&&console.warn("CssElementQueries: unable to parse local css files, "+document.styleSheets[i].href),p(document.styleSheets[i].cssRules||document.styleSheets[i].rules||document.styleSheets[i].cssText)}catch(o){}!function(){for(var t=c()("[data-responsive-image],[responsive-image]"),e=0,n=t.length;e<n;e++)u(t[e])}()},this.findElementQueriesElements=function(t){!function(t){var e=c(t);for(var r in n)if(n.hasOwnProperty(r))for(var i=e(r,t),s=0,o=i.length;s<o;s++)a(i[s],r)}(t)},this.update=function(){this.init()}};return e.update=function(){e.instance.update()},e.detach=function(t){t.elementQueriesSetupInformation?(t.elementQueriesSensor.detach(),delete t.elementQueriesSetupInformation,delete t.elementQueriesSensor):t.resizeSensorInstance&&(t.resizeSensorInstance.detach(),delete t.resizeSensorInstance)},e.init=function(){e.instance||(e.instance=new e),e.instance.init()},e.findElementQueriesElements=function(t){e.instance.findElementQueriesElements(t)},e.listen=function(){!function(t){if(document.addEventListener)document.addEventListener("DOMContentLoaded",t,!1);else if(/KHTML|WebKit|iCab/i.test(navigator.userAgent))var e=setInterval((function(){/loaded|complete/i.test(document.readyState)&&(t(),clearInterval(e))}),10);else window.onload=t}(e.init)},e})?r.apply(e,i):r)||(t.exports=s)},"5vqC":function(t,e,n){t.exports={ResizeSensor:n("MXs6"),ElementQueries:n("4Xgz")}},MXs6:function(t,e,n){"use strict";var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){if("undefined"==typeof window)return null;var t="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||function(e){return t.setTimeout(e,20)},n=t.cancelAnimationFrame||t.mozCancelAnimationFrame||t.webkitCancelAnimationFrame||function(e){t.clearTimeout(e)};function r(t,e){var n=Object.prototype.toString.call(t),r="[object Array]"===n||"[object NodeList]"===n||"[object HTMLCollection]"===n||"[object Object]"===n||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements,i=0,s=t.length;if(r)for(;i<s;i++)e(t[i]);else e(t)}function i(t){if(!t.getBoundingClientRect)return{width:t.offsetWidth,height:t.offsetHeight};var e=t.getBoundingClientRect();return{width:Math.round(e.width),height:Math.round(e.height)}}function s(t,e){Object.keys(e).forEach((function(n){t.style[n]=e[n]}))}var o=function(t,a){var l=0;function c(){var t,e,n=[];this.add=function(t){n.push(t)},this.call=function(r){for(t=0,e=n.length;t<e;t++)n[t].call(this,r)},this.remove=function(r){var i=[];for(t=0,e=n.length;t<e;t++)n[t]!==r&&i.push(n[t]);n=i},this.length=function(){return n.length}}r(t,(function(t){!function(t,n){if(t)if(t.resizedAttached)t.resizedAttached.add(n);else{t.resizedAttached=new c,t.resizedAttached.add(n),t.resizeSensor=document.createElement("div"),t.resizeSensor.dir="ltr",t.resizeSensor.className="resize-sensor";var r={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},o={position:"absolute",left:"0px",top:"0px",transition:"0s"};s(t.resizeSensor,r);var a=document.createElement("div");a.className="resize-sensor-expand",s(a,r);var u=document.createElement("div");s(u,o),a.appendChild(u);var h=document.createElement("div");h.className="resize-sensor-shrink",s(h,r);var d=document.createElement("div");s(d,o),s(d,{width:"200%",height:"200%"}),h.appendChild(d),t.resizeSensor.appendChild(a),t.resizeSensor.appendChild(h),t.appendChild(t.resizeSensor);var f=window.getComputedStyle(t),p=f?f.getPropertyValue("position"):null;"absolute"!==p&&"relative"!==p&&"fixed"!==p&&"sticky"!==p&&(t.style.position="relative");var y=!1,g=0,m=i(t),v=0,x=0,b=!0;l=0;var _=function(){if(b){if(0===t.offsetWidth&&0===t.offsetHeight)return void(l||(l=e((function(){l=0,_()}))));b=!1}var n,r;r=t.offsetHeight,u.style.width=(n=t.offsetWidth)+10+"px",u.style.height=r+10+"px",a.scrollLeft=n+10,a.scrollTop=r+10,h.scrollLeft=n+10,h.scrollTop=r+10};t.resizeSensor.resetSensor=_;var w=function(){g=0,y&&(v=m.width,x=m.height,t.resizedAttached&&t.resizedAttached.call(m))},k=function(){m=i(t),(y=m.width!==v||m.height!==x)&&!g&&(g=e(w)),_()},S=function(t,e,n){t.attachEvent?t.attachEvent("on"+e,n):t.addEventListener(e,n)};S(a,"scroll",k),S(h,"scroll",k),l=e((function(){l=0,_()}))}}(t,a)})),this.detach=function(e){l||(n(l),l=0),o.detach(t,e)},this.reset=function(){t.resizeSensor.resetSensor()}};if(o.reset=function(t){r(t,(function(t){t.resizeSensor.resetSensor()}))},o.detach=function(t,e){r(t,(function(t){t&&(t.resizedAttached&&"function"==typeof e&&(t.resizedAttached.remove(e),t.resizedAttached.length())||t.resizeSensor&&(t.contains(t.resizeSensor)&&t.removeChild(t.resizeSensor),delete t.resizeSensor,delete t.resizedAttached))}))},"undefined"!=typeof MutationObserver){var a=new MutationObserver((function(t){for(var e in t)if(t.hasOwnProperty(e))for(var n=t[e].addedNodes,r=0;r<n.length;r++)n[r].resizeSensor&&o.reset(n[r])}));document.addEventListener("DOMContentLoaded",(function(t){a.observe(document.body,{childList:!0,subtree:!0})}))}return o})?r.call(e,n,e,t):r)||(t.exports=i)},zUnb:function(t,e,n){"use strict";function r(t){return"function"==typeof t}n.r(e);let i=!1;const s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else i&&console.log("RxJS: Back to a better error behavior. Thank you. <3");i=t},get useDeprecatedSynchronousErrorHandling(){return i}};function o(t){setTimeout(()=>{throw t},0)}const a={closed:!0,next(t){},error(t){if(s.useDeprecatedSynchronousErrorHandling)throw t;o(t)},complete(){}},l=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))();function c(t){return null!==t&&"object"==typeof t}const u=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let h=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:i,_unsubscribe:s,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;t<n.length;++t)n[t].remove(this);if(r(s)){i&&(this._unsubscribe=void 0);try{s.call(this)}catch(a){e=a instanceof u?d(a.errors):[a]}}if(l(o)){let t=-1,n=o.length;for(;++t<n;){const n=o[t];if(c(n))try{n.unsubscribe()}catch(a){e=e||[],a instanceof u?e=e.concat(d(a.errors)):e.push(a)}}}if(e)throw new u(e)}add(e){let n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){const e=n;n=new t,n._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:r}=n;if(null===r)n._parentOrParents=this;else if(r instanceof t){if(r===this)return n;n._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return n;r.push(this)}const i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n}remove(t){const e=this._subscriptions;if(e){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}}return t.EMPTY=function(t){return t.closed=!0,t}(new t),t})();function d(t){return t.reduce((t,e)=>t.concat(e instanceof u?e.errors:e),[])}const f=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())();class p extends h{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a;break;case 1:if(!t){this.destination=a;break}if("object"==typeof t){t instanceof p?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new y(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new y(this,t,e,n)}}[f](){return this}static create(t,e,n){const r=new p(t,e,n);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class y extends p{constructor(t,e,n,i){let s;super(),this._parentSubscriber=t;let o=this;r(e)?s=e:e&&(s=e.next,n=e.error,i=e.complete,e!==a&&(o=Object.create(e),r(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=s,this._error=n,this._complete=i}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=s;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):o(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;o(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw n;o(n)}}__tryOrSetError(t,e,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return s.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(o(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const g=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")();function m(t){return t}let v=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:r}=this,i=function(t,e,n){if(t){if(t instanceof p)return t;if(t[f])return t[f]()}return t||e||n?new p(t,e,n):new p(a)}(t,e,n);if(i.add(r?r.call(i,this.source):this.source||s.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i}_trySubscribe(t){try{return this._subscribe(t)}catch(e){s.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:r}=t;if(e||r)return!1;t=n&&n instanceof p?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=x(e))((e,n)=>{let r;r=this.subscribe(e=>{try{t(e)}catch(i){n(i),r&&r.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[g](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?m:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=x(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function x(t){if(t||(t=s.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const b=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class _ extends h{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class w extends p{constructor(t){super(t),this.destination=t}}let k=(()=>{class t extends v{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[f](){return new w(this)}lift(t){const e=new S(this,this);return e.operator=t,e}next(t){if(this.closed)throw new b;if(!this.isStopped){const{observers:e}=this,n=e.length,r=e.slice();for(let i=0;i<n;i++)r[i].next(t)}}error(t){if(this.closed)throw new b;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,n=e.length,r=e.slice();for(let i=0;i<n;i++)r[i].error(t);this.observers.length=0}complete(){if(this.closed)throw new b;this.isStopped=!0;const{observers:t}=this,e=t.length,n=t.slice();for(let r=0;r<e;r++)n[r].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new b;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new b;return this.hasError?(t.error(this.thrownError),h.EMPTY):this.isStopped?(t.complete(),h.EMPTY):(this.observers.push(t),new _(this,t))}asObservable(){const t=new v;return t.source=this,t}}return t.create=(t,e)=>new S(t,e),t})();class S extends k{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):h.EMPTY}}function M(t){return t&&"function"==typeof t.schedule}function E(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new C(t,e))}}class C{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new T(t,this.project,this.thisArg))}}class T extends p{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}const A=t=>e=>{for(let n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()};function N(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}const R=N(),O=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function I(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const P=t=>{if(t&&"function"==typeof t[g])return r=t,t=>{const e=r[g]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(O(t))return A(t);if(I(t))return n=t,t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,o),t);if(t&&"function"==typeof t[R])return e=t,t=>{const n=e[R]();for(;;){let e;try{e=n.next()}catch(r){return t.error(r),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=c(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n,r};function D(t,e){return new v(n=>{const r=new h;let i=0;return r.add(e.schedule((function(){i!==t.length?(n.next(t[i++]),n.closed||r.add(this.schedule())):n.complete()}))),r})}function j(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[g]}(t))return function(t,e){return new v(n=>{const r=new h;return r.add(e.schedule(()=>{const i=t[g]();r.add(i.subscribe({next(t){r.add(e.schedule(()=>n.next(t)))},error(t){r.add(e.schedule(()=>n.error(t)))},complete(){r.add(e.schedule(()=>n.complete()))}}))})),r})}(t,e);if(I(t))return function(t,e){return new v(n=>{const r=new h;return r.add(e.schedule(()=>t.then(t=>{r.add(e.schedule(()=>{n.next(t),r.add(e.schedule(()=>n.complete()))}))},t=>{r.add(e.schedule(()=>n.error(t)))}))),r})}(t,e);if(O(t))return D(t,e);if(function(t){return t&&"function"==typeof t[R]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new v(n=>{const r=new h;let i;return r.add(()=>{i&&"function"==typeof i.return&&i.return()}),r.add(e.schedule(()=>{i=t[R](),r.add(e.schedule((function(){if(n.closed)return;let t,e;try{const n=i.next();t=n.value,e=n.done}catch(r){return void n.error(r)}e?n.complete():(n.next(t),this.schedule())})))})),r})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof v?t:new v(P(t))}class F extends p{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class z extends p{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function q(t,e){if(!e.closed)return t instanceof v?t.subscribe(e):P(t)(e)}class L{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new B(t,this.project,this.concurrent))}}class B extends z{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this.active++,this._innerSub(e)}_innerSub(t){const e=new F(this),n=this.destination;n.add(e);const r=q(t,e);r!==e&&n.add(r)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyComplete(){const t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function H(t,e){return e?D(t,e):new v(A(t))}function V(...t){let e=Number.POSITIVE_INFINITY,n=null,r=t[t.length-1];return M(r)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof r&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof v?t[0]:function(t=Number.POSITIVE_INFINITY){return function t(e,n,r=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(t((t,r)=>j(e(t,r)).pipe(E((e,i)=>n(t,e,r,i))),r)):("number"==typeof n&&(r=n),t=>t.lift(new L(e,r)))}(m,t)}(e)(H(t,n))}function W(){return function(t){return t.lift(new $(t))}}class ${constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const r=new U(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i}}class U extends p{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}class Y extends v{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new h,t.add(this.source.subscribe(new K(this.getSubject(),this))),t.closed&&(this._connection=null,t=h.EMPTY)),t}refCount(){return W()(this)}}const Q=(()=>{const t=Y.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class K extends w{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function Z(){return new k}function X(t){return{toString:t}.toString()}const G="__parameters__";function J(t,e,n){return X(()=>{const r=function(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}(e);function i(...t){if(this instanceof i)return r.apply(this,t),this;const e=new i(...t);return n.annotation=e,n;function n(t,n,r){const i=t.hasOwnProperty(G)?t[G]:Object.defineProperty(t,G,{value:[]})[G];for(;i.length<=r;)i.push(null);return(i[r]=i[r]||[]).push(e),t}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i})}const tt=J("Inject",t=>({token:t})),et=J("Optional"),nt=J("Self"),rt=J("SkipSelf");var it=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function st(t){for(let e in t)if(t[e]===st)return e;throw Error("Could not find renamed property on target object.")}function ot(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function at(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function lt(t){return ct(t,t[ht])||ct(t,t[pt])}function ct(t,e){return e&&e.token===t?e:null}function ut(t){return t&&(t.hasOwnProperty(dt)||t.hasOwnProperty(yt))?t[dt]:null}const ht=st({"\u0275prov":st}),dt=st({"\u0275inj":st}),ft=st({"\u0275provFallback":st}),pt=st({ngInjectableDef:st}),yt=st({ngInjectorDef:st});function gt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(gt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function mt(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const vt=st({__forward_ref__:st});function xt(t){return t.__forward_ref__=xt,t.toString=function(){return gt(this())},t}function bt(t){return"function"==typeof(e=t)&&e.hasOwnProperty(vt)&&e.__forward_ref__===xt?t():t;var e}const _t="undefined"!=typeof globalThis&&globalThis,wt="undefined"!=typeof window&&window,kt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,St="undefined"!=typeof global&&global,Mt=_t||St||wt||kt,Et=st({"\u0275cmp":st}),Ct=st({"\u0275dir":st}),Tt=st({"\u0275pipe":st}),At=st({"\u0275mod":st}),Nt=st({"\u0275loc":st}),Rt=st({"\u0275fac":st}),Ot=st({__NG_ELEMENT_ID__:st});class It{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ot({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return"InjectionToken "+this._desc}}const Pt=new It("INJECTOR",-1),Dt={},jt=/\n/gm,Ft="__source",zt=st({provide:String,useValue:st});let qt,Lt=void 0;function Bt(t){const e=Lt;return Lt=t,e}function Ht(t){const e=qt;return qt=t,e}function Vt(t,e=it.Default){if(void 0===Lt)throw new Error("inject() must be called from an injection context");return null===Lt?$t(t,void 0,e):Lt.get(t,e&it.Optional?null:void 0,e)}function Wt(t,e=it.Default){return(qt||Vt)(bt(t),e)}function $t(t,e,n){const r=lt(t);if(r&&"root"==r.providedIn)return void 0===r.value?r.value=r.factory():r.value;if(n&it.Optional)return null;if(void 0!==e)return e;throw new Error(`Injector: NOT_FOUND [${gt(t)}]`)}function Ut(t){const e=[];for(let n=0;n<t.length;n++){const r=bt(t[n]);if(Array.isArray(r)){if(0===r.length)throw new Error("Arguments array must have arguments.");let t=void 0,n=it.Default;for(let e=0;e<r.length;e++){const i=r[e];i instanceof et||"Optional"===i.ngMetadataName||i===et?n|=it.Optional:i instanceof rt||"SkipSelf"===i.ngMetadataName||i===rt?n|=it.SkipSelf:i instanceof nt||"Self"===i.ngMetadataName||i===nt?n|=it.Self:t=i instanceof tt||i===tt?i.token:i}e.push(Wt(t,n))}else e.push(Wt(r))}return e}class Yt{get(t,e=Dt){if(e===Dt){const e=new Error(`NullInjectorError: No provider for ${gt(t)}!`);throw e.name="NullInjectorError",e}return e}}class Qt{}function Kt(t,e){t.forEach(t=>Array.isArray(t)?Kt(t,e):e(t))}function Zt(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function Xt(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}var Gt=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),Jt=function(t){return t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({});const te={},ee=[];let ne=0;function re(t){return X(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===Gt.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||ee,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||Jt.Emulated,id:"c",styles:t.styles||ee,_:null,setInput:null,schemas:t.schemas||null,tView:null},r=t.directives,i=t.features,s=t.pipes;return n.id+=ne++,n.inputs=le(t.inputs,e),n.outputs=le(t.outputs),i&&i.forEach(t=>t(n)),n.directiveDefs=r?()=>("function"==typeof r?r():r).map(ie):null,n.pipeDefs=s?()=>("function"==typeof s?s():s).map(se):null,n})}function ie(t){return ue(t)||function(t){return t[Ct]||null}(t)}function se(t){return function(t){return t[Tt]||null}(t)}const oe={};function ae(t){const e={type:t.type,bootstrap:t.bootstrap||ee,declarations:t.declarations||ee,imports:t.imports||ee,exports:t.exports||ee,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&X(()=>{oe[t.id]=t.type}),e}function le(t,e){if(null==t)return te;const n={};for(const r in t)if(t.hasOwnProperty(r)){let i=t[r],s=i;Array.isArray(i)&&(s=i[1],i=i[0]),n[i]=r,e&&(e[i]=s)}return n}const ce=re;function ue(t){return t[Et]||null}function he(t,e){return t.hasOwnProperty(Rt)?t[Rt]:null}function de(t,e){const n=t[At]||null;if(!n&&!0===e)throw new Error(`Type ${gt(t)} does not have '\u0275mod' property.`);return n}const fe=20,pe=10;function ye(t){return Array.isArray(t)&&"object"==typeof t[1]}function ge(t){return Array.isArray(t)&&!0===t[1]}function me(t){return 0!=(8&t.flags)}function ve(t){return 1==(1&t.flags)}function xe(t){return null!==t.template}function be(t){return 0!=(512&t[2])}class _e{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function we(){return ke}function ke(t){return t.type.prototype.ngOnChanges&&(t.setInput=Me),Se}function Se(){const t=Ee(this),e=null==t?void 0:t.current;if(e){const n=t.previous;if(n===te)t.previous=e;else for(let t in e)n[t]=e[t];t.current=null,this.ngOnChanges(e)}}function Me(t,e,n,r){const i=Ee(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:te,current:null}),s=i.current||(i.current={}),o=i.previous,a=this.declaredInputs[n],l=o[a];s[a]=new _e(l&&l.currentValue,e,o===te),t[r]=e}function Ee(t){return t.__ngSimpleChanges__||null}we.ngInherit=!0;let Ce=void 0;function Te(t){return!!t.listen}const Ae={createRenderer:(t,e)=>void 0!==Ce?Ce:"undefined"!=typeof document?document:void 0};function Ne(t){for(;Array.isArray(t);)t=t[0];return t}function Re(t,e){return Ne(e[t.index])}function Oe(t,e){const n=e[t];return ye(n)?n:n[0]}function Ie(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function Pe(t){return 4==(4&t[2])}function De(t){return 128==(128&t[2])}function je(t,e){return null===t||null==e?null:t[e]}function Fe(t){t[18]=0}function ze(t,e){t[5]+=e;let n=t,r=t[3];for(;null!==r&&(1===e&&1===n[5]||-1===e&&0===n[5]);)r[5]+=e,n=r,r=r[3]}const qe={lFrame:en(null),bindingsEnabled:!0,checkNoChangesMode:!1};function Le(){return qe.bindingsEnabled}function Be(){return qe.lFrame.lView}function He(){return qe.lFrame.tView}function Ve(){return qe.lFrame.previousOrParentTNode}function We(t,e){qe.lFrame.previousOrParentTNode=t,qe.lFrame.isParent=e}function $e(){return qe.lFrame.isParent}function Ue(){return qe.checkNoChangesMode}function Ye(t){qe.checkNoChangesMode=t}function Qe(t,e){const n=qe.lFrame;n.bindingIndex=n.bindingRootIndex=t,Ke(e)}function Ke(t){qe.lFrame.currentDirectiveIndex=t}function Ze(){return qe.lFrame.currentQueryIndex}function Xe(t){qe.lFrame.currentQueryIndex=t}function Ge(t,e){const n=tn();qe.lFrame=n,n.previousOrParentTNode=e,n.lView=t}function Je(t,e){const n=tn(),r=t[1];qe.lFrame=n,n.previousOrParentTNode=e,n.lView=t,n.tView=r,n.contextLView=t,n.bindingIndex=r.bindingStartIndex}function tn(){const t=qe.lFrame,e=null===t?null:t.child;return null===e?en(t):e}function en(t){const e={previousOrParentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null};return null!==t&&(t.child=e),e}function nn(){const t=qe.lFrame;return qe.lFrame=t.parent,t.previousOrParentTNode=null,t.lView=null,t}const rn=nn;function sn(){const t=nn();t.isParent=!0,t.tView=null,t.selectedIndex=0,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function on(t){qe.lFrame.selectedIndex=t}function an(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n<r;n++){const e=t.data[n].type.prototype,{ngAfterContentInit:r,ngAfterContentChecked:i,ngAfterViewInit:s,ngAfterViewChecked:o,ngOnDestroy:a}=e;r&&(t.contentHooks||(t.contentHooks=[])).push(-n,r),i&&((t.contentHooks||(t.contentHooks=[])).push(n,i),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(n,i)),s&&(t.viewHooks||(t.viewHooks=[])).push(-n,s),o&&((t.viewHooks||(t.viewHooks=[])).push(n,o),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(n,o)),null!=a&&(t.destroyHooks||(t.destroyHooks=[])).push(n,a)}}function ln(t,e,n){hn(t,e,3,n)}function cn(t,e,n,r){(3&t[2])===n&&hn(t,e,n,r)}function un(t,e){let n=t[2];(3&n)===e&&(n&=2047,n+=1,t[2]=n)}function hn(t,e,n,r){const i=null!=r?r:-1;let s=0;for(let o=void 0!==r?65535&t[18]:0;o<e.length;o++)if("number"==typeof e[o+1]){if(s=e[o],null!=r&&s>=r)break}else e[o]<0&&(t[18]+=65536),(s<i||-1==i)&&(dn(t,n,e,o),t[18]=(4294901760&t[18])+o+2),o++}function dn(t,e,n,r){const i=n[r]<0,s=n[r+1],o=t[i?-n[r]:n[r]];i?t[2]>>11<t[18]>>16&&(3&t[2])===e&&(t[2]+=2048,s.call(o)):s.call(o)}class fn{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function pn(t,e,n){const r=Te(t);let i=0;for(;i<n.length;){const s=n[i];if("number"==typeof s){if(0!==s)break;i++;const o=n[i++],a=n[i++],l=n[i++];r?t.setAttribute(e,a,l,o):e.setAttributeNS(o,a,l)}else{const o=s,a=n[++i];64===o.charCodeAt(0)?r&&t.setProperty(e,o,a):r?t.setAttribute(e,o,a):e.setAttribute(o,a),i++}}return i}function yn(t,e){if(null===e||0===e.length);else if(null===t||0===t.length)t=e.slice();else{let n=-1;for(let r=0;r<e.length;r++){const i=e[r];"number"==typeof i?n=i:0===n||gn(t,n,i,null,-1===n||2===n?e[++r]:null)}}return t}function gn(t,e,n,r,i){let s=0,o=t.length;if(-1===e)o=-1;else for(;s<t.length;){const n=t[s++];if("number"==typeof n){if(n===e){o=-1;break}if(n>e){o=s-1;break}}}for(;s<t.length;){const e=t[s];if("number"==typeof e)break;if(e===n){if(null===r)return void(null!==i&&(t[s+1]=i));if(r===t[s+1])return void(t[s+2]=i)}s++,null!==r&&s++,null!==i&&s++}-1!==o&&(t.splice(o,0,e),s=o+1),t.splice(s++,0,n),null!==r&&t.splice(s++,0,r),null!==i&&t.splice(s++,0,i)}function mn(t){return-1!==t}function vn(t){return 32767&t}function xn(t){return t>>16}function bn(t,e){let n=xn(t),r=e;for(;n>0;)r=r[15],n--;return r}function _n(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():function(t){return"string"==typeof t?t:null==t?"":""+t}(t)}const wn=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Mt))();function kn(t){return t instanceof Function?t():t}let Sn=!0;function Mn(t){const e=Sn;return Sn=t,e}let En=0;function Cn(t,e){const n=An(t,e);if(-1!==n)return n;const r=e[1];r.firstCreatePass&&(t.injectorIndex=e.length,Tn(r.data,t),Tn(e,null),Tn(r.blueprint,null));const i=Nn(t,e),s=t.injectorIndex;if(mn(i)){const t=vn(i),n=bn(i,e),r=n[1].data;for(let i=0;i<8;i++)e[s+i]=n[t+i]|r[t+i]}return e[s+8]=i,s}function Tn(t,e){t.push(0,0,0,0,0,0,0,0,e)}function An(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null==e[t.injectorIndex+8]?-1:t.injectorIndex}function Nn(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=e[6],r=1;for(;n&&-1===n.injectorIndex;)n=(e=e[15])?e[6]:null,r++;return n?n.injectorIndex|r<<16:-1}function Rn(t,e,n){!function(t,e,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(Ot)&&(r=n[Ot]),null==r&&(r=n[Ot]=En++);const i=255&r,s=1<<i,o=64&i,a=32&i,l=e.data;128&i?o?a?l[t+7]|=s:l[t+6]|=s:a?l[t+5]|=s:l[t+4]|=s:o?a?l[t+3]|=s:l[t+2]|=s:a?l[t+1]|=s:l[t]|=s}(t,e,n)}function On(t,e,n,r=it.Default,i){if(null!==t){const i=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(Ot)?t[Ot]:void 0;return"number"==typeof e&&e>0?255&e:e}(n);if("function"==typeof i){Ge(e,t);try{const t=i();if(null!=t||r&it.Optional)return t;throw new Error(`No provider for ${_n(n)}!`)}finally{rn()}}else if("number"==typeof i){if(-1===i)return new qn(t,e);let s=null,o=An(t,e),a=-1,l=r&it.Host?e[16][6]:null;for((-1===o||r&it.SkipSelf)&&(a=-1===o?Nn(t,e):e[o+8],zn(r,!1)?(s=e[1],o=vn(a),e=bn(a,e)):o=-1);-1!==o;){a=e[o+8];const t=e[1];if(Fn(i,o,t.data)){const t=Pn(o,e,n,s,r,l);if(t!==In)return t}zn(r,e[1].data[o+8]===l)&&Fn(i,o,e)?(s=t,o=vn(a),e=bn(a,e)):o=-1}}}if(r&it.Optional&&void 0===i&&(i=null),0==(r&(it.Self|it.Host))){const t=e[9],s=Ht(void 0);try{return t?t.get(n,i,r&it.Optional):$t(n,i,r&it.Optional)}finally{Ht(s)}}if(r&it.Optional)return i;throw new Error(`NodeInjector: NOT_FOUND [${_n(n)}]`)}const In={};function Pn(t,e,n,r,i,s){const o=e[1],a=o.data[t+8],l=Dn(a,o,n,null==r?function(t){return 2==(2&t.flags)}(a)&&Sn:r!=o&&3===a.type,i&it.Host&&s===a);return null!==l?jn(e,o,l,a):In}function Dn(t,e,n,r,i){const s=t.providerIndexes,o=e.data,a=1048575&s,l=t.directiveStart,c=s>>20,u=i?a+c:t.directiveEnd;for(let h=r?a:a+c;h<u;h++){const t=o[h];if(h<l&&n===t||h>=l&&t.type===n)return h}if(i){const t=o[l];if(t&&xe(t)&&t.type===n)return l}return null}function jn(t,e,n,r){let i=t[n];const s=e.data;if(i instanceof fn){const o=i;if(o.resolving)throw new Error("Circular dep for "+_n(s[n]));const a=Mn(o.canSeeViewProviders);let l;o.resolving=!0,o.injectImpl&&(l=Ht(o.injectImpl)),Ge(t,r);try{i=t[n]=o.factory(void 0,s,t,r),e.firstCreatePass&&n>=r.directiveStart&&function(t,e,n){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=e.type.prototype;if(r){const r=ke(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,r),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,r)}i&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,i),s&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,s))}(n,s[n],e)}finally{o.injectImpl&&Ht(l),Mn(a),o.resolving=!1,rn()}}return i}function Fn(t,e,n){const r=64&t,i=32&t;let s;return s=128&t?r?i?n[e+7]:n[e+6]:i?n[e+5]:n[e+4]:r?i?n[e+3]:n[e+2]:i?n[e+1]:n[e],!!(s&1<<t)}function zn(t,e){return!(t&it.Self||t&it.Host&&e)}class qn{constructor(t,e){this._tNode=t,this._lView=e}get(t,e){return On(this._tNode,this._lView,t,void 0,e)}}function Ln(t){return t.ngDebugContext}function Bn(t){return t.ngOriginalError}function Hn(t,...e){t.error(...e)}class Vn{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),r=function(t){return t.ngErrorLogger||Hn}(t);r(this._console,"ERROR",t),e&&r(this._console,"ORIGINAL ERROR",e),n&&r(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?Ln(t)?Ln(t):this._findContext(Bn(t)):null}_findOriginalError(t){let e=Bn(t);for(;e&&Bn(e);)e=Bn(e);return e}}let Wn=!0,$n=!1;function Un(){return $n=!0,Wn}function Yn(t,e){t.__ngContext__=e}function Qn(t){throw new Error("Multiple components match node with tagname "+t.tagName)}function Kn(){throw new Error("Cannot mix multi providers and regular providers")}function Zn(t,e,n){let r=t.length;for(;;){const i=t.indexOf(e,n);if(-1===i)return i;if(0===i||t.charCodeAt(i-1)<=32){const n=e.length;if(i+n===r||t.charCodeAt(i+n)<=32)return i}n=i+1}}const Xn="ng-template";function Gn(t,e,n){let r=0;for(;r<t.length;){let i=t[r++];if(n&&"class"===i){if(i=t[r],-1!==Zn(i.toLowerCase(),e,0))return!0}else if(1===i){for(;r<t.length&&"string"==typeof(i=t[r++]);)if(i.toLowerCase()===e)return!0;return!1}}return!1}function Jn(t){return 0===t.type&&t.tagName!==Xn}function tr(t,e,n){return e===(0!==t.type||n?t.tagName:Xn)}function er(t,e,n){let r=4;const i=t.attrs||[],s=function(t){for(let n=0;n<t.length;n++)if(3===(e=t[n])||4===e||6===e)return n;var e;return t.length}(i);let o=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!o)if(4&r){if(r=2|1&r,""!==l&&!tr(t,l,n)||""===l&&1===e.length){if(nr(r))return!1;o=!0}}else{const c=8&r?l:e[++a];if(8&r&&null!==t.attrs){if(!Gn(t.attrs,c,n)){if(nr(r))return!1;o=!0}continue}const u=rr(8&r?"class":l,i,Jn(t),n);if(-1===u){if(nr(r))return!1;o=!0;continue}if(""!==c){let t;t=u>s?"":i[u+1].toLowerCase();const e=8&r?t:null;if(e&&-1!==Zn(e,c,0)||2&r&&c!==t){if(nr(r))return!1;o=!0}}}}else{if(!o&&!nr(r)&&!nr(l))return!1;if(o&&nr(l))continue;o=!1,r=l|1&r}}return nr(r)||o}function nr(t){return 0==(1&t)}function rr(t,e,n,r){if(null===e)return-1;let i=0;if(r||!n){let n=!1;for(;i<e.length;){const r=e[i];if(r===t)return i;if(3===r||6===r)n=!0;else{if(1===r||2===r){let t=e[++i];for(;"string"==typeof t;)t=e[++i];continue}if(4===r)break;if(0===r){i+=4;continue}}i+=n?1:2}return-1}return function(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){const r=t[n];if("number"==typeof r)return-1;if(r===e)return n;n++}return-1}(e,t)}function ir(t,e,n=!1){for(let r=0;r<e.length;r++)if(er(t,e[r],n))return!0;return!1}function sr(t,e){return t?":not("+e.trim()+")":e}function or(t){let e=t[0],n=1,r=2,i="",s=!1;for(;n<t.length;){let o=t[n];if("string"==typeof o)if(2&r){const e=t[++n];i+="["+o+(e.length>0?'="'+e+'"':"")+"]"}else 8&r?i+="."+o:4&r&&(i+=" "+o);else""===i||nr(o)||(e+=sr(s,i),i=""),r=o,s=s||!nr(r);n++}return""!==i&&(e+=sr(s,i)),e}const ar={};function lr(t){const e=t[3];return ge(e)?e[3]:e}function cr(t){return hr(t[13])}function ur(t){return hr(t[4])}function hr(t){for(;null!==t&&!ge(t);)t=t[4];return t}function dr(t,e){const n=t.contentQueries;if(null!==n)for(let r=0;r<n.length;r+=2){const i=n[r],s=n[r+1];if(-1!==s){const n=t.data[s];Xe(i),n.contentQueries(2,e[s],s)}}}function fr(t,e,n){return Te(e)?e.createElement(t,n):null===n?e.createElement(t):e.createElementNS(n,t)}function pr(t,e,n,r,i,s,o,a,l,c){const u=e.blueprint.slice();return u[0]=i,u[2]=140|r,Fe(u),u[3]=u[15]=t,u[8]=n,u[10]=o||t&&t[10],u[11]=a||t&&t[11],u[12]=l||t&&t[12]||null,u[9]=c||t&&t[9]||null,u[6]=s,u[16]=2==e.type?t[16]:u,u}function yr(t,e,n,r,i,s){const o=n+fe,a=t.data[o]||function(t,e,n,r,i,s){const o=Ve(),a=$e(),l=a?o:o&&o.parent,c=t.data[n]=kr(0,l&&l!==e?l:null,r,n,i,s);return null===t.firstChild&&(t.firstChild=c),o&&(!a||null!=o.child||null===c.parent&&2!==o.type?a||(o.next=c):o.child=c),c}(t,e,o,r,i,s);return We(a,!0),a}function gr(t,e,n){Je(e,e[6]);try{const r=t.viewQuery;null!==r&&Hr(1,r,n);const i=t.template;null!==i&&xr(t,e,i,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&dr(t,e),t.staticViewQueries&&Hr(2,t.viewQuery,n);const s=t.components;null!==s&&function(t,e){for(let n=0;n<e.length;n++)Fr(t,e[n])}(e,s)}catch(r){throw t.firstCreatePass&&(t.incompleteFirstPass=!0),r}finally{e[2]&=-5,sn()}}function mr(t,e,n,r){const i=e[2];if(256==(256&i))return;Je(e,e[6]);const s=Ue();try{Fe(e),qe.lFrame.bindingIndex=t.bindingStartIndex,null!==n&&xr(t,e,n,2,r);const o=3==(3&i);if(!s)if(o){const n=t.preOrderCheckHooks;null!==n&&ln(e,n,null)}else{const n=t.preOrderHooks;null!==n&&cn(e,n,0,null),un(e,0)}if(function(t){for(let e=cr(t);null!==e;e=ur(e)){if(!e[2])continue;const t=e[9];for(let e=0;e<t.length;e++){const n=t[e],r=n[3];0==(1024&n[2])&&ze(r,1),n[2]|=1024}}}(e),function(t){for(let e=cr(t);null!==e;e=ur(e))for(let t=pe;t<e.length;t++){const n=e[t],r=n[1];De(n)&&mr(r,n,r.template,n[8])}}(e),null!==t.contentQueries&&dr(t,e),!s)if(o){const n=t.contentCheckHooks;null!==n&&ln(e,n)}else{const n=t.contentHooks;null!==n&&cn(e,n,1),un(e,1)}!function(t,e){try{const n=t.expandoInstructions;if(null!==n){let r=t.expandoStartIndex,i=-1,s=-1;for(let t=0;t<n.length;t++){const o=n[t];"number"==typeof o?o<=0?(s=0-o,on(s),r+=9+n[++t],i=r):r+=o:(null!==o&&(Qe(r,i),o(2,e[i])),i++)}}}finally{on(-1)}}(t,e);const a=t.components;null!==a&&function(t,e){for(let n=0;n<e.length;n++)jr(t,e[n])}(e,a);const l=t.viewQuery;if(null!==l&&Hr(2,l,r),!s)if(o){const n=t.viewCheckHooks;null!==n&&ln(e,n)}else{const n=t.viewHooks;null!==n&&cn(e,n,2),un(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),s||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,ze(e[3],-1))}finally{sn()}}function vr(t,e,n,r){const i=e[10],s=!Ue(),o=Pe(e);try{s&&!o&&i.begin&&i.begin(),o&&gr(t,e,r),mr(t,e,n,r)}finally{s&&!o&&i.end&&i.end()}}function xr(t,e,n,r,i){const s=qe.lFrame.selectedIndex;try{on(-1),2&r&&e.length>fe&&function(t,e,n,r){if(!r)if(3==(3&e[2])){const n=t.preOrderCheckHooks;null!==n&&ln(e,n,0)}else{const n=t.preOrderHooks;null!==n&&cn(e,n,0,0)}on(0)}(t,e,0,Ue()),n(r,i)}finally{on(s)}}function br(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=_r(1,-1,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function _r(t,e,n,r,i,s,o,a,l,c){const u=fe+r,h=u+i,d=function(t,e){const n=[];for(let r=0;r<e;r++)n.push(r<t?null:ar);return n}(u,h),f="function"==typeof c?c():c;return d[1]={type:t,id:e,blueprint:d,template:n,queries:null,viewQuery:a,node:null,data:d.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:h,expandoInstructions:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:f,incompleteFirstPass:!1}}function wr(t,e,n,r){const i=Wr(e);i.push(n),t.firstCreatePass&&function(t){return t.cleanup||(t.cleanup=[])}(t).push(r,i.length-1)}function kr(t,e,n,r,i,s){return{type:n,index:r,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,tagName:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Sr(t,e,n){for(let r in t)if(t.hasOwnProperty(r)){const i=t[r];(n=null===n?{}:n).hasOwnProperty(r)?n[r].push(e,i):n[r]=[e,i]}return n}function Mr(t,e){const n=t.expandoInstructions;n.push(e.hostBindings),0!==e.hostVars&&n.push(e.hostVars)}function Er(t,e,n){for(let r=0;r<n;r++)e.push(ar),t.blueprint.push(ar),t.data.push(null)}function Cr(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function Tr(t,e,n){const r=fe-e.index,i=t.data.length-(1048575&e.providerIndexes);(t.expandoInstructions||(t.expandoInstructions=[])).push(r,i,n)}function Ar(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function Nr(t,e,n){if(n){if(e.exportAs)for(let r=0;r<e.exportAs.length;r++)n[e.exportAs[r]]=t;xe(e)&&(n[""]=t)}}function Rr(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function Or(t,e,n){t.data.push(n);const r=n.factory||(n.factory=he(n.type)),i=new fn(r,xe(n),null);t.blueprint.push(i),e.push(i)}function Ir(t,e,n){const r=Re(e,t),i=br(n),s=t[10],o=zr(t,pr(t,i,null,n.onPush?64:16,r,e,s,s.createRenderer(r,n)));t[e.index]=o}function Pr(t,e,n,r,i,s){const o=s[e];if(null!==o){const t=r.setInput;for(let e=0;e<o.length;){const i=o[e++],s=o[e++],a=o[e++];null!==t?r.setInput(n,a,i,s):n[s]=a}}}function Dr(t,e){let n=null,r=0;for(;r<e.length;){const i=e[r];if(0!==i)if(5!==i){if("number"==typeof i)break;t.hasOwnProperty(i)&&(null===n&&(n=[]),n.push(i,t[i],e[r+1])),r+=2}else r+=2;else r+=4}return n}function jr(t,e){const n=Oe(e,t);if(De(n)){const t=n[1];80&n[2]?mr(t,n,t.template,n[8]):n[5]>0&&function t(e){for(let r=cr(e);null!==r;r=ur(r))for(let e=pe;e<r.length;e++){const n=r[e];if(1024&n[2]){const t=n[1];mr(t,n,t.template,n[8])}else n[5]>0&&t(n)}const n=e[1].components;if(null!==n)for(let r=0;r<n.length;r++){const i=Oe(n[r],e);De(i)&&i[5]>0&&t(i)}}(n)}}function Fr(t,e){const n=Oe(e,t),r=n[1];!function(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])}(r,n),gr(r,n,n[8])}function zr(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function qr(t){for(;t;){t[2]|=64;const e=lr(t);if(be(t)&&!e)return t;t=e}return null}function Lr(t,e,n){const r=e[10];r.begin&&r.begin();try{mr(t,e,t.template,n)}catch(i){throw $r(e,i),i}finally{r.end&&r.end()}}function Br(t){!function(t){for(let e=0;e<t.components.length;e++){const n=t.components[e],r=Ie(n),i=r[1];vr(i,r,i.template,n)}}(t[8])}function Hr(t,e,n){Xe(0),e(t,n)}const Vr=(()=>Promise.resolve(null))();function Wr(t){return t[7]||(t[7]=[])}function $r(t,e){const n=t[9],r=n?n.get(Vn,null):null;r&&r.handleError(e)}function Ur(t,e){const n=e[3];return-1===t.index?ge(n)?n:null:n}function Yr(t,e){const n=Ur(t,e);return n?ii(e[11],n[7]):null}function Qr(t,e,n,r,i){if(null!=r){let s,o=!1;ge(r)?s=r:ye(r)&&(o=!0,r=r[0]);const a=Ne(r);0===t&&null!==n?null==i?ni(e,n,a):ei(e,n,a,i||null):1===t&&null!==n?ei(e,n,a,i||null):2===t?function(t,e,n){const r=ii(t,e);r&&function(t,e,n,r){Te(t)?t.removeChild(e,n,r):e.removeChild(n)}(t,r,e,n)}(e,a,o):3===t&&e.destroyNode(a),null!=s&&function(t,e,n,r,i){const s=n[7];s!==Ne(n)&&Qr(e,t,r,s,i);for(let o=pe;o<n.length;o++){const i=n[o];li(i[1],i,t,e,r,s)}}(e,t,s,n,i)}}function Kr(t,e,n,r){const i=Yr(t.node,e);i&&li(t,e,e[11],n?1:2,i,r)}function Zr(t,e){const n=t[9],r=n.indexOf(e);1024&e[2]&&ze(e[3],-1),n.splice(r,1)}function Xr(t,e){if(t.length<=pe)return;const n=pe+e,r=t[n];if(r){const i=r[17];null!==i&&i!==t&&Zr(i,r),e>0&&(t[n-1][4]=r[4]);const s=Xt(t,pe+e);Kr(r[1],r,!1,null);const o=s[19];null!==o&&o.detachView(s[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function Gr(t,e){if(!(256&e[2])){const n=e[11];Te(n)&&n.destroyNode&&li(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return ti(t[1],t);for(;e;){let n=null;if(ye(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)ye(e)&&ti(e[1],e),e=Jr(e,t);null===e&&(e=t),ye(e)&&ti(e[1],e),n=e&&e[4]}e=n}}(e)}}function Jr(t,e){let n;return ye(t)&&(n=t[6])&&2===n.type?Ur(n,t):t[3]===e?null:t[3]}function ti(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let r=0;r<n.length;r+=2){const t=e[n[r]];if(!(t instanceof fn)){const e=n[r+1];if(Array.isArray(e))for(let n=0;n<e.length;n+=2)e[n+1].call(t[e[n]]);else e.call(t)}}}(t,e),function(t,e){const n=t.cleanup;if(null!==n){const t=e[7];for(let r=0;r<n.length-1;r+=2)if("string"==typeof n[r]){const i=n[r+1],s="function"==typeof i?i(e):Ne(e[i]),o=t[n[r+2]],a=n[r+3];"boolean"==typeof a?s.removeEventListener(n[r],o,a):a>=0?t[a]():t[-a].unsubscribe(),r+=2}else n[r].call(t[n[r+1]]);e[7]=null}}(t,e);const n=e[6];n&&3===n.type&&Te(e[11])&&e[11].destroy();const r=e[17];if(null!==r&&ge(e[3])){r!==e[3]&&Zr(r,e);const n=e[19];null!==n&&n.detachView(t)}}}function ei(t,e,n,r){Te(t)?t.insertBefore(e,n,r):e.insertBefore(n,r,!0)}function ni(t,e,n){Te(t)?t.appendChild(e,n):e.appendChild(n)}function ri(t,e,n,r){null!==r?ei(t,e,n,r):ni(t,e,n)}function ii(t,e){return Te(t)?t.parentNode(e):e.parentNode}function si(t,e,n,r){const i=function(t,e,n){let r=e.parent;for(;null!=r&&(4===r.type||5===r.type);)r=(e=r).parent;if(null==r){const t=n[6];return 2===t.type?Yr(t,n):n[0]}if(e&&5===e.type&&4&e.flags)return Re(e,n).parentNode;if(2&r.flags){const e=t.data,n=e[e[r.index].directiveStart].encapsulation;if(n!==Jt.ShadowDom&&n!==Jt.Native)return null}return Re(r,n)}(t,r,e);if(null!=i){const t=e[11],s=function(t,e){if(2===t.type){const n=Ur(t,e);return null===n?null:oi(n.indexOf(e,pe)-pe,n)}return 4===t.type||5===t.type?Re(t,e):null}(r.parent||e[6],e);if(Array.isArray(n))for(let e=0;e<n.length;e++)ri(t,i,n[e],s);else ri(t,i,n,s)}}function oi(t,e){const n=pe+t+1;if(n<e.length){const t=e[n],r=t[1].firstChild;if(null!==r)return function t(e,n){if(null!==n){const r=n.type;if(3===r)return Re(n,e);if(0===r)return oi(-1,e[n.index]);if(4===r||5===r){const r=n.child;if(null!==r)return t(e,r);{const t=e[n.index];return ge(t)?oi(-1,t):Ne(t)}}{const r=e[16],i=r[6],s=lr(r),o=i.projection[n.projection];return null!=o?t(s,o):t(e,n.next)}}return null}(t,r)}return e[7]}function ai(t,e,n,r,i,s,o){for(;null!=n;){const a=r[n.index],l=n.type;o&&0===e&&(a&&Yn(Ne(a),r),n.flags|=4),64!=(64&n.flags)&&(4===l||5===l?(ai(t,e,n.child,r,i,s,!1),Qr(e,t,i,a,s)):1===l?ci(t,e,r,n,i,s):Qr(e,t,i,a,s)),n=o?n.projectionNext:n.next}}function li(t,e,n,r,i,s){ai(n,r,t.node.child,e,i,s,!1)}function ci(t,e,n,r,i,s){const o=n[16],a=o[6].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++)Qr(e,t,i,a[l],s);else ai(t,e,a,o[3],i,s,!0)}function ui(t,e,n){Te(t)?t.setAttribute(e,"style",n):e.style.cssText=n}function hi(t,e,n){Te(t)?""===n?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n):e.className=n}class di{constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._viewContainerRef=null}get rootNodes(){const t=this._lView;return null==t[0]?function t(e,n,r,i,s=!1){for(;null!==r;){const o=n[r.index];if(null!==o&&i.push(Ne(o)),ge(o))for(let e=pe;e<o.length;e++){const n=o[e],r=n[1].firstChild;null!==r&&t(n[1],n,r,i)}const a=r.type;if(4===a||5===a)t(e,n,r.child,i);else if(1===a){const e=n[16],s=e[6].projection[r.projection];if(Array.isArray(s))i.push(...s);else{const n=lr(e);t(n[1],n,s,i,!0)}}r=s?r.projectionNext:r.next}return i}(t[1],t,t[6].child,[]):[]}get context(){return this._lView[8]}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){const t=this._viewContainerRef.indexOf(this);t>-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}Gr(this._lView[1],this._lView)}onDestroy(t){wr(this._lView[1],this._lView,null,t)}markForCheck(){qr(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Lr(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){Ye(!0);try{Lr(t,e,n)}finally{Ye(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}detachFromAppRef(){var t;this._appRef=null,li(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class fi extends di{constructor(t){super(t),this._view=t}detectChanges(){Br(this._view)}checkNoChanges(){!function(t){Ye(!0);try{Br(t)}finally{Ye(!1)}}(this._view)}get context(){return null}}let pi,yi,gi;function mi(t,e,n){return pi||(pi=class extends t{}),new pi(Re(e,n))}function vi(t,e,n,r){return yi||(yi=class extends t{constructor(t,e,n){super(),this._declarationView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t){const e=this._declarationTContainer.tViews,n=pr(this._declarationView,e,t,16,null,e.node);n[17]=this._declarationView[this._declarationTContainer.index];const r=this._declarationView[19];return null!==r&&(n[19]=r.createEmbeddedView(e)),gr(e,n,t),new di(n)}}),0===n.type?new yi(r,n,mi(e,n,r)):null}function xi(t,e,n,r){let i;gi||(gi=class extends t{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostView=n}get element(){return mi(e,this._hostTNode,this._hostView)}get injector(){return new qn(this._hostTNode,this._hostView)}get parentInjector(){const t=Nn(this._hostTNode,this._hostView),e=bn(t,this._hostView),n=function(t,e,n){if(n.parent&&-1!==n.parent.injectorIndex){const t=n.parent.injectorIndex;let e=n.parent;for(;null!=e.parent&&t==e.parent.injectorIndex;)e=e.parent;return e}let r=xn(t),i=e,s=e[6];for(;r>1;)i=i[15],s=i[6],r--;return s}(t,this._hostView,this._hostTNode);return mn(t)&&null!=n?new qn(n,e):new qn(null,this._hostView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null}get length(){return this._lContainer.length-pe}createEmbeddedView(t,e,n){const r=t.createEmbeddedView(e||{});return this.insert(r,n),r}createComponent(t,e,n,r,i){const s=n||this.parentInjector;if(!i&&null==t.ngModule&&s){const t=s.get(Qt,null);t&&(i=t)}const o=t.create(s,r,void 0,i);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,r=n[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),ge(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],r=new gi(e,e[6],e[3]);r.detach(r.indexOf(t))}}const i=this._adjustIndex(e);return function(t,e,n,r){const i=pe+r,s=n.length;r>0&&(n[i-1][4]=e),r<s-pe?(e[4]=n[i],Zt(n,pe+r,e)):(n.push(e),e[4]=null),e[3]=n;const o=e[17];null!==o&&n!==o&&function(t,e){const n=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===n?t[9]=[e]:n.push(e)}(o,e);const a=e[19];null!==a&&a.insertView(t),e[2]|=128}(r,n,this._lContainer,i),Kr(r,n,!0,oi(i,this._lContainer)),t.attachToViewContainerRef(this),Zt(this._lContainer[8],i,t),t}move(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");return this.insert(t,e)}indexOf(t){const e=this._lContainer[8];return null!==e?e.indexOf(t):-1}remove(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1),n=Xr(this._lContainer,e);n&&(Xt(this._lContainer[8],e),Gr(n[1],n))}detach(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1),n=Xr(this._lContainer,e);return n&&null!=Xt(this._lContainer[8],e)?new di(n):null}_adjustIndex(t,e=0){return null==t?this.length+e:t}allocateContainerIfNeeded(){null===this._lContainer[8]&&(this._lContainer[8]=[])}});const s=r[n.index];if(ge(s))i=s;else{let t;if(4===n.type)t=Ne(s);else if(t=r[11].createComment(""),be(r)){const e=r[11],i=Re(n,r);ei(e,ii(e,i),t,function(t,e){return Te(t)?t.nextSibling(e):e.nextSibling}(e,i))}else si(r[1],r,t,n);r[n.index]=i=new Array(s,!0,!1,r,null,0,n,t,null,null),zr(r,i)}return new gi(i,n,r)}const bi=new It("Set Injector scope."),_i={},wi={},ki=[];let Si=void 0;function Mi(){return void 0===Si&&(Si=new Yt),Si}function Ei(t,e=null,n=null,r){return new Ci(t,n,e||Mi(),r)}class Ci{constructor(t,e,n,r=null){this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const i=[];e&&Kt(e,n=>this.processProvider(n,t,e)),Kt([t],t=>this.processInjectorType(t,[],i)),this.records.set(Pt,Ai(void 0,this));const s=this.records.get(bi);this.scope=null!=s?s.value:null,this.source=r||("object"==typeof t?null:gt(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Dt,n=it.Default){this.assertNotDestroyed();const r=Bt(this);try{if(!(n&it.SkipSelf)){let e=this.records.get(t);if(void 0===e){const n=("function"==typeof(i=t)||"object"==typeof i&&i instanceof It)&<(t);e=n&&this.injectableDefInScope(n)?Ai(Ti(t),_i):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(n&it.Self?Mi():this.parent).get(t,e=n&it.Optional&&e===Dt?null:e)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(gt(t)),r)throw s;return function(t,e,n,r){const i=t.ngTempTokenPath;throw e[Ft]&&i.unshift(e[Ft]),t.message=function(t,e,n,r=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let i=gt(e);if(Array.isArray(e))i=e.map(gt).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let r=e[n];t.push(n+":"+("string"==typeof r?JSON.stringify(r):gt(r)))}i=`{${t.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${t.replace(jt,"\n ")}`}("\n"+t.message,i,n,r),t.ngTokenPath=i,t.ngTempTokenPath=null,t}(s,t,"R3InjectorError",this.source)}throw s}finally{Bt(r)}var i}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,n)=>t.push(gt(n))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,n){if(!(t=bt(t)))return!1;let r=ut(t);const i=null==r&&t.ngModule||void 0,s=void 0===i?t:i,o=-1!==n.indexOf(s);if(void 0!==i&&(r=ut(i)),null==r)return!1;if(null!=r.imports&&!o){let t;n.push(s);try{Kt(r.imports,r=>{this.processInjectorType(r,e,n)&&(void 0===t&&(t=[]),t.push(r))})}finally{}if(void 0!==t)for(let e=0;e<t.length;e++){const{ngModule:n,providers:r}=t[e];Kt(r,t=>this.processProvider(t,n,r||ki))}}this.injectorDefTypes.add(s),this.records.set(s,Ai(r.factory,_i));const a=r.providers;if(null!=a&&!o){const e=t;Kt(a,t=>this.processProvider(t,e,a))}return void 0!==i&&void 0!==t.providers}processProvider(t,e,n){let r=Ri(t=bt(t))?t:bt(t&&t.provide);const i=function(t,e,n){return Ni(t)?Ai(void 0,t.useValue):Ai(function(t,e,n){let r=void 0;if(Ri(t)){const e=bt(t);return he(e)||Ti(e)}if(Ni(t))r=()=>bt(t.useValue);else if((i=t)&&i.useFactory)r=()=>t.useFactory(...Ut(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))r=()=>Wt(bt(t.useExisting));else{const i=bt(t&&(t.useClass||t.provide));if(i||function(t,e,n){let r="";throw t&&e&&(r=` - only instances of Provider and Type are allowed, got: [${e.map(t=>t==n?"?"+n+"?":"...").join(", ")}]`),new Error(`Invalid provider for the NgModule '${gt(t)}'`+r)}(e,n,t),!function(t){return!!t.deps}(t))return he(i)||Ti(i);r=()=>new i(...Ut(t.deps))}var i;return r}(t,e,n),_i)}(t,e,n);if(Ri(t)||!0!==t.multi){const t=this.records.get(r);t&&void 0!==t.multi&&Kn()}else{let e=this.records.get(r);e?void 0===e.multi&&Kn():(e=Ai(void 0,_i,!0),e.factory=()=>Ut(e.multi),this.records.set(r,e)),r=t,e.multi.push(t)}this.records.set(r,i)}hydrate(t,e){var n;return e.value===wi?function(t){throw new Error("Cannot instantiate cyclic dependency! "+t)}(gt(t)):e.value===_i&&(e.value=wi,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function Ti(t){const e=lt(t),n=null!==e?e.factory:he(t);if(null!==n)return n;const r=ut(t);if(null!==r)return r.factory;if(t instanceof It)throw new Error(`Token ${gt(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const n=function(t,e){const n=[];for(let r=0;r<t;r++)n.push("?");return n}(e);throw new Error(`Can't resolve all parameters for ${gt(t)}: (${n.join(", ")}).`)}const n=function(t){const e=t&&(t[ht]||t[pt]||t[ft]&&t[ft]());if(e){const n=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${n}" class.`),e}return null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new Error("unreachable")}function Ai(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function Ni(t){return null!==t&&"object"==typeof t&&zt in t}function Ri(t){return"function"==typeof t}const Oi=function(t,e,n){return function(t,e=null,n=null,r){const i=Ei(t,e,n,r);return i._resolveInjectorDefTypes(),i}({name:n},e,t,n)};let Ii=(()=>{class t{static create(t,e){return Array.isArray(t)?Oi(t,e,""):Oi(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=Dt,t.NULL=new Yt,t.\u0275prov=ot({token:t,providedIn:"any",factory:()=>Wt(Pt)}),t.__NG_ELEMENT_ID__=-1,t})();function Pi(t,e,n){let r=n?t.styles:null,i=n?t.classes:null,s=0;if(null!==e)for(let o=0;o<e.length;o++){const t=e[o];"number"==typeof t?s=t:1==s?i=mt(i,t):2==s&&(r=mt(r,t+": "+e[++o]+";"))}n?t.styles=r:t.stylesWithoutHost=r,n?t.classes=i:t.classesWithoutHost=i}let Di=null;function ji(){if(!Di){const t=Mt.Symbol;if(t&&t.iterator)Di=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const n=t[e];"entries"!==n&&"size"!==n&&Map.prototype[n]===Map.prototype.entries&&(Di=n)}}}return Di}function Fi(t){return!!zi(t)&&(Array.isArray(t)||!(t instanceof Map)&&ji()in t)}function zi(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function qi(t,e,n,r,i){const s=i?"class":"style";!function(t,e,n,r,i){for(let s=0;s<n.length;){const o=n[s++],a=n[s++],l=e[o],c=t.data[o];null!==c.setInput?c.setInput(l,i,r,a):l[a]=i}}(t,n,e.inputs[s],s,r)}function Li(t,e,n,r){const i=Be(),s=He(),o=fe+t,a=i[11],l=i[o]=fr(e,a,qe.lFrame.currentNamespace),c=s.firstCreatePass?function(t,e,n,r,i,s,o){const a=e.consts,l=je(a,s),c=yr(e,n[6],t,3,i,l);return function(t,e,n,r){let i=!1;if(Le()){const s=function(t,e,n){const r=t.directiveRegistry;let i=null;if(r)for(let s=0;s<r.length;s++){const o=r[s];ir(n,o.selectors,!1)&&(i||(i=[]),Rn(Cn(n,e),t,o.type),xe(o)?(2&n.flags&&Qn(n),Ar(t,n),i.unshift(o)):i.push(o))}return i}(t,e,n),o=null===r?null:{"":-1};if(null!==s){let r=0;i=!0,Rr(n,t.data.length,s.length);for(let t=0;t<s.length;t++){const e=s[t];e.providersResolver&&e.providersResolver(e)}Tr(t,n,s.length);let a=!1,l=!1;for(let i=0;i<s.length;i++){const c=s[i];n.mergedAttrs=yn(n.mergedAttrs,c.hostAttrs),Or(t,e,c),Nr(t.data.length-1,c,o),null!==c.contentQueries&&(n.flags|=8),null===c.hostBindings&&null===c.hostAttrs&&0===c.hostVars||(n.flags|=128);const u=c.type.prototype;!a&&(u.ngOnChanges||u.ngOnInit||u.ngDoCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n.index-fe),a=!0),l||!u.ngOnChanges&&!u.ngDoCheck||((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n.index-fe),l=!0),Mr(t,c),r+=c.hostVars}!function(t,e){const n=e.directiveEnd,r=t.data,i=e.attrs,s=[];let o=null,a=null;for(let l=e.directiveStart;l<n;l++){const t=r[l],n=t.inputs,c=null===i||Jn(e)?null:Dr(n,i);s.push(c),o=Sr(n,l,o),a=Sr(t.outputs,l,a)}null!==o&&(o.hasOwnProperty("class")&&(e.flags|=16),o.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=s,e.inputs=o,e.outputs=a}(t,n),Er(t,e,r)}o&&function(t,e,n){if(e){const r=t.localNames=[];for(let t=0;t<e.length;t+=2){const i=n[e[t+1]];if(null==i)throw new Error(`Export of name '${e[t+1]}' not found!`);r.push(e[t],i)}}}(n,r,o)}n.mergedAttrs=yn(n.mergedAttrs,n.attrs)}(e,n,c,je(a,o)),null!==c.attrs&&Pi(c,c.attrs,!1),null!==c.mergedAttrs&&Pi(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(t,s,i,0,e,n,r):s.data[o];We(c,!0);const u=c.mergedAttrs;null!==u&&pn(a,l,u);const h=c.classes;null!==h&&hi(a,l,h);const d=c.styles;null!==d&&ui(a,l,d),si(s,i,l,c),0===qe.lFrame.elementDepthCount&&Yn(l,i),qe.lFrame.elementDepthCount++,ve(c)&&(function(t,e,n){Le()&&(function(t,e,n,r){const i=n.directiveStart,s=n.directiveEnd;t.firstCreatePass||Cn(n,e),Yn(r,e);const o=n.initialInputs;for(let a=i;a<s;a++){const r=t.data[a],s=xe(r);s&&Ir(e,n,r);const l=jn(e,t,a,n);Yn(l,e),null!==o&&Pr(0,a-i,l,r,0,o),s&&(Oe(n.index,e)[8]=l)}}(t,e,n,Re(n,e)),128==(128&n.flags)&&function(t,e,n){const r=n.directiveStart,i=n.directiveEnd,s=t.expandoInstructions,o=t.firstCreatePass,a=n.index-fe,l=qe.lFrame.currentDirectiveIndex;try{on(a);for(let n=r;n<i;n++){const r=t.data[n],i=e[n];Ke(n),null!==r.hostBindings||0!==r.hostVars||null!==r.hostAttrs?Cr(r,i):o&&s.push(null)}}finally{on(-1),Ke(l)}}(t,e,n))}(s,i,c),function(t,e,n){if(me(e)){const r=e.directiveEnd;for(let i=e.directiveStart;i<r;i++){const e=t.data[i];e.contentQueries&&e.contentQueries(1,n[i],i)}}}(s,c,i)),null!==r&&function(t,e,n=Re){const r=e.localNames;if(null!==r){let i=e.index+1;for(let s=0;s<r.length;s+=2){const o=r[s+1],a=-1===o?n(e,t):t[o];t[i++]=a}}}(i,c)}function Bi(){let t=Ve();$e()?qe.lFrame.isParent=!1:(t=t.parent,We(t,!1));const e=t;qe.lFrame.elementDepthCount--;const n=He();n.firstCreatePass&&(an(n,t),me(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&qi(n,e,Be(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&qi(n,e,Be(),e.stylesWithoutHost,!1)}function Hi(t){return!!t&&"function"==typeof t.then}function Vi(t,e,n=!1,r){const i=Be(),s=He(),o=Ve();return function(t,e,n,r,i,s,o=!1,a){const l=ve(r),c=t.firstCreatePass&&(t.cleanup||(t.cleanup=[])),u=Wr(e);let h=!0;if(3===r.type){const d=Re(r,e),f=a?a(d):te,p=f.target||d,y=u.length,g=a?t=>a(Ne(t[r.index])).target:r.index;if(Te(n)){let o=null;if(!a&&l&&(o=function(t,e,n,r){const i=t.cleanup;if(null!=i)for(let s=0;s<i.length-1;s+=2){const t=i[s];if(t===n&&i[s+1]===r){const t=e[7],n=i[s+2];return t.length>n?t[n]:null}"string"==typeof t&&(s+=2)}return null}(t,e,i,r.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=s,o.__ngLastListenerFn__=s,h=!1;else{s=$i(r,e,s,!1);const t=n.listen(f.name||p,i,s);u.push(s,t),c&&c.push(i,g,y,y+1)}}else s=$i(r,e,s,!0),p.addEventListener(i,s,o),u.push(s),c&&c.push(i,g,y,o)}const d=r.outputs;let f;if(h&&null!==d&&(f=d[i])){const t=f.length;if(t)for(let n=0;n<t;n+=2){const t=e[f[n]][f[n+1]].subscribe(s),o=u.length;u.push(s,t),c&&c.push(i,r.index,o,-(o+1))}}}(s,i,i[11],o,t,e,n,r),Vi}function Wi(t,e,n){try{return!1!==e(n)}catch(r){return $r(t,r),!1}}function $i(t,e,n,r){return function i(s){if(s===Function)return n;const o=2&t.flags?Oe(t.index,e):e;0==(32&e[2])&&qr(o);let a=Wi(e,n,s),l=i.__ngNextListenerFn__;for(;l;)a=Wi(e,l,s)&&a,l=l.__ngNextListenerFn__;return r&&!1===a&&(s.preventDefault(),s.returnValue=!1),a}}function Ui(t,e){const n=Ie(t)[1],r=n.data.length-1;an(n,{directiveStart:r,directiveEnd:r+1})}class Yi{}class Qi{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${gt(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let Ki=(()=>{class t{}return t.NULL=new Qi,t})(),Zi=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=()=>Xi(t),t})();const Xi=function(t){return mi(t,Ve(),Be())};class Gi{}var Ji=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});let ts=(()=>{class t{}return t.\u0275prov=ot({token:t,providedIn:"root",factory:()=>null}),t})();class es{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const ns=new es("10.1.0");class rs{constructor(){}supports(t){return Fi(t)}create(t){return new ss(t)}}const is=(t,e)=>e;class ss{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||is}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,r=0,i=null;for(;e||n;){const s=!n||e&&e.currentIndex<cs(n,r,i)?e:n,o=cs(s,r,i),a=s.currentIndex;if(s===n)r--,n=n._nextRemoved;else if(e=e._next,null==s.previousIndex)r++;else{i||(i=[]);const t=o-r,e=a-r;if(t!=e){for(let n=0;n<t;n++){const r=n<i.length?i[n]:i[n]=0,s=r+n;e<=s&&s<t&&(i[n]=r+1)}i[s.previousIndex]=e-t}}o!==a&&t(s,o,a)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!Fi(t))throw new Error(`Error trying to diff '${gt(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,n,r,i=this._itHead,s=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)n=t[e],r=this._trackByFn(e,n),null!==i&&Object.is(i.trackById,r)?(s&&(i=this._verifyReinsertion(i,n,r,e)),Object.is(i.item,n)||this._addIdentityChange(i,n)):(i=this._mismatch(i,n,r,e),s=!0),i=i._next}else e=0,function(t,e){if(Array.isArray(t))for(let n=0;n<t.length;n++)e(t[n]);else{const n=t[ji()]();let r;for(;!(r=n.next()).done;)e(r.value)}}(t,t=>{r=this._trackByFn(e,t),null!==i&&Object.is(i.trackById,r)?(s&&(i=this._verifyReinsertion(i,t,r,e)),Object.is(i.item,t)||this._addIdentityChange(i,t)):(i=this._mismatch(i,t,r,e),s=!0),i=i._next,e++}),this.length=e;return this._truncate(i),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t,e;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,r){let i;return null===t?i=this._itTail:(i=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,i,r)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,i,r)):t=this._addAfter(new os(e,n),i,r),t}_verifyReinsertion(t,e,n,r){let i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?t=this._reinsertAfter(i,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,i=t._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new ls),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ls),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class os{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class as{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class ls{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new as,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function cs(t,e,n){const r=t.previousIndex;if(null===r)return r;let i=0;return n&&r<n.length&&(i=n[r]),r+e+i}class us{constructor(){}supports(t){return t instanceof Map||zi(t)}create(){return new hs}}class hs{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||zi(t)))throw new Error(`Error trying to diff '${gt(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,n)=>{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const r=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,r)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const r=n._prev,i=n._next;return r&&(r._next=i),i&&(i._prev=r),n._next=null,n._prev=null,n}const n=new ds(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}class ds{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let fs=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(null!=n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new rt,new et]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${n=t,n.name||typeof n}'`);var n}}return t.\u0275prov=ot({token:t,providedIn:"root",factory:()=>new t([new rs])}),t})(),ps=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new rt,new et]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=ot({token:t,providedIn:"root",factory:()=>new t([new us])}),t})();const ys=[new us],gs=new fs([new rs]),ms=new ps(ys);let vs=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>xs(t,Zi),t})();const xs=function(t,e){return vi(t,e,Ve(),Be())};let bs=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>_s(t,Zi),t})();const _s=function(t,e){return xi(t,e,Ve(),Be())},ws={};class ks extends Ki{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=ue(t);return new Es(e,this.ngModule)}}function Ss(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}const Ms=new It("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>wn});class Es extends Yi{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(or).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return Ss(this.componentDef.inputs)}get outputs(){return Ss(this.componentDef.outputs)}create(t,e,n,r){const i=(r=r||this.ngModule)?function(t,e){return{get:(n,r,i)=>{const s=t.get(n,ws,i);return s!==ws||r===ws?s:e.get(n,r,i)}}}(t,r.injector):t,s=i.get(Gi,Ae),o=i.get(ts,null),a=s.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=n?function(t,e,n){if(Te(t))return t.selectRootElement(e,n===Jt.ShadowDom);let r="string"==typeof e?t.querySelector(e):e;return r.textContent="",r}(a,n,this.componentDef.encapsulation):fr(l,s.createRenderer(null,this.componentDef),function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),u=this.componentDef.onPush?576:528,h={components:[],scheduler:wn,clean:Vr,playerHandler:null,flags:0},d=_r(0,-1,null,1,0,null,null,null,null,null),f=pr(null,d,h,u,null,null,s,a,o,i);let p,y;Je(f,null);try{const t=function(t,e,n,r,i,s){const o=n[1];n[20]=t;const a=yr(o,null,0,3,null,null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(Pi(a,l,!0),null!==t&&(pn(i,t,l),null!==a.classes&&hi(i,t,a.classes),null!==a.styles&&ui(i,t,a.styles)));const c=r.createRenderer(t,e),u=pr(n,br(e),null,e.onPush?64:16,n[20],a,r,c,void 0);return o.firstCreatePass&&(Rn(Cn(a,n),o,e.type),Ar(o,a),Rr(a,n.length,1)),zr(n,u),n[20]=u}(c,this.componentDef,f,s,a);if(c)if(n)pn(a,c,["ng-version",ns.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let r=1,i=2;for(;r<t.length;){let s=t[r];if("string"==typeof s)2===i?""!==s&&e.push(s,t[++r]):8===i&&n.push(s);else{if(!nr(i))break;i=s}r++}return{attrs:e,classes:n}}(this.componentDef.selectors[0]);t&&pn(a,c,t),e&&e.length>0&&hi(a,c,e.join(" "))}if(y=d.data[20],void 0!==e){const t=y.projection=[];for(let n=0;n<this.ngContentSelectors.length;n++){const r=e[n];t.push(null!=r?Array.from(r):null)}}p=function(t,e,n,r,i){const s=n[1],o=function(t,e,n){const r=Ve();t.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),Tr(t,r,1),Or(t,e,n));const i=jn(e,t,e.length-1,r);Yn(i,e);const s=Re(r,e);return s&&Yn(s,e),i}(s,n,e);r.components.push(o),t[8]=o,i&&i.forEach(t=>t(o,e)),e.contentQueries&&e.contentQueries(1,o,n.length-1);const a=Ve();if(s.firstCreatePass&&(null!==e.hostBindings||null!==e.hostAttrs)){on(a.index-fe);const t=n[1];Mr(t,e),Er(t,n,e.hostVars),Cr(e,o)}return o}(t,this.componentDef,f,h,[Ui]),gr(d,f,null)}finally{sn()}const g=new Cs(this.componentType,p,mi(Zi,y,f),f,y);return d.node.child=y,g}}class Cs extends class{}{constructor(t,e,n,r,i){super(),this.location=n,this._rootLView=r,this._tNode=i,this.destroyCbs=[],this.instance=e,this.hostView=this.changeDetectorRef=new fi(r),function(t,e,n,r){let i=t.node;null==i&&(t.node=i=kr(0,null,2,-1,null,null)),r[6]=i}(r[1],0,0,r),this.componentType=t}get injector(){return new qn(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(t=>t()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(t){this.destroyCbs&&this.destroyCbs.push(t)}}const Ts=void 0;var As=["en",[["a","p"],["AM","PM"],Ts],[["AM","PM"],Ts,Ts],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Ts,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Ts,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Ts,"{1} 'at' {0}",Ts],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let Ns={};function Rs(t){return t in Ns||(Ns[t]=Mt.ng&&Mt.ng.common&&Mt.ng.common.locales&&Mt.ng.common.locales[t]),Ns[t]}var Os=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});const Is="en-US";let Ps=Is;function Ds(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,r){throw new Error("ASSERTION ERROR: "+t+` [Expected=> null != ${e} <=Actual]`)}(n,e),"string"==typeof t&&(Ps=t.toLowerCase().replace(/_/g,"-"))}const js=new Map;class Fs extends Qt{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new ks(this);const n=de(t),r=t[Nt]||null;r&&Ds(r),this._bootstrapComponents=kn(n.bootstrap),this._r3Injector=Ei(t,e,[{provide:Qt,useValue:this},{provide:Ki,useValue:this.componentFactoryResolver}],gt(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=Ii.THROW_IF_NOT_FOUND,n=it.Default){return t===Ii||t===Qt||t===Pt?this:this._r3Injector.get(t,e,n)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class zs extends class{}{constructor(t){super(),this.moduleType=t,null!==de(t)&&function t(e){if(null!==e.\u0275mod.id){const t=e.\u0275mod.id;(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${gt(e)} vs ${gt(e.name)}`)})(t,js.get(t),e),js.set(t,e)}let n=e.\u0275mod.imports;n instanceof Function&&(n=n()),n&&n.forEach(e=>t(e))}(t)}create(t){return new Fs(this.moduleType,t)}}const qs=class extends k{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let r,i=t=>null,s=()=>null;t&&"object"==typeof t?(r=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(i=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(s=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(r=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(i=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),n&&(s=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const o=super.subscribe(r,i,s);return t instanceof h&&t.add(o),o}};function Ls(){return this._results[ji()]()}class Bs{constructor(){this.dirty=!0,this._results=[],this.changes=new qs,this.length=0;const t=ji(),e=Bs.prototype;e[t]||(e[t]=Ls)}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t){this._results=function t(e,n){void 0===n&&(n=e);for(let r=0;r<e.length;r++){let i=e[r];Array.isArray(i)?(n===e&&(n=e.slice(0,r)),t(i,n)):n!==e&&n.push(i)}return n}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class Hs{constructor(t){this.queryList=t,this.matches=null}clone(){return new Hs(this.queryList)}setDirty(){this.queryList.setDirty()}}class Vs{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,r=[];for(let t=0;t<n;t++){const n=e.getByIndex(t);r.push(this.queries[n.indexInDeclarationView].clone())}return new Vs(r)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==Zs(t,e).matches&&this.queries[e].setDirty()}}class Ws{constructor(t,e,n,r=null){this.predicate=t,this.descendants=e,this.isStatic=n,this.read=r}}class $s{constructor(t=[]){this.queries=t}elementStart(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let n=0;n<this.length;n++){const r=null!==e?e.length:0,i=this.getByIndex(n).embeddedTView(t,r);i&&(i.indexInDeclarationView=n,null!==e?e.push(i):e=[i])}return null!==e?new $s(e):null}template(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class Us{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new Us(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&!1===this.metadata.descendants){const e=this._declarationNodeIndex;let n=t.parent;for(;null!==n&&4===n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}matchTNode(t,e){const n=this.metadata.predicate;if(Array.isArray(n))for(let r=0;r<n.length;r++){const i=n[r];this.matchTNodeWithReadOption(t,e,Ys(e,i)),this.matchTNodeWithReadOption(t,e,Dn(e,t,i,!1,!1))}else n===vs?0===e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,Dn(e,t,n,!1,!1))}matchTNodeWithReadOption(t,e,n){if(null!==n){const r=this.metadata.read;if(null!==r)if(r===Zi||r===bs||r===vs&&0===e.type)this.addMatch(e.index,-2);else{const n=Dn(e,t,r,!1,!1);null!==n&&this.addMatch(e.index,n)}else this.addMatch(e.index,n)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}}function Ys(t,e){const n=t.localNames;if(null!==n)for(let r=0;r<n.length;r+=2)if(n[r]===e)return n[r+1];return null}function Qs(t,e,n,r){return-1===n?function(t,e){return 3===t.type||4===t.type?mi(Zi,t,e):0===t.type?vi(vs,Zi,t,e):null}(e,t):-2===n?function(t,e,n){return n===Zi?mi(Zi,e,t):n===vs?vi(vs,Zi,e,t):n===bs?xi(bs,Zi,e,t):void 0}(t,e,r):jn(t,t[1],n,e)}function Ks(t,e,n,r){const i=e[19].queries[r];if(null===i.matches){const r=t.data,s=n.matches,o=[];for(let t=0;t<s.length;t+=2){const i=s[t];o.push(i<0?null:Qs(e,r[i],s[t+1],n.metadata.read))}i.matches=o}return i.matches}function Zs(t,e){return t.queries.getByIndex(e)}const Xs=new It("Application Initializer");let Gs=(()=>{class t{constructor(t){this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n<this.appInits.length;n++){const e=this.appInits[n]();Hi(e)&&t.push(e)}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Wt(Xs,8))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const Js=new It("AppId"),to={provide:Js,useFactory:function(){return`${eo()}${eo()}${eo()}`},deps:[]};function eo(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const no=new It("Platform Initializer"),ro=new It("Platform ID"),io=new It("appBootstrapListener");let so=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const oo=new It("LocaleId"),ao=new It("DefaultCurrencyCode");class lo{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const co=function(t){return new zs(t)},uo=co,ho=function(t){return Promise.resolve(co(t))},fo=function(t){const e=co(t),n=kn(de(t).declarations).reduce((t,e)=>{const n=ue(e);return n&&t.push(new Es(n)),t},[]);return new lo(e,n)},po=fo,yo=function(t){return Promise.resolve(fo(t))};let go=(()=>{class t{constructor(){this.compileModuleSync=uo,this.compileModuleAsync=ho,this.compileModuleAndAllComponentsSync=po,this.compileModuleAndAllComponentsAsync=yo}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const mo=(()=>Promise.resolve(0))();function vo(t){"undefined"==typeof Zone?mo.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class xo{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new qs(!1),this.onMicrotaskEmpty=new qs(!1),this.onStable=new qs(!1),this.onError=new qs(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const n=this;n._nesting=0,n._outer=n._inner=Zone.current,Zone.wtfZoneSpec&&(n._inner=n._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(n._inner=n._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(n._inner=n._inner.fork(Zone.longStackTraceZoneSpec)),n.shouldCoalesceEventChangeDetection=e,n.lastRequestAnimationFrameId=-1,n.nativeRequestAnimationFrame=function(){let t=Mt.requestAnimationFrame,e=Mt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=!!t.shouldCoalesceEventChangeDetection&&t.nativeRequestAnimationFrame&&(()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Mt,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,ko(t),wo(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),ko(t))}(t)});t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:e},onInvokeTask:(n,r,i,s,o,a)=>{try{return So(t),n.invokeTask(i,s,o,a)}finally{e&&"eventTask"===s.type&&e(),Mo(t)}},onInvoke:(e,n,r,i,s,o,a)=>{try{return So(t),e.invoke(r,i,s,o,a)}finally{Mo(t)}},onHasTask:(e,n,r,i)=>{e.hasTask(r,i),n===r&&("microTask"==i.change?(t._hasPendingMicrotasks=i.microTask,ko(t),wo(t)):"macroTask"==i.change&&(t.hasPendingMacrotasks=i.macroTask))},onHandleError:(e,n,r,i)=>(e.handleError(r,i),t.runOutsideAngular(()=>t.onError.emit(i)),!1)})}(n)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!xo.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(xo.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,r){const i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+r,t,_o,bo,bo);try{return i.runTask(s,e,n)}finally{i.cancelTask(s)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}function bo(){}const _o={};function wo(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function ko(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function So(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Mo(t){t._nesting--,wo(t)}class Eo{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new qs,this.onMicrotaskEmpty=new qs,this.onStable=new qs,this.onError=new qs}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,r){return t.apply(e,n)}}let Co=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{xo.assertNotInAngularZone(),vo(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())vo(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let r=-1;e&&e>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==r),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})}whenStable(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(Wt(xo))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})(),To=(()=>{class t{constructor(){this._applications=new Map,Ro.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return Ro.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();class Ao{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}let No,Ro=new Ao;const Oo=new It("AllowMultipleToken");function Io(t,e,n=[]){const r="Platform: "+e,i=new It(r);return(e=[])=>{let s=Po();if(!s||s.injector.get(Oo,!1))if(t)t(n.concat(e).concat({provide:i,useValue:!0}));else{const t=n.concat(e).concat({provide:i,useValue:!0},{provide:bi,useValue:"platform"});!function(t){if(No&&!No.destroyed&&!No.injector.get(Oo,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");No=t.get(Do);const e=t.get(no,null);e&&e.forEach(t=>t())}(Ii.create({providers:t,name:r}))}return function(t){const e=Po();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(i)}}function Po(){return No&&!No.destroyed?No:null}let Do=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new Eo:("zone.js"===t?void 0:t)||new xo({enableLongStackTrace:Un(),shouldCoalesceEventChangeDetection:e}),n}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),r=[{provide:xo,useValue:n}];return n.run(()=>{const e=Ii.create({providers:r,parent:this.injector,name:t.moduleType.name}),i=t.create(e),s=i.injector.get(Vn,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return i.onDestroy(()=>zo(this._modules,i)),n.runOutsideAngular(()=>n.onError.subscribe({next:t=>{s.handleError(t)}})),function(t,e,n){try{const r=n();return Hi(r)?r.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}(s,n,()=>{const t=i.injector.get(Gs);return t.runInitializers(),t.donePromise.then(()=>(Ds(i.injector.get(oo,Is)||Is),this._moduleDoBootstrap(i),i))})})}bootstrapModule(t,e=[]){const n=jo({},e);return function(t,e,n){const r=new zs(n);return Promise.resolve(r)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(Fo);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${gt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Wt(Ii))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();function jo(t,e){return Array.isArray(e)?e.reduce(jo,t):Object.assign(Object.assign({},t),e)}let Fo=(()=>{class t{constructor(t,e,n,r,i,s){this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=i,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Un(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new v(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),a=new v(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{xo.assertNotInAngularZone(),vo(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{xo.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=V(o,a.pipe(t=>{return W()((e=Z,function(t){let n;n="function"==typeof e?e:function(){return e};const r=Object.create(t,Q);return r.source=t,r.subjectFactory=n,r})(t));var e}))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=t instanceof Yi?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const r=n.isBoundToModule?void 0:this._injector.get(Qt),i=n.create(Ii.NULL,[],e||n.selector,r);i.onDestroy(()=>{this._unloadComponent(i)});const s=i.injector.get(Co,null);return s&&i.injector.get(To).registerApplication(i.location.nativeElement,s),this._loadComponent(i),Un()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),i}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges();if(this._enforceNoNewChanges)for(let t of this._views)t.checkNoChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;zo(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(io,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),zo(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(Wt(xo),Wt(so),Wt(Ii),Wt(Vn),Wt(Ki),Wt(Gs))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();function zo(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const qo=Io(null,"core",[{provide:ro,useValue:"unknown"},{provide:Do,deps:[Ii]},{provide:To,deps:[]},{provide:so,deps:[]}]),Lo=[{provide:Fo,useClass:Fo,deps:[xo,so,Ii,Vn,Ki,Gs]},{provide:Ms,deps:[xo],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Gs,useClass:Gs,deps:[[new et,Xs]]},{provide:go,useClass:go,deps:[]},to,{provide:fs,useFactory:function(){return gs},deps:[]},{provide:ps,useFactory:function(){return ms},deps:[]},{provide:oo,useFactory:function(t){return Ds(t=t||"undefined"!=typeof $localize&&$localize.locale||Is),t},deps:[[new tt(oo),new et,new rt]]},{provide:ao,useValue:"USD"}];let Bo=(()=>{class t{constructor(t){}}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)(Wt(Fo))},providers:Lo}),t})();class Ho extends h{constructor(t,e){super()}schedule(t,e=0){return this}}class Vo extends Ho{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n=!1,r=void 0;try{this.work(t)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let Wo=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class $o extends Wo{constructor(t,e=Wo.now){super(t,()=>$o.delegate&&$o.delegate!==this?$o.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return $o.delegate&&$o.delegate!==this?$o.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}class Uo{constructor(t){this.project=t}call(t,e){return e.subscribe(new Yo(t,this.project))}}class Yo extends z{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const n=new F(this),r=this.destination;r.add(n),this.innerSubscription=q(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}class Qo extends Vo{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(t,e,n):t.flush(this)}}class Ko extends $o{}const Zo=new Ko(Qo),Xo=new v(t=>t.complete());let Go=(()=>{class t{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return function(...t){let e=t[t.length-1];return M(e)?(t.pop(),D(t,e)):H(t)}(this.value);case"E":return t=this.error,new v(e=>e.error(t));case"C":return Xo}var t;throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})();class Jo extends p{constructor(t,e,n=0){super(t),this.scheduler=e,this.delay=n}static dispatch(t){const{notification:e,destination:n}=t;e.observe(n),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(Jo.dispatch,this.delay,new ta(t,this.destination)))}_next(t){this.scheduleMessage(Go.createNext(t))}_error(t){this.scheduleMessage(Go.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(Go.createComplete()),this.unsubscribe()}}class ta{constructor(t,e){this.notification=t,this.destination=e}}class ea extends k{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n){super(),this.scheduler=n,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift(),super.next(t)}nextTimeWindow(t){this._events.push(new na(this._getNow(),t)),this._trimBufferThenGetEvents(),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,n=e?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,i=n.length;let s;if(this.closed)throw new b;if(this.isStopped||this.hasError?s=h.EMPTY:(this.observers.push(t),s=new _(this,t)),r&&t.add(t=new Jo(t,r)),e)for(let o=0;o<i&&!t.closed;o++)t.next(n[o]);else for(let o=0;o<i&&!t.closed;o++)t.next(n[o].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),s}_getNow(){return(this.scheduler||Zo).now()}_trimBufferThenGetEvents(){const t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length;let s=0;for(;s<i&&!(t-r[s].time<n);)s++;return i>e&&(s=Math.max(s,i-e)),s>0&&r.splice(0,s),r}}class na{constructor(t,e){this.time=t,this.value=e}}let ra=null;function ia(){return ra}const sa=new It("DocumentToken");var oa=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({});class aa{}let la,ca=(()=>{class t extends aa{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(function(t){return function(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=Rs(e);if(n)return n;const r=e.split("-")[0];if(n=Rs(r),n)return n;if("en"===r)return As;throw new Error(`Missing locale data for the locale "${t}".`)}(t)[Os.PluralCase]}(e||this.locale)(t)){case oa.Zero:return"zero";case oa.One:return"one";case oa.Two:return"two";case oa.Few:return"few";case oa.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(Wt(oo))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})(),ua=(()=>{class t{}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},providers:[{provide:aa,useClass:ca}]}),t})();function ha(t){return"browser"===t}try{la="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(YC){la=!1}let da=(()=>{class t{constructor(t){this._platformId=t,this.isBrowser=this._platformId?ha(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!la)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return t.\u0275fac=function(e){return new(e||t)(Wt(ro))},t.\u0275prov=ot({factory:function(){return new t(Wt(ro))},token:t,providedIn:"root"}),t})(),fa=(()=>{class t{}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)}}),t})();const pa=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine);let ya=(()=>{class t{constructor(t,e){this._platform=e,this._document=t}ngOnDestroy(){const t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t=this._platform?this._platform.isBrowser:"undefined"!=typeof window,e="cdk-overlay-container";if(t||pa){const t=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let e=0;e<t.length;e++)t[e].parentNode.removeChild(t[e])}const n=this._document.createElement("div");n.classList.add(e),pa?n.setAttribute("platform","test"):t||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._containerElement=n}}return t.\u0275fac=function(e){return new(e||t)(Wt(sa),Wt(da))},t.\u0275prov=ot({factory:function(){return new t(Wt(sa),Wt(da))},token:t,providedIn:"root"}),t})();const ga=(()=>{const t=Element.prototype;return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector})(),ma={schedule(t,e){const n=setTimeout(t,e);return()=>clearTimeout(n)},scheduleBeforeRender(t){if("undefined"==typeof window)return ma.schedule(t,0);if(void 0===window.requestAnimationFrame)return ma.schedule(t,16);const e=window.requestAnimationFrame(t);return()=>window.cancelAnimationFrame(e)}};function va(t,e,n){let r=n;return function(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}(t)&&e.some((e,n)=>!("*"===e||!function(t,e){return ga.call(t,e)}(t,e)||(r=n,0))),r}class xa{constructor(t,e){this.componentFactory=e.get(Ki).resolveComponentFactory(t)}create(t){return new ba(this.componentFactory,t)}}class ba{constructor(t,e){this.componentFactory=t,this.injector=e,this.eventEmitters=new ea(1),this.events=this.eventEmitters.pipe(function t(e,n){return"function"==typeof n?r=>r.pipe(t((t,r)=>j(e(t,r)).pipe(E((e,i)=>n(t,e,r,i))))):t=>t.lift(new Uo(e))}(t=>V(...t))),this.componentRef=null,this.inputChanges=null,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set,this.ngZone=this.injector.get(xo),this.elementZone="undefined"==typeof Zone?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{null!==this.componentRef&&null===this.scheduledDestroyFn&&(this.scheduledDestroyFn=ma.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null)},10))})}getInputValue(t){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){this.runInZone(()=>{var n,r;null!==this.componentRef?((n=e)!==(r=this.getInputValue(t))&&(n==n||r==r)||void 0===e&&this.unchangedInputs.has(t))&&(this.recordInputChange(t,e),this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e)})}initializeComponent(t){const e=Ii.create({providers:[],parent:this.injector}),n=function(t,e){const n=t.childNodes,r=e.map(()=>[]);let i=-1;e.some((t,e)=>"*"===t&&(i=e,!0));for(let s=0,o=n.length;s<o;++s){const t=n[s],o=va(t,e,i);-1!==o&&r[o].push(t)}return r}(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,n,t),this.implementsOnChanges="function"==typeof this.componentRef.instance.ngOnChanges,this.initializeInputs(),this.initializeOutputs(this.componentRef),this.detectChanges(),this.injector.get(Fo).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach(({propName:t})=>{this.implementsOnChanges&&this.unchangedInputs.add(t),this.initialInputValues.has(t)&&this.setInputValue(t,this.initialInputValues.get(t))}),this.initialInputValues.clear()}initializeOutputs(t){const e=this.componentFactory.outputs.map(({propName:e,templateName:n})=>t.instance[e].pipe(E(t=>({name:n,value:t}))));this.eventEmitters.next(e)}callNgOnChanges(t){if(!this.implementsOnChanges||null===this.inputChanges)return;const e=this.inputChanges;this.inputChanges=null,t.instance.ngOnChanges(e)}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=ma.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(t,e){if(null!==this.componentRef&&!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const n=this.inputChanges[t];if(n)return void(n.currentValue=e);const r=this.unchangedInputs.has(t);this.unchangedInputs.delete(t);const i=r?void 0:this.getInputValue(t);this.inputChanges[t]=new _e(i,e,r)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}}class _a extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}function wa(t,e){t.forEach(({propName:t})=>{Object.defineProperty(e,t,{get(){return this.ngElementStrategy.getInputValue(t)},set(e){this.ngElementStrategy.setInputValue(t,e)},configurable:!0,enumerable:!0})})}class ka extends class extends class{}{constructor(){super()}supportsDOMEvents(){return!0}}{static makeCurrent(){var t;t=new ka,ra||(ra=t)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=Ma||(Ma=document.querySelector("base"),Ma)?Ma.getAttribute("href"):null;return null==e?null:(n=e,Sa||(Sa=document.createElement("a")),Sa.setAttribute("href",n),"/"===Sa.pathname.charAt(0)?Sa.pathname:"/"+Sa.pathname);var n}resetBaseElement(){Ma=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return function(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[r,i]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(r.trim()===e)return decodeURIComponent(i)}return null}(document.cookie,t)}}let Sa,Ma=null;const Ea=new It("TRANSITION_ID"),Ca=[{provide:Xs,useFactory:function(t,e,n){return()=>{n.get(Gs).donePromise.then(()=>{const n=ia();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[Ea,sa,Ii],multi:!0}];class Ta{static init(){var t;t=new Ta,Ro=t}addToWindow(t){Mt.getAngularTestability=(e,n=!0)=>{const r=t.findTestabilityInTree(e,n);if(null==r)throw new Error("Could not find testability for element.");return r},Mt.getAllAngularTestabilities=()=>t.getAllTestabilities(),Mt.getAllAngularRootElements=()=>t.getAllRootElements(),Mt.frameworkStabilizers||(Mt.frameworkStabilizers=[]),Mt.frameworkStabilizers.push(t=>{const e=Mt.getAllAngularTestabilities();let n=e.length,r=!1;const i=function(e){r=r||e,n--,0==n&&t(r)};e.forEach((function(t){t.whenStable(i)}))})}findTestabilityInTree(t,e,n){if(null==e)return null;const r=t.getTestability(e);return null!=r?r:n?ia().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const Aa=new It("EventManagerPlugins");let Na=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let r=0;r<n.length;r++){const e=n[r];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error("No event manager plugin found for event "+t)}}return t.\u0275fac=function(e){return new(e||t)(Wt(Aa),Wt(xo))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();class Ra{constructor(t){this._doc=t}addGlobalEventListener(t,e,n){const r=ia().getGlobalEventTarget(this._doc,t);if(!r)throw new Error(`Unsupported event target ${r} for event ${e}`);return this.addEventListener(r,e,n)}}let Oa=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})(),Ia=(()=>{class t extends Oa{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const n=this._doc.createElement("style");n.textContent=t,this._styleNodes.add(e.appendChild(n))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>ia().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(Wt(sa))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const Pa={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Da=/%COMP%/g;function ja(t,e,n){for(let r=0;r<e.length;r++){let i=e[r];Array.isArray(i)?ja(t,i,n):(i=i.replace(Da,t),n.push(i))}return n}function Fa(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let za=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new qa(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case Jt.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new La(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case Jt.Native:case Jt.ShadowDom:return new Ba(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=ja(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(Wt(Na),Wt(Ia),Wt(Js))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();class qa{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(Pa[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;const i=Pa[r];i?t.setAttributeNS(i,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=Pa[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,r){r&Ji.DashCase?t.style.setProperty(e,n,r&Ji.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Ji.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Fa(n)):this.eventManager.addEventListener(t,e,Fa(n))}}class La extends qa{constructor(t,e,n,r){super(t),this.component=n;const i=ja(r+"-"+n.id,n.styles,[]);e.addStyles(i),this.contentAttr="_ngcontent-%COMP%".replace(Da,r+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(Da,r+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class Ba extends qa{constructor(t,e,n,r){super(t),this.sharedStylesHost=e,this.hostEl=n,this.component=r,this.shadowRoot=r.encapsulation===Jt.ShadowDom?n.attachShadow({mode:"open"}):n.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const i=ja(r.id,r.styles,[]);for(let s=0;s<i.length;s++){const t=document.createElement("style");t.textContent=i[s],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}let Ha=(()=>{class t extends Ra{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(Wt(sa))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const Va=["alt","control","meta","shift"],Wa={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},$a={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},Ua={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let Ya=(()=>{class t extends Ra{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,r){const i=t.parseEventName(n),s=t.eventCallback(i.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ia().onAndCancel(e,i.domEventName,s))}static parseEventName(e){const n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;const i=t._normalizeKey(n.pop());let s="";if(Va.forEach(t=>{const e=n.indexOf(t);e>-1&&(n.splice(e,1),s+=t+".")}),s+=i,0!=n.length||0===i.length)return null;const o={};return o.domEventName=r,o.fullKey=s,o}static getEventFullKey(t){let e="",n=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&$a.hasOwnProperty(e)&&(e=$a[e]))}return Wa[e]||e}(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),Va.forEach(r=>{r!=n&&(0,Ua[r])(t)&&(e+=r+".")}),e+=n,e}static eventCallback(e,n,r){return i=>{t.getEventFullKey(i)===e&&r.runGuarded(()=>n(i))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(Wt(sa))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const Qa=Io(qo,"browser",[{provide:ro,useValue:"browser"},{provide:no,useValue:function(){ka.makeCurrent(),Ta.init()},multi:!0},{provide:sa,useFactory:function(){return function(t){Ce=t}(document),document},deps:[]}]),Ka=[[],{provide:bi,useValue:"root"},{provide:Vn,useFactory:function(){return new Vn},deps:[]},{provide:Aa,useClass:Ha,multi:!0,deps:[sa,xo,ro]},{provide:Aa,useClass:Ya,multi:!0,deps:[sa]},[],{provide:za,useClass:za,deps:[Na,Ia,Js]},{provide:Gi,useExisting:za},{provide:Oa,useExisting:Ia},{provide:Ia,useClass:Ia,deps:[sa]},{provide:Co,useClass:Co,deps:[xo]},{provide:Na,useClass:Na,deps:[Aa,xo]},[]];let Za=(()=>{class t{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:Js,useValue:e.appId},{provide:Ea,useExisting:Js},Ca]}}}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)(Wt(t,12))},providers:Ka,imports:[ua,Bo]}),t})();"undefined"!=typeof window&&window;class Xa{}const Ga="*";function Ja(t,e=null){return{type:2,steps:t,options:e}}function tl(t){return{type:6,styles:t,offset:null}}function el(t){Promise.resolve(null).then(t)}class nl{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){el(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class rl{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,r=0;const i=this.players.length;0==i?el(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==i&&this._onFinish()}),t.onDestroy(()=>{++n==i&&this._onDestroy()}),t.onStart(()=>{++r==i&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){let t=0;return this.players.forEach(e=>{const n=e.getPosition();t=Math.min(n,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}function il(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function sl(t){switch(t.length){case 0:return new nl;case 1:return t[0];default:return new rl(t)}}function ol(t,e,n,r,i={},s={}){const o=[],a=[];let l=-1,c=null;if(r.forEach(t=>{const n=t.offset,r=n==l,u=r&&c||{};Object.keys(t).forEach(n=>{let r=n,a=t[n];if("offset"!==n)switch(r=e.normalizePropertyName(r,o),a){case"!":a=i[n];break;case Ga:a=s[n];break;default:a=e.normalizeStyleValue(n,r,a,o)}u[r]=a}),r||a.push(u),c=u,l=n}),o.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${o.join(t)}`)}return a}function al(t,e,n,r){switch(e){case"start":t.onStart(()=>r(n&&ll(n,"start",t)));break;case"done":t.onDone(()=>r(n&&ll(n,"done",t)));break;case"destroy":t.onDestroy(()=>r(n&&ll(n,"destroy",t)))}}function ll(t,e,n){const r=n.totalTime,i=cl(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==r?t.totalTime:r,!!n.disabled),s=t._data;return null!=s&&(i._data=s),i}function cl(t,e,n,r,i="",s=0,o){return{element:t,triggerName:e,fromState:n,toState:r,phaseName:i,totalTime:s,disabled:!!o}}function ul(t,e,n){let r;return t instanceof Map?(r=t.get(e),r||t.set(e,r=n)):(r=t[e],r||(r=t[e]=n)),r}function hl(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let dl=(t,e)=>!1,fl=(t,e)=>!1,pl=(t,e,n)=>[];const yl=il();(yl||"undefined"!=typeof Element)&&(dl=(t,e)=>t.contains(e),fl=(()=>{if(yl||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,n)=>e.apply(t,[n]):fl}})(),pl=(t,e,n)=>{let r=[];if(n)r.push(...t.querySelectorAll(e));else{const n=t.querySelector(e);n&&r.push(n)}return r});let gl=null,ml=!1;function vl(t){gl||(gl=("undefined"!=typeof document?document.body:null)||{},ml=!!gl.style&&"WebkitAppearance"in gl.style);let e=!0;return gl.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in gl.style,!e&&ml)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in gl.style),e}const xl=fl,bl=dl,_l=pl;function wl(t){const e={};return Object.keys(t).forEach(n=>{const r=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[r]=t[n]}),e}let kl=(()=>{class t{validateStyleProperty(t){return vl(t)}matchesElement(t,e){return xl(t,e)}containsElement(t,e){return bl(t,e)}query(t,e,n){return _l(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,r,i,s=[],o){return new nl(n,r)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})(),Sl=(()=>{class t{}return t.NOOP=new kl,t})();const Ml="ng-enter",El="ng-leave",Cl="ng-trigger",Tl=".ng-trigger",Al="ng-animating",Nl=".ng-animating";function Rl(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Ol(parseFloat(e[1]),e[2])}function Ol(t,e){switch(e){case"s":return 1e3*t;default:return t}}function Il(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let r,i=0,s="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};r=Ol(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(i=Ol(parseFloat(o),n[4]));const a=n[5];a&&(s=a)}else r=t;if(!n){let n=!1,s=e.length;r<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),i<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(s,0,`The provided timing value "${t}" is invalid.`)}return{duration:r,delay:i,easing:s}}(t,e,n)}function Pl(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function Dl(t,e,n={}){if(e)for(let r in t)n[r]=t[r];else Pl(t,n);return n}function jl(t,e,n){return n?e+":"+n+";":""}function Fl(t){let e="";for(let n=0;n<t.style.length;n++){const r=t.style.item(n);e+=jl(0,r,t.style.getPropertyValue(r))}for(const n in t.style)t.style.hasOwnProperty(n)&&!n.startsWith("_")&&(e+=jl(0,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[n]));t.setAttribute("style",e)}function zl(t,e,n){t.style&&(Object.keys(e).forEach(r=>{const i=Ul(r);n&&!n.hasOwnProperty(r)&&(n[r]=t.style[i]),t.style[i]=e[r]}),il()&&Fl(t))}function ql(t,e){t.style&&(Object.keys(e).forEach(e=>{const n=Ul(e);t.style[n]=""}),il()&&Fl(t))}function Ll(t){return Array.isArray(t)?1==t.length?t[0]:Ja(t):t}const Bl=new RegExp("{{\\s*(.+?)\\s*}}","g");function Hl(t){let e=[];if("string"==typeof t){let n;for(;n=Bl.exec(t);)e.push(n[1]);Bl.lastIndex=0}return e}function Vl(t,e,n){const r=t.toString(),i=r.replace(Bl,(t,r)=>{let i=e[r];return e.hasOwnProperty(r)||(n.push("Please provide a value for the animation param "+r),i=""),i.toString()});return i==r?t:i}function Wl(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const $l=/-+([a-z0-9])/g;function Ul(t){return t.replace($l,(...t)=>t[1].toUpperCase())}function Yl(t,e){return 0===t||0===e}function Ql(t,e,n){const r=Object.keys(n);if(r.length&&e.length){let s=e[0],o=[];if(r.forEach(t=>{s.hasOwnProperty(t)||o.push(t),s[t]=n[t]}),o.length)for(var i=1;i<e.length;i++){let n=e[i];o.forEach((function(e){n[e]=Zl(t,e)}))}}return e}function Kl(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error("Unable to resolve animation metadata node #"+e.type)}}function Zl(t,e){return window.getComputedStyle(t)[e]}const Xl="*";function Gl(t,e){const n=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>function(t,e,n){if(":"==t[0]){const r=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,n);if("function"==typeof r)return void e.push(r);t=r}const r=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const i=r[1],s=r[2],o=r[3];e.push(ec(i,o)),"<"!=s[0]||i==Xl&&o==Xl||e.push(ec(o,i))}(t,n,e)):n.push(t),n}const Jl=new Set(["true","1"]),tc=new Set(["false","0"]);function ec(t,e){const n=Jl.has(t)||tc.has(t),r=Jl.has(e)||tc.has(e);return(i,s)=>{let o=t==Xl||t==i,a=e==Xl||e==s;return!o&&n&&"boolean"==typeof i&&(o=i?Jl.has(t):tc.has(t)),!a&&r&&"boolean"==typeof s&&(a=s?Jl.has(e):tc.has(e)),o&&a}}const nc=new RegExp("s*:selfs*,?","g");function rc(t,e,n){return new ic(t).build(e,n)}class ic{constructor(t){this._driver=t}build(t,e){const n=new sc(e);return this._resetContextStyleTimingState(n),Kl(this,Ll(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,r=e.depCount=0;const i=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,r=n.name;r.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,i.push(this.visitState(n,e))}),n.name=r}else if(1==t.type){const i=this.visitTransition(t,e);n+=i.queryCount,r+=i.depCount,s.push(i)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:i,transitions:s,queryCount:n,depCount:r,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(n.containsDynamicStyles){const i=new Set,s=r||{};if(n.styles.forEach(t=>{if(oc(t)){const e=t;Object.keys(e).forEach(t=>{Hl(e[t]).forEach(t=>{s.hasOwnProperty(t)||i.add(t)})})}}),i.size){const n=Wl(i.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=Kl(this,Ll(t.animation),e);return{type:1,matchers:Gl(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:ac(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>Kl(this,t,e)),options:ac(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const i=t.steps.map(t=>{e.currentTime=n;const i=Kl(this,t,e);return r=Math.max(r,e.currentTime),i});return e.currentTime=r,{type:3,steps:i,options:ac(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return lc(Il(t,e).duration,0,"");const r=t;if(r.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=lc(0,0,"");return t.dynamic=!0,t.strValue=r,t}return n=n||Il(r,e),lc(n.duration,n.delay,n.easing)}(t.timings,e.errors);let r;e.currentAnimateTimings=n;let i=t.styles?t.styles:tl({});if(5==i.type)r=this.visitKeyframes(i,e);else{let i=t.styles,s=!1;if(!i){s=!0;const t={};n.easing&&(t.easing=n.easing),i=tl(t)}e.currentTime+=n.duration+n.delay;const o=this.visitStyle(i,e);o.isEmptyStep=s,r=o}return e.currentAnimateTimings=null,{type:4,timings:n,style:r,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?t==Ga?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let r=!1,i=null;return n.forEach(t=>{if(oc(t)){const e=t,n=e.easing;if(n&&(i=n,delete e.easing),!r)for(let t in e)if(e[t].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:n,easing:i,offset:t.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let r=e.currentTime,i=e.currentTime;n&&i>0&&(i-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const s=e.collectedStyles[e.currentQuerySelector],o=s[n];let a=!0;o&&(i!=r&&i>=o.startTime&&r<=o.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${i}ms" and "${r}ms"`),a=!1),i=o.startTime),a&&(s[n]={startTime:i,endTime:r}),e.options&&function(t,e,n){const r=e.params||{},i=Hl(t);i.length&&i.forEach(t=>{r.hasOwnProperty(t)||n.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[n],e.options,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let r=0;const i=[];let s=!1,o=!1,a=0;const l=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let l=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(oc(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if(oc(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),c=0;return null!=l&&(r++,c=n.offset=l),o=o||c<0||c>1,s=s||c<a,a=c,i.push(c),n});o&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),s&&e.errors.push("Please ensure that all keyframe offsets are in order");const c=t.steps.length;let u=0;r>0&&r<c?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==r&&(u=1/(c-1));const h=c-1,d=e.currentTime,f=e.currentAnimateTimings,p=f.duration;return l.forEach((t,r)=>{const s=u>0?r==h?1:u*r:i[r],o=s*p;e.currentTime=d+f.delay+o,f.duration=o,this._validateStyleAst(t,e),t.offset=s,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:Kl(this,Ll(t.animation),e),options:ac(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:ac(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:ac(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[i,s]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(nc,"")),[t=t.replace(/@\*/g,Tl).replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,Nl),e]}(t.selector);e.currentQuerySelector=n.length?n+" "+i:i,ul(e.collectedStyles,e.currentQuerySelector,{});const o=Kl(this,Ll(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:i,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:o,originalSelector:t.selector,options:ac(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:Il(t.timings,e.errors,!0);return{type:12,animation:Kl(this,Ll(t.animation),e),timings:n,options:null}}}class sc{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function oc(t){return!Array.isArray(t)&&"object"==typeof t}function ac(t){var e;return t?(t=Pl(t)).params&&(t.params=(e=t.params)?Pl(e):null):t={},t}function lc(t,e,n){return{duration:t,delay:e,easing:n}}function cc(t,e,n,r,i,s,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:r,duration:i,delay:s,totalTime:i+s,easing:o,subTimeline:a}}class uc{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const hc=new RegExp(":enter","g"),dc=new RegExp(":leave","g");function fc(t,e,n,r,i,s={},o={},a,l,c=[]){return(new pc).buildKeyframes(t,e,n,r,i,s,o,a,l,c)}class pc{buildKeyframes(t,e,n,r,i,s,o,a,l,c=[]){l=l||new uc;const u=new gc(t,e,l,r,i,c,[]);u.options=a,u.currentTimeline.setStyles([s],null,u.errors,a),Kl(this,n,u);const h=u.timelines.filter(t=>t.containsAnimation());if(h.length&&Object.keys(o).length){const t=h[h.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,u.errors,a)}return h.length?h.map(t=>t.buildKeyframes()):[cc(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const r=e.createSubContext(t.options),i=e.currentTimeline.currentTime,s=this._visitSubInstructions(n,r,r.options);i!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let r=e.currentTimeline.currentTime;const i=null!=n.duration?Rl(n.duration):null,s=null!=n.delay?Rl(n.delay):null;return 0!==i&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,i,s);r=Math.max(r,n.duration+n.delay)}),r}visitReference(t,e){e.updateOptions(t.options,!0),Kl(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let r=e;const i=t.options;if(i&&(i.params||i.delay)&&(r=e.createSubContext(i),r.transformIntoNewTimeline(),null!=i.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=yc);const t=Rl(i.delay);r.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>Kl(this,t,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let r=e.currentTimeline.currentTime;const i=t.options&&t.options.delay?Rl(t.options.delay):0;t.steps.forEach(s=>{const o=e.createSubContext(t.options);i&&o.delayNextStep(i),Kl(this,s,o),r=Math.max(r,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return Il(e.params?Vl(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),r.snapshotCurrentStyles());const i=t.style;5==i.type?this.visitKeyframes(i,e):(e.incrementTime(n.duration),this.visitStyle(i,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,r=e.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();const i=r&&r.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(i):n.setStyles(t.styles,i,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,r=e.currentTimeline.duration,i=n.duration,s=e.createSubContext().currentTimeline;s.easing=n.easing,t.styles.forEach(t=>{s.forwardTime((t.offset||0)*i),s.setStyles(t.styles,t.easing,e.errors,e.options),s.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(s),e.transformIntoNewTimeline(r+i),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,r=t.options||{},i=r.delay?Rl(r.delay):0;i&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=yc);let s=n;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=o.length;let a=null;o.forEach((n,r)=>{e.currentQueryIndex=r;const o=e.createSubContext(t.options,n);i&&o.delayNextStep(i),n===e.element&&(a=o.currentTimeline),Kl(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,r=e.currentTimeline,i=t.timings,s=Math.abs(i.duration),o=s*(e.currentQueryTotal-1);let a=s*e.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;Kl(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-c+(r.startTime-n.currentTimeline.startTime)}}const yc={};class gc{constructor(t,e,n,r,i,s,o,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=i,this.errors=s,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=yc,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new mc(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let r=this.options;null!=n.duration&&(r.duration=Rl(n.duration)),null!=n.delay&&(r.delay=Rl(n.delay));const i=n.params;if(i){let t=r.params;t||(t=this.options.params={}),Object.keys(i).forEach(n=>{e&&t.hasOwnProperty(n)||(t[n]=Vl(i[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const r=e||this.element,i=new gc(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return i.previousNode=this.previousNode,i.currentAnimateTimings=this.currentAnimateTimings,i.options=this._copyOptions(),i.updateOptions(t),i.currentQueryIndex=this.currentQueryIndex,i.currentQueryTotal=this.currentQueryTotal,i.parentContext=this,this.subContextCount++,i}transformIntoNewTimeline(t){return this.previousNode=yc,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const r={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},i=new vc(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(i),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,r,i,s){let o=[];if(r&&o.push(this.element),t.length>0){t=(t=t.replace(hc,"."+this._enterClassName)).replace(dc,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),o.push(...e)}return i||0!=o.length||s.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class mc{constructor(t,e,n,r){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new mc(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||Ga,this._currentKeyframe[t]=Ga}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&(this._previousKeyframe.easing=e);const i=r&&r.params||{},s=function(t,e){const n={};let r;return t.forEach(t=>{"*"===t?(r=r||Object.keys(e),r.forEach(t=>{n[t]=Ga})):Dl(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(s).forEach(t=>{const e=Vl(s[t],i,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:Ga),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],r=t._styleSummary[e];(!n||r.time>n.time)&&this._updateStyle(e,r.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((i,s)=>{const o=Dl(i,!0);Object.keys(o).forEach(n=>{const r=o[n];"!"==r?t.add(n):r==Ga&&e.add(n)}),n||(o.offset=s/this.duration),r.push(o)});const i=t.size?Wl(t.values()):[],s=e.size?Wl(e.values()):[];if(n){const t=r[0],e=Pl(t);t.offset=0,e.offset=1,r=[t,e]}return cc(this.element,r,i,s,this.duration,this.startTime,this.easing,!1)}}class vc extends mc{constructor(t,e,n,r,i,s,o=!1){super(t,e,s.delay),this.element=e,this.keyframes=n,this.preStyleProps=r,this.postStyleProps=i,this._stretchStartingKeyframe=o,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const i=[],s=n+e,o=e/s,a=Dl(t[0],!1);a.offset=0,i.push(a);const l=Dl(t[0],!1);l.offset=xc(o),i.push(l);const c=t.length-1;for(let r=1;r<=c;r++){let o=Dl(t[r],!1);o.offset=xc((e+o.offset*n)/s),i.push(o)}n=s,e=0,r="",t=i}return cc(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function xc(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class bc{}class _c extends bc{normalizePropertyName(t,e){return Ul(t)}normalizeStyleValue(t,e,n,r){let i="";const s=n.toString().trim();if(wc[e]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&r.push(`Please provide a CSS unit value for ${t}:${n}`)}return s+i}}const wc=(()=>function(t){const e={};return t.forEach(t=>e[t]=!0),e}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function kc(t,e,n,r,i,s,o,a,l,c,u,h,d){return{type:0,element:t,triggerName:e,isRemovalTransition:i,fromState:n,fromStyles:s,toState:r,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:h,errors:d}}const Sc={};class Mc{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function(t,e,n,r,i){return t.some(t=>t(e,n,r,i))}(this.ast.matchers,t,e,n,r)}buildStyles(t,e,n){const r=this._stateStyles["*"],i=this._stateStyles[t],s=r?r.buildStyles(e,n):{};return i?i.buildStyles(e,n):s}build(t,e,n,r,i,s,o,a,l,c){const u=[],h=this.ast.options&&this.ast.options.params||Sc,d=this.buildStyles(n,o&&o.params||Sc,u),f=a&&a.params||Sc,p=this.buildStyles(r,f,u),y=new Set,g=new Map,m=new Map,v="void"===r,x={params:Object.assign(Object.assign({},h),f)},b=c?[]:fc(t,e,this.ast.animation,i,s,d,p,x,l,u);let _=0;if(b.forEach(t=>{_=Math.max(t.duration+t.delay,_)}),u.length)return kc(e,this._triggerName,n,r,v,d,p,[],[],g,m,_,u);b.forEach(t=>{const n=t.element,r=ul(g,n,{});t.preStyleProps.forEach(t=>r[t]=!0);const i=ul(m,n,{});t.postStyleProps.forEach(t=>i[t]=!0),n!==e&&y.add(n)});const w=Wl(y.values());return kc(e,this._triggerName,n,r,v,d,p,b,w,g,m,_)}}class Ec{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const n={},r=Pl(this.defaultParams);return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(r[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const i=t;Object.keys(i).forEach(t=>{let s=i[t];s.length>1&&(s=Vl(s,r,e)),n[t]=s})}}),n}}class Cc{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new Ec(t.style,t.options&&t.options.params||{})}),Tc(this.states,"true","1"),Tc(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new Mc(t,e,this.states))}),this.fallbackTransition=new Mc(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,r){return this.transitionFactories.find(i=>i.match(t,e,n,r))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function Tc(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const Ac=new uc;class Nc{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],r=rc(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=r}_buildPlayer(t,e,n){const r=t.element,i=ol(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(r,i,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const r=[],i=this._animations[t];let s;const o=new Map;if(i?(s=fc(this._driver,e,i,Ml,El,{},{},n,Ac,r),s.forEach(t=>{const e=ul(o,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(r.push("The requested animation doesn't exist or has already been destroyed"),s=[]),r.length)throw new Error("Unable to create the animation due to the following errors: "+r.join("\n"));o.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,Ga)})});const a=sl(s.map(t=>{const e=o.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e}listen(t,e,n,r){const i=cl(e,"","","");return al(this._getPlayer(t),n,i,r),()=>{}}command(t,e,n,r){if("register"==n)return void this.register(t,r[0]);if("create"==n)return void this.create(t,e,r[0]||{});const i=this._getPlayer(t);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const Rc="ng-animate-queued",Oc="ng-animate-disabled",Ic=".ng-animate-disabled",Pc=[],Dc={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},jc={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class Fc{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=null!=(r=n?t.value:t)?r:null,n){const e=Pl(t);delete e.value,this.options=e}else this.options={};var r;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const zc="void",qc=new Fc(zc);class Lc{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Yc(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(i=n)&&"done"!=i)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);var i;const s=ul(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=ul(this._engine.statesByElement,t,{});return a.hasOwnProperty(e)||(Yc(t,Cl),Yc(t,"ng-trigger-"+e),a[e]=qc),()=>{this._engine.afterFlush(()=>{const t=s.indexOf(o);t>=0&&s.splice(t,1),this._triggers[e]||delete a[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,r=!0){const i=this._getTrigger(e),s=new Hc(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(Yc(t,Cl),Yc(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let a=o[e];const l=new Fc(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[e]=l,a||(a=qc),l.value!==zc&&a.value===l.value){if(!function(t,e){const n=Object.keys(t),r=Object.keys(e);if(n.length!=r.length)return!1;for(let i=0;i<n.length;i++){const r=n[i];if(!e.hasOwnProperty(r)||t[r]!==e[r])return!1}return!0}(a.params,l.params)){const e=[],n=i.matchStyles(a.value,a.params,e),r=i.matchStyles(l.value,l.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{ql(t,n),zl(t,r)})}return}const c=ul(this._engine.playersByElement,t,[]);c.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let u=i.matchTransition(a.value,l.value,t,l.params),h=!1;if(!u){if(!r)return;u=i.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:u,fromState:a,toState:l,player:s,isFallbackTransition:h}),h||(Yc(t,Rc),s.onStart(()=>{Qc(t,Rc)})),s.onDone(()=>{let e=this.players.indexOf(s);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(s);t>=0&&n.splice(t,1)}}),this.players.push(s),c.push(s),s}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const n=this._engine.driver.query(t,Tl,!0);n.forEach(t=>{if(t.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,n,r){const i=this._engine.statesByElement.get(t);if(i){const s=[];if(Object.keys(i).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,zc,r);n&&s.push(n)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&sl(s).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const n=new Set;e.forEach(e=>{const r=e.name;if(n.has(r))return;n.add(r);const i=this._triggers[r].fallbackTransition,s=this._engine.statesByElement.get(t)[r]||qc,o=new Fc(zc),a=new Hc(this.id,r,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:r,transition:i,fromState:s,toState:o,player:a,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)r=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)n.markElementAsRemoved(this.id,t,!1,e);else{const r=t.__ng_removed;r&&r!==Dc||(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Yc(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const r=n.player;if(r.destroyed)return;const i=n.element,s=this._elementListeners.get(i);s&&s.forEach(e=>{if(e.name==n.triggerName){const r=cl(i,n.triggerName,n.fromState.value,n.toState.value);r._data=t,al(n.player,e.phase,r,e.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,r=e.transition.ast.depCount;return 0==n||0==r?n-r:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class Bc{constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new Lc(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let r=!1;for(let i=n;i>=0;i--)if(this.driver.containsElement(this._namespaceList[i].hostElement,e)){this._namespaceList.splice(i+1,0,t),r=!0;break}r||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let r=this._namespaceLookup[t];r&&r.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const i=n[t[r]].namespaceId;if(i){const t=this._fetchNamespace(i);t&&e.add(t)}}}return e}trigger(t,e,n,r){if(Vc(e)){const i=this._fetchNamespace(t);if(i)return i.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!Vc(e))return;const i=e.__ng_removed;if(i&&i.setForRemoval){i.setForRemoval=!1,i.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const r=this._fetchNamespace(t);r&&r.insertNode(e,n)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Yc(t,Oc)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Qc(t,Oc))}removeNode(t,e,n,r){if(Vc(e)){const i=t?this._fetchNamespace(t):null;if(i?i.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),n){const n=this.namespacesByHostElement.get(e);n&&n.id!==t&&n.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,n,r){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,r,i){return Vc(e)?this._fetchNamespace(t).listen(e,n,r,i):()=>{}}_buildInstruction(t,e,n,r,i){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,r,t.fromState.options,t.toState.options,e,i)}destroyInnerAnimations(t){let e=this.driver.query(t,Tl,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,Nl,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return sl(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=Dc,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,Ic)&&this.markElementAsDisabled(t,!1),this.driver.query(t,Ic,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++)Yc(this.collectedEnterElements[n],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const n=[];try{e=this._flushAnimations(n,t)}finally{for(let t=0;t<n.length;t++)n[t]()}}else for(let n=0;n<this.collectedLeaveElements.length;n++)this.processLeaveNode(this.collectedLeaveElements[n]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?sl(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))}_flushAnimations(t,e){const n=new uc,r=[],i=new Map,s=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(t=>{c.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let n=0;n<e.length;n++)c.add(e[n])});const u=this.bodyNode,h=Array.from(this.statesByElement.keys()),d=Uc(h,this.collectedEnterElements),f=new Map;let p=0;d.forEach((t,e)=>{const n=Ml+p++;f.set(e,n),t.forEach(t=>Yc(t,n))});const y=[],g=new Set,m=new Set;for(let N=0;N<this.collectedLeaveElements.length;N++){const t=this.collectedLeaveElements[N],e=t.__ng_removed;e&&e.setForRemoval&&(y.push(t),g.add(t),e.hasAnimation?this.driver.query(t,".ng-star-inserted",!0).forEach(t=>g.add(t)):m.add(t))}const v=new Map,x=Uc(h,Array.from(g));x.forEach((t,e)=>{const n=El+p++;v.set(e,n),t.forEach(t=>Yc(t,n))}),t.push(()=>{d.forEach((t,e)=>{const n=f.get(e);t.forEach(t=>Qc(t,n))}),x.forEach((t,e)=>{const n=v.get(e);t.forEach(t=>Qc(t,n))}),y.forEach(t=>{this.processLeaveNode(t)})});const b=[],_=[];for(let N=this._namespaceList.length-1;N>=0;N--)this._namespaceList[N].drainQueuedTransitions(e).forEach(t=>{const e=t.player,i=t.element;if(b.push(e),this.collectedEnterElements.length){const t=i.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const c=!u||!this.driver.containsElement(u,i),h=v.get(i),d=f.get(i),p=this._buildInstruction(t,n,d,h,c);if(p.errors&&p.errors.length)_.push(p);else{if(c)return e.onStart(()=>ql(i,p.fromStyles)),e.onDestroy(()=>zl(i,p.toStyles)),void r.push(e);if(t.isFallbackTransition)return e.onStart(()=>ql(i,p.fromStyles)),e.onDestroy(()=>zl(i,p.toStyles)),void r.push(e);p.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(i,p.timelines),s.push({instruction:p,player:e,element:i}),p.queriedElements.forEach(t=>ul(o,t,[]).push(e)),p.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),p.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let r=l.get(e);r||l.set(e,r=new Set),n.forEach(t=>r.add(t))})}});if(_.length){const t=[];_.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),b.forEach(t=>t.destroy()),this.reportError(t)}const w=new Map,k=new Map;s.forEach(t=>{const e=t.element;n.has(e)&&(k.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,w))}),r.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{ul(w,e,[]).push(t),t.destroy()})});const S=y.filter(t=>Zc(t,a,l)),M=new Map;$c(M,this.driver,m,l,Ga).forEach(t=>{Zc(t,a,l)&&S.push(t)});const E=new Map;d.forEach((t,e)=>{$c(E,this.driver,new Set(t),a,"!")}),S.forEach(t=>{const e=M.get(t),n=E.get(t);M.set(t,Object.assign(Object.assign({},e),n))});const C=[],T=[],A={};s.forEach(t=>{const{element:e,player:s,instruction:o}=t;if(n.has(e)){if(c.has(e))return s.onDestroy(()=>zl(e,o.toStyles)),s.disabled=!0,s.overrideTotalTime(o.totalTime),void r.push(s);let t=A;if(k.size>1){let n=e;const r=[];for(;n=n.parentNode;){const e=k.get(n);if(e){t=e;break}r.push(n)}r.forEach(e=>k.set(e,t))}const n=this._buildAnimation(s.namespaceId,o,w,i,E,M);if(s.setRealPlayer(n),t===A)C.push(s);else{const e=this.playersByElement.get(t);e&&e.length&&(s.parentPlayer=sl(e)),r.push(s)}}else ql(e,o.fromStyles),s.onDestroy(()=>zl(e,o.toStyles)),T.push(s),c.has(e)&&r.push(s)}),T.forEach(t=>{const e=i.get(t.element);if(e&&e.length){const n=sl(e);t.setRealPlayer(n)}}),r.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let N=0;N<y.length;N++){const t=y[N],e=t.__ng_removed;if(Qc(t,El),e&&e.hasAnimation)continue;let n=[];if(o.size){let e=o.get(t);e&&e.length&&n.push(...e);let r=this.driver.query(t,Nl,!0);for(let t=0;t<r.length;t++){let e=o.get(r[t]);e&&e.length&&n.push(...e)}}const r=n.filter(t=>!t.destroyed);r.length?Kc(this,t,r):this.processLeaveNode(t)}return y.length=0,C.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),C}elementContainsData(t,e){let n=!1;const r=e.__ng_removed;return r&&r.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,r,i){let s=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(s=e)}else{const e=this.playersByElement.get(t);if(e){const t=!i||i==zc;e.forEach(e=>{e.queued||(t||e.triggerName==r)&&s.push(e)})}}return(n||r)&&(s=s.filter(t=>!(n&&n!=t.namespaceId||r&&r!=t.triggerName))),s}_beforeAnimationBuild(t,e,n){const r=e.element,i=e.isRemovalTransition?void 0:t,s=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,a=t!==r,l=ul(n,t,[]);this._getPreviousPlayers(t,a,i,s,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}ql(r,e.fromStyles)}_buildAnimation(t,e,n,r,i,s){const o=e.triggerName,a=e.element,l=[],c=new Set,u=new Set,h=e.timelines.map(e=>{const h=e.element;c.add(h);const d=h.__ng_removed;if(d&&d.removedBeforeQueried)return new nl(e.duration,e.delay);const f=h!==a,p=function(t){const e=[];return function t(e,n){for(let r=0;r<e.length;r++){const i=e[r];i instanceof rl?t(i.players,n):n.push(i)}}(t,e),e}((n.get(h)||Pc).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===h),y=i.get(h),g=s.get(h),m=ol(0,this._normalizer,0,e.keyframes,y,g),v=this._buildPlayer(e,m,p);if(e.subTimeline&&r&&u.add(h),f){const e=new Hc(t,o,h);e.setRealPlayer(v),l.push(e)}return v});l.forEach(t=>{ul(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,n){let r;if(t instanceof Map){if(r=t.get(e),r){if(r.length){const t=r.indexOf(n);r.splice(t,1)}0==r.length&&t.delete(e)}}else if(r=t[e],r){if(r.length){const t=r.indexOf(n);r.splice(t,1)}0==r.length&&delete t[e]}return r}(this.playersByQueriedElement,t.element,t))}),c.forEach(t=>Yc(t,Al));const d=sl(h);return d.onDestroy(()=>{c.forEach(t=>Qc(t,Al)),zl(a,e.toStyles)}),u.forEach(t=>{ul(r,t,[]).push(d)}),d}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new nl(t.duration,t.delay)}}class Hc{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new nl,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>al(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){ul(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Vc(t){return t&&1===t.nodeType}function Wc(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function $c(t,e,n,r,i){const s=[];n.forEach(t=>s.push(Wc(t)));const o=[];r.forEach((n,r)=>{const s={};n.forEach(t=>{const n=s[t]=e.computeStyle(r,t,i);n&&0!=n.length||(r.__ng_removed=jc,o.push(r))}),t.set(r,s)});let a=0;return n.forEach(t=>Wc(t,s[a++])),o}function Uc(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const r=new Set(e),i=new Map;return e.forEach(t=>{const e=function t(e){if(!e)return 1;let s=i.get(e);if(s)return s;const o=e.parentNode;return s=n.has(o)?o:r.has(o)?1:t(o),i.set(e,s),s}(t);1!==e&&n.get(e).push(t)}),n}function Yc(t,e){if(t.classList)t.classList.add(e);else{let n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function Qc(t,e){if(t.classList)t.classList.remove(e);else{let n=t.$$classes;n&&delete n[e]}}function Kc(t,e,n){sl(n).onDone(()=>t.processLeaveNode(e))}function Zc(t,e,n){const r=n.get(t);if(!r)return!1;let i=e.get(t);return i?r.forEach(t=>i.add(t)):e.set(t,r),n.delete(t),!0}class Xc{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new Bc(t,e,n),this._timelineEngine=new Nc(t,e,n),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,n,r,i){const s=t+"-"+r;let o=this._triggerCache[s];if(!o){const t=[],e=rc(this._driver,i,t);if(t.length)throw new Error(`The animation trigger "${r}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new Cc(t,e)}(r,e),this._triggerCache[s]=o}this._transitionEngine.registerTrigger(e,r,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,r){this._transitionEngine.insertNode(t,e,n,r)}onRemove(t,e,n,r){this._transitionEngine.removeNode(t,e,r||!1,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,r){if("@"==n.charAt(0)){const[t,i]=hl(n);this._timelineEngine.command(t,e,i,r)}else this._transitionEngine.trigger(t,e,n,r)}listen(t,e,n,r,i){if("@"==n.charAt(0)){const[t,r]=hl(n);return this._timelineEngine.listen(t,e,r,i)}return this._transitionEngine.listen(t,e,n,r,i)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function Gc(t,e){let n=null,r=null;return Array.isArray(e)&&e.length?(n=tu(e[0]),e.length>1&&(r=tu(e[e.length-1]))):e&&(n=tu(e)),n||r?new Jc(t,n,r):null}let Jc=(()=>{class t{constructor(e,n,r){this._element=e,this._startStyles=n,this._endStyles=r,this._state=0;let i=t.initialStylesByElement.get(e);i||t.initialStylesByElement.set(e,i={}),this._initialStyles=i}start(){this._state<1&&(this._startStyles&&zl(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(zl(this._element,this._initialStyles),this._endStyles&&(zl(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(ql(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ql(this._element,this._endStyles),this._endStyles=null),zl(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function tu(t){let e=null;const n=Object.keys(t);for(let r=0;r<n.length;r++){const i=n[r];eu(i)&&(e=e||{},e[i]=t[i])}return e}function eu(t){return"display"===t||"position"===t}const nu="animation",ru="animationend";class iu{constructor(t,e,n,r,i,s,o){this._element=t,this._name=e,this._duration=n,this._delay=r,this._easing=i,this._fillMode=s,this._onDoneFn=o,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=t=>this._handleCallback(t)}apply(){!function(t,e){const n=uu(t,"").trim();n.length&&(function(t,e){let n=0;for(let r=0;r<t.length;r++)","===t.charAt(r)&&n++}(n),e=`${n}, ${e}`),cu(t,"",e)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),lu(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){su(this._element,this._name,"paused")}resume(){su(this._element,this._name,"running")}setPosition(t){const e=ou(this._element,this._name);this._position=t*this._duration,cu(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),lu(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=uu(t,"").split(","),r=au(n,e);r>=0&&(n.splice(r,1),cu(t,"",n.join(",")))}(this._element,this._name))}}function su(t,e,n){cu(t,"PlayState",n,ou(t,e))}function ou(t,e){const n=uu(t,"");return n.indexOf(",")>0?au(n.split(","),e):au([n],e)}function au(t,e){for(let n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function lu(t,e,n){n?t.removeEventListener(ru,e):t.addEventListener(ru,e)}function cu(t,e,n,r){const i=nu+e;if(null!=r){const e=t.style[i];if(e.length){const t=e.split(",");t[r]=n,n=t.join(",")}}t.style[i]=n}function uu(t,e){return t.style[nu+e]}class hu{constructor(t,e,n,r,i,s,o,a){this.element=t,this.keyframes=e,this.animationName=n,this._duration=r,this._delay=i,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=r+i,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new iu(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:Zl(this.element,n))})}this.currentSnapshot=t}}class du extends nl{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=wl(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class fu{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return vl(t)}matchesElement(t,e){return xl(t,e)}containsElement(t,e){return bl(t,e)}query(t,e,n){return _l(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){n=n.map(t=>wl(t));let r=`@keyframes ${e} {\n`,i="";n.forEach(t=>{i=" ";const e=parseFloat(t.offset);r+=`${i}${100*e}% {\n`,i+=" ",Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(r+=`${i}animation-timing-function: ${n};\n`));default:return void(r+=`${i}${e}: ${n};\n`)}}),r+=i+"}\n"}),r+="}\n";const s=document.createElement("style");return s.innerHTML=r,s}animate(t,e,n,r,i,s=[],o){o&&this._notifyFaultyScrubber();const a=s.filter(t=>t instanceof hu),l={};Yl(n,r)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const c=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=Ql(t,e,l));if(0==n)return new du(t,c);const u="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(h);const d=Gc(t,e),f=new hu(t,e,u,n,r,i,c,d);return f.onDestroy(()=>{var t;(t=h).parentNode.removeChild(t)}),f}_notifyFaultyScrubber(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}class pu{constructor(t,e,n,r){this.element=t,this.keyframes=e,this.options=n,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:Zl(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class yu{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(gu().toString()),this._cssKeyframesDriver=new fu}validateStyleProperty(t){return vl(t)}matchesElement(t,e){return xl(t,e)}containsElement(t,e){return bl(t,e)}query(t,e,n){return _l(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,r,i,s=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,r,i,s);const a={duration:n,delay:r,fill:0==r?"both":"forwards"};i&&(a.easing=i);const l={},c=s.filter(t=>t instanceof pu);Yl(n,r)&&c.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const u=Gc(t,e=Ql(t,e=e.map(t=>Dl(t,!1)),l));return new pu(t,e,a,u)}}function gu(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}let mu=(()=>{class t extends Xa{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:Jt.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?Ja(t):t;return bu(this._renderer,null,e,"register",[n]),new vu(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(Wt(Gi),Wt(sa))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();class vu extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new xu(this._id,t,e||{},this._renderer)}}class xu{constructor(t,e,n,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return bu(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(t){this._command("setPosition",t)}getPosition(){return 0}}function bu(t,e,n,r,i){return t.setProperty(e,`@@${n}:${r}`,i)}const _u="@",wu="@.disabled";let ku=(()=>{class t{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new Su("",n,this.engine),this._rendererCache.set(n,t)),t}const r=e.id,i=e.id+"-"+this._currentId;this._currentId++,this.engine.register(i,t);const s=e=>{Array.isArray(e)?e.forEach(s):this.engine.registerTrigger(r,i,t,e.name,e)};return e.data.animation.forEach(s),new Mu(this,i,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&t<this._microtaskId?this._zone.run(()=>e(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(Wt(Gi),Wt(Xc),Wt(xo))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();class Su{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,!0)}removeChild(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,r){this.delegate.setAttribute(t,e,n,r)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,r){this.delegate.setStyle(t,e,n,r)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){e.charAt(0)==_u&&e==wu?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class Mu extends Su{constructor(t,e,n,r){super(e,n,r),this.factory=t,this.namespaceId=e}setProperty(t,e,n){e.charAt(0)==_u?"."==e.charAt(1)&&e==wu?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if(e.charAt(0)==_u){const r=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let i=e.substr(1),s="";return i.charAt(0)!=_u&&([i,s]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(i)),this.engine.listen(this.namespaceId,r,i,s,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}let Eu=(()=>{class t extends Xc{constructor(t,e,n){super(t.body,e,n)}}return t.\u0275fac=function(e){return new(e||t)(Wt(sa),Wt(Sl),Wt(bc))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const Cu=[{provide:Sl,useFactory:function(){return"function"==typeof gu()?new yu:new fu}},{provide:new It("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:Xa,useClass:mu},{provide:bc,useFactory:function(){return new _c}},{provide:Xc,useClass:Eu},{provide:Gi,useFactory:function(t,e,n){return new ku(t,e,n)},deps:[za,Xc,xo]}];let Tu=(()=>{class t{}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},providers:Cu,imports:[Za]}),t})(),Au=(()=>{class t{constructor(t){this._document=t}ngOnDestroy(){const t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container",e=this._document.querySelectorAll("."+t);if(null==e?void 0:e.length)this._containerElement=e[0];else{const e=this._document.createElement("div");e.classList.add(t),this._document.body.appendChild(e),this._containerElement=e}}}return t.\u0275fac=function(e){return new(e||t)(Wt(sa))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const Nu={provide:io,useFactory:function(t,e){return()=>{if(ha(e)){const e=Array.from(t.querySelectorAll(`[class*=${Ru}]`)),n=/\bflex-layout-.+?\b/g;e.forEach(t=>{t.classList.contains(Ru+"ssr")&&t.parentNode?t.parentNode.removeChild(t):t.className.replace(n,"")})}}},deps:[sa,ro],multi:!0},Ru="flex-layout-";let Ou=(()=>{class t{}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},providers:[Nu]}),t})();const Iu={addFlexToParent:!0,addOrientationBps:!1,disableDefaultBps:!1,disableVendorPrefixes:!1,serverLoaded:!1,useColumnBasisZero:!0,printWithBreakpoints:[],mediaTriggerAutoRestore:!0,ssrObserveBreakpoints:[]},Pu=new It("Flex Layout token, config options for the library",{providedIn:"root",factory:()=>Iu}),Du=new It("FlexLayoutServerLoaded",{providedIn:"root",factory:()=>!1}),ju=new It("Flex Layout token, collect all breakpoints into one provider",{providedIn:"root",factory:()=>null});let Fu=(()=>{class t{}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},imports:[[Ou]]}),t})(),zu=(()=>{class t{}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},imports:[[Ou,fa]]}),t})(),qu=(()=>{class t{}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},imports:[[Ou]]}),t})(),Lu=(()=>{class t{constructor(t,e){(function(t){return"server"===t})(e)&&!t&&console.warn("Warning: Flex Layout loaded on the server without FlexLayoutServerModule")}static withConfig(e,n=[]){return{ngModule:t,providers:e.serverLoaded?[{provide:Pu,useValue:Object.assign(Object.assign({},Iu),e)},{provide:ju,useValue:n,multi:!0},{provide:Du,useValue:!0}]:[{provide:Pu,useValue:Object.assign(Object.assign({},Iu),e)},{provide:ju,useValue:n,multi:!0}]}}}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)(Wt(Du),Wt(ro))},imports:[[zu,Fu,qu],zu,Fu,qu]}),t})();var Bu=n("5vqC");class Hu{constructor(t,e,n,r,i){this.element=t,this.newWidth=e,this.newHeight=n,this.oldWidth=r,this.oldHeight=i}}let Vu=(()=>{class t{constructor(t){this.element=t,this.resized=new qs}ngOnInit(){Bu.ResizeSensor&&(this.resizeSensor=new Bu.ResizeSensor(this.element.nativeElement,()=>this.onResized()))}ngOnDestroy(){this.resizeSensor&&this.resizeSensor.detach()}onResized(){const t=this.element.nativeElement.clientWidth,e=this.element.nativeElement.clientHeight;if(t===this.oldWidth&&e===this.oldHeight)return;const n=new Hu(this.element,t,e,this.oldWidth,this.oldHeight);this.oldWidth=this.element.nativeElement.clientWidth,this.oldHeight=this.element.nativeElement.clientHeight,this.resized.emit(n)}}return t.\u0275fac=function(e){return new(e||t)(function(t,e=it.Default){const n=Be();return null==n?Wt(t,e):On(Ve(),n,bt(t),e)}(Zi))},t.\u0275dir=ce({type:t,selectors:[["","resized",""]],outputs:{resized:"resized"}}),t})(),Wu=(()=>{class t{}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},imports:[[]]}),t})();var $u={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Uu=/([astvzqmhlc])([^astvzqmhlc]*)/gi,Yu=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,Qu=function(t){var e=[],n=String(t).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(Uu,(function(t,n,r){var i=n.toLowerCase(),s=function(t){var e=t.match(Yu);return e?e.map(Number):[]}(r),o=n;if("m"===i&&s.length>2&&(e.push([o].concat(s.splice(0,2))),i="l",o="m"===o?"l":"L"),s.length<$u[i])return"";for(e.push([o].concat(s.splice(0,$u[i])));s.length>=$u[i]&&s.length&&$u[i];)e.push([o].concat(s.splice(0,$u[i])));return""})),e};function Ku(t){return function(t){if(Array.isArray(t))return Zu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Zu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zu(t,e):void 0}}(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 Zu(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 Xu(t,e){var n=t.x*Math.cos(e)-t.y*Math.sin(e),r=t.y*Math.cos(e)+t.x*Math.sin(e);t.x=n,t.y=r}function Gu(t,e,n){t.x+=e,t.y+=n}function Ju(t,e){t.x*=e,t.y*=e}"undefined"!=typeof window&&function(t){if(void 0!==t&&t.CanvasRenderingContext2D&&(!t.Path2D||!function(t){var e=t.document.createElement("canvas").getContext("2d"),n=new t.Path2D("M0 0 L1 1");return e.strokeStyle="red",e.lineWidth=1,e.stroke(n),255===e.getImageData(0,0,1,1).data[0]}(t))){var e=function(){function t(e){var n;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.segments=[],e&&e instanceof t?(n=this.segments).push.apply(n,Ku(e.segments)):e&&(this.segments=Qu(e))}var e;return(e=[{key:"addPath",value:function(e){var n;e&&e instanceof t&&(n=this.segments).push.apply(n,Ku(e.segments))}},{key:"moveTo",value:function(t,e){this.segments.push(["M",t,e])}},{key:"lineTo",value:function(t,e){this.segments.push(["L",t,e])}},{key:"arc",value:function(t,e,n,r,i,s){this.segments.push(["AC",t,e,n,r,i,!!s])}},{key:"arcTo",value:function(t,e,n,r,i){this.segments.push(["AT",t,e,n,r,i])}},{key:"ellipse",value:function(t,e,n,r,i,s,o,a){this.segments.push(["E",t,e,n,r,i,s,o,!!a])}},{key:"closePath",value:function(){this.segments.push(["Z"])}},{key:"bezierCurveTo",value:function(t,e,n,r,i,s){this.segments.push(["C",t,e,n,r,i,s])}},{key:"quadraticCurveTo",value:function(t,e,n,r){this.segments.push(["Q",t,e,n,r])}},{key:"rect",value:function(t,e,n,r){this.segments.push(["R",t,e,n,r])}}])&&function(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)}}(t.prototype,e),t}(),n=t.CanvasRenderingContext2D.prototype.fill,r=t.CanvasRenderingContext2D.prototype.stroke;t.CanvasRenderingContext2D.prototype.fill=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i="nonzero";if(0===e.length||1===e.length&&"string"==typeof e[0])n.apply(this,e);else{2===arguments.length&&(i=e[1]);var o=e[0];s(this,o.segments),n.call(this,i)}},t.CanvasRenderingContext2D.prototype.stroke=function(t){t?(s(this,t.segments),r.call(this)):r.call(this)};var i=t.CanvasRenderingContext2D.prototype.isPointInPath;t.CanvasRenderingContext2D.prototype.isPointInPath=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("Path2D"===e[0].constructor.name){var r=e[1],o=e[2],a=e[3]||"nonzero",l=e[0];return s(this,l.segments),i.apply(this,[r,o,a])}return i.apply(this,e)},t.Path2D=e}function s(t,e){var n,r,i,s,o,a,l,c,u,h,d,f,p,y,g,m,v,x,b,_,w,k={x:0,y:0},S={x:0,y:0};t.beginPath();for(var M=0;M<e.length;++M){var E=e[M];switch("S"!==(g=E[0])&&"s"!==g&&"C"!==g&&"c"!==g&&(v=null,x=null),"T"!==g&&"t"!==g&&"Q"!==g&&"q"!==g&&(b=null,_=null),g){case"m":case"M":"m"===g?(d+=E[1],f+=E[2]):(d=E[1],f=E[2]),"M"!==g&&k||(k={x:d,y:f}),t.moveTo(d,f);break;case"l":t.lineTo(d+=E[1],f+=E[2]);break;case"L":t.lineTo(d=E[1],f=E[2]);break;case"H":t.lineTo(d=E[1],f);break;case"h":t.lineTo(d+=E[1],f);break;case"V":t.lineTo(d,f=E[1]);break;case"v":t.lineTo(d,f+=E[1]);break;case"a":case"A":"a"===g?(d+=E[6],f+=E[7]):(d=E[6],f=E[7]),p=E[1],y=E[2],l=E[3]*Math.PI/180,i=!!E[4],s=!!E[5],Xu(a={x:(S.x-(o={x:d,y:f}).x)/2,y:(S.y-o.y)/2},-l),(c=a.x*a.x/(p*p)+a.y*a.y/(y*y))>1&&(p*=c=Math.sqrt(c),y*=c),u=p*p*y*y,h=p*p*a.y*a.y+y*y*a.x*a.x,Ju(m={x:p*a.y/y,y:-y*a.x/p},s!==i?Math.sqrt((u-h)/h)||0:-Math.sqrt((u-h)/h)||0),r=Math.atan2((a.y-m.y)/y,(a.x-m.x)/p),n=Math.atan2(-(a.y+m.y)/y,-(a.x+m.x)/p),Xu(m,l),Gu(m,(o.x+S.x)/2,(o.y+S.y)/2),t.save(),t.translate(m.x,m.y),t.rotate(l),t.scale(p,y),t.arc(0,0,1,r,n,!s),t.restore();break;case"C":t.bezierCurveTo(E[1],E[2],v=E[3],x=E[4],d=E[5],f=E[6]);break;case"c":t.bezierCurveTo(E[1]+d,E[2]+f,E[3]+d,E[4]+f,E[5]+d,E[6]+f),v=E[3]+d,x=E[4]+f,d+=E[5],f+=E[6];break;case"S":null!==v&&null!==v||(v=d,x=f),t.bezierCurveTo(2*d-v,2*f-x,E[1],E[2],E[3],E[4]),v=E[1],x=E[2],d=E[3],f=E[4];break;case"s":null!==v&&null!==v||(v=d,x=f),t.bezierCurveTo(2*d-v,2*f-x,E[1]+d,E[2]+f,E[3]+d,E[4]+f),v=E[1]+d,x=E[2]+f,d+=E[3],f+=E[4];break;case"Q":t.quadraticCurveTo(b=E[1],_=E[2],d=E[3],f=E[4]);break;case"q":t.quadraticCurveTo(b=E[1]+d,_=E[2]+f,d+=E[3],f+=E[4]);break;case"T":null!==b&&null!==b||(b=d,_=f),t.quadraticCurveTo(b=2*d-b,_=2*f-_,d=E[1],f=E[2]);break;case"t":null!==b&&null!==b||(b=d,_=f),t.quadraticCurveTo(b=2*d-b,_=2*f-_,d+=E[1],f+=E[2]);break;case"z":case"Z":d=k.x,f=k.y,k=void 0,t.closePath();break;case"AC":t.arc(d=E[1],f=E[2],E[3],r=E[4],n=E[5],w=E[6]);break;case"AT":t.arcTo(E[1],E[2],d=E[3],f=E[4],E[5]);break;case"E":d=E[1],f=E[2],p=E[3],y=E[4],l=E[5],r=E[6],n=E[7],w=E[8],t.save(),t.translate(d,f),t.rotate(l),t.scale(p,y),t.arc(0,0,1,r,n,w),t.restore();break;case"R":k={x:d=E[1],y:f=E[2]},t.rect(d,f,E[3],E[4])}S.x=d,S.y=f}}}(window);var th=Qu,eh=Object.prototype.hasOwnProperty,nh=Object.prototype.toString,rh=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,sh=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===nh.call(t)},oh=function(t){if(!t||"[object Object]"!==nh.call(t))return!1;var e,n=eh.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&eh.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;for(e in t);return void 0===e||eh.call(t,e)},ah=function(t,e){rh&&"__proto__"===e.name?rh(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},lh=function(t,e){if("__proto__"===e){if(!eh.call(t,e))return;if(ih)return ih(t,e).value}return t[e]},ch=function t(){var e,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},l=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});l<c;++l)if(null!=(e=arguments[l]))for(n in e)r=lh(a,n),a!==(i=lh(e,n))&&(u&&i&&(oh(i)||(s=sh(i)))?(s?(s=!1,o=r&&sh(r)?r:[]):o=r&&oh(r)?r:{},ah(a,{name:n,newValue:t(u,o,i)})):void 0!==i&&ah(a,{name:n,newValue:i}));return a},uh="1.3.0";function hh(t){return(hh="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 dh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fh(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 ph(t,e,n){return e&&fh(t.prototype,e),n&&fh(t,n),t}function yh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gh(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 mh(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?gh(Object(n),!0).forEach((function(e){yh(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gh(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function vh(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&bh(t,e)}function xh(t){return(xh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function bh(t,e){return(bh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function wh(t,e,n){return(wh=_h()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&bh(i,n.prototype),i}).apply(null,arguments)}function kh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Sh(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?kh(t):e}function Mh(t){var e=_h();return function(){var n,r=xh(t);if(e){var i=xh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sh(this,n)}}function Eh(t,e,n){return(Eh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=xh(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function Ch(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(l){i=!0,s=l}finally{try{r||null==a.return||a.return()}finally{if(i)throw s}}return n}}(t,e)||Ah(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Th(t){return function(t){if(Array.isArray(t))return Nh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Ah(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 Ah(t,e){if(t){if("string"==typeof t)return Nh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nh(t,e):void 0}}function Nh(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 Rh(t){return!!t.changedTouches}function Oh(t){return"number"==typeof t&&!isNaN(t)}function Ih(t){return"number"!=typeof t||isNaN(t)}function Ph(t){for(var e=t.length,n=NaN,r=NaN,i=NaN,s=NaN,o=0;o<e;o++)n=isNaN(n)?t[o].x:Math.min(n,t[o].x),r=isNaN(r)?t[o].x:Math.max(r,t[o].x),i=isNaN(i)?t[o].y:Math.min(i,t[o].y),s=isNaN(s)?t[o].y:Math.max(s,t[o].y);return[n,i,r,s]}function Dh(t){return[{x:t.x1||0,y:t.y1||0},{x:t.x2||0,y:t.y2||0}]}function jh(t){return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}]}function Fh(t){var e=Ch(Ph(t),4),n=e[0],r=e[1];return{x:n,y:r,width:e[2]-n,height:e[3]-r}}function zh(t){return{x1:t[0].x,y1:t[0].y,x2:t[1].x,y2:t[1].y}}function qh(t){var e=t||{},n=e.x,r=e.y,i=e.width,s=e.height,o=e.x1,a=e.x2,l=e.y1,c=e.y2,u=e.cy,h=e.r,d=e.vertices;return Oh(e.cx)&&Oh(u)&&Oh(h)?"circle":Oh(o)&&Oh(a)&&Oh(l)&&Oh(c)?"line":Oh(n)&&Oh(r)&&Oh(i)&&Oh(s)?"rect":Oh(n)&&Oh(r)?"point":Array.isArray(d)?d.every((function(t){return Array.isArray(t)}))?"geopolygon":"polygon":null}function Lh(t,e){return{x:e.x-t,y:e.y-t,width:e.width+t,height:e.height+t}}function Bh(t,e){var n=e.types,r=e.logger,i={},s=[];return Array.isArray(t)?s.push.apply(s,Th(t)):(r.warn('Deprecated: "data-source" configuration"'),s.push(t)),s.forEach((function(t,e){var s=n(t.type);if(s){var o=t.key;void 0===t.key&&(r.warn("Missing key for dataset. Using index '".concat(e,"' as key.")),o=e);var a=s({key:o,data:t.data,config:t.config});i[o]=a}})),function(t){return t?i[t]:i[Object.keys(i)[0]]}}var Hh=Math.PI,Vh=2*Hh,Wh=1e-6,$h=Vh-Wh;function Uh(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Yh(){return new Uh}function Qh(t){return function(){return t}}Uh.prototype=Yh.prototype={constructor:Uh,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,s){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+s)},arcTo:function(t,e,n,r,i){var s=this._x1,o=this._y1,a=(n=+n)-(t=+t),l=(r=+r)-(e=+e),c=s-t,u=o-e,h=c*c+u*u;if((i=+i)<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>Wh)if(Math.abs(u*a-l*c)>Wh&&i){var d=n-s,f=r-o,p=a*a+l*l,y=d*d+f*f,g=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((Hh-Math.acos((p+h-y)/(2*g*m)))/2),x=v/m,b=v/g;Math.abs(x-1)>Wh&&(this._+="L"+(t+x*c)+","+(e+x*u)),this._+="A"+i+","+i+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+b*a)+","+(this._y1=e+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,s){t=+t,e=+e,s=!!s;var o=(n=+n)*Math.cos(r),a=n*Math.sin(r),l=t+o,c=e+a,u=1^s,h=s?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Wh||Math.abs(this._y1-c)>Wh)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%Vh+Vh),h>$h?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>Wh&&(this._+="A"+n+","+n+",0,"+ +(h>=Hh)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Kh=Math.abs,Zh=Math.atan2,Xh=Math.cos,Gh=Math.max,Jh=Math.min,td=Math.sin,ed=Math.sqrt,nd=1e-12,rd=Math.PI,id=rd/2,sd=2*rd;function od(t){return t>1?0:t<-1?rd:Math.acos(t)}function ad(t){return t>=1?id:t<=-1?-id:Math.asin(t)}function ld(t){return t.innerRadius}function cd(t){return t.outerRadius}function ud(t){return t.startAngle}function hd(t){return t.endAngle}function dd(t){return t&&t.padAngle}function fd(t,e,n,r,i,s,o,a){var l=n-t,c=r-e,u=o-i,h=a-s,d=h*l-u*c;if(!(d*d<nd))return[t+(d=(u*(e-s)-h*(t-i))/d)*l,e+d*c]}function pd(t,e,n,r,i,s,o){var a=t-n,l=e-r,c=(o?s:-s)/ed(a*a+l*l),u=c*l,h=-c*a,d=t+u,f=e+h,p=n+u,y=r+h,g=(d+p)/2,m=(f+y)/2,v=p-d,x=y-f,b=v*v+x*x,_=i-s,w=d*y-p*f,k=(x<0?-1:1)*ed(Gh(0,_*_*b-w*w)),S=(w*x-v*k)/b,M=(-w*v-x*k)/b,E=(w*x+v*k)/b,C=(-w*v+x*k)/b,T=S-g,A=M-m,N=E-g,R=C-m;return T*T+A*A>N*N+R*R&&(S=E,M=C),{cx:S,cy:M,x01:-u,y01:-h,x11:S*(i/_-1),y11:M*(i/_-1)}}function yd(t){this._context=t}function gd(t){return new yd(t)}function md(t){return t[0]}function vd(t){return t[1]}function xd(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function bd(t){return t}yd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var _d=Array.prototype.slice;function wd(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function kd(t){this._context=t}function Sd(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Md(t,e){this._context=t,this._k=(1-e)/6}kd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:wd(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:wd(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Md.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Sd(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Sd(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ed=function t(e){function n(t){return new Md(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Cd(t,e){this._context=t,this._alpha=e}Cd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(t,e,n){var r=t._x1,i=t._y1,s=t._x2,o=t._y2;if(t._l01_a>nd){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>nd){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,s,o,t._x2,t._y2)}(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Td=function t(e){function n(t){return e?new Cd(t,e):new Md(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ad(t){return t<0?-1:1}function Nd(t,e,n){var r=t._x1-t._x0,i=e-t._x1,s=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),a=(s*i+o*r)/(r+i);return(Ad(s)+Ad(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function Rd(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Od(t,e,n){var r=t._x0,i=t._x1,s=t._y1,o=(i-r)/3;t._context.bezierCurveTo(r+o,t._y0+o*e,i-o,s-o*n,i,s)}function Id(t){this._context=t}function Pd(t){this._context=new Dd(t)}function Dd(t){this._context=t}function jd(t){this._context=t}function Fd(t){var e,n,r=t.length-1,i=new Array(r),s=new Array(r),o=new Array(r);for(i[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,s[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)s[e]-=n=i[e]/s[e-1],o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/s[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/s[e];for(s[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)s[e]=2*t[e+1]-i[e+1];return[i,s]}function zd(t,e){this._context=t,this._t=e}function qd(t,e){if((i=t.length)>1)for(var n,r,i,s=1,o=t[e[0]],a=o.length;s<i;++s)for(r=o,o=t[e[s]],n=0;n<a;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Ld(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Bd(t,e){return t[e]}function Hd(t){for(var e,n=-1,r=0,i=t.length,s=-1/0;++n<i;)(e=+t[n][1])>s&&(s=e,r=n);return r}function Vd(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}function Wd(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0,i={},s=t||{get:function(){},has:function(){return!1},default:function(){}};function o(t,e){if(!t||"string"!=typeof t)throw new TypeError("Invalid argument: key must be a non-empty string");return!(t in i)&&(i[t]=e,!0)}function a(t){return i[t]||s.get(t)}function l(t){return!!i[t]||s.has(t)}function c(t){var e=i[t];return delete i[t],e}function u(){return Object.keys(i)}function h(){return Object.keys(i).map((function(t){return i[t]}))}function d(t){return void 0!==t&&(e=t),e}function f(t,i){if(void 0!==i)return o(t,i);var s=a(t);return r&&void 0===s&&r.warn("".concat(t," does not exist in ").concat(n," registry")),s||a(e)}return e=s.default(),f.add=o,f.get=a,f.has=l,f.remove=c,f.getKeys=u,f.getValues=h,f.default=d,f.register=o,f}function $d(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Ud(t){return(t=$d(Math.abs(t)))?t[1]:NaN}Id.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Od(this,this._t0,Rd(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Od(this,Rd(this,n=Nd(this,t,e)),n);break;default:Od(this,this._t0,n=Nd(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Pd.prototype=Object.create(Id.prototype)).point=function(t,e){Id.prototype.point.call(this,e,t)},Dd.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,s){this._context.bezierCurveTo(e,t,r,n,s,i)}},jd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Fd(t),i=Fd(e),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},zd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Yd,Qd=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kd(t){if(!(e=Qd.exec(t)))throw new Error("invalid format: "+t);var e;return new Zd({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Zd(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Xd(t,e){var n=$d(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Kd.prototype=Zd.prototype,Zd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Gd={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Xd(100*t,e)},r:Xd,s:function(t,e){var n=$d(t,e);if(!n)return t+"";var r=n[0],i=n[1],s=i-(Yd=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+$d(t,Math.max(0,e+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Jd(t){return t}var tf,ef,nf,rf=Array.prototype.map,sf=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function of(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Jd:(e=rf.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,s=[],o=0,a=e[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),s.push(t.substring(i-=a,i+a)),!((l+=a+1)>r));)a=e[o=(o+1)%e.length];return s.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Jd:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(rf.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Kd(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,y=t.comma,g=t.precision,m=t.trim,v=t.type;"n"===v?(y=!0,v="g"):Gd[v]||(void 0===g&&(g=12),m=!0,v="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var x="$"===d?i:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===d?s:/[%p]/.test(v)?l:"",_=Gd[v],w=/[defgprs%]/.test(v);function k(t){var i,s,l,d=x,k=b;if("c"===v)k=_(t)+k,t="";else{var S=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:_(Math.abs(t),g),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),d=(S?"("===h?h:c:"-"===h||"("===h?"":h)+d,k=("s"===v?sf[8+Yd/3]:"")+k+(S&&"("===h?")":""),w)for(i=-1,s=t.length;++i<s;)if(48>(l=t.charCodeAt(i))||l>57){k=(46===l?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}y&&!f&&(t=r(t,1/0));var M=d.length+t.length+k.length,E=M<p?new Array(p-M+1).join(e):"";switch(y&&f&&(t=r(E+t,E.length?p-k.length:1/0),E=""),n){case"<":t=d+t+k+E;break;case"=":t=d+E+t+k;break;case"^":t=E.slice(0,M=E.length>>1)+d+t+k+E.slice(M);break;default:t=E+d+t+k}return a(t)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=Kd(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ud(e)/3))),i=Math.pow(10,-r),s=sf[8+r/3];return function(t){return n(i*t)+s}}}}tf=of({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),ef=tf.format,nf=tf.formatPrefix;var af=new Date,lf=new Date;function cf(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,s){var o,a=[];if(n=i.ceil(n),s=null==s?1:Math.floor(s),!(n<r&&s>0))return a;do{a.push(o=new Date(+n)),e(n,s),t(n)}while(o<n&&n<r);return a},i.filter=function(n){return cf((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return af.setTime(+e),lf.setTime(+r),t(af),t(lf),Math.floor(n(af,lf))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var uf=864e5,hf=6048e5,df=cf((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/uf}),(function(t){return t.getDate()-1}));function ff(t){return cf((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/hf}))}var pf=ff(0),yf=ff(1);ff(2),ff(3);var gf=ff(4);ff(5),ff(6);var mf=cf((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));mf.every=function(t){return isFinite(t=Math.floor(t))&&t>0?cf((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var vf=cf((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/uf}),(function(t){return t.getUTCDate()-1}));function xf(t){return cf((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/hf}))}var bf=xf(0),_f=xf(1);xf(2),xf(3);var wf=xf(4);xf(5),xf(6);var kf=cf((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));function Sf(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Mf(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ef(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Cf(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,o=t.shortDays,a=t.months,l=t.shortMonths,c=Pf(i),u=Df(i),h=Pf(s),d=Df(s),f=Pf(o),p=Df(o),y=Pf(a),g=Df(a),m=Pf(l),v=Df(l),x={a:function(t){return o[t.getDay()]},A:function(t){return s[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:np,e:np,f:ap,g:vp,G:bp,H:rp,I:ip,j:sp,L:op,m:lp,M:cp,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Vp,s:Wp,S:up,u:hp,U:dp,V:pp,w:yp,W:gp,x:null,X:null,y:mp,Y:xp,Z:_p,"%":Hp},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return s[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:wp,e:wp,f:Cp,g:zp,G:Lp,H:kp,I:Sp,j:Mp,L:Ep,m:Tp,M:Ap,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Vp,s:Wp,S:Np,u:Rp,U:Op,V:Pp,w:Dp,W:jp,x:null,X:null,y:Fp,Y:qp,Z:Bp,"%":Hp},_={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return S(t,e,n,r)},d:Uf,e:Uf,f:Gf,g:Hf,G:Bf,H:Qf,I:Qf,j:Yf,L:Xf,m:$f,M:Kf,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:Wf,Q:tp,s:ep,S:Zf,u:Ff,U:zf,V:qf,w:jf,W:Lf,x:function(t,e,r){return S(t,n,e,r)},X:function(t,e,n){return S(t,r,e,n)},y:Hf,Y:Bf,Z:Vf,"%":Jf};function w(t,e){return function(n){var r,i,s,o=[],a=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++a<c;)37===t.charCodeAt(a)&&(o.push(t.slice(l,a)),null!=(i=Tf[r=t.charAt(++a)])?r=t.charAt(++a):i="e"===r?" ":"0",(s=e[r])&&(r=s(n,i)),o.push(r),l=a+1);return o.push(t.slice(l,a)),o.join("")}}function k(t,e){return function(n){var r,i,s=Ef(1900,void 0,1);if(S(s,t,n+="",0)!=n.length)return null;if("Q"in s)return new Date(s.Q);if("s"in s)return new Date(1e3*s.s+("L"in s?s.L:0));if(e&&!("Z"in s)&&(s.Z=0),"p"in s&&(s.H=s.H%12+12*s.p),void 0===s.m&&(s.m="q"in s?s.q:0),"V"in s){if(s.V<1||s.V>53)return null;"w"in s||(s.w=1),"Z"in s?(i=(r=Mf(Ef(s.y,0,1))).getUTCDay(),r=i>4||0===i?_f.ceil(r):_f(r),r=vf.offset(r,7*(s.V-1)),s.y=r.getUTCFullYear(),s.m=r.getUTCMonth(),s.d=r.getUTCDate()+(s.w+6)%7):(i=(r=Sf(Ef(s.y,0,1))).getDay(),r=i>4||0===i?yf.ceil(r):yf(r),r=df.offset(r,7*(s.V-1)),s.y=r.getFullYear(),s.m=r.getMonth(),s.d=r.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),i="Z"in s?Mf(Ef(s.y,0,1)).getUTCDay():Sf(Ef(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+7*s.W-(i+5)%7:s.w+7*s.U-(i+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,Mf(s)):Sf(s)}}function S(t,e,n,r){for(var i,s,o=0,a=e.length,l=n.length;o<a;){if(r>=l)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(s=_[i in Tf?e.charAt(o++):i])||(r=s(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=w(n,x),x.X=w(r,x),x.c=w(e,x),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}kf.every=function(t){return isFinite(t=Math.floor(t))&&t>0?cf((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Tf={"-":"",_:" ",0:"0"},Af=/^\s*\d+/,Nf=/^%/,Rf=/[\\^$*+?|[\]().{}]/g;function Of(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function If(t){return t.replace(Rf,"\\$&")}function Pf(t){return new RegExp("^(?:"+t.map(If).join("|")+")","i")}function Df(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function jf(t,e,n){var r=Af.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ff(t,e,n){var r=Af.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function zf(t,e,n){var r=Af.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function qf(t,e,n){var r=Af.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Lf(t,e,n){var r=Af.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Bf(t,e,n){var r=Af.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Hf(t,e,n){var r=Af.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Vf(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Wf(t,e,n){var r=Af.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function $f(t,e,n){var r=Af.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Uf(t,e,n){var r=Af.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Yf(t,e,n){var r=Af.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Qf(t,e,n){var r=Af.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Kf(t,e,n){var r=Af.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Zf(t,e,n){var r=Af.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Xf(t,e,n){var r=Af.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Gf(t,e,n){var r=Af.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Jf(t,e,n){var r=Nf.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function tp(t,e,n){var r=Af.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function ep(t,e,n){var r=Af.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function np(t,e){return Of(t.getDate(),e,2)}function rp(t,e){return Of(t.getHours(),e,2)}function ip(t,e){return Of(t.getHours()%12||12,e,2)}function sp(t,e){return Of(1+df.count(mf(t),t),e,3)}function op(t,e){return Of(t.getMilliseconds(),e,3)}function ap(t,e){return op(t,e)+"000"}function lp(t,e){return Of(t.getMonth()+1,e,2)}function cp(t,e){return Of(t.getMinutes(),e,2)}function up(t,e){return Of(t.getSeconds(),e,2)}function hp(t){var e=t.getDay();return 0===e?7:e}function dp(t,e){return Of(pf.count(mf(t)-1,t),e,2)}function fp(t){var e=t.getDay();return e>=4||0===e?gf(t):gf.ceil(t)}function pp(t,e){return t=fp(t),Of(gf.count(mf(t),t)+(4===mf(t).getDay()),e,2)}function yp(t){return t.getDay()}function gp(t,e){return Of(yf.count(mf(t)-1,t),e,2)}function mp(t,e){return Of(t.getFullYear()%100,e,2)}function vp(t,e){return Of((t=fp(t)).getFullYear()%100,e,2)}function xp(t,e){return Of(t.getFullYear()%1e4,e,4)}function bp(t,e){var n=t.getDay();return Of((t=n>=4||0===n?gf(t):gf.ceil(t)).getFullYear()%1e4,e,4)}function _p(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Of(e/60|0,"0",2)+Of(e%60,"0",2)}function wp(t,e){return Of(t.getUTCDate(),e,2)}function kp(t,e){return Of(t.getUTCHours(),e,2)}function Sp(t,e){return Of(t.getUTCHours()%12||12,e,2)}function Mp(t,e){return Of(1+vf.count(kf(t),t),e,3)}function Ep(t,e){return Of(t.getUTCMilliseconds(),e,3)}function Cp(t,e){return Ep(t,e)+"000"}function Tp(t,e){return Of(t.getUTCMonth()+1,e,2)}function Ap(t,e){return Of(t.getUTCMinutes(),e,2)}function Np(t,e){return Of(t.getUTCSeconds(),e,2)}function Rp(t){var e=t.getUTCDay();return 0===e?7:e}function Op(t,e){return Of(bf.count(kf(t)-1,t),e,2)}function Ip(t){var e=t.getUTCDay();return e>=4||0===e?wf(t):wf.ceil(t)}function Pp(t,e){return t=Ip(t),Of(wf.count(kf(t),t)+(4===kf(t).getUTCDay()),e,2)}function Dp(t){return t.getUTCDay()}function jp(t,e){return Of(_f.count(kf(t)-1,t),e,2)}function Fp(t,e){return Of(t.getUTCFullYear()%100,e,2)}function zp(t,e){return Of((t=Ip(t)).getUTCFullYear()%100,e,2)}function qp(t,e){return Of(t.getUTCFullYear()%1e4,e,4)}function Lp(t,e){var n=t.getUTCDay();return Of((t=n>=4||0===n?wf(t):wf.ceil(t)).getUTCFullYear()%1e4,e,4)}function Bp(){return"+0000"}function Hp(){return"%"}function Vp(t){return+t}function Wp(t){return Math.floor(+t/1e3)}var $p=Wd();$p("d3-number",(function(t,e,n){var r,i;function s(t){return i(t)}function o(){s.locale({decimal:n||".",thousands:e||",",grouping:[3],currency:["$",""]})}return s.locale=function(e){return r=of(e),i=r.format(t),this},o(),s.format=function(t,i,s,a){return(s||a)&&(e=s,n=a,o()),r.format(t)(i)},s.pattern=function(e){return e&&(t=e,i=r.format(e)),t},s})),$p("d3-time",(function(t){var e=Cf({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=e.format(t);function r(t){return n(t)}return r.format=function(t,n){return e.format(t)(n)},r.locale=function(){return e=Cf.apply(void 0,arguments),n=e.format(t),this},r.parse=function(t,n){return e.parse(t)(n)},r.parsePattern=function(t){return e.parse(t)},r}));var Up={id:function(t){return"".concat(t.source,"/").concat(t.key||t.title)},key:function(t){return String(t.key||t.title)},tags:function(t){return t.tags},min:function(t){return t.min},max:function(t){return t.max},type:function(t){return t.type},title:function(t){return String(t.title)},values:function(t){return t.values},value:function(t){return t},label:function(t){return t},formatter:function(t){return function(t){if("function"==typeof t.formatter)return t.formatter();var e=t.formatter||{};return $p(e.type||"d3-number")(e.format||"")}(t)}};function Yp(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.id,r=void 0===n?Up.id:n,i=e.key,s=void 0===i?Up.key:i,o=e.min,a=void 0===o?Up.min:o,l=e.max,c=void 0===l?Up.max:l,u=e.type,h=void 0===u?Up.type:u,d=e.tags,f=void 0===d?Up.tags:d,p=e.title,y=void 0===p?Up.title:p,g=e.values,m=void 0===g?Up.values:g,v=e.value,x=void 0===v?Up.value:v,b=e.label,_=void 0===b?Up.label:b,w=e.formatter,k=void 0===w?Up.formatter:w,S={id:function(){return r(t)},key:function(){return s(t)},raw:function(){return t},tags:function(){return f(t)},type:function(){return h(t)},min:function(){return a(t)},max:function(){return c(t)},title:function(){return y(t)},items:function(){return m(t)},formatter:function(){return k(t)},value:x,label:_};return S}var Qp={diverging:function(t,e){if((a=t.length)>0)for(var n,r,i,s,o,a,l=0,c=t[e[0]].length;l<c;++l)for(s=o=0,n=0;n<a;++n)(i=(r=t[e[n]][l])[1]-r[0])>=0?(r[0]=s,r[1]=s+=i):i<0?(r[1]=o,r[0]=o+=i):r[0]=s},none:qd,silhouette:function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],s=i.length;r<s;++r){for(var o=0,a=0;o<n;++o)a+=t[o][r][1]||0;i[r][1]+=i[r][0]=-a/2}qd(t,e)}},expand:function(t,e){if((r=t.length)>0){for(var n,r,i,s=0,o=t[0].length;s<o;++s){for(i=n=0;n<r;++n)i+=t[n][s][1]||0;if(i)for(n=0;n<r;++n)t[n][s][1]/=i}qd(t,e)}},wiggle:function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,s=0,o=1;o<r;++o){for(var a=0,l=0,c=0;a<i;++a){for(var u=t[e[a]],h=u[o][1]||0,d=(h-(u[o-1][1]||0))/2,f=0;f<a;++f){var p=t[e[f]];d+=(p[o][1]||0)-(p[o-1][1]||0)}l+=h,c+=d*h}n[o-1][1]+=n[o-1][0]=s,l&&(s-=c/l)}n[o-1][1]+=n[o-1][0]=s,qd(t,e)}}},Kp={ascending:function(t){var e=t.map(Vd);return Ld(t).sort((function(t,n){return e[t]-e[n]}))},insideout:function(t){var e,n,r=t.length,i=t.map(Vd),s=function(t){var e=t.map(Hd);return Ld(t).sort((function(t,n){return e[t]-e[n]}))}(t),o=0,a=0,l=[],c=[];for(e=0;e<r;++e)n=s[e],o<a?(o+=i[n],l.push(n)):(a+=i[n],c.push(n));return c.reverse().concat(l)},none:Ld,reverse:function(t){return Ld(t).reverse()}};function Zp(t,e,n){for(var r={},i=e.stackKey,s=e.value,o=e.startProp||"start",a=e.endProp||"end",l=e.offset||"none",c=e.order||"none",u=e.valueRef||"",h=0,d={},f=0;f<t.items.length;f++){var p=t.items[f],y=u?p[u]:null;if(y&&y.source){var g="".concat(y.source.key||"","/").concat(y.source.field);d[g]||(d[g]=y.source)}var m=i(p);r[m]=r[m]||{items:[]},r[m].items.push(p),h=Math.max(h,r[m].items.length)}for(var v=Array.apply(null,{length:h}).map(Number.call,Number),x=Object.keys(r).map((function(t){return r[t].items})),b=function(){var t=Qh([]),e=Ld,n=qd,r=Bd;function i(i){var s,o,a=t.apply(this,arguments),l=i.length,c=a.length,u=new Array(c);for(s=0;s<c;++s){for(var h,d=a[s],f=u[s]=new Array(l),p=0;p<l;++p)f[p]=h=[0,+r(i[p],d,p,i)],h.data=i[p];f.key=d}for(s=0,o=e(u);s<c;++s)u[o[s]].index=s;return n(u,o),u}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Qh(_d.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Qh(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Ld:"function"==typeof t?t:Qh(_d.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?qd:t,i):n},i}().keys(v).value((function(t,e){return t[e]?s(t[e]):0})).order(Kp[c]).offset(Qp[l])(x),_=[],w=0;w<b.length;w++)for(var k=b[w],S=0;S<k.length;S++){var M=k[S],E=k[S].data[k.key];E&&(E[o]={value:M[0]},E[a]={value:M[1]},_.push(M[0],M[1]))}var C=Object.keys(d).map((function(t){var e=n(d[t].key);return e?e.field(d[t].field):null})).filter((function(t){return!!t})),T=Yp({title:C.map((function(t){return t.title()})).join(", "),min:Math.min.apply(Math,_),max:Math.max.apply(Math,_),type:"measure",formatter:C[0]?C[0].formatter:void 0});t.fields.push(T)}function Xp(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i=n.logger;if(Array.isArray(t))r.items=t.map((function(t){return{value:t,label:String(t)}}));else if(t){if("collection"in t)r=mh({},e.collection(t.collection));else{var s=e.dataset?e.dataset(t.source):null,o=t.value||function(t){return t},a=t.label||function(t){return t};if(t.groupBy||t.mapTo)i.warn('Deprecated "data" configuration',t),r.items=[];else if(t.hierarchy)r.root=s.hierarchy?s.hierarchy(t.hierarchy):null,r.fields=s.fields();else if(t.items)r.items=t.items.map((function(t){return{value:o(t),label:String(a(t))}}));else if(t.extract){var l=Array.isArray(t.extract)?t.extract:[t.extract];r.items=[];var c,u=[];l.forEach((function(t){var n,i=t.source?e.dataset(t.source):s;i&&((n=r.items).push.apply(n,Th(i.extract(t))),void 0!==t.field&&u.push(i.field(t.field)))})),u.length&&(r.fields=u),t.amend&&Array.isArray(t.amend)&&(c=r.items).push.apply(c,Th(t.amend))}else if(void 0!==t.field&&s){var h=s.field(t.field);h&&(r.fields||(r.fields=[]),r.fields.push(h),"value"in t||(a=h.label||function(t){return t},r.value=o=h.value||function(t){return t}),r.items=h.items().map((function(e){return{value:o(e),label:String(a(e)),source:{field:t.field}}})))}else t.fields&&t.fields.forEach((function(t){var n,i="object"===hh(t)&&t.source?e.dataset(t.source):s;i&&(n="object"===hh(t)&&void 0!==t.field?i.field(t.field):i.field(t))&&(r.fields||(r.fields=[]),r.fields.push(n))}));r.items&&t.map&&(r.items=r.items.map(t.map))}t&&t.stack&&Zp(r,t.stack,e.dataset)}return t&&!Array.isArray(t)&&"function"==typeof t.filter&&r.items&&(r.items=r.items.filter(t.filter)),t&&!Array.isArray(t)&&"function"==typeof t.sort&&r.items&&(r.items=r.items.sort(t.sort)),r}function Gp(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Xp,i={};(t||[]).forEach((function(t){if(!t.key)throw new Error('Data collection is missing "key" property');if("object"===hh(t.data)&&"collection"in t.data)throw new Error("Data config for collections may not reference other collections");i[t.key]=function(){return r(t.data,e,n)}}));var s=function(t){var e,n;if("string"==typeof t?e=t:"object"===hh(t)&&(e=t.key,n=t),!(e in i))throw new Error("Unknown data collection: ".concat(e));"function"==typeof i[e]&&(i[e]=i[e]());var r=i[e];if(n&&n.fields&&n.fields.filter){var s=r.fields.filter(n.fields.filter);r.fields.length!==s.length&&(r=ch(r,{fields:s}))}return r};return s}function Jp(t,e,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Xp;if(t.data){var s=i(t.data,e,n);if(s&&s.fields&&s.fields[0])return s.fields[0].formatter()}if(r=t.formatter?"".concat(t.formatter,"-").concat(t.type||"number"):t.type||"d3-number",n.formatter.has(r)){var o=n.formatter.get(r)(t.format||"");return o}throw new Error("Formatter of type '".concat(r,"' was not found"))}function ty(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Jp,i={};return{get:function(s){var o;return"string"==typeof s&&t[s]?o=s:"object"===hh(s)&&"formatter"in s&&t[s.formatter]?o=s.formatter:"object"===hh(s)&&"type"in s&&t[s.type]&&(o=s.type),o?(i[o]=i[o]||r(t[o],e,n),i[o]):r(s||{},e,n)},all:function(){return Object.keys(t).forEach(this.get),i}}}function ey(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var ny,ry=(1===(ny=ey).length&&(ny=function(t){return function(e,n){return ey(t(e),n)}}(ny)),{left:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;ny(t[i],e)<0?n=i+1:r=i}return n},right:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;ny(t[i],e)>0?r=i:n=i+1}return n}}).right;function iy(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),s=new Array(i);++r<i;)s[r]=t+r*n;return s}var sy=Math.sqrt(50),oy=Math.sqrt(10),ay=Math.sqrt(2);function ly(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),s=r/Math.pow(10,i);return i>=0?(s>=sy?10:s>=oy?5:s>=ay?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(s>=sy?10:s>=oy?5:s>=ay?2:1)}function cy(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var uy="$";function hy(){}function dy(t,e){var n=new hy;if(t instanceof hy)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,s=t.length;if(null==e)for(;++i<s;)n.set(i,t[i]);else for(;++i<s;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}function fy(){}hy.prototype=dy.prototype={constructor:hy,has:function(t){return uy+t in this},get:function(t){return this[uy+t]},set:function(t,e){return this[uy+t]=e,this},remove:function(t){var e=uy+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===uy&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===uy&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===uy&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===uy&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===uy&&++t;return t},empty:function(){for(var t in this)if(t[0]===uy)return!1;return!0},each:function(t){for(var e in this)e[0]===uy&&t(this[e],e.slice(1),this)}};var py=dy.prototype;fy.prototype={constructor:fy,has:py.has,add:function(t){return this[uy+(t+="")]=t,this},remove:py.remove,clear:py.clear,values:py.keys,size:py.size,empty:py.empty,each:py.each};var yy=Array.prototype,gy=yy.map,my=yy.slice,vy={name:"implicit"};function xy(){var t=dy(),e=[],n=[],r=vy;function i(i){var s=i+"",o=t.get(s);if(!o){if(r!==vy)return r;t.set(s,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=dy();for(var r,s,o=-1,a=n.length;++o<a;)t.has(s=(r=n[o])+"")||t.set(s,e.push(r));return i},i.range=function(t){return arguments.length?(n=my.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return xy(e,n).unknown(r)},cy.apply(i,arguments),i}function by(){var t,e,n=xy().unknown(void 0),r=n.domain,i=n.range,s=[0,1],o=!1,a=0,l=0,c=.5;function u(){var n=r().length,u=s[1]<s[0],h=s[u-0],d=s[1-u];t=(d-h)/Math.max(1,n-a+2*l),o&&(t=Math.floor(t)),h+=(d-h-t*(n-a))*c,e=t*(1-a),o&&(h=Math.round(h),e=Math.round(e));var f=iy(n).map((function(e){return h+t*e}));return i(u?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),u()):r()},n.range=function(t){return arguments.length?(s=[+t[0],+t[1]],u()):s.slice()},n.rangeRound=function(t){return s=[+t[0],+t[1]],o=!0,u()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,u()):o},n.padding=function(t){return arguments.length?(a=Math.min(1,l=+t),u()):a},n.paddingInner=function(t){return arguments.length?(a=Math.min(1,t),u()):a},n.paddingOuter=function(t){return arguments.length?(l=+t,u()):l},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),u()):c},n.copy=function(){return by(r(),s).round(o).paddingInner(a).paddingOuter(l).align(c)},cy.apply(u(),arguments)}function _y(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function wy(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ky(){}var Sy=.7,My=1/Sy,Ey="\\s*([+-]?\\d+)\\s*",Cy="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ty="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ay=/^#([0-9a-f]{3,8})$/,Ny=new RegExp("^rgb\\("+[Ey,Ey,Ey]+"\\)$"),Ry=new RegExp("^rgb\\("+[Ty,Ty,Ty]+"\\)$"),Oy=new RegExp("^rgba\\("+[Ey,Ey,Ey,Cy]+"\\)$"),Iy=new RegExp("^rgba\\("+[Ty,Ty,Ty,Cy]+"\\)$"),Py=new RegExp("^hsl\\("+[Cy,Ty,Ty]+"\\)$"),Dy=new RegExp("^hsla\\("+[Cy,Ty,Ty,Cy]+"\\)$"),jy={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 Fy(){return this.rgb().formatHex()}function zy(){return this.rgb().formatRgb()}function qy(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ay.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ly(e):3===n?new Wy(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?By(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?By(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=Ny.exec(t))?new Wy(e[1],e[2],e[3],1):(e=Ry.exec(t))?new Wy(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Oy.exec(t))?By(e[1],e[2],e[3],e[4]):(e=Iy.exec(t))?By(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Py.exec(t))?Qy(e[1],e[2]/100,e[3]/100,1):(e=Dy.exec(t))?Qy(e[1],e[2]/100,e[3]/100,e[4]):jy.hasOwnProperty(t)?Ly(jy[t]):"transparent"===t?new Wy(NaN,NaN,NaN,0):null}function Ly(t){return new Wy(t>>16&255,t>>8&255,255&t,1)}function By(t,e,n,r){return r<=0&&(t=e=n=NaN),new Wy(t,e,n,r)}function Hy(t){return t instanceof ky||(t=qy(t)),t?new Wy((t=t.rgb()).r,t.g,t.b,t.opacity):new Wy}function Vy(t,e,n,r){return 1===arguments.length?Hy(t):new Wy(t,e,n,null==r?1:r)}function Wy(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function $y(){return"#"+Yy(this.r)+Yy(this.g)+Yy(this.b)}function Uy(){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 Yy(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Qy(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Zy(t,e,n,r)}function Ky(t){if(t instanceof Zy)return new Zy(t.h,t.s,t.l,t.opacity);if(t instanceof ky||(t=qy(t)),!t)return new Zy;if(t instanceof Zy)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,a=s-i,l=(s+i)/2;return a?(o=e===s?(n-r)/a+6*(n<r):n===s?(r-e)/a+2:(e-n)/a+4,a/=l<.5?s+i:2-s-i,o*=60):a=l>0&&l<1?0:o,new Zy(o,a,l,t.opacity)}function Zy(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Xy(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Gy(t){return function(){return t}}function Jy(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Gy(isNaN(t)?e:t)}_y(ky,qy,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Fy,formatHex:Fy,formatHsl:function(){return Ky(this).formatHsl()},formatRgb:zy,toString:zy}),_y(Wy,Vy,wy(ky,{brighter:function(t){return t=null==t?My:Math.pow(My,t),new Wy(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Sy:Math.pow(Sy,t),new Wy(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:$y,formatHex:$y,formatRgb:Uy,toString:Uy})),_y(Zy,(function(t,e,n,r){return 1===arguments.length?Ky(t):new Zy(t,e,n,null==r?1:r)}),wy(ky,{brighter:function(t){return t=null==t?My:Math.pow(My,t),new Zy(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Sy:Math.pow(Sy,t),new Zy(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 Wy(Xy(t>=240?t-240:t+120,i,r),Xy(t,i,r),Xy(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 tg=function t(e){var n=function(t){return 1==(t=+t)?Jy:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Gy(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Vy(t)).r,(e=Vy(e)).r),i=n(t.g,e.g),s=n(t.b,e.b),o=Jy(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=s(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function eg(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(s){for(n=0;n<r;++n)i[n]=t[n]*(1-s)+e[n]*s;return i}}function ng(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,s=new Array(i),o=new Array(r);for(n=0;n<i;++n)s[n]=cg(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=s[n](t);return o}}function rg(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ig(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function sg(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=cg(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var og=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ag=new RegExp(og.source,"g");function lg(t,e){var n,r,i,s=og.lastIndex=ag.lastIndex=0,o=-1,a=[],l=[];for(t+="",e+="";(n=og.exec(t))&&(r=ag.exec(e));)(i=r.index)>s&&(i=e.slice(s,i),a[o]?a[o]+=i:a[++o]=i),(n=n[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:ig(n,r)})),s=ag.lastIndex;return s<e.length&&(i=e.slice(s),a[o]?a[o]+=i:a[++o]=i),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)a[(n=l[r]).i]=n.x(t);return a.join("")})}function cg(t,e){var n,r=typeof e;return null==e||"boolean"===r?Gy(e):("number"===r?ig:"string"===r?(n=qy(e))?(e=n,tg):lg:e instanceof qy?tg:e instanceof Date?rg:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?eg:Array.isArray(e)?ng:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?sg:ig)(t,e)}function ug(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function hg(t){return+t}var dg=[0,1];function fg(t){return t}function pg(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function yg(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function gg(t,e,n){var r=t[0],i=t[1],s=e[0],o=e[1];return i<r?(r=pg(i,r),s=n(o,s)):(r=pg(r,i),s=n(s,o)),function(t){return s(r(t))}}function mg(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),s=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=pg(t[o],t[o+1]),s[o]=n(e[o],e[o+1]);return function(e){var n=ry(t,e,1,r)-1;return s[n](i[n](e))}}function vg(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function xg(t,e){return function(){var t,e,n,r,i,s,o=dg,a=dg,l=cg,c=fg;function u(){return r=Math.min(o.length,a.length)>2?mg:gg,i=s=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((s||(s=r(a,o.map(t),ig)))(n)))},h.domain=function(t){return arguments.length?(o=gy.call(t,hg),c===fg||(c=yg(o)),u()):o.slice()},h.range=function(t){return arguments.length?(a=my.call(t),u()):a.slice()},h.rangeRound=function(t){return a=my.call(t),l=ug,u()},h.clamp=function(t){return arguments.length?(c=t?yg(o):fg,h):c!==fg},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}()(t,e)}function bg(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var r,i,s,o,a=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=ly(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),s=new Array(i=Math.ceil(e-t+1));++a<i;)s[a]=(t+a)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),s=new Array(i=Math.ceil(t-e+1));++a<i;)s[a]=(t-a)/o;return r&&s.reverse(),s}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return function(t,e,n,r){var i,s=function(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),s=r/i;return s>=sy?i*=10:s>=oy?i*=5:s>=ay&&(i*=2),e<t?-i:i}(t,e,n);switch((r=Kd(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ud(e)/3)))-Ud(Math.abs(t)))}(s,o))||(r.precision=i),nf(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ud(e)-Ud(t))+1}(s,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Ud(Math.abs(t)))}(s))||(r.precision=i-2*("%"===r.type))}return ef(r)}(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),s=0,o=i.length-1,a=i[s],l=i[o];return l<a&&(r=a,a=l,l=r,r=s,s=o,o=r),(r=ly(a,l,n))>0?r=ly(a=Math.floor(a/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=ly(a=Math.ceil(a*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[s]=Math.floor(a/r)*r,i[o]=Math.ceil(l/r)*r,e(i)):r<0&&(i[s]=Math.ceil(a*r)/r,i[o]=Math.floor(l*r)/r,e(i)),t},t}function _g(){var t=xg(fg,fg);return t.copy=function(){return vg(t,_g())},cy.apply(t,arguments),bg(t)}function wg(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[ry(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=my.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=my.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return wg().domain(e).range(n).unknown(t)},cy.apply(i,arguments)}function kg(t){return void 0===t?function(t){return t}:function(e){return t(e)}}function Sg(t){return Math.max(0,Math.min(1,t))}function Mg(t){return"object"===hh(t)}function Eg(t,e,n){for(var r=Math.abs(e-n)/(t+1),i=[],s=1;s<=t;s++){var o=s*r;i.push(e<n?e+o:e-o)}return i}function Cg(t,e,n){if(1===t.length)return t;for(var r=t.concat([]),i=0;i<t.length;i++){var s=t[i],o=t[i+1];0===i&&s!==n.start()?(r.push.apply(r,Th(Eg(e,s,o))),r.push.apply(r,Th(Eg(e,s-=o-s,o=t[i])))):i===t.length-1&&o!==n.end()?r.push.apply(r,Th(Eg(e,s,o=s+(s-t[i-1])))):r.push.apply(r,Th(Eg(e,s,o)))}return r.filter((function(t){return t>=n.min()&&t<=n.max()}))}function Tg(t){var e=t.distance,n=t.scale,r=t.minorCount,i=void 0===r?0:r,s=t.unitDivider,o=void 0===s?100:s,a=t.formatter,l=void 0===a?void 0:a,c=Ih(o)||Ih(e)?2:Math.max(e/o,2),u=Math.min(1e3,Math.round(c)),h=n.ticks(u);h.length<=1&&(h=n.ticks(u+1));var d=i>0?Cg(h,i,n):h;d.sort((function(t,e){return t-e}));var f=d.map(kg(l));return d.map((function(t,e){var r=n(t);return{position:r,start:r,end:r,label:f[e],value:t,isMinor:-1===h.indexOf(t)}}))}function Ag(t){var e=t.distance,n=t.scale,r=t.minorCount,i=void 0===r?0:r,s=t.unitDivider,o=void 0===s?100:s,a=t.formatter,l=void 0===a?void 0:a,c=Ih(o)||Ih(e)?2:Math.max(e/o,2),u=Math.min(1e3,Math.round(c));n.nice(u>10?10:u);var h=n.ticks(u),d=i>0?Cg(h,i,n):h;d.sort((function(t,e){return t-e}));var f=d.map(kg(l));return d.map((function(t,e){var r=n(t);return{position:r,start:r,end:r,label:f[e],value:t,isMinor:-1===h.indexOf(t)}}))}function Ng(t){var e,n=t.settings,r=t.scale,i=t.distance,s=t.formatter,o=void 0===s?function(t){return t}:s,a=n.minorTicks&&!Ih(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;return Array.isArray(n.ticks.values)?e=function(t){var e=t.scale,n=t.formatter,r=void 0===n?function(t){return t}:n;return t.values.sort((function(t,e){return(Mg(t)?t.value:t)-(Mg(e)?e.value:e)})).filter((function(t,n,r){var i=Mg(t)?t.value:t;return i<=e.max()&&i>=e.min()&&r.indexOf(t)===n})).map((function(t){var n=Mg(t),i=n?t.value:t,s=e(i);return{position:s,value:i,label:n&&void 0!==t.label?t.label:r(i),isMinor:!!n&&!!t.isMinor,start:n&&!isNaN(t.start)?Sg(e(t.start)):s,end:n&&!isNaN(t.end)?Sg(e(t.end)):s}}))}({values:n.ticks.values.filter((function(t){return"object"===hh(t)?!Ih(t.value):!Ih(t)})),scale:r.copy(),formatter:o}):Ih(n.ticks.count)?(e=(n.ticks.tight?Ag:Tg)({distance:i,minorCount:a,unitDivider:n.ticks.distance,scale:r,formatter:o}),n.ticks.forceBounds&&function(t,e,n){var r=t.map((function(t){return t.position})),i=e.range();-1===r.indexOf(i[0])?t.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(e.start()),isMinor:!1,value:e.start()}):t[0]&&t[0].isMinor&&(t[0].isMinor=!1);var s=t[t.length-1];-1===r.indexOf(i[1])?t.push({position:i[1],start:i[1],end:i[1],label:n(e.end()),isMinor:!1,value:e.end()}):s&&s.isMinor&&(s.isMinor=!1)}(e,r,o)):e=function(t){var e=t.count,n=t.minorCount,r=t.scale,i=t.formatter;return r.ticks((e-1)*n+e).map((function(t,e){var s=r(t);return{position:s,start:s,end:s,label:i(t),isMinor:e%(n+1)!=0,value:t}}))}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:r.copy(),formatter:o}),e}function Rg(t){var e=t.scale,n=e.domain(),r=e.data().items,i=e.labels?e.labels():n,s=e.bandwidth();return n.map((function(t,n){var o=e(t);return{position:o+s/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:o,end:o+s}}))}function Og(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return Object.keys(e).forEach((function(i){var s=hh(t[i]);r[i]="function"===s?t[i](n):"undefined"===s?e[i]:t[i]})),r}var Ig={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},Pg={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},Dg={count:NaN};function jg(t,e){var n=+t.min,r=+t.max,i=0,s=1;if(e&&e[0]){var o=e.map((function(t){return t.min()})).filter((function(t){return!isNaN(t)})),a=e.map((function(t){return t.max()})).filter((function(t){return!isNaN(t)}));if(i=o.length?Math.min.apply(Math,Th(o)):Number.NaN,s=a.length?Math.max.apply(Math,Th(a)):Number.NaN,isNaN(i)||isNaN(s))i=-1,s=1;else if(i===s&&0===i)i=-1,s=1;else if(i===s&&i)i-=Math.abs(.1*i),s+=Math.abs(.1*s);else if(!isNaN(t.expand)){var l=s-i;i-=l*t.expand,s+=l*t.expand}if(Array.isArray(t.include)){var c=t.include.filter((function(t){return!isNaN(t)}));i=Math.min.apply(Math,Th(c).concat([i])),s=Math.max.apply(Math,Th(c).concat([s]))}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?s:r}}function Fg(t,e){t.instance||(t.instance=e.copy(),t.instance.domain([e.start(),e.end()]),t.instance.clamp(!0),t.instance.range(t.invert?[1,0]:[0,1]))}function zg(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=_g(),s={instance:null,invert:!1},o={data:n,resources:r},a=Og(e,Ig,o);function l(t){return Ih(t)?NaN:i(t)}a.ticks=Og(e.ticks,Pg,o),a.minorTicks=Og(e.minorTicks,Dg,o),l.data=function(){return n},l.invert=function(t){return i.invert(t)},l.rangeRound=function(t){return i.rangeRound(t),l},l.clamp=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return i.clamp(t),l},l.cachedTicks=function(){return t},l.clearTicksCache=function(){return t=void 0,this},l.ticks=function(e){return null!==e&&"object"===hh(e)?(e.settings=e.settings||{},e.settings=ch(!0,{},a,e.settings),e.scale=l,t=Ng(e)):t=i.ticks(e)},l.nice=function(t){return i.nice(t),l},l.tickFormat=function(t,e){return i.tickFormat(t,e)},l.interpolate=function(t){return i.interpolate(t),l},l.domain=function(t){return arguments.length?(i.domain(t),s.instance&&s.instance.domain([l.start(),l.end()]),l):i.domain()},l.range=function(t){return arguments.length?(i.range(t),l):i.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(t){for(var e=(l.start()-l.end())/t,n=[l.end()],r=[],i=e/2,s=0;s<t;s++){var o=n[n.length-1]||0,a=o+e,c=l(o+i);n.push.apply(n,[a,a]),r.push.apply(r,[c,c])}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){var t=zg(e,n,r);return t.domain(l.domain()),t.range(l.range()),t.clamp(i.clamp()),t},l.norm=function(t){return Fg(s,l),s.instance(t)},l.normInvert=function(t){return Fg(s,l),s.instance.invert(t)};var c=jg(a,n?n.fields:[]),u=c.mini,h=c.maxi;return l.domain([u,h]),l.range(a.invert?[1,0]:[0,1]),s.invert=a.invert,l}var qg={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function Lg(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={data:e,resources:n},i=Og(t,qg,r),s=e.items||[],o={},a=[],l=[];function c(t,n){t.data=function(){return e},t.datum=function(t){return s[o[t]]},t.start=function(){return t.domain()[0]},t.end=function(){return t.domain()[t.domain().length-1]},t.labels=function(){return l},t.ticks=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.scale=t,Rg(e)}}var u=by();c(u),u.pxScale=function(t){var e=i.maxPxStep;if(isNaN(e))return u;var n=u.domain().length,r=Math.max(1,n-u.paddingInner()+2*u.paddingOuter());if(r*e>=t)return u;var s=u.copy();s.type=u.type,c(s);var o=r*e/t,a=(1-o)*u.align();return s.range(i.invert?[o+a,a]:[a,o+a]),s};for(var h="function"==typeof t.value?t.value:function(t){return t.datum.value},d="function"==typeof t.label?t.label:function(t){return t.datum.label},f=0;f<s.length;f++){var p=ch({datum:s[f]},r),y=h(p,f);-1===a.indexOf(y)&&(a.push(y),l.push(d(p,f)),o[y]=f)}return u.domain(a),u.range(i.invert?i.range.slice().reverse():i.range),u.padding(isNaN(i.padding)?0:i.padding),isNaN(i.paddingInner)||u.paddingInner(i.paddingInner),isNaN(i.paddingOuter)||u.paddingOuter(i.paddingOuter),u.align(isNaN(i.align)?.5:i.align),u}var Bg={depth:0};function Hg(t,e,n){return t.ancestors().map((function(t){return e(ch({datum:t.data},n))})).reverse().slice(1).toString()}function Vg(t,e,n){var r=e.ticks.depth,i=e.value,s=e.label,o=[],a=[],l={},c=[],u=0;if(!t)return{values:o,labels:a,items:l,ticks:c};t.eachAfter((function(t){if(t.depth>0){var e=Hg(t,i,n),h=t.leaves()||[t],d=i(ch({datum:t.data},n)),f=s(ch({datum:t.data},n)),p=Array.isArray(t.children),y={key:e,count:h.length,value:d,label:f,leftEdge:Hg(h[0],i,n),rightEdge:Hg(h[Math.max(h.length-1,0)],i,n),node:t};p?(o.push("SPACER_".concat(u,"_SPACER")),u++):(o.push(e),a.push(f)),(r<=0&&!p||t.depth===r)&&c.push(y),l[e]=y}}));var h=t.height-1;return h>0&&o.splice(-h),{values:o,labels:a,items:l,ticks:c}}var Wg=function(t){return t.min()},$g=function(t){return t.max()};function Ug(t,e){var n=t&&!isNaN(t.min),r=t&&!isNaN(t.max),i=n?+t.min:0,s=r?+t.max:1;if(e&&e.length){if(!n){var o=e.map(Wg).filter(Oh);i=o.length?Math.min.apply(Math,Th(o)):i}if(!r){var a=e.map($g).filter(Oh);s=a.length?Math.max.apply(Math,Th(a)):s}}return[i,s]}var Yg={domain:[],range:[],invert:!1,min:NaN,max:NaN};function Qg(t,e,n){var r=t.length;if(2===r)return[e,n];var i=[],s=(n-e)/(r-1);i.push(e);for(var o=1;o<r-1;o++)i.push(e+s*o);return i.push(n),i}function Kg(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=zg(t,e,n).clamp(!0).interpolate(tg),i=Og(t,Yg,{data:e,resources:n}),s=Array.isArray(i.domain)&&i.domain.length,o=Array.isArray(i.range)&&i.range.length,a=r;ch(!0,a,r);var l=Ug(i,e?e.fields:[]),c=Ch(l,2),u=c[0],h=c[1],d=s?i.domain.length:-1,f=n.theme?n.theme.palette("sequential",d>0?d:2):[],p=o?i.range:f;return a.range(i.invert?p.slice().reverse():p.slice()),a.domain(s?i.domain:Qg(a.range(),u,h)),a}var Zg={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function Xg(t,e,n){var r=t.length;if(2===r)return[e+(n-e)/2];for(var i=[],s=(n-e)/r,o=1;o<r;o++)i.push(e+s*o);return i}function Gg(t,e,n,r){n=t[0],r=t&&t.length>=2?t[t.length-1]:r;var i=Kg().domain([n,r]).range(e);return[n].concat(Th(function(t){for(var e=[],n=0;n<t.length-1;n++)e.push((t[n]+t[n+1])/2);return e}(t)),[r]).map((function(t){return i(t)}))}function Jg(t,e,n){var r=2===t.length?10:Math.max(1,t.length),i=_g().domain([e,n]).nice(r).ticks(r);if(!t||!t.length)return i;for(var s=Math.max(0,t.length-1);i.length>s;)i[0]-e<=n-i[i.length-1]?i.shift():i.pop();return i}var tm={domain:[],range:[]};function em(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=xy(),i={data:e,resources:n},s=Og(t,tm,i),o="function"==typeof t.value?t.value:function(t){return t.datum.value},a="function"==typeof t.label?t.label:function(t){return t.datum.label},l=e.items||[],c={},u=[],h=[],d=0;d<l.length;d++){var f=ch({datum:l[d]},i),p=o(f,d);-1===u.indexOf(p)&&(u.push(p),h.push(a(f,d)),c[p]=d)}return r.data=function(){return e},r.labels=function(){return h},r.label=function(t){return h[u.indexOf(t)]},r.datum=function(t){return l[c[t]]},r.range(s.range),Array.isArray(s.domain)&&s.domain.length?r.domain(s.domain):r.domain(u),r}var nm={domain:[],range:[],unknown:void 0},rm={domain:[],range:[],override:!1},im=Wd();function sm(t,e,n){var r=t.data;t.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(t.source)?t.source:[t.source]).forEach((function(t){r.extract.push({field:t})})));var i,s=Xp(r,e,n),o=t.type||function(t){return t.root?"h-band":t.fields&&t.fields[0]?-1!==t.fields.map((function(t){return"dimension"===t.type()?"band":"linear"})).indexOf("linear")?"linear":"band":"linear"}(s);return"color"===o&&(o=s.fields&&s.fields[0]&&"dimension"===s.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(o)&&((i=(i=n.scale.get(o))(t,s,{theme:n.theme,logger:n.logger})).type=o),i}function om(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:sm,i={};return{get:function(s){var o;return"string"==typeof s&&t[s]?o=s:"object"===hh(s)&&"scale"in s&&t[s.scale]&&(o=s.scale),o?(i[o]=i[o]||r(t[o],e,n),i[o]):r(s,e,n)},all:function(){return Object.keys(t).forEach(this.get),i}}}im("linear",zg),im("band",Lg),im("h-band",(function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={data:n,resources:r},s=Og(e,qg,i);s.ticks=Og(e.ticks,Bg,i),s.value="function"==typeof e.value?e.value:function(t){return t.datum.value},s.label="function"==typeof e.label?e.label:function(t){return t.datum.value};var o=Lg(s),a=Vg(n.root,s,i),l=a.values,c=a.labels,u=a.items,h=a.ticks,d=function(t){var e=String(t),n=u[e];return o(n?s.invert?n.rightEdge:n.leftEdge:e)};ch(!0,d,o),d.bandwidth=function(t){var e=u[String(t)],n=o.bandwidth();if(e&&!e.isLeaf){var r=d(e.leftEdge),i=d(e.rightEdge);return Math.abs(r-i)+n}return n},d.step=function(t){var e=u[String(t)],n=e?e.count:1;return o.step()*n},d.data=function(){return n},d.datum=function(t){var e=u[String(t)];return e?e.node.data:null},d.copy=function(){return t(e,n,r)},d.labels=function(){return c},d.ticks=function(){return h.map((function(t){var e=d(t.key),n=d.bandwidth(t.key);return{position:e+n/2,label:t.label,data:t.node.data,start:e,end:e+n}}))};var f=o.pxScale;return d.pxScale=function(t){return o=f(t),d},d.domain(l),d})),im("sequential-color",Kg),im("threshold-color",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=wg(),i=Og(t,Zg,{data:e,resources:n}),s=Array.isArray(i.domain)&&i.domain.length,o=Array.isArray(i.range)&&i.range.length;function a(t){return Ih(t)?NaN:r(t)}Object.keys(r).forEach((function(t){return a[t]=r[t]}));var l=e.fields,c=Ug(i,l),u=Ch(c,2),h=u[0],d=u[1],f=s?i.domain.length:-1,p=n.theme?n.theme.palette("sequential",f>0?f:2):[],y=o?i.range:p,g=[];return g=s?i.domain:i.nice?Jg(y,h,d):[h+(d-h)/2],y.length>g.length+1?g=Xg(y,h,d):y.length<g.length+1&&(y=Gg(g,y,h,d)),a.data=function(){return e},a.range(i.invert?y.slice().reverse():y),a.domain(g),a})),im("categorical-color",(function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=em(e,n,r),s=r.theme,o=Og(e,nm,{data:n,resources:r});if(o.explicit=Og(e.explicit,rm,{data:n,resources:r}),t=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():s?s.palette("categorical",i.domain().length).slice():[],o.unknown)i.unknown(o.unknown);else if(s&&s.palette("unknown")){var a=s.palette("unknown");i.unknown(a[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){for(var l=i.domain().slice(),c=o.explicit.domain,u=Array.isArray(o.explicit.range)?o.explicit.range:[],h=Math.floor(l.length/t.length),d=1;d<h+1;d*=2)t=t.concat(t);if(o.explicit.override)for(var f=0;f<c.length;f++){var p=l.indexOf(c[f]);p>-1&&(t[p]=u[f])}else{var y=c.map((function(t,e){return[l.indexOf(t),t,u[e]]})).sort((function(t,e){return t[0]-e[0]}));y.forEach((function(e){var n=l.indexOf(e[1]);-1!==n&&t.splice(n,0,e[2])}))}t.length=l.length}return i.range(t),i}));var am={};function lm(){lm.init.call(this)}am.isObject=function(t){return"object"==typeof t&&null!==t},am.isNumber=function(t){return"number"==typeof t},am.isUndefined=function(t){return void 0===t},am.isFunction=function(t){return"function"==typeof t};var cm=lm;lm.EventEmitter=lm,lm.prototype._events=void 0,lm.prototype._maxListeners=void 0,lm.defaultMaxListeners=10,lm.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},lm.prototype.setMaxListeners=function(t){if(!am.isNumber(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},lm.prototype.emit=function(t){var e,n,r,i,s,o;if(this._events||(this._events={}),"error"===t&&!this._events.error)throw(e=arguments[1])instanceof Error?e:Error('Uncaught, unspecified "error" event.');if(am.isUndefined(n=this._events[t]))return!1;if(am.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),s=1;s<r;s++)i[s-1]=arguments[s];n.apply(this,i)}else if(am.isObject(n)){for(r=arguments.length,i=new Array(r-1),s=1;s<r;s++)i[s-1]=arguments[s];for(r=(o=n.slice()).length,s=0;s<r;s++)o[s].apply(this,i)}return!0},lm.prototype.on=lm.prototype.addListener=function(t,e){var n;if(!am.isFunction(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,am.isFunction(e.listener)?e.listener:e),this._events[t]?am.isObject(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,am.isObject(this._events[t])&&!this._events[t].warned&&(n=am.isUndefined(this._maxListeners)?lm.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,am.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),am.isFunction(console.trace)&&console.trace()),this},lm.prototype.once=function(t,e){if(!am.isFunction(e))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}return r.listener=e,this.on(t,r),this},lm.prototype.removeListener=function(t,e){var n,r,i,s;if(!am.isFunction(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(i=(n=this._events[t]).length,r=-1,n===e||am.isFunction(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(am.isObject(n)){for(s=i;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},lm.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(am.isFunction(n=this._events[t]))this.removeListener(t,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},lm.prototype.listeners=function(t){return this._events&&this._events[t]?am.isFunction(this._events[t])?[this._events[t]]:this._events[t].slice():[]},lm.listenerCount=function(t,e){return t._events&&t._events[e]?am.isFunction(t._events[e])?1:t._events[e].length:0};var um=function(t){return Object.keys(cm.prototype).forEach((function(e){t[e]=cm.prototype[e]})),cm.init(t),t};function hm(){var t=0,e=0,n=0,r=0;n=n||t;var i={move:function(t){this.moveTo(n+t)},moveTo:function(s){var o=Math.max(t,Math.min(e-r,s));n!==o&&(n=o,i.emit("update"))},update:function(s){var o=!1,a=s.min;t=void 0===a?t:a;var l=s.max;e=void 0===l?e:l,void 0!==s.viewSize&&s.viewSize!==r&&(r=s.viewSize,o=!0);var c=Math.max(t,Math.min(e-r,n));n!==c&&(n=c,o=!0),o&&i.emit("update")},getState:function(){return{min:t,max:e,start:n,viewSize:r}}};return um(i),i}function dm(t,e){var n=t.min||0,r=t.max||0,i=t.viewSize||0,s=e||hm();return s.update({min:n,max:r,viewSize:i}),s}function fm(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=dm(t[r],e?e[r]:null));return n}function pm(t,e){return e[t]||(e[t]=hm()),e[t]}function ym(t,e){return t<=e}function gm(t,e){return t<e}function mm(t,e,n){for(var r=0;r<t.length&&e>t[r];)++r;return t[r]===e&&n&&++r,r}function vm(t,e,n,r){for(var i=t.length,s=1;s<i;s+=2)if(n(t[s-1],e)&&r(e,t[s]))return!0;return!1}function xm(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.includeMax,i=void 0===r||r,s=n.includeMin,o=void 0===s||s;t=i?ym:gm,e=o?ym:gm},i.add=function(t){var e,n=t.min,i=t.max,s=mm(r,n),o=mm(r,i,!0),a=[s,o-s];s%2==0&&a.push(n),o%2==0&&a.push(i);var l=r.join(",");return(e=r).splice.apply(e,a),l!==r.join(",")},i.remove=function(t){var e,n=t.min,i=t.max,s=mm(r,n),o=mm(r,i,!0),a=[s,o-s];s%2==1&&a.push(n),o%2==1&&a.push(i);var l=r.join(",");return(e=r).splice.apply(e,a),l!==r.join(",")},i.set=function(t){var e=r.join(",");return r=[],Array.isArray(t)?t.forEach(i.add):i.add(t),e!==r.join(",")},i.clear=function(){var t=r.length>0;return r=[],t},i.containsValue=function(n){return vm(r,n,e,t)},i.containsRange=function(t){var e=t.max,n=mm(r,t.min,!0),i=mm(r,e);return n===i&&i%2==1},i.toggle=function(t){return i.containsRange(t)?i.remove(t):i.add(t)},i.ranges=function(){for(var t=[],e=1;e<r.length;e+=2)t.push({min:r[e-1],max:r[e]});return t},i.configure(n),i}function bm(){var t=[];function e(){}return e.add=function(e){return-1===t.indexOf(e)&&(t.push(e),!0)},e.remove=function(e){var n=t.indexOf(e);return-1!==n&&(t.splice(n,1),!0)},e.contains=function(e){return-1!==t.indexOf(e)},e.values=function(){return t.slice()},e.clear=function(){return t=[]},e.toString=function(){return t.join(";")},e}var _m={key:void 0,includeMin:!0,includeMax:!0};function wm(t){for(var e,n,r=t.items,i=t.collection,s=t.vc,o={},a=[],l=0,c=r.length;l<c;l++){i[e=r[l].key]||(i[e]=s()),n=r[l].values||[r[l].value];for(var u=0;u<n.length;u++)i[e].add(n[u])&&(o[e]=o[e]||[],o[e].push(n[u]))}for(var h=Object.keys(o),d=0,f=h.length;d<f;d++)a.push({id:e=h[d],values:o[e]});return a}function km(t){for(var e,n,r=t.items,i=t.collection,s={},o=[],a=0,l=r.length;a<l;a++)if(i[e=r[a].key]){n=r[a].values||[r[a].value];for(var c=0;c<n.length;c++)i[e].remove(n[c])&&(s[e]=s[e]||[],s[e].push(n[c]))}for(var u=Object.keys(s),h=0,d=u.length;h<d;h++)o.push({id:e=u[h],values:s[e]});return o}function Sm(t){for(var e,n,r={},i=0,s=t.length;i<s;i++){n=t[i].values||[t[i].value],r[e=t[i].key]||(r[e]=[]);for(var o=0;o<n.length;o++)-1===r[e].indexOf(n[o])&&r[e].push(n[o])}return r}function Mm(t){var e=t.key,n=t.collection,r=t.obj,i=t.value;n[e]||(n[e]=(0,t.fn)()),r[e]=r[e]||[],r[e].push(i),n[e].add(i)}function Em(t){for(var e,n,r,i=t.values,s=t.vc,o={},a={},l=[],c=[],u=Sm(t.items),h=Object.keys(u),d=0,f=h.length;d<f;d++)for(var p=0,y=(r=u[e=h[d]]).length;p<y;p++)n=r[p],i[e]&&i[e].contains(n)?i[e]&&i[e].contains(n)&&(a[e]=a[e]||[],a[e].push(n),i[e].remove(n)):Mm({key:e,value:n,collection:i,obj:o,fn:s});for(var g=Object.keys(o),m=0,v=g.length;m<v;m++)l.push({id:e=g[m],values:o[e]});for(var x=Object.keys(a),b=0,_=x.length;b<_;b++)c.push({id:e=x[b],values:a[e]});return[l,c]}function Cm(t,e){for(var n,r,i=[],s=Object.keys(t),o=function(t){return-1===e[n].indexOf(t)},a=0,l=s.length;a<l;a++)e[n=s[a]]?(r=t[n].filter(o)).length&&i.push({id:n,values:r}):i.push({id:n,values:t[n]});return i}function Tm(t){for(var e,n,r=t.vCollection,i=t.vc,s={},o=Sm(t.items),a={},l=Object.keys(r),c=0,u=l.length;c<u;c++)a[n=l[c]]=r[n].values().slice(),delete r[n];for(var h=function(t){r[n]&&r[n].contains(t)||Mm({key:n,value:t,collection:r,obj:s,fn:i})},d=Object.keys(o),f=0,p=d.length;f<p;f++)o[n=d[f]].forEach(h);return e=Cm(a,s),[Cm(s,a),e]}function Am(t,e,n){var r=function(t,e){if(!Object.keys(e).length)return t;for(var n=t.length,r=Array(n),i=0;i<n;i++)r[i]=t[i].key in e?ch({},t[i],{key:e[t[i].key]}):t[i];return r}(e,n);return t&&t.length?t.reduce((function(t,e){return e(t)}),r):r}function Nm(t){return t.replace(/(-[a-z])/g,(function(t){return t.toUpperCase().replace("-","")}))}function Rm(t){return t.replace(/([A-Z])/g,(function(t){return"-".concat(t.toLowerCase())}))}function Om(t,e,n){var r=n.ranges,i=n.rc,s=n.aliases,o=n.rangeConfig,a=Am(n.interceptors["".concat(e,"Ranges")],t,s),l=!1;return a.forEach((function(t){var n=t.key;if(r[n]||(r[n]=i(o.sources[n]||o.default)),"set"===e)l=r[n][e](t.ranges||t.range)||l;else for(var s=t.ranges||[t.range],a=0;a<s.length;a++)l=r[n][e](s[a])||l})),l}function Im(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.vc,n=void 0===e?bm:e,r=t.rc,i=void 0===r?xm:r,s=!1,o={},a={},l={},c={sources:{},default:ch({},_m)},u={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},h=function(){var t={values:{},ranges:{}};return Object.keys(a).forEach((function(e){t.values[e]=a[e].values()})),Object.keys(o).forEach((function(e){t.ranges[e]=o[e].ranges()})),t},d={ls:[],clear:function(){this.ls.forEach((function(t){return t.clear()}))},start:function(){this.ls.forEach((function(t){return t.start()}))},end:function(){this.ls.forEach((function(t){return t.end()}))},update:function(){var t=h();this.ls.forEach((function(e){return e._state(t)}))},updateValues:function(){var t=h();this.ls.forEach((function(e){return e._state({values:t.values})}))},updateRanges:function(){var t=h();this.ls.forEach((function(e){return e._state({ranges:t.ranges})}))}},f={configure:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(t.ranges)&&t.ranges.length&&(c={sources:{},default:ch({},_m)},t.ranges.forEach((function(t){var e={};Object.keys(_m).filter((function(t){return"key"!==t})).forEach((function(n){e[n]=void 0!==t[n]?t[n]:_m[n]})),void 0!==t.key?c.sources[t.key]=e:c.default=e})),Object.keys(o).forEach((function(t){return o[t].configure(c.sources[t]||c.default)})),f.emit("update",[],[]))},link:function(t){if(f===t)throw new Error("Can't link to self");d.ls.push(t),t._state(h())},_state:function(t){if(!t)return h();if(t.values){var e=[];Object.keys(t.values).forEach((function(n){a[n]&&t.values[n].join(";")===a[n].toString()||e.push({key:n,values:t.values[n]})})),Object.keys(a).forEach((function(n){t.values[n]||e.push({key:n,values:[]})})),e.length&&f.setValues(e)}if(t.ranges){var n=[];Object.keys(t.ranges).forEach((function(e){o[e]&&t.ranges[e].join(";")===o[e].toString()||n.push({key:e,ranges:t.ranges[e]})})),Object.keys(o).forEach((function(e){t.ranges[e]||n.push({key:e,ranges:[]})})),n.length&&f.setRanges(n)}},start:function(){if(!s){s=!0;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];f.emit.apply(f,["start"].concat(e)),d.start()}},end:function(){if(s){s=!1,o={},a={};for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];f.emit.apply(f,["end"].concat(e)),d.end()}},isActive:function(){return s},clear:function(){var t=f.brushes().filter((function(t){return"value"===t.type&&t.brush.values().length})).map((function(t){return{id:t.id,values:t.brush.values()}})),e=Object.keys(o).length>0||t.length;o={},a={},e&&(f.emit("update",[],t),d.clear())},brushes:function(){var t=[];return(t=t.concat(Object.keys(o).map((function(t){return{type:"range",id:t,brush:o[t]}})))).concat(Object.keys(a).map((function(t){return{type:"value",id:t,brush:a[t]}})))},addValue:function(t,e){f.addValues([{key:t,value:e}])},addValues:function(t){var e=Am(u.addValues,t,l),r=wm({vc:n,collection:a,items:e});f.emit("add-values",e),r.length&&(s||(s=!0,f.emit("start")),f.emit("update",r,[]),d.updateValues())},setValues:function(t){var e=Am(u.setValues,t,l),r=Tm({items:e,vCollection:a,vc:n});f.emit("set-values",e),(r[0].length>0||r[1].length>0)&&(s||(s=!0,f.emit("start")),f.emit("update",r[0],r[1]),d.updateValues())},removeValue:function(t,e){f.removeValues([{key:t,value:e}])},removeValues:function(t){var e=Am(u.removeValues,t,l),n=km({collection:a,items:e});f.emit("remove-values",e),n.length&&(f.emit("update",[],n),d.updateValues())},addAndRemoveValues:function(t,e){var r=Am(u.addValues,t,l),i=Am(u.removeValues,e,l),o=wm({vc:n,collection:a,items:r}),c=km({collection:a,items:i});f.emit("add-values",r),f.emit("remove-values",i),(o.length||c.length)&&(s||(s=!0,f.emit("start")),f.emit("update",o,c),d.updateValues())},toggleValue:function(t,e){f.toggleValues([{key:t,value:e}])},toggleValues:function(t){var e=Am(u.toggleValues,t,l),r=Em({items:e,values:a,vc:n});f.emit("toggle-values",e),(r[0].length>0||r[1].length>0)&&(s||(s=!0,f.emit("start")),f.emit("update",r[0],r[1]),d.updateValues())},containsValue:function(t,e){var n=l[t]||t;return!!a[n]&&a[n].contains(e)},addRange:function(t,e){f.addRanges([{key:t,range:e}])},addRanges:function(t){Om(t,"add",{ranges:o,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(s||(s=!0,f.emit("start")),f.emit("update",[],[]),d.updateRanges())},removeRange:function(t,e){f.removeRanges([{key:t,range:e}])},removeRanges:function(t){Om(t,"remove",{ranges:o,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(s||(s=!0,f.emit("start")),f.emit("update",[],[]),d.updateRanges())},setRange:function(t,e){f.setRanges([{key:t,range:e}])},setRanges:function(t){Om(t,"set",{ranges:o,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(s||(s=!0,f.emit("start")),f.emit("update",[],[]),d.updateRanges())},toggleRange:function(t,e){f.toggleRanges([{key:t,range:e}])},toggleRanges:function(t){Om(t,"toggle",{ranges:o,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(s||(s=!0,f.emit("start")),f.emit("update",[],[]),d.updateRanges())},containsRangeValue:function(t,e){var n=l[t]||t;return!!o[n]&&o[n].containsValue(e)},containsRange:function(t,e){var n=l[t]||t;return!!o[n]&&o[n].containsRange(e)},containsMappedData:function(t,e,n){for(var r,i,s,c,u=[],h=Object.keys(t),d=0,f=h.length;d<f;d++){if("value"===(r=h[d]))i=t,u[d]={key:"",i:d,bool:!1};else{if("source"===r)continue;i=t[r],u[d]={key:r,i:d,bool:!1}}void 0!==(s=i.source&&i.source.field)&&(void 0!==i.source.key&&(s="".concat(i.source.key,"/").concat(s)),s in l&&(s=l[s]),c=i.value,o[s]?u[d].bool=Array.isArray(c)?o[s].containsRange({min:c[0],max:c[1]}):o[s].containsValue(c):a[s]&&a[s].contains(c)&&(u[d].bool=!0))}return e?(u=u.filter((function(t){return-1!==e.indexOf(t.key)})),"and"===n?!!u.length&&!u.some((function(t){return!1===t.bool})):"xor"===n?!!u.length&&u.some((function(t){return t.bool}))&&u.some((function(t){return!1===t.bool})):u.some((function(t){return t.bool}))):u.some((function(t){return t.bool}))},intercept:function(t,e){var n=Nm(t);u[n]&&u[n].push(e)},removeInterceptor:function(t,e){var n=Nm(t);if(u[n]){var r=u[n].indexOf(e);-1!==r&&u[n].splice(r,1)}},removeAllInterceptors:function(t){var e=[];if(t){var n=Nm(t);u[n]&&u[n].length&&e.push({name:t,handlers:u[n]})}else Object.keys(u).forEach((function(t){u[t].length&&e.push({name:Rm(t),handlers:u[t]})}));e.forEach((function(t){t.handlers.slice().forEach((function(e){return f.removeInterceptor(t.name,e)}))}))},addKeyAlias:function(t,e){l[t]=e},removeKeyAlias:function(t){delete l[t]}};return um(f),f}function Pm(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Wd();var Dm=2*Math.PI,jm=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Dm);function i(t){return 1-e*function(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Dm)},i.period=function(n){return t(e,n)},i}(1,.3);function Fm(t,e){return t.data?t.data.value:"text"===t.type?t.text:e}function zm(t,e,n){var r,i=t.old,s=t.current,o=e.renderer,a=[],l={nodes:[],ips:[]},c={nodes:[],ips:[]},u={nodes:[],ips:[]},h=[],d=n.trackBy||Fm,f={start:function(){var t={};i.forEach((function(e,n){var r=d(e,n);t[r]=e})),s.forEach((function(e,n){var r=d(e,n);t[r]?(u.ips.push(sg(t[r],e)),u.nodes.push(e),a.push(t[r]),t[r]=!1):(l.nodes.push(e),l.ips.push(sg({r:.001,opacity:0},e)))})),Object.keys(t).forEach((function(e){t[e]&&(c.nodes.push(t[e]),c.ips.push(sg(t[e],ch({},t[e],{r:1e-4,opacity:0}))))})),c.ips.length&&h.push({easing:Pm,duration:200,tweens:c.ips,nodes:[].concat(a)}),u.ips.length&&h.push({easing:Pm,duration:400,tweens:u.ips,nodes:[]}),l.ips.length&&h.push({easing:jm,duration:1200,tweens:l.ips,nodes:Th(u.nodes)}),h.length&&(h[0].started=Date.now(),"undefined"!=typeof window&&(r=window.requestAnimationFrame(f.tick)))},tick:function(){var t=h[0];t||f.stop(),t.started||(t.started=Date.now());var e=(Date.now()-t.started)/t.duration,n=[],i=t.tweens.map((function(n){return n(t.easing(Math.min(1,e)))}));n.push.apply(n,Th(i)),n.push.apply(n,Th(t.nodes)),o.render(n),e>=1&&(h.shift(),h.length||f.stop()),r&&(r=window.requestAnimationFrame(f.tick))},stop:function(){r&&(window.cancelAnimationFrame(r),r=!1)}};return f}var qm={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},Lm=/^\$/;function Bm(t){var e=hh(t);return"object"!==e&&"function"!==e&&"undefined"!==e}function Hm(t,e,n){var r=t[e];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(t[e]=r.pxScale(n))}function Vm(t,e){return t.pxScale?t.pxScale(e):t}var Wm={normalizeSettings:function(t,e,n){var r=ch({},t),i=ch({},e);return Object.keys(r).forEach((function(t){i[t]={};var s=r[t],o=hh(s);if("function"==typeof s)i[t].fn=s;else if(Bm(s)){var a=e[t];"string"==typeof a&&Lm.test(a)&&(a=qm[a]);var l=hh(a);i[t]="undefined"===l||l===o?s:a}else s&&"object"===hh(s)&&("function"==typeof s.fn&&(i[t].fn=s.fn),void 0!==s.scale&&(i[t].scale=n.scale(s.scale)),"string"==typeof s.ref&&(i[t].ref=s.ref))})),Object.keys(e).forEach((function(t){if(!(t in r)){var n=e[t],s=hh(n);i[t]="string"===s&&Lm.test(n)?qm[n]:n}})),i},resolveForItem:function(t,e,n){for(var r={},i=Object.keys(e),s=i.length,o=t.datum,a=t.datum,l=0;l<s;l++){var c=i[l],u=e[c],h="object"===hh(a)&&void 0!==u,d=h&&"string"==typeof u.ref,f=d?a[u.ref]:h&&c in a?a[c]:o;Bm(u)?r[c]=u:h&&u.fn?(u.scale&&(t.scale=u.scale),r[c]=u.fn.call(null,t,n)):h&&u.scale&&f?(r[c]=u.scale(f.value),u.scale.bandwidth&&(r[c]+=u.scale.bandwidth()/2)):r[c]=d&&f?f.value:u.fn?u.fn.call(null,t,n):u}return r},updateScaleSize:Hm};function $m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wm,n={};function r(r){var i=r.data,s=r.defaults,o=r.scaled,a=n.norm=e.normalizeSettings(r.settings,void 0===s?{}:s,t.chart),l={scale:t.chart.scale,formatter:t.chart.formatter};o&&Object.keys(o).forEach((function(t){a[t]&&e.updateScaleSize(a,t,o[t])}));var c=[];if(!i||!Array.isArray(i.items)){var u=e.resolveForItem({data:i,resources:l},n.norm,-1);return{settings:n.norm,item:u}}for(var h=0,d=i.items.length;h<d;h++){var f=e.resolveForItem({datum:i.items[h],data:i,resources:l},n.norm,h);f.data=i.items[h],c.push(f)}return{settings:n.norm,items:c}}return{resolve:r}}function Um(t,e){var n=e.data,r=e.style,i=e.filter,s=e.mode,o=t.chart.brush(e.context),a=n,l=r.active||{},c=r.inactive||{},u=[];Object.keys(l).forEach((function(t){u.push(t)})),Object.keys(c).forEach((function(t){-1===u.indexOf(t)&&u.push(t)}));var h=[],d=!1,f=function(){var e=function t(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,n){return Array.isArray(n.children)?(e.push.apply(e,Th(t(n.children))),e):(e.push(n),e)}),[])}(t.nodes);return"function"==typeof i&&(e=e.filter(i)),e},p=function(){for(var t,e=f(),n=e.length,r=!1,i="function"==typeof a?a({brush:o}):a,p=function(n){if(!(t=e[n].data))return"continue";e[n].__style||(e[n].__style={},u.forEach((function(t){e[n].__style[t]=e[n][t]})));var a=o.containsMappedData(t,i,s),f=h.indexOf(e[n]),p=!1;if(a&&-1===f?(h.push(e[n]),p=!0):a||-1===f||(h.splice(f,1),p=!0),p||d){var y=ch({},e[n],e[n].__style);u.forEach((function(t){e[n][t]=a&&t in l?"function"==typeof l[t]?l[t].call(null,y):l[t]:!a&&t in c?"function"==typeof c[t]?c[t].call(null,y):c[t]:e[n].__style[t]})),r=!0}},y=0;y<n;y++)p(y);return d=!1,r},y=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1},n=e.suppressRender,r=f(),i=r.length,s=function(t){if(!r[t].data)return"continue";r[t].__style=r[t].__style||{},u.forEach((function(e){r[t].__style[e]=r[t][e],e in c&&(r[t][e]="function"==typeof c[e]?c[e].call(null,r[t]):c[e])}))},o=0;o<i;o++)s(o);d=!0,h.length=0,n||t.renderer.render(t.nodes)},g=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1},n=e.suppressRender,r=f(),i=r.length,s=function(t){r[t].__style&&(Object.keys(r[t].__style).forEach((function(e){r[t][e]=r[t].__style[e]})),r[t].__style=void 0)},o=0;o<i;o++)s(o);h.length=0,n||t.renderer.render(t.nodes)},m=function(){p()&&t.renderer.render(t.nodes)};return o.on("start",y),o.on("end",g),o.on("update",m),{isActive:function(){return o.isActive()},update:function(){h.length=0,d=!0,p()},cleanUp:function(){o.removeListener("start",y),o.removeListener("end",g),o.removeListener("update",m)}}}function Ym(t){for(var e=t.nodes,n=t.action,r=t.chart,i=t.trigger,s=[],o=0;o<e.length;o++){var a=e[o].data;null!==a&&s.push(a)}!function(t){var e=t.dataPoints,n=t.action,r=t.chart,i=t.trigger;if(i){var s=i.data||[""],o={items:[],actionFn:"toggleRanges"},a={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(o.actionFn="".concat(n,"Ranges"),a.actionFn="".concat(n,"Values"));for(var l=function(t){var n=e[t];if(!n)return"continue";s.forEach((function(t){var e=n&&!t?n:n[t];if(e){var r={key:e.source.field};void 0!==e.source.key&&(r.key="".concat(e.source.key,"/").concat(e.source.field)),Array.isArray(e.value)?(r.range={min:e.value[0],max:e.value[1]},o.items.push(r)):(r.value=e.value,a.items.push(r))}}))},c=0;c<e.length;c++)l(c);i.contexts.forEach((function(t){o.items.length?r.brush(t)[o.actionFn](o.items):r.brush(t)[a.actionFn](a.items)}))}}({dataPoints:s,action:n,chart:r,trigger:i})}function Qm(t){var e=t.collisions,n=t.t,r=t.config,i=t.action,s=[],o=!1;return e.length>0&&(s=e,o=!0,"stop"===n.propagation&&(s=[e[e.length-1]])),Ym({nodes:s.map((function(t){return t.node})),action:i,chart:r.chart,data:r.data,trigger:n}),o}function Km(t,e,n){var r=n.element().getBoundingClientRect(),i=Rh(t)?function(t,e){return 1!==t.changedTouches.length?null:{x:t.changedTouches[0].clientX-e.left,y:t.changedTouches[0].clientY-e.top}}(t,r):function(t,e){return{x:t.clientX-e.left,y:t.clientY-e.top}}(t,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(e.touchRadius>0&&Rh(t)?i={cx:i.x,cy:i.y,r:e.touchRadius}:e.mouseRadius>0&&!Rh(t)&&(i={cx:i.x,cy:i.y,r:e.mouseRadius}),n.itemsAt(i))}function Zm(t,e,n){return t?"function"==typeof t?t(e):t:n}function Xm(t){var e=t.e,n=t.t,r=t.config;return Qm({collisions:Km(e,n,r.renderer),t:n,config:r,action:Zm(n.action,e,"toggle")})}function Gm(t){var e=t.e,n=t.t,r=t.config;return Qm({collisions:Km(e,n,r.renderer),t:n,config:r,action:Zm(n.action,e,"set")})}var Jm={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function tv(t,e){Object.keys(Jm).forEach((function(n){var r=e[n];void 0!==r&&(t[Jm[n]]=r)}))}function ev(t){for(var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",r=0;r<t.length;r++){var i=t[r];n+=0===r?"M".concat(i.x," ").concat(i.y):"L".concat(i.x," ").concat(i.y),n+=" "}return e&&(n+="Z"),n}function nv(t,e,n,r){var i=n/2,s=t-r/2,o=e-r/2,a=t-i,l=e-i;return[{x:s,y:o},{x:s,y:l},{x:s+r,y:l},{x:s+r,y:o},{x:a+n,y:o},{x:a+n,y:o+r},{x:s+r,y:o+r},{x:s+r,y:l+n},{x:s,y:l+n},{x:s,y:o+r},{x:a,y:o+r},{x:a,y:o}]}function rv(t){return-t/180*Math.PI}function iv(t){return function(t){var e=(.5*(Math.floor(t/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(e-t))*Math.sqrt(2),r=n*Math.cos(t),i=n*Math.sin(t);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(rv(t))}function sv(t,e){return{x:t.x+e.x,y:t.y+e.y}}function ov(t,e){return{x:t.x-e.x,y:t.y-e.y}}function av(t,e){return{x:t.x*e,y:t.y*e}}function lv(t,e){return t.x-e.x}function cv(t,e){return t.y-e.y}function uv(t,e){return Math.pow(lv(t,e),2)+Math.pow(cv(t,e),2)}function hv(t,e){return Math.sqrt(uv(t,e))}function dv(t,e){return t.x*e.x+t.y*e.y}function fv(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},r=Math.cos(e),i=Math.sin(e),s=ov(t,n),o={x:r*s.x-i*s.y,y:i*s.x+r*s.y};return sv(o,n)}var pv={up:0,down:180,left:90,right:-90};function yv(t){var e=t.size,n=e/2;return{type:"rect",x:t.x-n,y:t.y-n,width:e,height:e}}var gv=Wd();function mv(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(e).forEach((function(n){void 0!==Jm[n]&&"transform"!==n&&(t[n]=e[n])}))}gv.add("circle",(function(t){return{type:"circle",fill:"black",cx:t.x,cy:t.y,r:t.size/2}})),gv.add("diamond",(function(t){var e=t.size,n=t.x-e/2,r=t.y-e/2;return{type:"path",fill:"black",d:ev([{x:n,y:r+e/2},{x:n+e/2,y:r},{x:n+e,y:r+e/2},{x:n+e/2,y:r+e},{x:n,y:r+e/2}])}})),gv.add("saltire",(function(t){var e=rv(45),n=t.size/2,r=isNaN(t.width)?n/2:t.width,i=Math.min(r,n),s=t.size,o=Math.sin(Math.asin(-e))*(i/2);s+=2*(n/Math.sin(-e)-n);var a={x:t.x,y:t.y};return{type:"path",fill:"black",d:ev(nv(t.x,t.y,s-=2*o,i).map((function(t){return fv(t,e,a)})))}})),gv.add("square",(function(t){var e=t.size;return{type:"rect",fill:"black",x:t.x-e/2,y:t.y-e/2,width:e,height:e}})),gv.add("triangle",(function(t){var e=t.size,n={x:t.x,y:t.y},r=e/2,i=t.x-r,s=t.y-r,o=[{x:i,y:s+e},{x:i+r,y:s},{x:i+e,y:s+e},{x:i,y:s+e}],a=rv(pv[t.direction]||0);return{type:"path",fill:"black",d:ev(o=o.map((function(t){return fv(t,a,n)})))}})),gv.add("line",(function(t){var e="vertical"===t.direction,n=t.size/2,r=t.x,i=t.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(e?0:n),y1:i-(e?n:0),x2:r+(e?0:n),y2:i+(e?n:0),collider:yv(t)}})),gv.add("star",(function(t){for(var e=t.size,n=[],r=e/2,i=t.points||5,s=Math.min(t.innerRadius||e/2,e)/2,o=isNaN(t.startAngle)?90:t.startAngle,a=360/i,l=1;l<=i;l++){var c=a*l+o,u=rv(c),h=rv(c+a/2),d=Math.sin(u),f=Math.cos(u),p=Math.sin(h),y=Math.cos(h);n.push({x:t.x+f*r,y:t.y+d*r}),n.push({x:t.x+y*s,y:t.y+p*s})}return{type:"path",fill:"black",d:ev(n)}})),gv.add("n-polygon",(function(t){for(var e=[],n=t.size/2,r=Math.max(isNaN(t.sides)?6:t.sides,3),i=360/r,s=isNaN(t.startAngle)?0:t.startAngle,o=1;o<=r;o++){var a=rv(i*o+s),l=Math.sin(a),c=Math.cos(a);e.push({x:t.x+c*n,y:t.y+l*n})}return{type:"path",fill:"black",d:ev(e)}})),gv.add("cross",(function(t){var e=t.x,n=t.y,r=t.size/2,i=isNaN(t.width)?r/2:t.width,s=Math.min(i,r);return{type:"path",fill:"black",d:ev(nv(e,n,t.size,s))}})),gv.add("bar",(function(t){var e={x:t.x,y:t.y},n=t.size/2,r=n/2/2,i=[{x:e.x-n,y:e.y+r},{x:e.x-n,y:e.y-r},{x:e.x+n,y:e.y-r},{x:e.x+n,y:e.y+r}];if("vertical"===t.direction){var s=rv(90);i=i.map((function(t){return fv(t,s,e)}))}var o=Fh(i);return o.type="rect",o.fill="black",o}));var vv=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gv;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.get(e.type);if(n){var r=n(e);return mv(r,e),void 0!==e.data&&(r.data=e.data),r}return n}};function xv(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.dock,r=void 0===n?"center":n,i=t.displayOrder,s=void 0===i?0:i,o=t.prioOrder,a=void 0===o?0:o,l=t.preferredSize,c=void 0===l?0:l,u=t.minimumLayoutMode,h=t.show,d=void 0===h||h;r=r||"center";var f={computePreferredSize:function(t){return"function"==typeof c?c({inner:t.inner,outer:t.outer,children:t.children,dock:this.dock()},e):c},dock:function(t){return void 0!==t?(r=t,this):"function"==typeof r?r(e):r},displayOrder:function(t){return void 0!==t?(s=t,this):"function"==typeof s?s(e):s},prioOrder:function(t){return void 0!==t?(a=t,this):"function"==typeof a?a(e):a},minimumLayoutMode:function(t){return void 0!==t?(u=t,this):"function"==typeof u?u(e):u},show:function(t){return void 0!==t?(d=t,this):"function"==typeof d?d(e):d}};return f}function bv(t,e,n){var r=e.require,i=void 0===r?[]:r,s=e.mediator||{},o=n.settings,a=n.formatter,l=n.scale,c=n.data,u=n.renderer,h=n.chart,d=n.dockConfig,f=n.mediator,p=n.instance,y=n.rect,g=n.style,m=n.registries,v=n.resolver,x=n.update,b=n._DO_NOT_USE_getInfo,_=n.symbol,w=n.isVisible;t.emit=function(){},w&&(t.isVisible=w),Object.defineProperty(t,"settings",{get:o}),Object.defineProperty(t,"data",{get:c}),Object.defineProperty(t,"formatter",{get:a}),Object.defineProperty(t,"scale",{get:l}),Object.defineProperty(t,"mediator",{get:f}),Object.defineProperty(t,"style",{get:g}),Object.defineProperty(t,"registries",{get:m}),y&&Object.defineProperty(t,"rect",{get:y}),b&&(t._DO_NOT_USE_getInfo=b),Object.keys(e).forEach((function(n){var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((function(t){return t===r}))||(t[n]="function"==typeof e[n]?e[n].bind(t):e[n])})),i.forEach((function(e){"renderer"===e?Object.defineProperty(t,"renderer",{get:u}):"chart"===e?Object.defineProperty(t,"chart",{get:h}):"dockConfig"===e?Object.defineProperty(t,"dockConfig",{get:d}):"instance"===e?Object.defineProperty(t,"instance",{get:p}):"update"===e&&x?Object.defineProperty(t,"update",{get:x}):"resolver"===e?Object.defineProperty(t,"resolver",{get:v}):"symbol"===e&&Object.defineProperty(t,"symbol",{get:_})})),Object.keys(s).forEach((function(e){t.mediator.on(e,s[e].bind(t))}))}function _v(t,e,n){var r=function(e){return t[e]?(n.warn("Deprecation Warning the ".concat(e," property should be moved into layout: {} property")),t[e]):t.layout?t.layout[e]:void 0},i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),t.layout=t.layout||{},t.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:t.layout.displayOrder,t.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:t.layout.prioOrder,t.layout.dock=i.dock||t.layout.dock,t.layout.minimumLayoutMode=i.minimumLayoutMode||t.layout.minimumLayoutMode,i.show=t.show,i.preferredSize=e,i}function wv(t,e,n){Object.keys(n.on||{}).forEach((function(r){t.eventListeners=t.eventListeners||[];var i=n.on[r].bind(t);t.eventListeners.push({event:r,listener:i}),e.on(r,i)})),t.emit=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return e.emit.apply(e,[t].concat(r))}}function kv(t,e){t.eventListeners&&(t.eventListeners.forEach((function(t){e.removeListener(t.event,t.listener)})),t.eventListeners.length=0),t.emit=function(){}}function Sv(t,e,n){return hv(t,n)+hv(e,n)-hv(t,e)<1e-12}function Mv(t,e){return t.x>=e.x&&t.x+t.width<=e.x+e.width&&t.y>=e.y&&t.y+t.height<=e.y+e.height}function Ev(t){return t.x1===t.x2&&t.y1===t.y2}function Cv(t){return t.width<=0||t.height<=0}function Tv(t){return t.r<=0}function Av(t){return t.edges.length<=2}function Nv(t,e){for(var n=0,r=e.edges.length;n<r;n++)if(!0===Fv(t,zh(e.edges[n])))return!0;return!1}function Rv(t,e){for(var n=e.numPolygons,r=e.polygons,i=0;i<n;i++)if(!0===Uv(t,r[i]))return!0;return!1}function Ov(t,e){return!Tv(t)&&uv({x:t.cx,y:t.cy},e)<=Math.pow(t.r,2)}function Iv(t,e){if(Cv(e)||Tv(t))return!1;var n=e.width/2,r=e.height/2,i=e.y+r,s=t.r,o=t.cy,a=Math.abs(t.cx-(e.x+n)),l=Math.abs(o-i);return!(a>n+s||l>r+s)&&(a<=n||l<=r||Math.pow(a-n,2)+Math.pow(l-r,2)<=Math.pow(s,2))}function Pv(t,e){if(Tv(t)||Ev(e))return!1;var n=Ch(Dh(e),2),r=n[0],i=n[1];if(Ov(t,r)||Ov(t,i))return!0;var s={x:t.cx,y:t.cy},o=function(t,e,n){return sv(function(t,e){var n=dv(t,e)/dv(e,e)||1;return{x:e.x*n,y:e.y*n}}(ov(n,t),ov(e,t)),t)}(r,i,s);return uv(o,s)<=Math.pow(t.r,2)&&Sv(r,i,o)}function Dv(t,e){if(Av(e)||Tv(t))return!1;if(jv(e,{x:t.cx,y:t.cy}))return!0;for(var n=e.edges.length,r=0;r<n;r++)if(Pv(t,zh(e.edges[r])))return!0;return!1}function jv(t,e){if(Av(t)||!Bv(t.boundingRect(),e))return!1;var n,r,i,s,o,a=e.x,l=e.y,c=t.vertices;for(n=!1,s=-1,i=(r=c.length)-1;++s<r;i=s){if(c[s].x===a&&c[s].y===l)return!0;if(c[s].y===c[i].y&&c[s].y===l&&(a-c[s].x)*(a-c[i].x)<=0)return!0;if(c[s].y<l&&l<=c[i].y||c[i].y<l&&l<=c[s].y){if(a===(o=(c[i].x-c[s].x)*(l-c[s].y)/(c[i].y-c[s].y)+c[s].x))return!0;a<o&&(n=!n)}}return n}function Fv(t,e){if(Av(t))return!1;for(var n=0,r=t.edges.length;n<r;n++)if(Vv(e,zh(t.edges[n])))return!0;var i=Ch(Dh(e),2),s=i[1];return jv(t,i[0])||jv(t,s)}function zv(t,e){if(Av(t))return!1;for(var n=0,r=t.edges.length;n<r;n++)if(Hv(e,zh(t.edges[n])))return!0;var i=Ch(jh(e),4),s=i[1],o=i[2],a=i[3];return jv(t,i[0])||jv(t,s)||jv(t,o)||jv(t,a)}function qv(t,e){return!Cv(t)&&!Cv(e)&&t.x<=e.x+e.width&&e.x<=t.x+t.width&&t.y<=e.y+e.height&&e.y<=t.y+t.height}function Lv(t,e){return!Cv(t)&&!Cv(e)&&[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}].every((function(e){return Bv(t,e)}))}function Bv(t,e){return!Cv(t)&&e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height}function Hv(t,e){if(Ev(e)||Cv(t))return!1;var n=Ch(Dh(e),2),r=n[1];if(Bv(t,n[0])||Bv(t,r))return!0;for(var i=jh(t),s=i.length,o=0;o<s;o++)if(Vv(zh([i[o],i[3!==o?o+1:0]]),e))return!0;return!1}function Vv(t,e){var n,r,i=Ch(Dh(t),2),s=i[0],o=i[1],a=Ch(Dh(e),2),l=a[0],c=a[1],u=lv(o,s),h=cv(o,s),d=lv(c,l),f=cv(c,l),p=lv(s,l),y=cv(s,l),g=f*u-d*h,m=d*y-f*p,v=u*y-h*p;if(0===u&&0===h)return!1;if(0===d&&0===f)return!1;if(0===g){if(0===m&&0===v){if(0===u){if(0===h)return s.x===o.x&&s.y===o.y;n=cv(l,s)/h,r=cv(c,s)/h}else n=(l.x-s.x)/u,r=(c.x-s.x)/u;return!(n<0&&r<0||n>1&&r>1)}return!1}var x=m/g;return g=v/g,x>=0&&x<=1&&g>=0&&g<=1}function Wv(t,e){if(Ev(t))return!1;var n=Ch(Dh(t),2);return Sv(n[0],n[1],e)}function $v(t,e){var n=t.boundingRect(),r=e.boundingRect();return!!qv(n,r)&&(Lv(n,r)?Nv(t,e):Nv(e,t))}function Uv(t,e){var n=t.boundingRect(),r=e.boundingRect();return!!qv(n,r)&&(Lv(r,n)?function(t,e){for(var n=t.numPolygons,r=t.polygons,i=0;i<n;i++)if(!0===$v(e,r[i]))return!0;return!1}(t,e):function(t,e){for(var n=0,r=e.edges.length;n<r;n++)if(!0===Kv(t,zh(e.edges[n])))return!0;return!1}(t,e))}function Yv(t,e){if(Tv(t))return!1;if(Qv(e,{x:t.cx,y:t.cy}))return!0;for(var n=e.numPolygons,r=e.polygons,i=0;i<n;i++)for(var s=r[i],o=s.edges.length,a=0;a<o;a++)if(Pv(t,zh(s.edges[a])))return!0;return!1}function Qv(t,e){if(!Bv(t.boundingRect(),e))return!1;var n,r,i,s,o,a,l=e.x,c=e.y,u=t.numPolygons,h=!1;for(r=0;r<u;r++)for(o=-1,s=(i=(n=t.vertices[r]).length)-1;++o<i;s=o){if(n[o].x===l&&n[o].y===c)return!0;if(n[o].y===n[s].y&&n[o].y===c&&(l-n[o].x)*(l-n[s].x)<=0)return!0;if(n[o].y<c&&c<=n[s].y||n[s].y<c&&c<=n[o].y){if(l===(a=(n[s].x-n[o].x)*(c-n[o].y)/(n[s].y-n[o].y)+n[o].x))return!0;l<a&&(h=!h)}}return h}function Kv(t,e){var n=Ch(Dh(e),2),r=n[1];if(Qv(t,n[0])||Qv(t,r))return!0;for(var i=t.numPolygons,s=t.polygons,o=0;o<i;o++)for(var a=s[o],l=0,c=a.edges.length;l<c;l++)if(Vv(e,zh(a.edges[l])))return!0;return!1}function Zv(t,e){var n=Ch(jh(e),4),r=n[1],i=n[2],s=n[3];if(Qv(t,n[0])||Qv(t,r)||Qv(t,i)||Qv(t,s))return!0;for(var o=t.numPolygons,a=t.polygons,l=0;l<o;l++)for(var c=a[l],u=0,h=c.edges.length;u<h;u++)if(Hv(e,zh(c.edges[u])))return!0;return!1}var Xv=/^\$/,Gv="@extend";function Jv(t){throw new Error('Cyclical reference for "'.concat(t,'"'))}function tx(t,e){return function t(e,n,r){if("string"==typeof e){var i=n[e];return-1!==r.indexOf(e)&&Jv(e),Xv.test(i)?(r.push(e),t(i,n,r)):i}var s=e,o=ch(!0,{},n,e),a={};if(e[Gv]){var l=e[Gv];-1!==r.indexOf(l)&&Jv(l);var c=r.slice();c.push(l),s=ch(!0,{},t(o[l],n,c),e)}return Object.keys(s).forEach((function(e){var n=r.slice();if(e!==Gv&&!Xv.test(e)){a[e]=s[e];var i=a[e];Xv.test(i)&&i in o?(-1!==r.indexOf(i)&&Jv(i),n.push(i),a[e]="object"===hh(i=o[i])||Xv.test(i)&&i in o?t(i,o,n):i):"object"===hh(i)&&(a[e]=t(i,o,n))}})),a}(t,e,[])}function ex(t){t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height)}function nx(t,e){var n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=t.width||0,n.height=t.height||0,void 0!==e.size&&(n.width=isNaN(e.size.width)?n.width:e.size.width,n.height=isNaN(e.size.height)?n.height:e.size.height),void 0!==e.logicalSize?(r.width=isNaN(e.logicalSize.width)?n.width:e.logicalSize.width,r.height=isNaN(e.logicalSize.height)?n.height:e.logicalSize.height,r.align=isNaN(e.logicalSize.align)?.5:Math.min(Math.max(e.logicalSize.align,0),1),r.preserveAspectRatio=e.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),ex(r),ex(n),{logicalContainerRect:r,containerRect:n}}function rx(t){var e={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return ch(!0,e,t),e.center.minWidthRatio=Math.min(Math.max(e.center.minWidthRatio,0),1),e.center.minHeightRatio=Math.min(Math.max(e.center.minHeightRatio,0),1),e.center.minWidth=Math.max(e.center.minWidth,0),e.center.minHeight=Math.max(e.center.minHeight,0),e}function ix(t,e,n,r,i){return{x:isNaN(t)?0:t,y:isNaN(t)?0:e,width:isNaN(t)?0:n,height:isNaN(t)?0:r,margin:isNaN(i)?0:i}}function sx(t,e,n){if(void 0===t.cachedSize){var r,i=t.config.dock(),s=t.comp.preferredSize({inner:e,outer:n,dock:i});isNaN(s)?s&&!isNaN(s.size)&&(s.width=s.size,s.height=s.size):s={width:s,height:s},r="top"===i||"bottom"===i?s.height:"right"===i||"left"===i?s.width:Math.max(s.width,s.height),t.cachedSize=Math.ceil(r),t.edgeBleed=s.edgeBleed||0}return t.cachedSize}function ox(t,e){switch(e.config.dock()){case"top":t.y+=e.cachedSize,t.height-=e.cachedSize;break;case"bottom":t.height-=e.cachedSize;break;case"left":t.x+=e.cachedSize,t.width-=e.cachedSize;break;case"right":t.width-=e.cachedSize}}function ax(t,e){var n=e.edgeBleed;n&&(t.left=Math.max(t.left,n.left||0),t.right=Math.max(t.right,n.right||0),t.top=Math.max(t.top,n.top||0),t.bottom=Math.max(t.bottom,n.bottom||0))}function lx(t,e,n){e.x<n.left&&(e.width-=n.left-e.x,e.x=n.left);var r=t.width-(e.x+e.width);r<n.right&&(e.width-=n.right-r),e.y<n.top&&(e.height-=n.top-e.y,e.y=n.top);var i=t.height-(e.y+e.height);i<n.bottom&&(e.height-=n.bottom-i)}function cx(t,e,n,r,i){var s=ch({},e),o=ch({},n);return ox(s,r),ax(o,r),lx(t,s,o),!!function(t,e,n){var r=Math.min(n.center.minWidth,t.width)||Math.max(t.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,t.height)||Math.max(t.height*n.center.minHeightRatio,1);return e.width>=r&&e.height>=i}(t,s,i)&&(ox(e,r),ax(n,r),!0)}function ux(t){var e=t.layoutRect,n=t.visible,r=t.hidden,i=t.settings,s=ix(e.x,e.y,e.width,e.height),o={left:0,right:0,top:0,bottom:0},a=n.slice();a.sort((function(t,e){return t.config.prioOrder()-e.config.prioOrder()}));for(var l=0;l<a.length;++l){var c=a[l];sx(c,s,e),cx(e,s,o,c,i)||(r.push(a.splice(l,1)[0]),--l)}!function(t,e){if(0!==e.length)for(var n=0;n<t.length;++n){var r=t[n];r.referencedDocks.length&&r.referencedDocks.every((function(t){return e.some((function(e){return e.key===t}))}))&&e.push(t.splice(n,1)[0])}}(n,r);var u=n.filter((function(t){return-1!==a.indexOf(t)}));return n.length=0,n.push.apply(n,Th(u)),lx(e,s,o),s}function hx(t){return{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y}}function dx(t){var e;return Fh((e=[]).concat.apply(e,Th(t.map(jh))))}function fx(t){var e=t.visible,n=t.layoutRect,r=t.reducedRect,i=t.containerRect,s=t.translation,o=ix(r.x,r.y,r.width,r.height),a=ix(r.x,r.y,r.width,r.height),l={},c=e.slice(),u=c.slice().sort((function(t,e){return t.config.displayOrder()-e.config.displayOrder()}));return e.sort((function(t,e){if(e.referencedDocks.length>0)return-1;if(t.referencedDocks.length>0)return 1;var n=t.config.displayOrder()-e.config.displayOrder();return 0===n?c.indexOf(t)-c.indexOf(e):n})).forEach((function(t){var e={},c={};switch(t.config.dock()){case"top":e.height=c.height=t.cachedSize,e.width=n.width,c.width=o.width,e.x=n.x,c.x=o.x,e.y=c.y=o.y-t.cachedSize,o.y-=t.cachedSize,o.height+=t.cachedSize;break;case"bottom":e.x=n.x,c.x=o.x,e.y=c.y=o.y+o.height,e.width=n.width,c.width=o.width,e.height=c.height=t.cachedSize,o.height+=t.cachedSize;break;case"left":e.x=c.x=a.x-t.cachedSize,e.y=n.y,c.y=a.y,e.width=c.width=t.cachedSize,e.height=n.height,c.height=a.height,a.x-=t.cachedSize,a.width+=t.cachedSize;break;case"right":e.x=c.x=a.x+a.width,e.y=n.y,c.y=a.y,e.width=c.width=t.cachedSize,e.height=n.height,c.height=a.height,a.width+=t.cachedSize;break;case"center":e.x=c.x=r.x,e.y=c.y=r.y,e.width=c.width=r.width,e.height=c.height=r.height;break;default:if(t.referencedDocks.length>0){var u=t.referencedDocks.map((function(t){return l[t]})).filter((function(t){return!!t}));u.length>0&&(e=dx(u.map((function(t){return t.outerRect}))),c=dx(u.map((function(t){return t.r}))))}}t.key&&(l[t.key]={r:c,outerRect:e}),function(t,e,n,r){var i={x:r.width/n.width,y:r.height/n.height},s={left:0,top:0};if(n.preserveAspectRatio){var o=i.x<i.y,a=Math.min(i.x,i.y);i.x=a,i.y=a;var l=o?"height":"width",c=(r[l]-n[l]*i.x)*n.align;s.left=o?0:c,s.top=o?c:0}t.scaleRatio=i,t.margin=s,e.scaleRatio=i,e.margin=s,n.scaleRatio=i,n.margin=s}(c,e,n,i),c.edgeBleed=t.edgeBleed,c.computed=hx(c),e.edgeBleed=t.edgeBleed,e.computed=hx(e),c.x+=s.x,c.y+=s.y,e.x+=s.x,e.y+=s.y,t.comp.resize(c,e),t.cachedSize=void 0,t.edgeBleed=void 0})),u}function px(t){if(!t.resize||"function"!=typeof t.resize)throw new Error("Component is missing resize function");if(!t.dockConfig&&!t.preferredSize)throw new Error("Component is missing preferredSize function")}function yx(t,e,n){for(var r,i,s,o,a,l=[],c=[],u=0;u<t.length;++u){var h=t[u];px(h);var d=h.dockConfig,f=h.key,p=d.dock(),y=/@/.test(p)?p.split(",").map((function(t){return t.replace(/^\s*@/,"")})):[];i=n,a=void 0,s=e.layoutModes||{},o=(r=d).minimumLayoutMode(),(a=r.show())&&"object"===hh(o)?a=s[o.width]&&s[o.height]&&i.width>=s[o.width].width&&i.height>=s[o.height].height:a&&void 0!==o&&(a=s[o]&&i.width>=s[o].width&&i.height>=s[o].height),a?l.push({comp:h,key:f,config:d,referencedDocks:y}):c.push({comp:h,key:f,config:d,referencedDocks:y})}return[l,c]}var gx=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.hasKey&&r.key===e)return t[n]}return null},mx=function t(e){return null==e?void 0:e.map((function(e){var n=e.instance.dockConfig();return{preferredSize:function(r){return n.computePreferredSize(mh(mh({},r),{},{children:t(e.children)}))}}}))},vx=function(t,e){return{visible:[],hidden:e,ordered:[]}},xx=function(t){return function(e,n){var r,i=n.map((function(t,e){var n=t.instance.dockConfig();return{index:e,key:t.key,dockConfig:n,resize:t.instance.resize,preferredSize:function(e){return n.computePreferredSize(mh(mh({},e),{},{children:mx(t.children)}))}}})),s=function(t){return n[t.index]},o=null!==(r=t(e,i))&&void 0!==r?r:{},a=o.visible,l=void 0===a?i:a,c=o.hidden,u=void 0===c?[]:c,h=o.ordered,d=void 0===h?l:h;return{visible:l.map(s),hidden:u.map(s),ordered:d.map(s)}}},bx=function(t){return"function"==typeof t?xx(t):(e=rx(t),n={layout:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t||isNaN(t.x)||isNaN(t.y)||isNaN(t.width)||isNaN(t.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};var r=nx(t,e),i=r.logicalContainerRect,s=r.containerRect,o=Ch(yx(n,e,i),2),a=o[0],l=o[1],c=fx({visible:a,layoutRect:i,reducedRect:ux({layoutRect:i,visible:a,hidden:l,settings:e}),containerRect:s,translation:{x:t.x,y:t.y}});return l.forEach((function(t){t.comp.visible=!1;var e=ix();t.comp.resize(e,e)})),{visible:a.map((function(t){return t.comp})),hidden:l.map((function(t){return t.comp})),ordered:c.map((function(t){return t.comp}))}},settings:function(t){e=rx(t)}},xx((function(t,e){return n.layout(t,e)})));var e,n};function _x(t,e,n){var r=e.left-n.left,i=e.top-n.top,s=qh(t),o=ch(!0,{},t);switch(s){case"circle":o.cx+=r,o.cy+=i;break;case"polygon":for(var a=0,l=o.vertices.length;a<l;a++){var c=o.vertices[a];c.x+=r,c.y+=i}break;case"geopolygon":for(var u=0;u<o.vertices.length;u++)for(var h=o.vertices[u],d=0,f=h.length;d<f;d++){var p=h[d];p.x+=r,p.y+=i}break;case"line":o.x1+=r,o.y1+=i,o.x2+=r,o.y2+=i;break;case"point":case"rect":o.x+=r,o.y+=i}return o}function wx(t,e){var n=[],r=0;e.forEach((function(t){n.push(r),r++;var e=t.instance.def.additionalElements&&t.instance.def.additionalElements();e&&(r+=e.length)})),e.forEach((function(e,r){return function(t,e,n){var r=e.instance.renderer().element();if(!isNaN(n)&&r&&t&&t.children){var i=t.children[Math.max(0,n)];if(r!==i){var s=e.instance.def.additionalElements&&e.instance.def.additionalElements().filter(Boolean);t.insertBefore&&void 0!==i?(t.insertBefore(r,i),s&&s.forEach((function(e){t.insertBefore(e,r)}))):(s&&s.forEach((function(e){t.appendChild(e,r)})),t.appendChild(r))}}}(t,e,n[r])}))}function kx(t,e){var n=t.element,r=t.data,i=void 0===r?[]:r,s=t.settings,o=void 0===s?{}:s,a=t.on,l=void 0===a?{}:a,c=e.registries,u=e.logger,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={},n=t,r=function(t){t.forEach((function(t){var n=Array.isArray(t.colors[0])?t.colors:[t.colors];e[t.key]={colors:n,sizes:n.map((function(t){return t?t.length:0}))}}))},i=function(t,n){var r=e[t];if(!r)return[];for(var i=r.sizes,s=0;s<i.length;s++)if(n<=i[s])return r.colors[s];return r.colors[i.length-1]},s={palette:function(t,e){return i(t,e)},setPalettes:r,style:function(t){return tx(t,n)},setStyle:function(e){n=ch({},t,e)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),s}(e.style,e.palettes),d=[],f=ch({},t),p=function(){var t={};return um(t),t}(),y=[],g=null,m=null,v=null,x=[],b=function(){},_=function(){},w={},k=!1,S=function(t){var e=t.createComponent,n={},r=[],i=[],s=function t(n){var i=e(n);return i&&(r.push(i),n.components&&(i.children=n.components.map((function(e){return t(e)})).filter((function(t){return!!t})))),i};return n.destroy=function(){r.forEach((function(t){return t.instance.destroy()})),r=[],i=[]},n.findComponentByKey=function(t){return gx(r,t)},n.forEach=function(t){r.forEach(t)},n.layout=function(t){var e=t.rect,n=[],r=[],s=[],o=bx(t.layoutSettings);return function t(e){var n=e.hidden,r=e.ordered,i=e.visible,s=(0,e.layoutFn)(e.rect,e.components),o=s.visible,a=s.hidden,l=s.ordered;i.push.apply(i,Th(o)),n.push.apply(n,Th(a)),r.push.apply(r,Th(l)),o.forEach((function(e){if(e.children){var s,o,a=bx(null!==(s=null===(o=e.settings)||void 0===o?void 0:o.strategy)&&void 0!==s?s:{});t({components:e.children,hidden:n,layoutFn:a,ordered:r,rect:e.instance.getRect(),visible:i})}})),a.forEach((function(e){e.children&&t({components:e.children,hidden:n,layoutFn:vx,ordered:r,rect:null,visible:i})}))}({components:i,hidden:r,layoutFn:o,ordered:s,rect:e,visible:n}),{visible:n,hidden:r,ordered:s}},n.set=function(t){i=t.components.map((function(t){return s(t)})).filter((function(t){return!!t}))},n.update=function(t){var e=t.components,n=t.data,o=t.excludeFromUpdate,a=t.formatters,l=t.scales;(function t(e,n){for(var i=function(i){var s,o=e[i],a=n.find((function(t){return o.hasKey&&o.key===t.key}));a?o.children&&a.components&&t(o.children,a.components):(e.splice(i,1),-1!==(s=r.indexOf(o))&&r.splice(s,1),o.children&&t(o.children,[]),o.instance.destroy())},s=e.length-1;s>=0;s--)i(s)})(i,e),i=function t(e){var n=e.compList,r=e.data,i=e.excludeFromUpdate,o=e.formatters,a=e.scales;return e.settingsList.map((function(e){var l=gx(n,e.key);return i.indexOf(e.key)>-1?l:l?e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(l.applyTransform=!0,l):(l.updateWith={formatters:o,scales:a,data:r,settings:e},e.components&&(l.children=t({compList:l.children||[],data:r,excludeFromUpdate:i,formatters:o,scales:a,settingsList:e.components})),l):s(e)})).filter((function(t){return!!t}))}({compList:i,data:n,excludeFromUpdate:o,formatters:a,scales:l,settingsList:e})},n}({createComponent:function(t){return c.component.has(t.type)?{instance:function(t){var e,n,r,i,s,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.defaultSettings,l=void 0===a?{}:a,c=t._DO_NOT_USE_getInfo,u=void 0===c?function(){return{}}:c,h=o.chart,d=o.container,f=o.mediator,p=o.registries,y=o.theme,g=o.renderer,m=um({}),v=o.settings||{},x=ch(!0,{},l,v),b=[],_=$m({chart:h}),w=!1,k={nodes:[],chart:h,config:x.brush||{},renderer:null},S={tap:[],over:[]},M=[],E={},C=ch({},v);function T(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var i,s,o,a=void 0!==t[e],l=void 0!==v[e],c=arguments.length,u=new Array(c),h=0;h<c;h++)u[h]=arguments[h];return a&&("function"==typeof t[e]?i=(s=t[e]).call.apply(s,[E].concat(u)):r&&(i=t[e])),l&&("function"==typeof v[e]?i=(o=v[e]).call.apply(o,[C].concat(u)):r&&(i=v[e])),a||l||(i=n.call.apply(n,[E].concat(u))),i}}var A=T("preferredSize",(function(){return 0}),!0),N=T("resize",(function(t){return t.inner})),R=T("created"),O=T("beforeMount"),I=T("mounted"),P=T("beforeUnmount"),D=T("beforeUpdate"),j=T("updated"),F=T("beforeRender"),z=T("beforeDestroy"),q=T("destroyed"),L=t.render,B=function(){x.brush&&(x.brush.consume||[]).forEach((function(t){t.context&&t.style&&M.push(Um(k,t))}))},H=function(){x.brush&&(x.brush.trigger||[]).forEach((function(t){"over"===t.on?S.over.push(t):S.tap.push(t)}))};Object.defineProperty(k,"data",{get:function(){return b}});var V=x.renderer||t.renderer,W=V?g||p.renderer(V)():g||p.renderer()();"function"==typeof W.settings&&W.settings(x.rendererSettings),k.renderer=W;var $={resources:h.logger?{logger:h.logger()}:{}},U=xv(_v(x,A,h.logger()),$),Y=function(t){t.key=x.key,t.element=W.element()},Q=function(){};Q.dockConfig=function(){return U},Q.set=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.settings&&(v=t.settings,x=ch(!0,{},l,t.settings),U=xv(_v(x,A,h.logger()),$)),x.scale&&(e=h.scale(x.scale)),b=x.data?Xp(x.data,{dataset:h.dataset,collection:h.dataCollection},{logger:h.logger()},h.dataCollection):e?e.data():[],"string"==typeof x.formatter||"object"===hh(x.formatter)?n=h.formatter(x.formatter):e&&e.data().fields&&(n=e.data().fields[0].formatter()),s=y.style(x.style||{})},Q.resize=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=N({inner:t,outer:e});i=W.size(n||t),C.rect=ch(!0,{computedPhysical:i.computedPhysical,computedOuter:e.computed||e,computedInner:t.computed||t},t),i=ch(!0,{computedOuter:e.computed||e,computedInner:t.computed||t},i)},Q.getRect=function(){return C.rect};var K,Z,X=function(){var t=W.renderArgs?W.renderArgs.slice(0):[];return t.push({data:b}),t};Q.beforeMount=O,Q.beforeRender=function(){F({size:i})},Q.render=function(){var t=k.nodes=L.call.apply(L,[E].concat(Th(X())));W.render(t),K=t},Q.hide=function(){Q.unmount(),W.size({x:0,y:0,width:0,height:0}),W.clear()},Q.beforeUpdate=function(){D({settings:x,data:b})},Q.update=function(){if(Z&&Z.stop(),x.rendererSettings&&"function"==typeof x.rendererSettings.transform&&x.rendererSettings.transform())W.render();else{var t=k.nodes=L.call.apply(L,[E].concat(Th(X())));M.forEach((function(t){return t.cleanUp()})),M.length=0,S.tap=[],S.over=[],x.brush&&(B(),H()),M.forEach((function(t){t.isActive()&&t.update()})),K&&x.animations&&x.animations.enabled?(Z=zm({old:K,current:t},{renderer:W},x.animations)).start():W.render(t),K=t,W.setKey&&"string"==typeof v.key&&W.setKey(v.key)}},Q.updated=j,Q.destroy=function(){Q.unmount(),z(r),W.destroy(),q(),r=null};var G=function(t){k.nodes=t,M.forEach((function(t){t.isActive()&&t.update()})),W.render(t)};return bv(E,t,{settings:function(){return x},data:function(){return b},scale:function(){return e},formatter:function(){return n},renderer:function(){return W},chart:function(){return h},dockConfig:function(){return U},mediator:function(){return f},instance:function(){return C},rect:function(){return C.rect},style:function(){return s},update:function(){return G},registries:function(){return p},resolver:function(){return _},symbol:function(){return vv(p.symbol)}}),bv(C,v,{settings:function(){return x},data:function(){return b},scale:function(){return e},formatter:function(){return n},renderer:function(){return W},chart:function(){return h},dockConfig:function(){return U},mediator:function(){return f},style:function(){return s},_DO_NOT_USE_getInfo:u.bind(E),isVisible:function(){return w}}),Q.getBrushedShapes=function(t,e,n){var r=[];if(x.brush&&x.brush.consume){var i=h.brush(t),s=W.findShapes("*");x.brush.consume.filter((function(e){return e.context===t})).forEach((function(t){for(var o=0;o<s.length;o++){var a=s[o];a.data&&i.containsMappedData(a.data,n||t.data,e)&&(Y(a),r.push(a),s.splice(o,1),o--)}}))}return r},Q.findShapes=function(t){for(var e=W.findShapes(t),n=0,r=e.length;n<r;n++)Y(e[n]);return e},Q.shapesAt=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=W.itemsAt(t);e=n&&"stop"===n.propagation&&r.length>0?[r.pop().node]:r.map((function(t){return t.node}));for(var i=0,s=e.length;i<s;i++)Y(e[i]);return e},Q.brushFromShapes=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.contexts=Array.isArray(e.contexts)?e.contexts:[],Ym({nodes:t,action:e.action||"toggle",trigger:e,chart:h,data:k.data})},Q.mount=function(){r=W.element&&W.element()?r:W.appendTo(d),W.setKey&&"string"==typeof v.key&&W.setKey(v.key),x.brush&&(B(),H()),wv(C,m,v),wv(E,m,t),w=!0},Q.mounted=function(){return I(r)},Q.unmount=function(){[C,E].forEach((function(t){kv(t,m)})),S.tap=[],S.over=[],M.forEach((function(t){t.cleanUp()})),M.length=0,P(),w=!1},Q.onBrushTap=function(t){S.tap.forEach((function(e){Xm({e:t,t:e,config:k})&&"stop"===e.globalPropagation&&h.toggleBrushing(!0)}))},Q.onBrushOver=function(t){S.over.forEach((function(e){Gm({e:t,t:e,config:k})&&"stop"===e.globalPropagation&&h.toggleBrushing(!0)}))},Q.def=E,Q.ctx=C,Q.renderer=function(){return W},Q.set({settings:v}),R(),Q}(c.component(t.type),{settings:t,chart:f,mediator:p,registries:c,theme:h,container:n}),settings:ch(!0,{},t),key:t.key,hasKey:void 0!==t.key}:(u.warn("Unknown component: ".concat(t.type)),!1)}});function M(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return function(){for(var r,i="function"==typeof t[e],s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];return i?(r=t[e]).call.apply(r,[f].concat(o)):n.call.apply(n,[f].concat(o))}}var E=function(){var t;o.dockLayout?(u.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),t=o.dockLayout):t=o.strategy;var e=function(t){if("function"==typeof t.getBoundingClientRect){var e=t.getBoundingClientRect();return{x:0,y:0,width:e.width,height:e.height}}return{x:0,y:0,width:0,height:0}}(n);return S.layout({layoutSettings:t,rect:e})},C=M("created"),T=M("beforeMount"),A=M("mounted"),N=M("beforeUpdate"),R=M("updated"),O=M("beforeRender"),I=M("beforeDestroy"),P=M("destroyed"),D=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.partialData,i=e.formatters,s=void 0===i?{}:i,o=e.scales,a=void 0===o?{}:o,l=e.scroll,d=void 0===l?{}:l;b=Bh(t,{logger:u,types:c.data}),r||Object.keys(w).forEach((function(t){return w[t].clear()})),e.palettes&&h.setPalettes(e.palettes),e.style&&h.setStyle(e.style),_=Gp(e.collections,{dataset:b},{logger:u});var f={theme:h,logger:u};g=om(a,{dataset:b,collection:_},mh(mh({},f),{},{scale:c.scale})),m=ty(s,{dataset:b,collection:_},mh(mh({},f),{},{formatter:c.formatter})),v=fm(d,v)};function j(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e={},r=t.filter((function(t){return!!t.key})).map((function(t){return t.key}));x.forEach((function(t){t.key&&-1!==r.indexOf(t.key)?e[t.key]=t:t.destroy()})),x=t.map((function(t){var r=t.key&&e[t.key]?e[t.key]:c.interaction(t.type)(f,p,n);return r.set(t),r}))}var F=function(t){var e=n.getBoundingClientRect(),r={x:("clientX"in t?t.clientX:t.x)-e.left,y:("clientY"in t?t.clientY:t.y)-e.top},i=[];return y.forEach((function(t){var e=t.instance.getRect();Bv(e.computedPhysical?e.computedPhysical:{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y},r)&&i.push(t)})),i},z=function(){if(!d.length&&n){Object.keys(l).forEach((function(t){var e=l[t].bind(f);n.addEventListener(t,e),d.push({key:t,listener:e})}));var t,e={},r=function(t){t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=F(e)},i=function(t){var n=e.comps||F(t);if(!n.every((function(t){return t.instance.def.disableTriggers}))&&("touchend"===t.type&&t.preventDefault(),function(t,e){var n=Rh(t),r=n?t.changedTouches[0]:t,i=Date.now()-e.time,s=isNaN(e.x)?0:Math.abs(r.clientX-e.x),o=isNaN(e.y)?0:Math.abs(r.clientY-e.y);return(0===t.button||n)&&!e.multiTouch&&s<=12&&o<=12&&i<=300}(t,e)))for(var r=n.length-1;r>=0;r--)if(n[r].instance.onBrushTap(t),k){k=!1;break}},s=[];s.push({key:"mousedown",listener:r}),s.push({key:"mouseup",listener:i}),("ontouchstart"in(t=n)&&"ontouchend"in t||navigator.maxTouchPoints>1)&&(s.push({key:"touchstart",listener:r}),s.push({key:"touchend",listener:i})),s.push({key:"mousemove",listener:function(t){for(var e=F(t),n=e.length-1;n>=0;n--)if(e[n].instance.onBrushOver(t),k){k=!1;break}}}),s.forEach((function(t){n.addEventListener(t.key,t.listener),d.push(t)}))}},q=function(){d.forEach((function(t){return n.removeEventListener(t.key,t.listener)})),d.length=0};return f.layoutComponents=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.excludeFromUpdate,n=void 0===e?[]:e;t.data&&(i=t.data),t.settings&&(o=t.settings,j(t.settings.interactions)),N(),D(i,o);var r=o,s=r.formatters,a=r.scales,l=r.components,c=void 0===l?[]:l;S.update({components:c,data:i,excludeFromUpdate:n,formatters:s,scales:a}),S.forEach((function(t){t.updateWith&&t.instance.set(t.updateWith)})),S.forEach((function(t){t.updateWith&&t.instance.beforeUpdate()})),E()},f.update=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.partialData,s=e.excludeFromUpdate,a=void 0===s?[]:s;e.data&&(i=e.data),e.settings&&(o=e.settings,j(e.settings.interactions)),N(),D(i,o,{partialData:r});var l=o,c=l.formatters,u=l.scales,h=l.components,d=void 0===h?[]:h;S.update({components:d,data:i,excludeFromUpdate:a,formatters:c,scales:u}),S.forEach((function(t){t.updateWith&&t.instance.set(t.updateWith)})),S.forEach((function(t){t.updateWith&&t.instance.beforeUpdate()}));var f,p=[],g=[];if(r)S.forEach((function(t){(t.updateWith||t.applyTransform)&&t.visible&&p.push(t)})),f=p;else{var m=E(),v=m.visible,x=m.hidden,b=m.ordered;y=v,f=v,t=b,v.forEach((function(t){t.updateWith&&t.visible?p.push(t):g.push(t)})),x.forEach((function(t){t.instance.hide(),t.visible=!1,delete t.updateWith,t.applyTransform=!1}))}g.forEach((function(t){return t.instance.beforeMount()})),g.forEach((function(t){return t.instance.mount()})),f.forEach((function(t){return t.instance.beforeRender()})),f.forEach((function(t){(t.updateWith||t.applyTransform)&&t.visible?t.instance.update():t.instance.render()})),r||wx(n,t),g.forEach((function(t){return t.instance.mounted()})),p.forEach((function(t){return t.instance.updated()})),y.forEach((function(t){delete t.updateWith,t.visible=!0,t.applyTransform=!1})),R()},f.destroy=function(){I(),S.destroy(),q(),j(),delete f.update,delete f.destroy,P()},f.getAffectedShapes=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return y.filter((function(t){return null==r||t.key===r})).forEach((function(r){i.push.apply(i,Th(r.instance.getBrushedShapes(t,e,n)))})),i},f.findShapes=function(t){var e=[];return y.forEach((function(n){e.push.apply(e,Th(n.instance.findShapes(t)))})),e},f.componentsFromPoint=function(t){return F(t).map((function(t){return t.instance.ctx}))},f.shapesAt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],i=n.getBoundingClientRect(),s=y;if(Array.isArray(e.components)&&e.components.length>0){var o=e.components.map((function(t){return t.key}));s=y.filter((function(t){return-1!==o.indexOf(t.key)})).map((function(t){return{instance:t.instance,opts:e.components[o.indexOf(t.key)]}}))}for(var a=s.length-1;a>=0;a--){var l=s[a],c=l.instance.renderer().element().getBoundingClientRect(),u=_x(t,i,c),h=l.instance.shapesAt(u,l.opts),d=h.length>0&&"stop"===e.propagation;if(r.push.apply(r,Th(h)),r.length>0&&d)return r}return r},f.brushFromShapes=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]},n=function(n){var r=e.components[n].key;y.filter((function(t){return r===t.key})).forEach((function(r){var i=t.filter((function(t){return t.key===r.key}));r.instance.brushFromShapes(i,e.components[n])}))},r=0;r<e.components.length;r++)n(r)},f.scroll=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return pm(t,v)},f.dataset=function(t){return b(t)},f.dataCollection=function(t){return _(t)},f.scales=function(){return g.all()},f.formatters=function(){return m.all()},f.brush=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return w[t]||(w[t]=Im()),w[t]},f.scale=function(t){return g.get(t)},f.formatter=function(t){return m.get(t)},f.toggleBrushing=function(t){k=void 0!==t?t:!k},f.component=function(t){var e=S.findComponentByKey(t);return null==e?void 0:e.instance.ctx},f.logger=function(){return u},f.theme=function(){return h},Object.defineProperty(f,"interactions",{get:function(){return{instances:x,on:function(){z(),x.forEach((function(t){return t.on()}))},off:function(){q(),x.forEach((function(t){return t.off()}))}}}}),C(),n&&(T(),n.innerHTML="",function(){var t=o.components,e=void 0===t?[]:t;O(),D(i,o),S.set({components:e});var r=E(),s=r.visible,a=r.ordered;y=s,r.hidden.forEach((function(t){t.instance.hide(),t.visible=!1})),s.forEach((function(t){return t.instance.beforeMount()})),s.forEach((function(t){return t.instance.mount()})),s.forEach((function(t){return t.instance.beforeRender()})),s.forEach((function(t){return t.instance.render()})),s.forEach((function(t){return t.instance.mounted()})),s.forEach((function(t){t.visible=!0})),wx(n,a)}(),z(),j(o.interactions),A(n),f.element=n),f}var Sx=function(t){var e=Wd(t);return e.prio=function(t){return t?e.default(t[0]):[e.default()]},e.types=function(){return e.getKeys()},e},Mx=Wd();function Ex(t,e){var n=e.cache;if("number"==typeof t)return n.fields[t];for(var r=0;r<n.fields.length;r++)if(n.fields[r].key()===t)return n.fields[r];for(var i=0;i<n.fields.length;i++)if(n.fields[i].title()===t)return n.fields[i];return null}var Cx=function(t){return t.filter((function(t){return"number"==typeof t&&!isNaN(t)}))},Tx={first:function(t){return t[0]},last:function(t){return t[t.length-1]},min:function(t){var e=Cx(t);return e.length?Math.min.apply(null,e):NaN},max:function(t){var e=Cx(t);return e.length?Math.max.apply(null,e):NaN},sum:function(t){var e=Cx(t);return e.length?e.reduce((function(t,e){return t+e}),0):NaN},avg:function(t){var e=Cx(t),n=e.length;return n?function(t){return t.reduce((function(t,e){return t+e}),0)}(e)/n:NaN}};function Ax(t,e,n,r){var i={},s=r.field||(void 0!==t.field?e.field(t.field):null);return Object.keys(n).forEach((function(o){var a=n[o],l=i[o]={};-1!==["number","string","boolean"].indexOf(hh(a))?(l.type="primitive",l.value=a):"function"==typeof a?(l.type="function",l.value=a,l.label=a,l.field=s):"object"===hh(a)&&(a.fields?l.fields=a.fields.map((function(n){return Ax(t,e,{main:n},r).main})):void 0!==a.field?(l.type="field",l.field=e.field(a.field),l.value=l.field.value,l.label=l.field.label):s&&(l.value=s.value,l.label=s.label,l.field=s),"function"==typeof a.filter&&(l.filter=a.filter),void 0!==a.value&&(l.value=a.value),void 0!==a.label&&(l.label=a.label),"function"==typeof a.reduce?l.reduce=a.reduce:a.reduce?l.reduce=Tx[a.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?Tx[l.field.reduce]:l.field.reduce),"function"==typeof a.reduceLabel?l.reduceLabel=a.reduceLabel:a.reduceLabel?l.reduceLabel=Tx[a.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?Tx[l.field.reduceLabel]:l.field.reduceLabel))})),i}function Nx(t,e){var n=Ax(t,e,{main:{value:t.value,label:t.label,reduce:t.reduce,filter:t.filter}},{}).main;return{props:Ax(t,e,t.props||{},n),main:n}}function Rx(t,e,n,r){for(var i,s=Array(t.length),o=Array(t.length),a=0;a<t.length;a++)s[a]=(i=r?t[a][r]:t[a]).value,o[a]=i.label;var l=e.reduce,c=e.reduceLabel,u=l?l(s):s,h={value:u,label:c?c(o,u):n?n(u):String(u)};return r&&t[0][r].source?(h.source=t[0][r].source,h):!r&&t[0].source?(h.source=t[0].source,h):h}function Ox(t,e){var n=e.main,r=e.propsArr,i=e.props,s=[],o=n.field.formatter(),a={};return r.forEach((function(t){a[t]=i[t].field?i[t].field.formatter():function(t){return t}})),s.push.apply(s,Th(t.map((function(t){var e=Rx(t.items,n,o);return r.forEach((function(n){e[n]=Rx(t.items,i[n],a[n],n)})),e})))),s}function Ix(t){var e=t.cfg,n=t.itemData,r=t.obj,i=t.target,s=t.tracker,o="function"===t.trackType?e.trackBy(n):n[e.trackBy],a=s[o];a||(a=s[o]={items:[],id:o},i.push(a)),a.items.push(r)}function Px(t,e,n){var r=n.key,i={value:"function"==typeof t.value?t.value(e):void 0!==t.value?t.value:e};return i.label="function"==typeof t.label?t.label(e):String(void 0!==t.label?t.label:i.value),t.field&&(i.source={key:r,field:t.field.key()}),i}function Dx(t,e){var n=Array.isArray(t)?t:[t],r=[];return n.forEach((function(t){void 0!==t.field&&function(){var n=e.field(t.field),i=e.key();if(!n)throw Error("Field '".concat(t.field,"' not found"));for(var s=Nx(t,e),o=s.props,a=s.main,l=Object.keys(o),c=!!t.trackBy,u=hh(t.trackBy),h={},d=[],f=n.items(),p=[],y=function(e){var n=f[e];if(a.filter&&!a.filter(n))return"continue";var r=Px(a,n,{key:i});l.forEach((function(t){var s=o[t],a=s.field?s.field.items()[e]:n;r[t]=Px(s,a,{key:i})})),c&&Ix({cfg:t,itemData:n,obj:r,target:d,tracker:h,trackType:u}),p.push(r)},g=0;g<f.length;g++)y(g);r.push.apply(r,c?Th(Ox(d,{main:a,propsArr:l,props:o})):p)}()})),r}var jx=function(t){return t.filter((function(t){return"number"==typeof t&&!isNaN(t)}))},Fx=function(t){var e=t.key,n=t.data,r=t.cache,i=t.config;if(n){var s=n;"string"==typeof s&&(s=function(t){var e=t.config,n=t.data.split("\n"),r=n[0],i=n[1],s=",";if(e&&e.parse&&e.parse.delimiter)s=e.parse.delimiter;else if(r)for(var o=[/,/,/\t/,/;/],a=0;a<o.length;a++){var l=o[a];if(r&&i){if(l.test(r)&&l.test(i)&&r.split(l).length===i.split(l).length){s=l;break}}else l.test(r)&&(s=l)}return n.map((function(t){return t.split(s)}))}({data:n,config:i})),Array.isArray(s)&&function(t){var e,n=t.source,r=t.data,i=t.cache,s=t.config,o=r,a=s&&s.parse;Array.isArray(r[0])?a&&!1===a.headers?e=r[0].map((function(t,e){return e})):(e=r[0],o=r.slice(1)):e=Object.keys(r[0]);var l,c=!!a&&"function"==typeof a.row&&a.row,u=e;u=a&&"function"==typeof a.fields?a.fields(u.slice()):e.map((function(t){return{key:t,title:t}})),Array.isArray(r[0])?l=u.map((function(){return[]})):(l={},u.forEach((function(t){l[t.key]=[]})));for(var h=0;h<o.length;h++){var d=c?c(o[h],h,u):o[h];if(d)if(Array.isArray(d))for(var f=0;f<u.length;f++)l[f].push(d[f]);else for(var p=0;p<u.length;p++)l[u[p].key].push(d[u[p].key])}for(var y=Array.isArray(l)?function(t){return l[t]}:function(t){return l[u[t].key]},g=0;g<u.length;g++){var m=y(g),v=jx(m),x=v.length>0,b=x?"measure":"dimension",_=x?Math.min.apply(Math,Th(v)):NaN,w=x?Math.max.apply(Math,Th(v)):NaN;i.fields.push(Yp(ch({source:n,key:g,title:u[g].title,values:m,min:_,max:w,type:b},u[g]),{value:u[g].value,label:u[g].label}))}}({data:s,cache:r,source:e,config:i})}};function zx(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.key,n=t.data,r=t.config,i={fields:[]},s={key:function(){return e},raw:function(){return n},field:function(t){return Ex(t,{cache:i,matrix:n})},fields:function(){return i.fields.slice()},extract:function(t){return Dx(t,s)},hierarchy:function(){return null}};return Fx({key:e,data:n,config:r,cache:i}),s}zx.util={normalizeConfig:Nx,collect:Ox,track:Ix};var qx=Wd();qx.default("matrix"),qx("matrix",zx),qx("default",zx);var Lx=Wd();function Bx(t,e,n){return Math.max(t,Math.min(e,n))}function Hx(t){var e,n=t.item,r=t.value,i=t.rendWidth,s=t.rendHeight,o="x",a="y",l=i,c=s,u=r<.5?90:-90;return t.flipXY&&(o="y",a="x",l=s,c=i,u=r<.5?180:0),(0,t.symbol)(ch({},n.oob,(yh(e={},o,t.boxCenter*l),yh(e,a,Math.max(n.oob.size/2,Math.min(r*c,c-n.oob.size/2))),yh(e,"startAngle",u),e)))}function Vx(t){var e,n=t.item,r=t.to,i=t.boxCenter,s=t.rendWidth,o=t.rendHeight,a="x1",l="y1",c="x2",u="y2",h=s,d=o;return t.flipXY&&(a="y1",l="x1",c="y2",u="x2",h=o,d=s),ch({},n.line,(yh(e={type:"line"},u,Math.floor(t.from*d)),yh(e,a,i*h),yh(e,l,Math.floor(r*d)),yh(e,c,i*h),yh(e,"data",n.data||{}),yh(e,"collider",{type:null}),e))}function Wx(t){var e,n=t.item,r=t.position,i=t.width,s=t.boxCenter,o=t.rendWidth,a=t.rendHeight,l="x1",c="y1",u="x2",h="y2",d=o,f=a;t.flipXY&&(l="y1",c="x1",u="y2",h="x2",d=a,f=o);var p=i/2;return ch({type:"line"},n[t.key],(yh(e={},c,Math.floor(r*f)),yh(e,l,(s-p)*d),yh(e,h,Math.floor(r*f)),yh(e,u,(s+p)*d),yh(e,"r",p*d),yh(e,"cx",s*d),yh(e,"cy",r*f),yh(e,"width",i*d),yh(e,"data",n.data||{}),yh(e,"collider",{type:null}),e))}function $x(t,e,n){var r=e.box,i=r.maxWidthPx,s=r.minWidthPx,o=t>=0?1:-1,a=Math.min(o*t*r.width,isNaN(i)?n:i/n);return(a=isNaN(s)?a:Math.max(s/n,a))*o}Lx("native",(function(t,e,n){var r,i,s={chart:t,mediator:e,element:n},o=[],a=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(s)()),r.enable&&Object.keys(r.events).forEach((function(t){var e=r.events[t].bind(s);n.addEventListener(t,e),o.push({key:t,listener:e})}))}function c(){o.forEach((function(t){n.removeEventListener(t.key,t.listener)})),o=[]}return{get key(){return i},set:function(t){!function(t){i=t.key,(r=t).events=r.events||[],void 0===r.enable&&(r.enable=!0)}(t),c(),a&&l()},off:function(){a=!1,c()},on:function(){a=!0,0===o.length&&l()},destroy:function(){c(),s=null,r=null}}}));var Ux={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},Yx=Object.keys(Ux),Qx={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created:function(){this.state={}},render:function(t){var e=this,n=t.data,r=this.rect,i=r.width,s=r.height,o="horizontal"===this.settings.settings.orientation,a=this.style,l=this.resolver,c=this.symbol,u=Yx.filter((function(t){return!e.settings.settings[t]||!1!==e.settings.settings[t].show})),h={};u.forEach((function(t){return h[t]=Ux[t]}));var d=function(t){var e,n=t.keys,r=t.data,i=t.settings,s=t.width,o=t.height,a=t.resolver,l=ch(!0,{},t.defaultSettings||{},t.style||{}),c={major:"horizontal"===i.orientation?o:s,minor:"horizontal"===i.orientation?s:o},u=i.major;e="object"===hh(u)&&"object"===hh(u.ref)&&void 0!==u.ref.start&&void 0!==u.ref.end?a.resolve({data:r,defaults:{start:0,end:1},scaled:c,settings:ch(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"===hh(u)&&void 0!==u.binStart&&void 0!==u.binEnd?a.resolve({data:r,defaults:{start:0,end:1},scaled:c,settings:ch(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):a.resolve({data:r,scaled:c,defaults:{major:.5},settings:{major:i.major}});var h=i.minor||{},d={};["start","end","min","max","med"].forEach((function(t){(h[t]||r.items&&r.items.length&&r.items[0][t])&&(d[t]={scale:h.scale,ref:t})}));for(var f,p={major:e,minor:a.resolve({data:r,defaults:{start:0,end:1},scaled:c,settings:ch(!0,{},d,h)})},y=0,g=n.length;y<g;y++)i[f]&&!1===i[f].show||(p[f=n[y]]=a.resolve({data:r,defaults:l[f],settings:i[f],scaled:c}));return p}({keys:u,data:n,defaultSettings:h,style:a,settings:this.settings.settings,width:i,height:s,resolver:l});return function(t){var e=t.width,n=t.height,r=t.flipXY,i=t.resolved,s=t.keys,o=t.symbol,a=[],l=i.major.items;if(!l.length)return a;var c,u,h,d,f,p,y,g,m,v=e,x=n,b=r?n:e,_=i.major.settings,w=["start","end","min","max","med"].filter((function(t){return void 0!==i.minor.settings[t]})),k=w.length,S=s.filter((function(t){return"oob"!==t})),M=s?s.length:0,E=S?S.length:0,C={box:function(){h.box&&Oh(h.start)&&Oh(h.end)&&c.push(function(t){var e,n=t.item,r=t.boxWidth,i=t.boxPadding,s=t.rendWidth,o=t.rendHeight,a="x",l="y",c="width",u="height",h=s,d=o;t.flipXY&&(a="y",l="x",c="height",u="width",h=o,d=s);var f=function(t){var e=t.start,n=t.end,r=t.minPx,i=void 0===r?.1:r,s=t.maxPx,o=void 0===s?1:s,a=Math.max(e,n),l=Math.min(e,n),c=Bx(-.1,1.2,a),u=Bx(-.1,1.2,l),h=c*o-u*o,d=Math.max(i,h),f=(d-h)/2;return{actualDiff:d,startModifier:f,actualLow:u*o-f}}({start:n.start,end:n.end,minPx:n.box.minHeightPx,maxPx:d}),p=f.actualDiff,y=f.actualLow;return ch({},n.box,(yh(e={type:"rect"},a,(i+n.major)*h),yh(e,l,y),yh(e,u,p),yh(e,c,r*h),yh(e,"data",n.data||{}),yh(e,"collider",{type:null}),e))}({item:h,boxWidth:d,boxPadding:f,rendWidth:v,rendHeight:x,flipXY:r}))},line:function(){Oh(h.min)&&Oh(h.start)&&c.push(Vx({item:h,from:h.min,to:h.start,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:r})),Oh(h.max)&&Oh(h.end)&&c.push(Vx({item:h,from:h.max,to:h.end,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:r}))},median:function(){h.median&&Oh(h.med)&&c.push(Wx({item:h,key:"median",position:h.med,width:d,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:r}))},whisker:function(){if(h.whisker){var t=d*h.whisker.width;Oh(h.min)&&c.push(Wx({item:h,key:"whisker",position:h.min,width:t,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:r})),Oh(h.max)&&c.push(Wx({item:h,key:"whisker",position:h.max,width:t,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:r}))}}};function T(){for(var t,e=-Number.MAX_VALUE,n=Number.MAX_VALUE,r=0;r<k;r++)Oh(t=h[w[r]])&&(e<t&&(e=t),n>t&&(n=t));y=e<0&&e!==-Number.MAX_VALUE,g=n>1&&n!==Number.MAX_VALUE,m=y||g}for(var A=0,N=l.length;A<N;A++){c=[],u=null;var R=l[A],O=R.data,I=null,P=null;void 0!==_.binStart?(I=R.binStart,P=R.binEnd,u=_.binStart.scale):I=(u=_.major.scale)?R.major:0;var D=0;u?u.bandwidth?I-=(D=u.bandwidth())/2:D=P-I:D=1,h=ch({},{major:I,majorEnd:P},i.minor.items[A]);for(var j=0;j<M;j++)h[s[j]]=i[s[j]].items[A];if(d=$x(D,h,b),p=(f=(D-d)/2)+h.major+d/2,T(),m)h.oob&&(y?c.push(Hx({item:h,value:0,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:r,symbol:o})):g&&c.push(Hx({item:h,value:1,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:r,symbol:o})));else for(var F=0;F<E;F++)h[S[F]]&&!1===h[S[F]].show||C[S[F]]();a.push({type:"container",data:O,collider:{type:"bounds"},children:c})}return a}({items:d.items,settings:d.settings,width:i,height:s,flipXY:o,resolved:d,keys:u,symbol:c})}},Kx={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},Zx=/px$/,Xx={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},Gx={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function Jx(t,e){return t&&"function"==typeof t.bandwidth?{isBandwidth:!0,value:Math.max(1,t.bandwidth()*e)}:{isBandwidth:!1,value:Math.max(1,e)}}var tb={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:function(t){return t.data.value}},style:{item:"$shape"}},render:function(t){var e=this.resolver.resolve({data:t.data,defaults:ch({},Xx,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),n=this.rect,r=n.width,i=n.height,s=ch({},Gx,this.settings.settings.sizeLimits),o=e.items,a=function(t,e,n,r,i){var s=Jx(t?t.scale:void 0,n),o=Jx(e?e.scale:void 0,r),a=Math.min(s.value*i[s.isBandwidth?"maxRelDiscrete":"maxRelExtent"],o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(s.value*i[s.isBandwidth?"minRelDiscrete":"minRelExtent"],o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(a)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(e.settings.x,e.settings.y,r,i,s);return function(t,e,n,r){var i=e.width,s=e.height;return t.filter((function(t){return!1!==t.show&&!isNaN(t.x+t.y)})).map((function(t){var e=t,o=Zx.test(t.size)?parseInt(t.size,10):n.min+e.size*(n.max-n.min);Ih(o)&&(o=n.min+(e=Kx).size*(n.max-n.min));var a=Ch(function(t){var e=Xx.shape,n={};return"object"===hh(t.shape)&&"string"==typeof t.shape.type?(e=t.shape.type,n=t.shape):"string"==typeof t.shape&&(e=t.shape),[e="rect"===e?"square":e,n]}(e),2),l=a[0],c=mh(mh({},a[1]),{},{type:l,label:t.label,x:t.x*i,y:t.y*s,fill:e.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,o)),stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,opacity:e.opacity});e===t.errorShape&&(c.width=e.width);var u=r(c);return u.data=t.data,u}))}(o,this.rect,a,this.settings.shapeFn||this.symbol)}};Math;var eb={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function nb(t,e){return t.slice&&"arc"in t.slice?e.arc:e.data.value}var rb={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render:function(t){for(var e=[],n=[],r=this.settings.settings,i=this.resolver.resolve({data:t.data,defaults:ch({},eb,this.style.slice),settings:r.slice}).items,s=0,o=0,a=i.length;o<a;o++){var l=nb(r,i[o]);l>0&&i[o].outerRadius>=i[o].innerRadius&&(e.push(l),n.push(i[o]),s+=l)}var c=function(){var t=bd,e=xd,n=null,r=Qh(0),i=Qh(sd),s=Qh(0);function o(o){var a,l,c,u,h,d=o.length,f=0,p=new Array(d),y=new Array(d),g=+r.apply(this,arguments),m=Math.min(sd,Math.max(-sd,i.apply(this,arguments)-g)),v=Math.min(Math.abs(m)/d,s.apply(this,arguments)),x=v*(m<0?-1:1);for(a=0;a<d;++a)(h=y[p[a]=a]=+t(o[a],a,o))>0&&(f+=h);for(null!=e?p.sort((function(t,n){return e(y[t],y[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),a=0,c=f?(m-d*x)/f:0;a<d;++a,g=u)y[l=p[a]]={data:o[l],index:a,value:h=y[l],startAngle:g,endAngle:u=g+(h>0?h*c:0)+x,padAngle:v};return y}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Qh(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Qh(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Qh(+t),o):i},o.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:Qh(+t),o):s},o}().sortValues(null);return c.startAngle(r.startAngle),c.endAngle(r.endAngle),c.padAngle(r.padAngle),function(t,e,n,r){var i=e.x,s=e.y,o=e.width,a=e.height,l=function(){var t=ld,e=cd,n=Qh(0),r=null,i=ud,s=hd,o=dd,a=null;function l(){var l,c,u=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-id,f=s.apply(this,arguments)-id,p=Kh(f-d),y=f>d;if(a||(a=l=Yh()),h<u&&(c=h,h=u,u=c),h>nd)if(p>sd-nd)a.moveTo(h*Xh(d),h*td(d)),a.arc(0,0,h,d,f,!y),u>nd&&(a.moveTo(u*Xh(f),u*td(f)),a.arc(0,0,u,f,d,y));else{var g,m,v=d,x=f,b=d,_=f,w=p,k=p,S=o.apply(this,arguments)/2,M=S>nd&&(r?+r.apply(this,arguments):ed(u*u+h*h)),E=Jh(Kh(h-u)/2,+n.apply(this,arguments)),C=E,T=E;if(M>nd){var A=ad(M/u*td(S)),N=ad(M/h*td(S));(w-=2*A)>nd?(b+=A*=y?1:-1,_-=A):(w=0,b=_=(d+f)/2),(k-=2*N)>nd?(v+=N*=y?1:-1,x-=N):(k=0,v=x=(d+f)/2)}var R=h*Xh(v),O=h*td(v),I=u*Xh(_),P=u*td(_);if(E>nd){var D,j=h*Xh(x),F=h*td(x),z=u*Xh(b),q=u*td(b);if(p<rd&&(D=fd(R,O,z,q,j,F,I,P))){var L=R-D[0],B=O-D[1],H=j-D[0],V=F-D[1],W=1/td(od((L*H+B*V)/(ed(L*L+B*B)*ed(H*H+V*V)))/2),$=ed(D[0]*D[0]+D[1]*D[1]);C=Jh(E,(u-$)/(W-1)),T=Jh(E,(h-$)/(W+1))}}k>nd?T>nd?(g=pd(z,q,R,O,h,T,y),m=pd(j,F,I,P,h,T,y),a.moveTo(g.cx+g.x01,g.cy+g.y01),T<E?a.arc(g.cx,g.cy,T,Zh(g.y01,g.x01),Zh(m.y01,m.x01),!y):(a.arc(g.cx,g.cy,T,Zh(g.y01,g.x01),Zh(g.y11,g.x11),!y),a.arc(0,0,h,Zh(g.cy+g.y11,g.cx+g.x11),Zh(m.cy+m.y11,m.cx+m.x11),!y),a.arc(m.cx,m.cy,T,Zh(m.y11,m.x11),Zh(m.y01,m.x01),!y))):(a.moveTo(R,O),a.arc(0,0,h,v,x,!y)):a.moveTo(R,O),u>nd&&w>nd?C>nd?(g=pd(I,P,j,F,u,-C,y),m=pd(R,O,z,q,u,-C,y),a.lineTo(g.cx+g.x01,g.cy+g.y01),C<E?a.arc(g.cx,g.cy,C,Zh(g.y01,g.x01),Zh(m.y01,m.x01),!y):(a.arc(g.cx,g.cy,C,Zh(g.y01,g.x01),Zh(g.y11,g.x11),!y),a.arc(0,0,u,Zh(g.cy+g.y11,g.cx+g.x11),Zh(m.cy+m.y11,m.cx+m.x11),y),a.arc(m.cx,m.cy,C,Zh(m.y11,m.x11),Zh(m.y01,m.x01),!y))):a.arc(0,0,u,_,b,y):a.lineTo(I,P)}else a.moveTo(0,0);if(a.closePath(),l)return a=null,l+""||null}return l.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-rd/2;return[Xh(r)*n,td(r)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Qh(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Qh(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Qh(+t),l):n},l.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Qh(+t),l):r},l.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Qh(+t),l):i},l.endAngle=function(t){return arguments.length?(s="function"==typeof t?t:Qh(+t),l):s},l.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Qh(+t),l):o},l.context=function(t){return arguments.length?(a=null==t?null:t,l):a},l}(),c={x:i+o/2,y:s+a/2},u=Math.min(o,a)/2,h=Math.min(o,a)/2,d=h/100;return t.map((function(t,e){var i=n[e];i.type="path";var s=h*i.outerRadius,o=u*i.innerRadius;l.innerRadius(o),l.outerRadius(s),l.cornerRadius(d*i.cornerRadius),i.d=l(t);var a=l.centroid(t),f=i.offset?function(t,e,n,r){var i=Ch(t,2),s=i[0],o=i[1],a=Math.sqrt(s*s+o*o),l=n-r;return{x:(s/=a)*e*l,y:(o/=a)*e*l}}(a,i.offset,s,o):{x:0,y:0};return i.transform="translate(".concat(f.x,", ").concat(f.y,") translate(").concat(c.x,", ").concat(c.y,")"),i.desc={share:t.value/r,slice:{start:t.startAngle,end:t.endAngle,innerRadius:o,outerRadius:s,offset:{x:c.x+f.x,y:c.y+f.y}}},i}))}(c(e),ch({},this.rect,{x:0,y:0}),n,s)}},ib=function(t){function e(e){if(t[e.type]&&t[e.type].condition(e)){var n=t[e.type],r=void 0===n.conditionAppend||n.conditionAppend(e);n.items.forEach((function(t){var n=Math.round(e[t.key]),i=e[t.key]-n;e[t.key]=n,r&&"append"===t.type&&(i>0?e[t.key]+=.5:e[t.key]-=.5)}))}}return void 0===t&&((t={}).line={append:["x1","x2","y1","y2"],round:[],condition:function(t){return t.x1===t.x2||t.y1===t.y2},conditionAppend:function(t){return t.strokeWidth%2!=0}},t.rect={append:["x","y"],round:["width","height"],condition:function(){return!0},conditionAppend:function(t){return t.strokeWidth%2!=0}}),Object.keys(t).forEach((function(e){var n=t[e];n.items=[],n.append.forEach((function(t){n.items.push({key:t,type:"append"})})),n.round.forEach((function(t){n.items.push({key:t,type:"round"})}))})),e.multiple=function(t){return t.forEach((function(t){return e(t)}))},e}(),sb=function(){function t(){dh(this,t),this.reset(),this.push.apply(this,arguments)}return ph(t,[{key:"transposeCoordinate",value:function(t,e,n){if("number"==typeof e&&isFinite(e)){var r=t.substring(0,1);if("x"===r||"cx"===t)return e*this.width;if("width"===t)return e*this.width;if("r"===t)return e*(n?this.height:this.width);if("y"===r||"cy"===t)return e*this.height;if("height"===t)return e*this.height}return e}},{key:"push",value:function(){var t;return(t=this.storage).push.apply(t,arguments),this}},{key:"processItem",value:function(e){var n={},r=void 0!==e.flipXY?e.flipXY:this.flipXY,i=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){e=e.fn({width:r?this.height:this.width,height:r?this.width:this.height,flipXY:r});for(var s=Object.keys(e),o=0,a=s.length;o<a;o++){var l=s[o];n[t.evaluateKey(l,r)]=e[l]}}else for(var c=Object.keys(e),u=0,h=c.length;u<h;u++){var d=c[u],f=t.evaluateKey(d,r),p=this.transposeCoordinate(f,e[d],r);n[f]=p}return i&&ib(n),n}},{key:"output",value:function(){for(var t=[],e=0,n=this.storage.length;e<n;e++){var r=this.processItem(this.storage[e]);t.push(r)}return t}},{key:"reset",value:function(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}],[{key:"evaluateKey",value:function(t,e){if(e){var n=t.substring(0,1),r=t.substring(1);if("x"===n)return"y".concat(r);if("y"===n)return"x".concat(r);if("cx"===t)return"cy";if("cy"===t)return"cx";if("width"===t)return"height";if("height"===t)return"width"}return t}}]),t}();function ob(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(sb,e)}function ab(t,e){return t&&e?t.cachedTicks&&t.cachedTicks()||t.ticks({distance:e}):[]}var lb={created:function(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender:function(){this.blueprint=ob(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render:function(){var t=this;if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,Hm(this,"x",this.rect.width),Hm(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=ch({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=ch({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=ab(this.x,this.rect.width),this.lines.y=ab(this.y,this.rect.height),this.lines.y=this.lines.y.map((function(t){return ch(t,{flipXY:!0})}));var e=function(e){var n=e.dir,r=e.isMinor,i=t.lines[n].filter((function(t){return!!t.isMinor===r}));t.resolver.resolve({settings:r?t.settings.minorTicks:t.settings.ticks,data:{items:i,dir:n}}).items.forEach((function(e){var n=e.data;e.show&&t.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function cb(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){var i="right"===r;return"\n M ".concat(t," ").concat(e-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(t," ").concat(e+n,"\n L ").concat(i?t+n:t-n," ").concat(e," Z\n ")}var s="bottom"===r;return"\n M ".concat(t-n," ").concat(e,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(s?1:0,", ").concat(t+n," ").concat(e,"\n L ").concat(t," ").concat(s?e+n:e-n," Z\n ")}function ub(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){var i="right"===r;return"\n M ".concat(t+=i?1.5*n:-1.5*n," ").concat(e-n,"\n L ").concat(t," ").concat(e+n,"\n L ").concat(i?t+n:t-n," ").concat(e," Z\n ")}var s="bottom"===r;return e+=s?1.5*n:-1.5*n,"\n M ".concat(t-n," ").concat(e,"\n L ").concat(t+n," ").concat(e,"\n L ").concat(t," ").concat(s?e+n:e-n," Z\n ")}function hb(t){if(void 0===t)return 0;if("number"==typeof t&&isFinite(t))return t;if("string"==typeof t)switch(t){case"center":case"middle":return.5;case"bottom":case"right":return 1;case"top":case"left":default:return 0}return 0}function db(t){var e={value:t.value};return t.label&&(e.label=t.label.text),e}function fb(t){return void 0!==("function"==typeof t.value?t.value():t.value)}function pb(t,e){var n=t.min();if(n===t.max()){var r=function(t){var e=t.range();return 2===(null==e?void 0:e.length)&&e[0]>e[1]}(t);if(e<n)return r?2:-1;if(e>n)return r?-1:2}return t(e)}var yb={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:function(){return 30},beforeRender:function(){this.blueprint=ob(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render:function(){var t=this,e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];var n={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(fb).map((function(e){if("function"==typeof e.value&&(e.value=e.value()),e.scale){var n=t.chart.scale(e.scale),r=pb(n,e.value);return ch(e,{scale:n,position:r})}return ch(e,{position:e.value})})),this.lines.y=this.lines.y.filter(fb).map((function(e){if("function"==typeof e.value&&(e.value=e.value()),e.scale){var n=t.chart.scale(e.scale),r=pb(n,e.value);return ch(e,{scale:n,position:r,flipXY:!0})}return ch(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((function(t){return!(t.position<0||t.position>1)||(n["x".concat(t.position>1?1:0)].push(db(t)),!1)})),this.lines.y=this.lines.y.filter((function(t){return!(t.position<0||t.position>1)||(n["y".concat(t.position>1?1:0)].push(db(t)),!1)}));var r=[];return[].concat(Th(this.lines.x),Th(this.lines.y)).forEach((function(n){(!0===n.show||void 0===n.show)&&function(t){var e,n=t.chart,r=t.blueprint,i=t.renderer,s=t.p,o=t.settings,a=t.items,l=!0,c=!1,u=!1,h=!1,d=ch(!0,{},o.style.line,s.line||{});if(e=r.processItem({type:"line",x1:s.position,y1:0,x2:s.position,y2:1,stroke:d.stroke||"black",strokeWidth:d.strokeWidth||1,strokeDasharray:d.strokeDasharray,flipXY:s.flipXY||!1}),s.label){var f,p=ch(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},o.style.label||{},{fill:d.stroke},s.label),y={width:0,height:0},g="";if("string"==typeof s.formatter)f=n.formatter(s.formatter);else if("object"===hh(s.formatter))f=n.formatter(s.formatter);else if(void 0!==s.scale&&s.scale.data){var m=s.scale.data()&&s.scale.data().fields;f=m&&m[0]?m[0].formatter():null}!1!==s.label.showValue&&(f?g=" (".concat(f(s.value),")"):s.scale&&(g=" (".concat(s.value,")"))),g&&(y=i.measureText({text:g,fontFamily:p.fontFamily,fontSize:p.fontSize}));var v=i.measureText({text:p.text||"",fontFamily:p.fontFamily,fontSize:p.fontSize}),x={width:v.width+y.width,height:Math.max(v.height,y.height)},b=p.padding,_=hb(s.flipXY?p.vAlign:p.align),w=hb(s.flipXY?p.align:p.vAlign),k=Math.min(1+x.width+2*b,p.maxWidth*r.width,p.maxWidthPx),S=x.height+2*b,M=s.flipXY?S:k,E=s.flipXY?k:S;if((c=r.processItem({fn:function(t){var e=t.height,n=s.position*t.width-(s.flipXY?S:k)*(1-_);return{type:"rect",x:n=s.flipXY?n:Math.max(n,0),y:Math.max(Math.abs(w*e-E*w),0),width:s.flipXY?M:Math.min(M,r.width-n),height:E,stroke:p.background.stroke,strokeWidth:p.background.strokeWidth,fill:p.background.fill,opacity:p.background.opacity}},flipXY:s.flipXY||!1})).x<-1||c.x+c.width>r.width+1||c.y<-1||c.y+c.height>r.height+1)c=void 0;else{u={type:"text",text:p.text||"",fill:p.fill,opacity:p.opacity,fontFamily:p.fontFamily,fontSize:p.fontSize,x:c.x+b,y:c.y+c.height/2+x.height/3,maxWidth:c.width-2*b-y.width,anchor:"start"},g&&(h={type:"text",text:g||"",fill:p.fill,opacity:p.opacity,fontFamily:p.fontFamily,fontSize:p.fontSize,x:u.x+3+(c.width-(y.width+2*b)),y:u.y});for(var C=0,T=a.length;C<T;C++){var A=a[C];"rect"===A.type?qv(c,A)&&(l=!1):"line"===A.type&&s.flipXY===A.flipXY&&Hv(c,A)&&(l=!1)}}}a.push(e),l&&c&&u&&(a.push(c,u),h&&a.push(h))}({chart:t.chart,blueprint:t.blueprint,renderer:t.renderer,p:n,settings:e,items:r})})),e.style.oob.show&&function(t){for(var e=t.blueprint,n=t.oob,r=t.settings,i=t.items,s=Object.keys(n),o=r.style.oob||{},a=function(t,r){var a=s[t],l=n[a];if(l.length>0){var c,u=a.charAt(1),h="y"===a.charAt(0),d=o.padding.x+o.width,f=o.padding.y+o.width;c=h?"1"===u?"bottom":"top":"1"===u?"right":"left";var p=e.processItem({fn:function(t){var e=u*t.width+("1"===u?-d:d),n=h?f:t.height-f;return"arc"===o.type?{type:"path",d:cb(h?n:e,h?e:n,o.width,c),x:e,y:n,stroke:o.stroke,fill:o.fill,strokeWidth:o.strokeWidth||0}:{type:"circle",cx:e,cy:n,r:o.width,stroke:o.stroke,fill:o.fill,strokeWidth:o.strokeWidth||0,opacity:o.opacity,data:l}},flipXY:h}),y=p.cx||p.x,g=p.cy||p.y,m={type:"text",text:l.length||"",x:y-.4*o.width,y:g+.4*o.width,fontFamily:o.text.fontFamily,fontSize:"".concat(1.3*o.width,"px"),stroke:o.text.stroke,fill:o.text.fill,strokeWidth:o.text.strokeWidth||0,opacity:o.text.opacity},v={type:"path",d:ub(y,g,o.width,c),x:y,y:g,stroke:o.triangle.stroke,fill:o.triangle.fill,strokeWidth:o.triangle.strokeWidth||0,opacity:o.triangle.opacity};i.push(p,m,v)}},l=0,c=s.length;l<c;l++)a(l)}({blueprint:this.blueprint,oob:n,settings:e,items:r}),r}};function gb(t,e){var n=isNaN(t.style.align)?.5:Math.min(Math.max(t.style.align,0),1);return t.tilted?t.stepSize*n:Math.max(0,t.stepSize-(e?t.textRect.height:t.textRect.width))*n}function mb(t,e){var n,r={type:"text",text:(n=t.label,"string"==typeof n||"number"==typeof n?n:"-"),x:0,y:0,maxWidth:e.maxWidth,maxHeight:e.maxHeight};return"top"===e.align||"bottom"===e.align?(r.x=t.start*e.innerRect.width+(e.innerRect.x-e.outerRect.x)+gb(e,!1),r.y="top"===e.align?e.innerRect.height:0,r.anchor=e.stepSize?"start":"middle",r.x+=isNaN(e.style.offset)?0:+e.style.offset):(r.y=t.start*e.innerRect.height+(e.innerRect.y-e.outerRect.y)+gb(e,!0),r.x="left"===e.align?e.innerRect.width:0,r.anchor="left"===e.align?"end":"start",r.baseline=e.stepSize?"text-before-edge":"central",r.y+=isNaN(e.style.offset)?0:+e.style.offset),function(t,e){["fill","fontSize","fontFamily"].forEach((function(n){t[n]=e.style[n]}))}(r,e),function(t,e){if(!e.tilted&&!e.stepSize)if("top"===e.align||"bottom"===e.align){var n=e.outerRect.width,r=Math.min(e.maxWidth/2,e.textRect.width/2),i=t.x+r;t.x-r<0?(t.anchor="start",t.x=e.innerRect.x-e.outerRect.x):i>n&&(t.anchor="end",t.x=e.innerRect.width+e.innerRect.x)}else{var s=e.outerRect.height,o=e.maxHeight/2,a=t.y+o;t.y-o<0?(t.y=e.innerRect.y-e.outerRect.y,t.baseline="text-before-edge"):a>s&&(t.y=e.innerRect.height+(e.innerRect.y-e.outerRect.y),t.baseline="text-after-edge")}}(r,e),function(t,e){"top"===e.align?t.y-=e.padding:"bottom"===e.align?t.y+=e.padding+e.maxHeight:"left"===e.align?t.x-=e.padding:"right"===e.align&&(t.x+=e.padding)}(r,e),function(t,e){if(e.tilted){var n=-e.angle,r=n*(Math.PI/180);"bottom"===e.align?(t.x-=e.maxHeight*Math.sin(r)/2,t.y-=e.maxHeight,t.y+=e.maxHeight*Math.cos(r)/2):t.x-=e.maxHeight*Math.sin(r)/3,t.transform="rotate(".concat(n,", ").concat(t.x,", ").concat(t.y,")"),t.anchor="bottom"===e.align==e.angle<0?"start":"end";var i=Math.cos(r)*e.maxWidth;if("bottom"===e.align==e.angle<0){var s=e.outerRect.width-e.paddingEnd;t.x+i>s&&(t.maxWidth=(s-t.x-10)/Math.cos(r))}else{var o=e.paddingEnd;t.x-i<o&&(t.maxWidth=(t.x-o-10)/Math.cos(r))}}}(r,e),function(t,e){t.boundingRect=e.textBounds(t)}(r,e),function(t,e,n){n.layered||!n.stepSize?function(t,e){e.collider={type:"polygon",vertices:[{x:e.boundingRect.x,y:e.boundingRect.y},{x:e.boundingRect.x+e.boundingRect.width,y:e.boundingRect.y},{x:e.boundingRect.x+e.boundingRect.width,y:e.boundingRect.y+e.boundingRect.height},{x:e.boundingRect.x,y:e.boundingRect.y+e.boundingRect.height}]}}(0,e):n.tilted?function(t,e,n){var r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,e.boundingRect.height/2),s="start"===e.anchor,o=e.boundingRect.y+("start"===e.anchor&&r>=0||"end"===e.anchor&&r<0?e.boundingRect.height:0),a=[{x:e.x-i,y:o},{x:e.x+i,y:o}].map((function(t){return fv(t,r,{x:e.x,y:e.y})})),l={x:s?e.boundingRect.x+e.boundingRect.width+10:e.boundingRect.x-10,y:e.boundingRect.y+e.boundingRect.height},c={x:s?e.boundingRect.x+e.boundingRect.width+10:e.boundingRect.x-10,y:e.boundingRect.y};a.push.apply(a,r>=0?[l,c]:[c,l]),e.collider={type:"polygon",vertices:a}}(0,e,n):function(t,e,n){if("bottom"===n.align||"top"===n.align){var r=t.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);e.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{var i=t.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);e.collider={type:"rect",x:0,y:i,width:n.innerRect.width,height:i<0?n.stepSize+i:n.stepSize}}var s=e.collider;s.x=Math.max(s.x,0),s.y=Math.max(s.y,0);var o=s.x+s.width-(n.outerRect.x+n.outerRect.width);s.width=o>0?s.width-o:s.width;var a=s.y+s.height-(n.outerRect.y+n.outerRect.height);s.height=a>0?s.height-a:s.height}(t,e,n)}(t,r,e),r}function vb(t){return!t.isMinor&&t.position>=0&&t.position<=1}function xb(t){var e=t.value,n=t.maxValue,r=t.minValue,i=t.range,s=t.modifier;return isNaN(i)||isNaN(s)||(e=i*s),e>n&&(e=n),e<r&&(e=r),e}var bb=function(t,e,n){return t.width*Math.abs(e.position-n.position)};function _b(t){var e=0;return e+=t.paddingStart,(e+=t.line.show?t.line.strokeWidth/2:0)+(t.ticks.show?t.ticks.margin:0)}function wb(t){var e=0;return(e+=t.ticks.show?t.ticks.tickSize:0)+(_b(t)+t.labels.margin)}function kb(t,e){return t.map((function(t){return function(t,e){var n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(n.x1=n.x2=t.position*e.innerRect.width+(e.innerRect.x-e.outerRect.x),n.y1="top"===e.align?e.innerRect.height:0,n.y2="top"===e.align?n.y1-e.tickSize:n.y1+e.tickSize):(n.y1=n.y2=t.position*e.innerRect.height+(e.innerRect.y-e.outerRect.y),n.x1="left"===e.align?e.innerRect.width:0,n.x2="left"===e.align?n.x1-e.tickSize:n.x1+e.tickSize),function(t,e){ch(t,e.style)}(n,e),function(t,e){"top"===e.align?(t.y1-=e.padding,t.y2-=e.padding):"bottom"===e.align?(t.y1+=e.padding,t.y2+=e.padding):"left"===e.align?(t.x1-=e.padding,t.x2-=e.padding):"right"===e.align&&(t.x1+=e.padding,t.x2+=e.padding)}(n,e),function(t,e){var n=t.strokeWidth/2;t.x1===e.innerRect.width?(t.x1-=n,t.x2-=n):0===t.x1?(t.x1+=n,t.x2+=n):t.y1===e.innerRect.height?(t.y1-=n,t.y2-=n):0===t.y1&&(t.y1+=n,t.y2+=n)}(n,e),n}(t,e)}))}function Sb(t,e){return e?Math.abs(e.end-e.start):t.bandwidth()}function Mb(t){var e=t.settings,n=t.innerRect,r=t.tilted,i=t.layered,s=t.textMetrics.height,o=Sb(t.scale,t.tick),a={width:0,height:s};if("left"===e.align||"right"===e.align)a.width=n.width-wb(e)-e.paddingEnd;else if(i)a.width=o*n.width*2;else if(r){var l=Math.abs(e.labels.tiltAngle)*(Math.PI/180);a.width=(n.height-wb(e)-e.paddingEnd-s*Math.cos(l))/Math.sin(l)}else a.width=o*n.width;return a.width=xb({value:a.width,maxValue:e.labels.maxLengthPx,minValue:e.labels.minLengthPx}),a}function Eb(t){var e=t.settings,n=t.innerRect,r=t.outerRect,i=t.tilted,s=t.layered,o=t.tick,a=t.index,l=t.major,c=t.textMetrics.height,u={width:0,height:c};if("left"===e.align||"right"===e.align)u.width=n.width-wb(e)-e.paddingEnd;else if(i){var h=Math.abs(e.labels.tiltAngle)*(Math.PI/180);u.width=(n.height-wb(e)-e.paddingEnd-c*Math.cos(h))/Math.sin(h)}else u.width=function(t){var e=t.major,n=t.innerRect,r=t.outerRect,i=t.tick,s=t.index,o=t.layered?2:1,a=e[s-o],l=e[s+o],c=a?bb(n,i,a)/2-2:1/0,u=l?bb(n,i,l)/2-2:1/0;return e.length<2?n.width:a?l?2*Math.min(c,u):function(t){var e=t.innerRect,n=t.outerRect,r=t.tick,i=t.prevWidth,s=2*Math.min(i,e.width-e.width*r.position+(n.width-e.width-(e.x-n.x)));return Math.max(i,s,1===r.position?e.width/2-2:0)}({innerRect:n,outerRect:r,tick:i,prevWidth:c}):function(t){var e=t.innerRect,n=t.tick,r=t.nextWidth,i=2*Math.min(r,e.width*n.position+(e.x-t.outerRect.x));return Math.max(r,i,0===n.position?e.width/2-2:0)}({innerRect:n,outerRect:r,tick:i,nextWidth:u})}({layered:s,major:l,innerRect:n,outerRect:r,tick:o,index:a});return u.width=xb({value:u.width,maxValue:e.labels.maxLengthPx,minValue:e.labels.minLengthPx}),u}var Cb={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},Tb={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"},Ab={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created:function(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.defaultDock=this.state.isDiscrete?"bottom":"left",this.setState(this.settings)},setState:function(){var t,e,n;this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(t){var e=t.state,n=t.settings,r=ch(!0,{},e.isDiscrete?Cb:Tb,t.style),i=ch(!0,{},r,n.settings),s=n.layout.dock||e.defaultDock;i.dock=s,i.align=function(t,e){var n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(t)&&-1===r.indexOf(e)||-1!==r.indexOf(t)&&-1===n.indexOf(e)?t:e}(n.settings.align,s),i.labels.tiltAngle=Math.max(-90,Math.min(i.labels.tiltAngle,90));var o=i.paddingStart,a=i.paddingEnd;return i.paddingStart="function"==typeof o?o.call(null):o,i.paddingEnd="function"==typeof a?a.call(null):a,i}(this),this.state.concreteNodeBuilder=function(t){var e;function n(){return e=Eb,n}function r(){return e=Mb,r}function i(t){var n,r=t.settings,i=t.scale,s=t.innerRect,o=t.outerRect,a=t.measureText,l=t.ticks,c=t.state,u=t.textBounds,h=[],d=function(t){return t.filter((function(t){return!t.isMinor}))}(l),f=function(t){return t.filter((function(t){return t.isMinor}))}(l),p={innerRect:s,align:r.align,outerRect:o},y="tilted"===c.labels.activeMode,g="layered"===c.labels.activeMode;if(r.line.show&&(p.style=r.line,p.padding=r.paddingStart,h.push(function(t){var e={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===t.align||"bottom"===t.align?(e.x1=t.innerRect.x-t.outerRect.x,e.x2=t.innerRect.width+t.innerRect.x,e.y1=e.y2="top"===t.align?t.innerRect.height-t.padding:t.padding):(e.x1=e.x2="left"===t.align?t.innerRect.width-t.padding:t.padding,e.y1=t.innerRect.y-t.outerRect.y,e.y2=t.innerRect.height+t.innerRect.y),function(t,e){ch(t,e.style)}(e,t),e}(p))),r.ticks.show&&(p.style=r.ticks,p.tickSize=r.ticks.tickSize,p.padding=_b(r),n=kb(d,p)),r.labels.show){var m=wb(r);p.style=r.labels,p.padding=m,p.tilted=y,p.layered=g,p.angle=r.labels.tiltAngle,p.paddingEnd=r.paddingEnd,p.textBounds=u;var v,x=function(t,n){var c,u;p.textRect=(0,(c={tick:t,measureText:a,style:p.style}).measureText)({text:c.tick.label,fontSize:(u=c.style).fontSize,fontFamily:u.fontFamily});var h=e({textMetrics:p.textRect,settings:r,innerRect:s,outerRect:o,scale:i,tilted:y,layered:g,tick:t,major:d,index:n});p.maxWidth=h.width,p.maxHeight=h.height,p.stepSize=function(t){var e=t.innerRect,n=t.settings;return("top"===n.align||"bottom"===n.align?e.width:e.height)*Sb(t.scale,t.tick)}({innerRect:s,scale:i,ticks:l,settings:r,tick:t})};v=!g||"top"!==r.align&&"bottom"!==r.align?function(t,e,n){return t.map((function(t,r){n(t,r);var i=mb(t,e);return i.data=t.data,i}))}(d,p,x):function(t,e,n,r){var i=e.padding,s=wb(n);return t.map((function(t,o){r(t,o);var a=s+e.maxHeight+n.labels.margin;e.layer=o%2,e.padding=o%2==0?i:a;var l=mb(t,e);return l.data=t.data,l}))}(d,p,r,x),r.labels.filterOverlapping&&function(t,e,n){var r=function(e,n){return qv(Lh(1,t[e].boundingRect),Lh(1,t[n].boundingRect))};if(n&&n.tilted){var i=Math.abs(n.angle);r=function(e,n){var r=1/Math.abs(t[e].x-t[n].x),s=Math.sin(i*(Math.PI/180))/r;return t[e].boundingRect.height>s}}for(var s=0;s<=t.length-1;s++)for(var o=s+1;o<=Math.min(s+5,s+(t.length-1));o++)t[s]&&t[o]&&r(s,o)&&(o===t.length-1?(t.splice(s,1),e&&e.splice(s,1)):(t.splice(o,1),e&&e.splice(o,1)),o--,s--)}(v,n,p),h.push.apply(h,Th(v))}return r.minorTicks&&r.minorTicks.show&&f.length>0&&(p.style=r.minorTicks,p.tickSize=r.minorTicks.tickSize,p.padding=function(t){return t.line.strokeWidth+t.minorTicks.margin}(r),h.push.apply(h,Th(kb(f,p)))),n&&h.push.apply(h,Th(n)),h}return n.build=i,r.build=i,t?r():n()}(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=(t=this.state,n=(e=this.state.settings).labels.mode,this.state.isDiscrete&&t.isHorizontal?"auto"===n?t.labels.activeMode:-1!==["layered","tilted"].indexOf(e.labels.mode)&&-1!==["top","bottom"].indexOf(e.dock)?n:"horizontal":"horizontal")},preferredSize:function(t){var e=this.formatter,n=this.state;return this.state.pxScale=Vm(this.scale,this.state.isHorizontal?t.inner.width:t.inner.height),function(t){var e=t.settings,n=0,r=function(t){var e=t.isDiscrete,n=t.rect,r=t.measureText,i=t.settings,s=t.state,o=0,a={left:0,top:0,right:0,bottom:0},l=i.labels,c=l.maxLengthPx,u=l.minLengthPx;if(i.labels.show){var h,d,f=i.align,p="top"===f||"bottom"===f,y=t.scale.ticks({settings:i,distance:p?n.inner.width:n.inner.height,formatter:t.formatter}).filter(vb),g=function(t){var e=r({text:t,fontSize:i.labels.fontSize,fontFamily:i.labels.fontFamily});return e.width=xb({value:e.width,maxValue:c,minValue:u}),e};if(e&&p&&"auto"===i.labels.mode&&(s.labels.activeMode=function(t){var e=t.majorTicks,n=t.measure,r=t.rect,i=t.settings,s=i.labels.maxGlyphCount,o="layered"===t.state.labels.activeMode?2:1,a=i.labels.tiltThreshold?i.labels.tiltThreshold:.7,l=n("\u2026").width,c=r.width,u=0;if(isNaN(s))for(var h=0;h<e.length;h++){var d=e[h],f=d.label;if(n(f).width*(f.length>1?a:1)+l>(u=o*c*Math.abs(d.start-d.end)))return!0}else if(u=o*c*e.reduce((function(t,e){return Math.min(Math.abs(e.start-e.end),t)}),1/0),n("M").width*a*s+l>u)return!0;return!1}({majorTicks:y,measure:g,rect:n.inner,state:s,settings:i})?"tilted":"horizontal"),!i.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&function(t){var e=t.rect,n=t.state,r=t.majorTicks,i=t.measure;return t.horizontal?function(t){for(var e=t.majorTicks,n=t.measureText,r="layered"===t.state.labels.activeMode?2:1,i=t.rect.width,s=e.map((function(t){return t.label})).map((function(t){return"".concat(t.slice(0,1)).concat(t.length>1?"\u2026":"")})).map(n).map((function(t){return t.width})),o=0;o<e.length;++o){var a=e[o];if(r*i*Math.abs(a.start-a.end)<s[o])return!0}return!1}({majorTicks:r,measureText:i,rect:e,state:n}):function(t){var e=t.majorTicks,n=t.rect.height,r=(0,t.measureText)("M").height;return!(e.length<2)&&n*Math.abs(e[0].position-e[1].position)<r}({majorTicks:r,measureText:i,rect:e,state:n})}({rect:n.inner,state:s,majorTicks:y,measure:g,horizontal:p}))return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0};if("tilted"===s.labels.activeMode){var m=Math.abs(i.labels.tiltAngle)*(Math.PI/180);h=function(t){return xb({value:t.width,maxValue:c,minValue:u})*Math.sin(m)+t.height*Math.cos(m)}}else h=p?function(t){return t.height}:function(t){return xb({value:t.width,maxValue:c,minValue:u})};if(p&&"tilted"!==s.labels.activeMode)d=["M"];else if(isNaN(i.labels.maxGlyphCount))d=y.map((function(t){return t.label}));else{for(var v="",x=0;x<i.labels.maxGlyphCount;x++)v+="M";d=[v]}var b=d.map(g),_=b.map(h),w=Math.max.apply(Math,Th(_).concat([0]));if(o+=w,o+=i.labels.margin,"layered"===s.labels.activeMode&&(o*=2),"tilted"===s.labels.activeMode){var k="bottom"===i.align==i.labels.tiltAngle>=0,S=Math.abs(i.labels.tiltAngle)*(Math.PI/180),M=(w-r("M").height*Math.cos(S))/Math.sin(S),E=Math.min(i.labels.maxEdgeBleed,Math.max.apply(Math,Th(b.map((function(t){return Math.min(M,t.width)*Math.cos(S)+t.height})).map((function(t,e){var r=y[e]?y[e].position:0;return k?t-r*n.inner.width:t-(1-r)*n.inner.width}))).concat([0])))+i.paddingEnd;if(a[k?"left":"right"]=E,!i.labels.filterOverlapping&&function(t){var e=t.majorTicks,n=t.measureText,r=t.rect,i=t.bleedSize,s=t.angle;if(e.length<2)return!1;if(0===s)return!0;var o=Math.abs(s),a=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(e[0].position-e[1].position));return n("M").height>Math.sin(o*(Math.PI/180))/a}({majorTicks:y,measureText:r,rect:n,bleedSize:E,angle:i.labels.tiltAngle}))return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}return{size:o,edgeBleed:a}}({isDiscrete:t.isDiscrete,rect:t.rect,formatter:t.formatter,measureText:t.measureText,scale:t.scale,settings:e,state:t.state}),i=r.edgeBleed;if(n+=r.size,r.isToLarge)return{size:n};if(e.ticks.show&&(n+=e.ticks.margin,n+=e.ticks.tickSize),e.minorTicks&&e.minorTicks.show){var s=e.minorTicks.margin+e.minorTicks.tickSize;s>n&&(n=s)}if(e.line.show){var o=e.line.strokeWidth/2;n+=o,i[function(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return t}}(e.align)]=Math.ceil(o)}return n+=e.paddingStart,{size:n+=e.paddingEnd,edgeBleed:i}}({isDiscrete:this.state.isDiscrete,rect:{inner:t.inner,outer:t.outer},formatter:e,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n})},beforeUpdate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.settings;this.setState(e)},resize:function(t){var e=t.inner,n=t.outer,r=ch({},e,function(t){var e=t.align,n=t.inner;return"left"===e?{x:n.width+n.x}:"right"===e||"bottom"===e?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:e})),i=n||r;return ch(this.state.innerRect,r),ch(this.state.outerRect,i),n},beforeRender:function(){var t=this.formatter,e=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=Vm(this.scale,e),this.state.ticks=this.state.pxScale.ticks({distance:e,formatter:t}).filter((function(t){return t.position>=0&&t.position<=1}))},render:function(){var t=[];return t.push.apply(t,Th(this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:this.state}))),ib.multiple(t),t}},Nb={render:function(){return[]}};function Rb(t,e,n){var r="";return"function"==typeof t?r=t():"string"==typeof t?r=t:n&&(r=(n.data().fields||[]).map((function(t){return t.title()})).join(e)),r}function Ob(t,e){var n="middle";return"left"===t?"top"===e?n="end":"bottom"===e&&(n="start"):"right"===t?"top"===e?n="start":"bottom"===e&&(n="end"):"left"===e?n="start":"right"===e&&(n="end"),n}var Ib={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created:function(){this.definitionSettings=this.settings.settings,this.title=Rb(this.settings.text,this.definitionSettings.join,this.scale)},preferredSize:function(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render:function(){var t=[];return t.push(function(t){var e=t.definitionSettings,n=t.dock,r=t.rect,i=t.measureText,s=t.style,o={type:"text",text:t.title,x:0,y:0,dx:0,dy:0,anchor:Ob(n,e.anchor),baseline:"alphabetical"};ch(o,s.text);var a=i(o);if("top"===n||"bottom"===n){var l=r.width/2;"left"===e.anchor?l=e.paddingLeft||0:"right"===e.anchor&&(l=r.width-(e.paddingRight||0)),o.x=l,o.y="top"===n?r.height-e.paddingStart:e.paddingStart+a.height,o.dy="top"===n?-a.height/6:-a.height/3,o.maxWidth=.8*r.width}else{var c=r.height/2;"top"===e.anchor?c=e.paddingStart:"bottom"===e.anchor&&(c=r.height-e.paddingStart),o.y=c,o.x="left"===n?r.width-e.paddingStart:e.paddingStart,o.dx="left"===n?-a.height/3:a.height/3,o.transform="rotate(".concat("left"===n?270:90,", ").concat(o.x+o.dx,", ").concat(o.y+o.dy,")"),o.maxWidth=.8*r.height}return isNaN(e.maxLengthPx)||(o.maxWidth=Math.min(o.maxWidth,e.maxLengthPx)),o}({title:this.title,dock:this.settings.layout.dock,definitionSettings:this.definitionSettings,rect:this.rect,measureText:this.renderer.measureText,style:this.style})),t},beforeUpdate:function(t){t.settings&&(ch(this.settings,t.settings),this.definitionSettings=t.settings.settings),this.title=Rb(this.settings.text,this.definitionSettings.join,this.scale)}};function Pb(t,e){var n,r=t.settings.layout.dock,i=t.settings.settings.invert,s="top"===r||"bottom"===r,o=t.rect[s?"width":"height"],a=t.chart.scroll(t.settings.scroll),l=e[s?"x":"y"];i&&(l=o-l);var c=a.getState();n={startOffset:l,startScroll:c.start,swipe:!1};var u=l/o*(c.max-c.min)+c.min;return u<c.start?n.startScroll=u:u>c.start+c.viewSize&&(n.startScroll=u-c.viewSize),{update:function(t){var e=t[s?"x":"y"];if(i&&(e=o-e),!n.swipe){if(Math.abs(n.startOffset-e)<=1)return;n.swipe=!0}var r=a.getState();a.moveTo(n.startScroll+(e-n.startOffset)/o*(r.max-r.min))},end:function(t){var e=t[s?"x":"y"];i&&(e=o-e);var r=a.getState();a.moveTo(n.swipe?n.startScroll+(e-n.startOffset)/o*(r.max-r.min):e/o*(r.max-r.min)+r.min-r.viewSize/2)}}}function Db(t,e){var n=e.element().getBoundingClientRect();return{x:t.center.x-n.left,y:t.center.y-n.top}}var jb={require:["chart","renderer"],on:{panStart:function(t){var e=Db(t,this.renderer);this.currentMove=Pb(this,{x:e.x-t.deltaX,y:e.y-t.deltaY}),this.currentMove.update(e)},panMove:function(t){if(this.currentMove){var e=Db(t,this.renderer);this.currentMove.update(e)}},panEnd:function(t){if(this.currentMove){var e=Db(t,this.renderer);this.currentMove.end(e),this.currentMove=null}},panCancel:function(){this.currentMove=null},tap:function(t){var e=Db(t,this.renderer);Pb(this,e).end(e)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(t){var e=this.chart.scroll(this.settings.scroll).getState();return e.viewSize>=e.max-e.min?Math.max(t.width,t.height):this.settings.settings.width},render:function(t){var e,n=this.settings.layout.dock,r=this.settings.settings.invert,i="top"===n||"bottom"===n,s=i?"width":"height",o=this.rect[s],a=this.chart.scroll(this.settings.scroll).getState(),l=o*(a.start-a.min)/(a.max-a.min),c=o*a.viewSize/(a.max-a.min);return r&&(l=o-l-c),t("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(t("div",{class:"scroller",style:(e={position:"absolute"},yh(e,i?"left":"top","".concat(l,"px")),yh(e,i?"top":"left","25%"),yh(e,i?"height":"width","50%"),yh(e,s,"".concat(Math.max(1,c),"px")),yh(e,"background",this.settings.settings.thumbColor),e)})))},renderer:"dom"};function Fb(t){var e=t.h,n=t.isVertical,r=t.value,i=t.pos,s=t.borderHit,o=t.state,a=t.idx,l="end"!==t.align,c=l?{left:"0",top:"0"}:{right:"0",bottom:"0"},u=0,h="100%",d="100%";return o.targetRect&&"start"===o.settings.bubbles.align?(h="".concat(o.targetRect.x+o.targetRect.width,"px"),d="".concat(o.targetRect.y+o.targetRect.height,"px")):o.targetRect&&"end"===o.settings.bubbles.align&&(h="".concat(o.rect.width-(u=n?o.targetRect.x:o.targetRect.y),"px"),d="".concat(o.rect.height-u,"px")),l||(i-=s),e("div",{onmouseover:function(t){t.srcElement.children[0].style.backgroundColor="#000",t.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout:function(t){t.srcElement.children[0].style.backgroundColor=o.style.line.stroke,t.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[o.key,"edge",a].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?u:i,"px"),top:"".concat(n?i:u,"px"),height:n?"".concat(s,"px"):d,width:n?h:"".concat(s,"px"),pointerEvents:"auto"}},[e("div",{style:ch({backgroundColor:o.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},c)})])}function zb(t){var e,n,r=t.h,i=t.isVertical,s=t.label,o=t.otherValue,a=t.rangeIdx,l=t.idx,c=t.pos,u=t.state,h=t.value,d="end"!==t.align,f="outside"===u.settings.bubbles.placement,p="none";i?(n=d?"left":"right",f&&(p=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(n=d?"top":"bottom",f&&(p=d?"translate(0px, -100%)":"translate(0px, 100%)"));var y=u.edit&&u.edit.rangeIdx===a&&u.edit.bubbleIdx===l,g={position:"relative",borderRadius:"".concat(u.style.bubble.borderRadius,"px"),border:"".concat(u.style.bubble.strokeWidth,"px solid ").concat(u.style.bubble.stroke),backgroundColor:u.style.bubble.fill,color:u.style.bubble.color,fontFamily:u.style.bubble.fontFamily,fontSize:u.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:i?"translate(0,-50%)":"translate(-50%,0)",cursor:i?"ns-resize":"ew-resize"},m=u.style.bubble.stroke,v=y?r("input",{type:"text",value:h,style:mh(mh({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup:function(t){if("Enter"===t.key){t.preventDefault(),t.stopPropagation();var e=parseFloat(t.target.value);isNaN(e)?(m="rgba(230, 78, 78, 0.6)",t.target.style.border="".concat(u.style.bubble.strokeWidth,"px solid ").concat(m)):u.onEditConfirmed(a,e,o)}else"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),u.onEditCanceled())}}):r("div",{"data-key":[u.key,"bubble",a].join("-"),"data-other-value":o,"data-idx":a,"data-bidx":l,style:g},[s]);return r("div",{style:(e={position:"absolute"},yh(e,n,"0"),yh(e,i?"top":"left","".concat(c,"px")),yh(e,"transform",p),e)},[v])}function qb(t){var e=t.isVertical,n=t.top,r=t.height,i=t.on;return(0,t.h)("div",ch({style:{backgroundColor:t.color,opacity:t.opacity,position:"absolute",left:e?0:"".concat(n,"px"),top:e?"".concat(n,"px"):0,height:e?"".concat(r,"px"):"100%",width:e?"100%":"".concat(r,"px"),pointerEvents:"auto"}},i),[])}function Lb(t){var e=t.borderHit,n=t.els,r=t.isVertical,i=t.state,s=t.vStart,o=t.vEnd,a=t.idx,l=0;i.targetRect&&(l=r?i.targetRect.y:i.targetRect.x);var c=!!i.scale,u=c?i.scale.norm(s)*i.size:s,h=c?i.scale.norm(o)*i.size:o,d=Math.abs(u-h),f=Math.min(u,h)+l,p=f+d;if(i.targetRect){var y=i.targetFillRect||i.targetRect,g=r?y.height:y.width,m=c?i.scale.norm(s)*g:s,v=c?i.scale.norm(o)*g:o,x=Math.abs(m-v),b=Math.min(m,v),_={h:i.h,isVertical:r,top:b,height:x,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(_.on={onmouseover:function(t){t.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout:function(t){t.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(y.x,"px"),top:"".concat(y.y,"px"),height:"".concat(y.height,"px"),width:"".concat(y.width,"px")}},[qb(_)]))}var w=u<h?s:o,k=u<h?o:s,S=Ch(c?i.scale.domain():[Math.min(s,o),Math.max(s,o)],2),M=S[0],E=S[1],C=w+1e-5>=M&&w-1e-5<=E,T=k-1e-5<=E&&k+1e-5>=M;C&&n.push(Fb({h:i.h,isVertical:r,borderHit:e,value:w,pos:f,align:"start",state:i,idx:a})),T&&n.push(Fb({h:i.h,isVertical:r,borderHit:e,value:k,pos:p,align:"end",state:i,idx:a}));var A=i.settings.bubbles;if(A&&A.show){var N={fontSize:A.fontSize,fontFamily:A.fontFamily,color:A.fill},R=[s,o];C&&n.push(zb({h:i.h,isVertical:r,align:A.align,style:N,rangeIdx:a,idx:0,otherValue:k,value:w,label:"".concat(i.format(w,R)),pos:f,state:i})),T&&n.push(zb({h:i.h,isVertical:r,align:A.align,style:N,rangeIdx:a,idx:1,otherValue:w,value:k,label:"".concat(i.format(k,R)),pos:p,state:i}))}}function Bb(t){var e=t.active.limitHigh-t.active.end,n=t.current-t.start;return n<0?Math.max(n,t.active.limitLow-t.active.start):Math.min(n,e)}function Hb(t){var e=[],n=0===t.direction;if(Array.isArray(t.ranges)&&t.ranges.forEach((function(r,i){t.active&&i===t.active.idx||Lb({borderHit:5,els:e,isVertical:n,state:t,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})})),t.active){var r=t.start,i=t.current;if(-1!==t.active.idx)if("foo"===t.active.mode)r=Math.min(t.active.start,t.active.end),i=Math.max(t.active.start,t.active.end);else if("modify"===t.active.mode)r=Math.min(t.start,t.current),i=Math.max(t.start,t.current);else{var s=Bb(t);r=t.active.start+s,i=t.active.end+s}Lb({borderHit:5,els:e,isVertical:n,state:t,vStart:r,vEnd:i,idx:t.active.idx})}return e}function Vb(t){return{min:t.scale.min(),max:t.scale.max()}}function Wb(t){return{min:0,max:t.direction?t.rect.width:t.rect.height}}function $b(t,e,n){var r,i,s=t.ranges,o=-1;for(r=0;r<s.length;r++){if(s[r].min<=e&&e<=s[r].max){o=r,n.min=r?s[r-1].max:n.min,n.max=r+1<s.length?s[r+1].min:n.max;break}if(e<s[r].min){n.max=s[r].min,n.min=r?s[r-1].max:n.min;break}}-1===o&&s.length&&r>=s.length&&(n.min=s[s.length-1].max),-1!==o&&(i={idx:o,start:s[o].min,end:s[o].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),t.active=i}function Ub(t){t.renderer.render(Hb(t))}function Yb(t,e){if(!e||!e.isActive())return[];var n=t.scale.data(),r=(n&&n.fields||[]).map((function(t){return t.id()})),i=e.brushes().filter((function(t){return"range"===t.type&&-1!==r.indexOf(t.id)}))[0];return i?i.brush.ranges():[]}function Qb(t,e){for(var n,r=1/0,i=e.domain(),s=e.bandwidth()/2,o=0;o<i.length;++o){var a=Math.abs(t-s-e(i[o]));a<r&&(r=a,n=i[o])}return n}function Kb(t,e){return Math.min.apply(Math,Th(t))<=Math.max.apply(Math,Th(e))&&Math.max.apply(Math,Th(t))>=Math.min.apply(Math,Th(e))}function Zb(t){return Fh(t.reduce((function(t,e){return t.push.apply(t,Th(jh(e.bounds))),t}),[]))}var Xb={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart:function(t){this.start(t)},rangeMove:function(t){this.move(t)},rangeEnd:function(t){this.end(t)},rangeClear:function(t){this.clear(t)},bubbleStart:function(t){this.bubbleStart(t)}},created:function(){this.state={key:this.settings.key||"brush-range"}},beforeRender:function(t){this.state.rect=t.size.computedInner},renderRanges:function(){this.state.started||(this.state.ranges=Yb(this.state,this.state.brushInstance),this.state.active=null,Ub(this.state))},render:function(t){var e=this,n=this.settings.settings;this.state.direction="vertical"===n.direction?0:1;var r=this.renderer.element().getBoundingClientRect(),i=this.state.rect[0===this.state.direction?"height":"width"],s=Vm(this.chart.scale(n.scale),i),o=function(t){var e={targetRect:null,targetFillRect:null,scale:null,size:null},n=t.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((function(e){return t.chart.component(e)})).filter((function(t){return!!t&&!!t.rect})),i=n.target&&n.target.selector?t.chart.findShapes(n.target.selector):[],s=n.target&&n.target.fillSelector?t.chart.findShapes(n.target.fillSelector):[];if(i.length>0){var o=Zb(i);if(e.size=o[0===t.state.direction?"height":"width"],e.scale=Vm(t.chart.scale(n.scale),e.size),e.targetRect=o,s.length>0){var a=Zb(s);e.targetFillRect=a}}else if(r&&r.length>0){var l=r.slice(1).reduce((function(t,e){return{x0:Math.min(t.x0,e.rect.computedInner.x),y0:Math.min(t.y0,e.rect.computedInner.y),x1:Math.max(t.x1,e.rect.computedInner.x+e.rect.computedInner.width),y1:Math.max(t.y1,e.rect.computedInner.y+e.rect.computedInner.height)}}),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});e.targetRect={x:l.x0-t.state.rect.x,y:l.y0-t.state.rect.y,width:l.x1-l.x0,height:l.y1-l.y0}}return e}(this);if(s=o.scale?o.scale:s,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?i:o.size,this.state.settings=n,this.state.style=this.style,this.state.offset=r,this.state.brush="object"===hh(n.brush)?n.brush.context:n.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!n.multiple,this.state.h=t,this.state.onEditConfirmed=function(t,n,r){e.state.edit=null,function(t,e,n,r){var i=t.ranges.map((function(t){return{min:t.min,max:t.max}})),s=t.scale.min(),o=t.scale.max();i[e]={min:Math.max(s,Math.min(n,r)),max:Math.min(o,Math.max(n,r))},t.ranges[e]=mh({},i[e]);var a=t.scale.data();a&&a.fields&&a.fields.forEach((function(e){t.fauxBrushInstance||t.brushInstance.setRange(e.id(),i)}))}(e.state,t,n,r),e.emit("bubbleEnd"),Ub(e.state)},this.state.onEditCanceled=function(){e.state.edit=null,Ub(e.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof n.bubbles.label&&function(t,r){return n.bubbles.label.call(void 0,{datum:t,data:r,scale:s,resources:{scale:e.chart.scale,formatter:e.chart.formatter}})},{}.hasOwnProperty.call(s,"norm")){this.state.editable=!0,this.state.observeBrush="object"===hh(n.brush)&&n.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=s;var a=this.state.scale.data();!this.state.format&&a&&a.fields&&a.fields[0]&&(this.state.format=a.fields[0].formatter())}else this.state.editable=!1,this.state.scale=zg(),this.state.scale.data=s.data,this.state.format||(this.state.format=function(t,e){return Kb(s.range(),e)?function(t,e){var n=e.ticks(),r=e.domain().indexOf(Qb(t,e));return-1!==r?n[r].label:"-"}(t,s):"-"}),this.state.fauxBrushInstance=Im(),this.state.findValues=function(t){return function(t,e){var n=e.domain(),r=e.range(),i=[];return t.forEach((function(t){if(Kb(r,[t.min,t.max])){var s=n.indexOf(Qb(t.min,e)),o=n.indexOf(Qb(t.max,e));i.push.apply(i,n.slice(Math.min(s,o),Math.max(s,o)+1))}})),i}(t,s)};return this.state.ranges=Yb(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[Hb(this.state)]:[]},mounted:function(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy:function(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start:function(t){!function(t){var e=t.state,n=t.e,r=t.renderer,i=t.ranges,s=t.targetSize;if(!e.started){e.edit=null;var o=n.center.x-n.deltaX,a=n.center.y-n.deltaY,l=document.elementFromPoint(o,a);r.element().contains(l)||(l=null);var c={started:!0};e.offset=ch({},r.element().getBoundingClientRect());var u=o-e.offset.left,h=a-e.offset.top;e.offset.left+=e.targetRect?e.targetRect.x:0,e.offset.top+=e.targetRect?e.targetRect.y:0,e.ranges=i(e,e.fauxBrushInstance||e.brushInstance);var d=n.center[e.cssCoord.coord]-n[e.cssCoord.pos]-e.offset[e.cssCoord.offset];c.current=e.scale.normInvert((n.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size),c.start=e.scale.normInvert(d/e.size);var f,p,y=e.ranges,g=Vb(e),m=-1;if(l&&l.hasAttribute("data-idx"))m=parseInt(l.getAttribute("data-idx"),10),g.min=m>0?y[m-1].max:g.min,g.max=m+1<y.length?y[m+1].min:g.max;else{for(f=0;f<y.length;f++){if(y[f].min<=c.start&&c.start<=y[f].max){m=f,g.min=f?y[f-1].max:g.min,g.max=f+1<y.length?y[f+1].min:g.max;break}if(c.start<y[f].min){g.max=y[f].min,g.min=f?y[f-1].max:g.min;break}}-1===m&&y.length&&f>=y.length&&(g.min=y[y.length-1].max)}if(-1!==m||e.multi||(c.ranges=[],g.min=e.scale.min(),g.max=e.scale.max()),-1!==m)if(p={idx:m,start:y[m].min,end:y[m].max,limitLow:g.min,limitHigh:g.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),p.mode="modify";else{var v=e.scale.norm(p.start)*e.size,x=e.scale.norm(p.end)*e.size;Math.abs(d-v)<=s?(c.start=p.end,p.mode="modify"):Math.abs(d-x)<=s&&(c.start=p.start,p.mode="modify")}else p={idx:-1,start:c.start,end:c.current,limitLow:g.min,limitHigh:g.max,mode:"current"};c.active=p,"modify"!==p.mode&&e.targetRect&&!Bv(e.targetRect,{x:u,y:h})||Object.keys(c).forEach((function(t){return e[t]=c[t]}))}}({e:t,state:this.state,renderer:this.renderer,ranges:Yb,targetSize:5})},end:function(){this.state.started&&(function(t,e){t.started=!1,t.ranges=e(t,t.fauxBrushInstance||t.brushInstance);var n=Vb(t);$b(t,t.current,n)}(this.state,Yb),Ub(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move:function(t){this.state.started&&(function(t,e){var n=t.scale.normInvert((e.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset])/t.size);t.current=Math.max(Math.min(n,t.active.limitHigh),t.active.limitLow)}(this.state,t),function(t){var e=t.ranges.map((function(t){return{min:t.min,max:t.max}}));if(-1!==t.active.idx)if("modify"===t.active.mode)e[t.active.idx].min=Math.min(t.start,t.current),e[t.active.idx].max=Math.max(t.start,t.current);else{var n=Bb(t);e[t.active.idx].min+=n,e[t.active.idx].max+=n}else e.push({min:Math.min(t.start,t.current),max:Math.max(t.start,t.current)});var r=t.scale.data();r&&r.fields&&r.fields.forEach((function(n){if(t.fauxBrushInstance){var r=Yb(t,t.fauxBrushInstance),i=t.findValues(r),s=t.findValues(e),o=s.filter((function(t){return-1===i.indexOf(t)})),a=i.filter((function(t){return-1===s.indexOf(t)})),l=o.map((function(t){return{key:n.id(),value:t}})),c=a.map((function(t){return{key:n.id(),value:t}}));t.brushInstance.addAndRemoveValues(l,c),t.fauxBrushInstance.setRange(n.id(),e)}else t.brushInstance.setRange(n.id(),e)}))}(this.state),Ub(this.state))},clear:function(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart:function(t){if(this.state.editable){var e=t.srcEvent||t,n=e.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(!isNaN(r.rangeIdx)&&JSON.stringify(r)!==JSON.stringify(this.state.edit)){this.state.edit=r,e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault();var i=n.parentNode;Ub(this.state);var s=i.querySelector("input");s.focus(),s.select()}}}};function Gb(t){t.renderer.render(Hb(t))}function Jb(t){return t.rc.ranges()}var t_={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart:function(t){this.start(t)},areaMove:function(t){this.move(t)},areaEnd:function(t){this.end(t)},areaClear:function(t){this.clear(t)}},created:function(){this.state={key:this.settings.key||"brush-area-dir"}},render:function(t){var e=this;this.state.rect=this.rect;var n=this.settings.settings,r="vertical"===n.direction?0:1,i=this.state.rect[0===r?"height":"width"],s=this.renderer.element().getBoundingClientRect(),o=(n.target?n.target.components||[n.target.component]:[]).map((function(t){return e.chart.component(t)})).filter((function(t){return!!t&&!!t.rect})),a=o[0]?o.slice(1).reduce((function(t,e){return{x0:Math.min(t.x0,e.rect.x),y0:Math.min(t.y0,e.rect.y),x1:Math.max(t.x1,e.rect.x+e.rect.width),y1:Math.max(t.y1,e.rect.y+e.rect.height)}}),{x0:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=r,this.state.settings=n,this.state.offset=s,this.state.rc=xm(),this.state.renderer=this.renderer,this.state.multi=!!n.multiple,this.state.h=t,this.state.size=i,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(t,e){return function(t,e,n){var r=Math.min.apply(Math,Th(n)),i=Math.max.apply(Math,Th(n)),s=t.chart.shapesAt({x:t.direction?r+t.rect.x:t.rect.x,y:t.direction?t.rect.y:r+t.rect.y,width:t.direction?i-r:t.rect.width+t.rect.x,height:t.direction?t.rect.height+t.rect.y:i-r},t.settings.brush);if(0===s.length)return"-";var o=s.reduce((function(n,i){var s=n.bounds,o=i.bounds;return e===r?s[t.cssCoord.coord]<=o[t.cssCoord.coord]?n:i:s[t.cssCoord.coord]+s[t.cssCoord.area]>=o[t.cssCoord.coord]+o[t.cssCoord.area]?n:i})),a=t.settings.brush.components.reduce((function(t,e){return t.key===o.key?t:e}));return"function"==typeof t.settings.bubbles.label?t.settings.bubbles.label(o.data):Array.isArray(a.data)&&a.data.length?o.data[a.data[0]].label:o.data&&o.data.label?o.data.label:"-"}(this,t,e)},[]},start:function(t){!function(t){var e=t.state,n=t.e,r=t.renderer,i=t.ranges,s=t.targetSize;if(!e.started){var o=n.center.x-n.deltaX,a=n.center.y-n.deltaY,l=document.elementFromPoint(o,a);r.element().contains(l)||(l=null);var c={started:!0};e.offset=r.element().getBoundingClientRect(),e.ranges=i(e);var u=o-e.offset.left,h=a-e.offset.top,d=n.center[e.cssCoord.coord]-n[e.cssCoord.pos]-e.offset[e.cssCoord.offset],f=n.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset],p=f,y=d;c.start=d,c.current=f;var g,m,v=e.ranges,x=Wb(e),b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),x.min=b>0?v[b-1].max:x.min,x.max=b+1<v.length?v[b+1].min:x.max;else{for(g=0;g<v.length;g++){if(v[g].min<=y&&y<=v[g].max){b=g,x.min=g?v[g-1].max:x.min,x.max=g+1<v.length?v[g+1].min:x.max;break}if(y<v[g].min){x.max=v[g].min,x.min=g?v[g-1].max:x.min;break}}-1===b&&v.length&&g>=v.length&&(x.min=v[v.length-1].max)}if(-1!==b||e.multi||(c.ranges=[],x.min=0,x.max=e.direction?e.rect.width:e.rect.height),-1!==b)if(m={idx:b,start:v[b].min,end:v[b].max,limitLow:x.min,limitHigh:x.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),m.mode="modify";else{var _=m.end;Math.abs(d-m.start)<=s?(c.start=m.end,m.mode="modify"):Math.abs(d-_)<=s&&(c.start=m.start,m.mode="modify")}else m={idx:-1,start:y,end:p,limitLow:x.min,limitHigh:x.max,mode:"current"};c.active=m,"modify"!==m.mode&&e.targetRect&&!Bv(e.targetRect,{x:u,y:h})||Object.keys(c).forEach((function(t){return e[t]=c[t]}))}}({e:t,state:this.state,renderer:this.renderer,ranges:Jb,targetSize:5})},end:function(){this.state.started&&(function(t,e){t.started=!1,t.ranges=e(t);var n=Wb(t);$b(t,t.current,n)}(this.state,Jb),Gb(this.state))},move:function(t){this.state.started&&(function(t,e){t.current=Math.max(Math.min(e.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset],t.active.limitHigh),t.active.limitLow)}(this.state,t),function(t){var e=t.ranges.map((function(t){return{min:t.min,max:t.max}}));if(-1!==t.active.idx)if("modify"===t.active.mode)e[t.active.idx].min=Math.min(t.start,t.current),e[t.active.idx].max=Math.max(t.start,t.current);else{var n=Bb(t);e[t.active.idx].min=t.active.start+n,e[t.active.idx].max=t.active.end+n}else e.push({min:Math.min(t.start,t.current),max:Math.max(t.start,t.current)});t.rc.set(e);var r=[];e.forEach((function(e){r.push.apply(r,Th(function(t,e){return t.chart.shapesAt({x:t.direction?e.min+t.rect.x:t.rect.x,y:t.direction?t.rect.y:e.min+t.rect.y,width:t.direction?e.max-e.min:t.rect.width+t.rect.x,height:t.direction?t.rect.height+t.rect.y:e.max-e.min},t.settings.brush)}(t,e)))})),function(t,e){t.chart.brushFromShapes(e,t.settings.brush)}(t,r)}(this.state),Gb(this.state))},clear:function(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function e_(t){var e="vertical"===t.direction,n=t.rect[e?"height":"width"],r=t.rect[e?"width":"height"];return function(t){var e=t.brush;if(!e||!e.isActive())return[];var n=t.scale.data(),r=(n&&n.fields||[]).map((function(t){return t.id()})),i=e.brushes().filter((function(t){return"range"===t.type&&-1!==r.indexOf(t.id)}))[0];return i?i.brush.ranges():[]}(t).map((function(i){var s=t.scale(i.min)*n,o=t.scale(i.max)*n,a=Math.min(s,o),l=Math.abs(s-o);return{type:"rect",fill:t.fill,opacity:t.opacity,x:e?0:a,width:e?r:l,y:e?a:0,height:e?l:r}}))}function n_(t){t.brush&&(t.brush.removeListener("start",t.start),t.brush.removeListener("update",t.update),t.brush.removeListener("end",t.end)),t.start=void 0,t.update=void 0,t.end=void 0,t.brush=void 0,t.scale=void 0,t.renderer=void 0}var r_={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:function(){return 50},created:function(){this.state={}},render:function(){var t=this.settings.settings,e=this.chart.brush(t.brush),n=t.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=Vm(this.chart.scale(t.scale),r);return n_(this.state),function(t,e,n,r){function i(){!function(t){t.renderer.render(e_(t))}(t)}function s(){!function(t){t.renderer.render(e_(t))}(t)}function o(){!function(t){t.renderer.render(e_(t))}(t)}t.brush=e,e&&(e.on("start",i),e.on("update",s),e.on("end",o),t.start=i,t.update=s,t.end=o,t.brush=e,t.scale=n,t.renderer=r)}(this.state,e,i,this.renderer),this.state.rect=this.rect,this.state.fill=t.fill||"#ccc",this.state.opacity=void 0!==t.opacity?t.opacity:1,this.state.direction=n,e_(this.state)},beforeDestroy:function(){n_(this.state)}};function i_(t,e){return{x:e.center.x-t.left,y:e.center.y-t.top}}function s_(t,e,n){return uv(t,e.points[0])<Math.pow(n.settings.snapIndicator.threshold,2)}function o_(t,e){null==t.path.d?t.path.d="M".concat(e.x," ").concat(e.y," "):t.path.d+="L".concat(e.x," ").concat(e.y," "),t.points.push(e)}function a_(t){var e=t.state,n=t.start,r=void 0===n?null:n,i=t.end,s=void 0===i?null:i;null!==r&&(e.snapIndicator.x1=r.x,e.snapIndicator.y1=r.y),null!==s&&(e.snapIndicator.x2=s.x,e.snapIndicator.y2=s.y)}function l_(t,e){t.snapIndicator.visible=e}var c_={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart:function(t){this.start(t)},lassoEnd:function(t){this.end(t)},lassoMove:function(t){this.move(t)},lassoCancel:function(){this.cancel()}},created:function(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start:function(t){var e,n,r;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(e=this.settings.settings.lasso).fill,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,strokeDasharray:e.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(t){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:t.strokeDasharray,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(t){return{visible:!0,type:"circle",cx:0,cy:0,r:t.r,fill:t.fill,opacity:t.opacity,stroke:t.stroke,strokeWidth:t.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=(n=this.state.rendererBounds,r=this.chart.element.getBoundingClientRect(),{x:n.left-r.left,y:n.top-r.top}),this.state.brushConfig=this.settings.settings.brush.components.map((function(t){return{key:t.key,contexts:t.contexts||["lassoBrush"],data:t.data||[""],action:t.action||"add"}}));var i=i_(this.state.rendererBounds,t);o_(this.state,i),a_({state:this.state,start:i}),function(t,e){t.startPoint.cx=e.x,t.startPoint.cy=e.y}(this.state,i)},move:function(t){if(this.state.active){var e=i_(this.state.rendererBounds,t);s_(e,this.state,this.settings)?l_(this.state,!0):l_(this.state,!1),o_(this.state,e),a_({state:this.state,end:e}),function(t,e){var n=[t.startPoint,t.path,t.snapIndicator].filter((function(t){return t.visible}));e.render(n)}(this.state,this.renderer),function(t,e){if(t.active){var n=t.points[t.points.length-2],r=t.points[t.points.length-1];t.lineBrushShape.x1=n.x+t.componentDelta.x,t.lineBrushShape.y1=n.y+t.componentDelta.y,t.lineBrushShape.x2=r.x+t.componentDelta.x,t.lineBrushShape.y2=r.y+t.componentDelta.y;var i=e.shapesAt(t.lineBrushShape,{components:t.brushConfig});e.brushFromShapes(i,{components:t.brushConfig})}}(this.state,this.chart)}},end:function(t){this.state.active&&(l_(this.state,!1),s_(i_(this.state.rendererBounds,t),this.state,this.settings)&&function(t,e){if(t.active){var n=t.componentDelta.x,r=t.componentDelta.y,i=t.points.map((function(t){return{x:t.x+n,y:t.y+r}})),s=e.shapesAt({vertices:i},{components:t.brushConfig});e.brushFromShapes(s,{components:t.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},cancel:function(){var t;this.state.active&&(t=this.chart,this.state.brushConfig.forEach((function(e){e.contexts.forEach((function(e){t.brush(e).end()}))})),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render:function(){}};function u_(t,e,n,r,i){for(var s,o=0,a=e.length-1;o<a;){var l=Math.floor((o+a)/2);(s=i(e[l]))[n]+s[r]<t[n]?o=l+1:a=l}return o}function h_(t){var e=t.orientation,n=t.targetNodes,r=t.labels,i=t.container,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u_,o=[],a="v"===e?"x":"y",l="v"===e?"width":"height",c=function(t){return t.textBounds},u=function(t){return t.node.localBounds};return function(t,e){var h=r[e],d=h.textBounds,f=h.node;if(d[a]<i[a]||d[a]+d[l]>i[a]+i[l])return!1;for(var p=s(d,o,a,l,c);p<o.length;p++)if(qv(d,o[p].textBounds))return!1;for(var y=s(d,n,a,l,u),g=d[a]+d[l],m=y;m<n.length;m++){var v=n[m].node;if(g<v.localBounds[a])break;if(qv(d,v.localBounds)&&f!==v)return!1}return o.push(r[e]),!0}}function d_(t,e){return{node:t,data:t.data,scale:e.scale,formatter:e.formatter,dataset:e.dataset}}function f_(t){var e=hh(t);return("string"===e||"number"===e)&&""!==t}function p_(t){return mh({type:"rect",rx:2,ry:2,fill:t.backgroundColor},t.backgroundBounds)}function y_(t,e,n){return n?t.width>=e.height:t.width>=e.width}function g_(t,e,n){return n?t.height>=e.width:t.height>=e.height}function m_(t,e,n,r,i){var s,o;return"v"===t?(s=r||i||y_(e,n,!0),o=g_(e,n,!r)):(s=y_(e,n),o=i||g_(e,n,!1)),s&&o}function v_(t,e,n,r){return t+.5*e+(r-.5)*(e-n)-.5*n}function x_(t,e,n){var r={type:"text",text:e,maxWidth:n.rotate?t.height:t.width,x:0,y:t.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(t,e,n){return y_(t,e,n.rotate)&&g_(t,e,n.rotate)}(t,i,n))return!1;var s=.5*i.height;return n.rotate?(r.x=v_(t.x,t.width,i.height,n.align)+s,r.y=v_(t.y,t.height,i.width,n.justify),r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=v_(t.x,t.width,i.width,n.align),r.y=v_(t.y,t.height,i.height,n.justify)+s),r}function b_(t){var e=t.bar,n=t.view,r=t.direction,i=t.position,s=t.padding,o=void 0===s?4:s,a={};if(ch(a,e),i&&"inside"!==i)if("up"===r||"down"===r){var l=Math.max(0,Math.min(e.y,n.height)),c=Math.max(0,Math.min(e.y+e.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(a.y=0,a.height=l):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(a.y=c,a.height=n.height-c)}else{var u=Math.max(0,Math.min(e.x,n.width)),h=Math.max(0,Math.min(e.x+e.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(a.x=0,a.width=u):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(a.x=h,a.width=n.width-h)}return function(t,e){var n=Math.max(0,Math.min(t.y,e.height)),r=Math.max(0,Math.min(t.y+t.height,e.height)),i=Math.max(0,Math.min(t.x,e.width)),s=Math.max(0,Math.min(t.x+t.width,e.width));t.x=i,t.width=s-i,t.y=n,t.height=r-n}(a,n),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.top,r=void 0===n?4:n,i=e.bottom,s=void 0===i?4:i,o=e.left,a=void 0===o?4:o,l=e.right,c=void 0===l?4:l;t.x+=a,t.width-=a+c,t.y+=r,t.height-=r+s}(a,o),a}function __(t){var e,n,r,i,s,o=t.direction,a=t.fitsHorizontally,l=t.measured,c=t.node,u=t.orientation,h=t.placementSettings,d=t.rect,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b_,p=[],y="h"===u?"width":"height";for(s=0;s<h.length;s++)if(i=f({bar:c.localBounds,view:d,direction:o,position:(r=h[s]).position,padding:r.padding}),p.push(i),e=!s||i[y]>e[y]?i:e,m_(u,i,l,a,r.overflow)){n=i;break}return n||(s=p.indexOf(n=e)),{bounds:n,placement:r=h[s]}}function w_(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=i.top,o=void 0===s?4:s,a=i.bottom,l=void 0===a?4:a,c=i.left,u=void 0===c?4:c,h=i.right,d=void 0===h?4:h,f=t.x+t.dx,p=t.y+t.dy,y=n?Math.min(e.width,r.height):Math.min(e.height,r.width),g=n?Math.min(e.height,r.height):Math.min(e.width,r.width),m=.5*e.height,v=1e-9,x=n?f-m:f,b=n?p:p-m,_={x:x-u-v,y:b-o-v,width:g+(u+d)-v,height:y+(o+l)-v};return _}function k_(t){for(var e,n,r,i,s,o,a,l,c,u,h,d,f,p=t.chart,y=t.targetNodes,g=t.rect,m=t.fitsHorizontally,v=t.collectiveOrientation,x=arguments.length>1&&void 0!==arguments[1]?arguments[1]:__,b=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x_,_=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h_,w=[],k={container:g,targetNodes:y,labels:[],orientation:v},S=0,M=y.length;S<M;S++){o=null,d=d_(r=(n=y[S]).node,p),f="left"===(c=n.direction)||"right"===c?"h":"v";for(var E=0;E<n.texts.length;E++)if(f_(i=n.texts[E])){var C=x({direction:c,fitsHorizontally:m,lblStngs:u=n.labelSettings[E],measured:l=n.measurements[E],node:r,orientation:f,placements:u.placements,placementSettings:n.placementSettings[E],rect:g});if(h=C.placement,(o=C.bounds)&&h){s=h.justify;var T="function"==typeof u.linkData?u.linkData(d,S):void 0,A="function"==typeof h.overflow?h.overflow(d,S):h.overflow;"up"===c&&(s=1-s),"opposite"===h.position&&(s=1-s),"left"===c&&(s=1-s);var N=!("h"===v||m);if(e=b(o,i,{justify:"h"===f?h.align:s,align:"h"===f?s:h.align,fontSize:u.fontSize,fontFamily:u.fontFamily,textMetrics:l,rotate:N,overflow:!!A})){var R=w_(e,l,N,o,h.padding);a="function"==typeof h.fill?h.fill(mh(mh({},d),{},{textBounds:R}),S):h.fill,e.fill=a,void 0!==T&&(e.data=T),"object"===hh(h.background)&&(e.backgroundColor="function"==typeof h.background.fill?h.background.fill(mh(mh({},d),{},{textBounds:R}),S):h.background.fill,void 0!==e.backgroundColor&&(e.backgroundBounds=w_(e,l,N,o,h.background.padding))),w.push(e),k.labels.push({node:r,textBounds:R})}}}}var O=w.filter(_(k)),I=O.filter((function(t){return void 0!==t.backgroundBounds})).map(p_);return[].concat(Th(I),Th(O))}function S_(t){for(var e,n,r,i,s,o,a,l=t.nodes,c=t.rect,u=t.chart,h=t.labelSettings,d=t.placementSettings,f=t.settings,p=t.renderer,y={},g=[],m=!0,v=!1,x=0;x<l.length;x++)if(qv(i=(n=l[x]).localBounds,c)){var b=d_(n,u);e={node:n,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(var _=0;_<h.length;_++)f_(r="function"==typeof(o=h[_]).label?o.label(b,x):void 0)&&(a="function"==typeof f.direction?f.direction(b,x):f.direction||"up",v=v||"left"===a||"right"===a,y.fontFamily=o.fontFamily,y.fontSize="".concat(o.fontSize,"px"),y.text=r,s=p.measureText(y),e.measurements.push(s),e.texts.push(r),e.labelSettings.push(o),e.placementSettings.push(d[_]),e.direction=a,m=m&&s.width<=i.width-8);g.push(e)}return{targetNodes:g,fitsHorizontally:m,hasHorizontalDirection:v}}function M_(t){var e=t.orientation,n=t.defaultOrientation,r=void 0===n?"h":n;switch((void 0===e?"auto":e).toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return r}}function E_(t){var e=2*Math.PI;return(t%e+e)%e}function C_(t,e){t.x+=e,t.width-=2*e,t.y+=e,t.height-=2*e}function T_(t){return{x:t.x,y:t.y-t.height/2,width:t.width,height:t.height}}function A_(t,e,n){var r=e.x,i=e.y;if(r*r+i*i>t*t)return null;var s=Math.sin(n),o=Math.cos(n),a=r*o-i*s,l=t*t-a*a;if(l<0)return null;var c=Math.sqrt(l);return{x:a*o+s*c,y:-a*s+o*c}}function N_(t){var e,n,r=t.radius,i=t.size,s=t.angle,o=i.width,a=i.height,l={x:o/2,y:a/2};switch(Math.floor(s/(Math.PI/2))){case 0:if(!(e=A_(r,l,s)))return null;e.y*=-1,n={x:-o,y:0};break;case 1:if(!(e=A_(r,l,Math.PI-s)))return null;n={x:-o,y:-a};break;case 2:if(!(e=A_(r,l,s-Math.PI)))return null;e.x*=-1,n={x:0,y:-a};break;case 3:if(!(e=A_(r,l,2*Math.PI-s)))return null;e.x*=-1,e.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:e.x+n.x,y:e.y+n.y,width:o,height:a}}function R_(t){var e=t.slice,n=t.measured,r=t.padding,i=e.start,s=e.end,o=e.innerRadius,a=e.outerRadius,l=a-o-2*r,c=s-i;if(c<Math.PI){var u=(n.height/2+r)/Math.tan(c/2);u>o&&(l=a-u-2*r)}if(l<0||l<n.minReqWidth)return null;var h=E_((i+s)/2),d=a-r,f={x:Math.sin(h)*d,y:-Math.cos(h)*d,width:l,height:n.height};return h<Math.PI?(f.angle=h-Math.PI/2,f.anchor="end"):(f.angle=h+Math.PI/2,f.anchor="start"),f}function O_(t){var e=t.context,n=t.bounds,r=t.node.desc.slice,i=E_((r.start+r.end)/2);switch(Math.floor(i/(Math.PI/2))){case 0:e.q1maxY=n.y-2,void 0===e.q2minY&&(e.q2minY=n.y+n.height+2);break;case 1:e.q2minY=n.y+n.height+2;break;case 2:e.q3minY=n.y+n.height+2;break;case 3:e.q4maxY=n.y-2,void 0===e.q3minY&&(e.q3minY=n.y+n.height+2)}}function I_(t,e){return{node:t,data:t.data,scale:e.scale,formatter:e.formatter,dataset:e.dataset}}function P_(t,e,n){var r={type:"text",text:e,maxWidth:t.width,x:t.x,y:t.y+("top"===t.baseline?t.height/2:0),fill:n.fill,anchor:t.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(t.angle)){var i=t.angle*(360/(2*Math.PI));r.transform="rotate(".concat(i,", ").concat(r.x,", ").concat(r.y,")")}return r}function D_(t){var e,n,r=t.slice,i=t.direction,s=t.position,o=t.padding,a=t.measured,l=t.view,c=t.context,u=t.store,h=r.start,d=r.end,f=r.innerRadius,p=r.offset;switch(s){case"into":e="rotate"===i?R_({slice:r,measured:a,padding:o}):function(t){var e=t.slice,n=t.padding,r=t.measured,i=e.start,s=e.end,o=e.innerRadius,a=e.outerRadius,l=E_((i+s)/2),c=N_({radius:a,size:{width:r.width+2*n,height:r.height+2*n},angle:l});return c?(c.baseline="top",Hv(c,{x1:0,y1:0,x2:Math.sin(i)*a,y2:-Math.cos(i)*a})||Hv(c,{x1:0,y1:0,x2:Math.sin(s)*a,y2:-Math.cos(s)*a})||Iv({cx:0,cy:0,r:o},c)?null:(C_(c,n),c)):null}({slice:r,measured:a,padding:o});break;case"inside":n={start:h,end:d,innerRadius:0,outerRadius:f},e="rotate"===i?R_({slice:n,measured:a,padding:o}):function(t){var e=t.slice,n=t.padding,r=t.measured,i=t.store,s=e.outerRadius,o=E_((e.start+e.end)/2),a=N_({radius:s,size:{width:r.width+2*n,height:r.height+2*n},angle:o});return a?(a.baseline="top",C_(a,n),i.insideLabelBounds.some((function(t){return qv(t,a)}))?null:(i.insideLabelBounds.push({x:a.x-4,y:a.y,width:a.width+8,height:a.height}),a)):null}({slice:n,measured:a,padding:o,store:u});break;case"outside":e="rotate"===i?function(t){var e=t.slice,n=t.measured,r=t.padding,i=t.view,s=e.start,o=e.end,a=e.outerRadius,l=e.offset,c=a+r,u=o-s;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;var h=E_((s+o)/2),d=Math.sin(h)*c,f=-Math.cos(h)*c,p=n.width,y=h%Math.PI;if(y>Math.PI/2&&(y=Math.PI-y),Math.cos(y)>.001){var g=Math.abs((f<0?i.y:i.y+i.height)-l.y)/Math.cos(y)-Math.tan(y)*(n.height/2)-2*r-a;g<p&&(p=g)}if(Math.sin(y)>.001){var m=Math.abs((d<0?i.x:i.x+i.width)-l.x)/Math.sin(y)-n.height/2/Math.tan(y)-2*r-a;m<p&&(p=m)}if(p<=0||p<n.minReqWidth)return null;var v={x:d,y:f,width:p,height:n.height};return h<Math.PI?(v.angle=h-Math.PI/2,v.anchor="start"):(v.angle=h+Math.PI/2,v.anchor="end"),v}({slice:r,measured:a,padding:o,view:l}):function(t){var e=t.slice,n=t.measured,r=t.padding,i=t.view,s=t.context,o=e.outerRadius,a=e.offset,l=E_((e.start+e.end)/2);if(function(t,e,n){switch(e){case 0:return t.q1maxY<0;case 1:return t.q2minY>n.height;case 2:return t.q3minY>n.height;case 3:return t.q4maxY<0;default:return!0}}(s,Math.floor(l/(Math.PI/2)),i))return null;var c=o+r+n.height/2,u=Math.sin(l)*c,h=-Math.cos(l)*c,d=n.width;if(l<Math.PI){var f=Math.abs(i.x+i.width-(u+a.x));f<d&&(d=f)}else{var p=Math.abs(i.x-(u+a.x));p<d&&(d=p)}if(d<n.minReqWidth)return null;var y={x:u,y:h,width:d,height:n.height};return y.anchor=l<Math.PI?"start":"end",y}({slice:r,measured:a,padding:o,view:l,context:c});break;default:throw new Error("not implemented")}return e&&(e.x+=p.x,e.y+=p.y,"outside"===s&&"rotate"!==i&&function(t,e,n){var r=n.offset,i=n.outerRadius,s=E_((n.start+n.end)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==e.q1maxY){var o=Math.min(t.y,e.q1maxY-t.height),a=t.y-o;if(t.y=o,a>1){var l=i+2;t.line={type:"line",x1:t.x-2,y1:t.y+2,x2:r.x+Math.sin(s)*l,y2:r.y-Math.cos(s)*l,strokeWidth:1}}}break;case 1:if(void 0!==e.q2minY){var c=Math.max(t.y,e.q2minY),u=c-t.y;if(t.y=c,u>1){var h=i+2;t.line={type:"line",x1:t.x-2,y1:t.y-2,x2:r.x+Math.sin(s)*h,y2:r.y-Math.cos(s)*h,strokeWidth:1}}}break;case 2:if(void 0!==e.q3minY){var d=Math.max(t.y,e.q3minY),f=d-t.y;if(t.y=d,f>1){var p=i+2;t.line={type:"line",x1:t.x+2,y1:t.y-2,x2:r.x+Math.sin(s)*p,y2:r.y-Math.cos(s)*p,strokeWidth:1}}}break;case 3:if(void 0!==e.q4maxY){var y=Math.min(t.y,e.q4maxY-t.height),g=t.y-y;if(t.y=y,g>1){var m=i+2;t.line={type:"line",x1:t.x+2,y1:t.y+2,x2:r.x+Math.sin(s)*m,y2:r.y-Math.cos(s)*m,strokeWidth:1}}}}}(e,c,r)),e}function j_(t){for(var e=t.context,n=t.direction,r=t.measured,i=t.node,s=t.placementSettings,o=t.rect,a=t.store,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D_,c=0;c<s.length;c++){var u=s[c],h=l({context:e,slice:i.desc.slice,view:o,direction:n,position:u.position,measured:r,padding:u.padding,store:a});if(h)return{bounds:h,placement:u}}return{bounds:null,placement:null}}function F_(t){for(var e=[],n=[],r=[],i=[],s=0;s<t.length;++s){var o=t[s].desc.slice,a=E_((o.start+o.end)/2);switch(Math.floor(a/(Math.PI/2))){case 0:e.push(t[s]);break;case 1:n.push(t[s]);break;case 2:r.push(t[s]);break;case 3:i.push(t[s])}}var l=function(t,e){return E_((t.desc.slice.start+t.desc.slice.end)/2)-E_((e.desc.slice.start+e.desc.slice.end)/2)},c=function(t,e){return l(e,t)};return e.sort(c),n.sort(l),r.sort(c),i.sort(l),e.concat(n,i,r)}function z_(t,e,n){var r=e.fontFamily,i="".concat(e.fontSize,"px"),s=n.measureText({text:t,fontFamily:r,fontSize:i});return s.minReqWidth=Math.min(s.width,n.measureText({text:"".concat(t[0],"\u2026"),fontFamily:r,fontSize:i}).width),s}var q_=/\n+|\r+|\r\n/,L_=/\s/,B_=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function H_(t){return"string"==typeof t?-1!==t.search(q_):-1!==String(t).search(q_)}function V_(t){return-1!==t.search(L_)}function W_(t){return-1!==t.search(B_)}function $_(t,e,n,r,i){return r.some((function(r){return r(t,e,n)}))?1:i.some((function(r){return r(t,e,n)}))?0:2}function U_(t){""===t[0]&&t.shift(),""===t[t.length-1]&&t.pop()}function Y_(t,e,n){return Math.max(e,Math.min(n,t))}function Q_(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.string,n=t.separator,r=void 0===n?"":n,i=t.reverse,s=void 0!==i&&i,o=t.measureText,a=void 0===o?function(t){return{width:t.length,height:1}}:o,l=t.mandatoryBreakIdentifiers,c=void 0===l?[H_]:l,u=t.noBreakAllowedIdentifiers,h=void 0===u?[]:u,d=t.suppressIdentifier,f=void 0===d?[V_,H_,function(t){return""===t}]:d,p=t.hyphenationIdentifiers,y=void 0===p?[W_]:p,g=String(e).split(r);U_(g);var m=g.length,v=s?function(t){return t>=0}:function(t){return t<m},x=s?m:-1;function b(t){var e=Y_(t,0,m-1),n=g[e],r=a(n),i=$_(n,e,g,c,h);return{index:e,value:n,breakOpportunity:i,suppress:f.some((function(t){return t(n,e,g)})),hyphenation:y.some((function(t){return t(n,e,g)})),width:r.width,height:r.height,done:!1}}function _(t){return isNaN(t)?s?x--:x++:x=Y_(t,0,m-1),v(x)?b(x):{done:!0}}return{next:_,peek:b,length:m}}var K_="\u2026",Z_=/^\s*\d+(\.\d+)?px\s*$/i;function X_(t){return"string"===hh(t)&&Z_.test(t)}function G_(t){var e=t["font-size"]||t.fontSize;return X_(e)?parseFloat(e)*Math.max(isNaN(t.lineHeight)?1.2:t.lineHeight,0):19.2}function J_(t){var e=t.maxHeight,n=Math.max(t.maxLines,1)||1/0;if(isNaN(e))return n;var r=G_(t);return Math.max(1,Math.min(Math.floor(e/r),n))}function tw(t,e){return{lines:[],line:"",width:0,maxLines:J_(t),maxWidth:t.maxWidth,hyphens:{enabled:"auto"===t.hyphens,char:"\u2010",metrics:e("\u2010")}}}function ew(t){t.lines.push(t.line),t.line="",t.width=0}function nw(t,e){t.line+=e.value,t.width+=e.width}function rw(t,e,n){if(e.width>t.maxWidth)return e;for(var r=e.index,i=1;i<5;i++){var s=n.peek(e.index-1);if(!e.hyphenation||!s.hyphenation||0===e.index)return e;if(t.width+t.hyphens.metrics.width<=t.maxWidth)return t.line+=t.hyphens.char,e;if(1===t.line.length)return e;e=n.next(r-i),t.line=t.line.slice(0,-1),t.width-=e.width}return e}function iw(t,e,n){for(var r=Q_({string:e.value,measureText:n});t.lines.length<t.maxLines;){var i=r.next();if(i.done)break;t.width+i.width>t.maxWidth&&2===i.breakOpportunity&&t.line.length>0?(i=t.hyphens.enabled?rw(t,i,r):i,ew(t),nw(t,i)):nw(t,i)}}function sw(t,e){for(var n=Q_({string:t.text,separator:"",measureText:e,noBreakAllowedIdentifiers:[function(t,e){return 0===e}]}),r=tw(t,e),i=!0;r.lines.length<r.maxLines;){var s=n.next();if(s.done){ew(r),i=!1;break}1===s.breakOpportunity?ew(r):r.width+s.width>r.maxWidth&&2===s.breakOpportunity?s.suppress?r.width+=s.width:(s=r.hyphens.enabled?rw(r,s,n):s,ew(r),nw(r,s)):nw(r,s)}return{lines:r.lines,reduced:i}}function ow(t,e){for(var n=Q_({string:t.text,separator:/(\s|-|\u2010)/,measureText:e}),r=tw(t,e),i=!0;r.lines.length<r.maxLines;){var s=n.next();if(s.done){ew(r),i=!1;break}1===s.breakOpportunity?ew(r):r.width+s.width>r.maxWidth&&2===s.breakOpportunity?s.suppress?ew(r):s.width>r.maxWidth?iw(r,s,e):(ew(r),nw(r,s)):nw(r,s)}return{lines:r.lines,reduced:i}}function aw(t){return{"break-all":sw,"break-word":ow}[t.wordBreak]}function lw(t){return function(e){var n=e.node;if(function(t){return"text"===t.type&&!t._lineBreak}(n)){var r=aw(n);if(!r)return;var i=t(n);if(i.width>n.maxWidth||H_(n.text)){var s=(G_(n)-i.height)/2,o=r(n,function(t,e){return function(n){return e({text:n,fontSize:t.fontSize,fontFamily:t.fontFamily})}}(n,t));e.node=function(t,e,n,r){var i={type:"container",children:[]};void 0!==e.id&&(i.id=e.id);var s=0;return t.lines.forEach((function(o,a){var l=ch({},e);l.text=o,l._lineBreak=!0,s+=n,t.reduced&&a===t.lines.length-1?l.text+=K_:delete l.maxWidth,l.dy=isNaN(l.dy)?s:l.dy+s,s+=r,s+=n,i.children.push(l)})),i}(o,n,s,i.height)}}}}function cw(t,e){var n=t.text,r=t["font-size"],i=t["font-family"],s=t.maxWidth;if(n="string"==typeof n?n:"".concat(n),void 0===s)return n;var o=e({text:n,fontSize:r,fontFamily:i}).width;if(o<=s)return n;for(var a=0,l=n.length-1;a<=l;){var c=Math.floor((a+l)/2);(o=e({text:n.substr(0,c)+K_,fontSize:r,fontFamily:i}).width)<=s?a=c+1:l=c-1}return n.substr(0,l)+K_}function uw(t){var e=t.baseline||t["dominant-baseline"],n=0,r=parseInt(t.fontSize||t["font-size"],10)||0;switch(e){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}var hw,dw={},fw={},pw={fontSize:void 0,fontFamily:void 0};function yw(t,e,n){var r=t+e+n;return"number"!=typeof fw[r]&&(hw=hw||document.createElement("canvas").getContext("2d"),function(t,e){pw.fontSize===t&&pw.fontFamily===e||(hw.font=t+" "+e,pw.fontSize=t,pw.fontFamily=e)}(e,n),fw[r]=hw.measureText(t).width),fw[r]}function gw(t){return"number"!=typeof dw[t]&&(dw[t]=function(t){if(X_(t)){var e=parseFloat(t);return e+4*Math.ceil((e+1e-12)/24)}return 16}(t)),dw[t]}function mw(t){var e=t.fontSize;return{width:yw(t.text,e,t.fontFamily),height:gw(e)}}function vw(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mw,n=t["font-size"]||t.fontSize,r=t["font-family"]||t.fontFamily,i=e({text:t.text,fontFamily:r,fontSize:n}),s=Math.min(t.maxWidth||i.width,i.width),o=t.x||0,a=t.y||0,l=t.dx||0,c=(t.dy||0)+uw(t),u={x:0,y:a+c-.75*i.height,width:s,height:i.height},h=t["text-anchor"]||t.anchor;return u.x="middle"===h?o+l-s/2:"end"===h?o+l-s:o+l,u}function xw(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mw,n=aw(t),r=t["font-size"]||t.fontSize,i=t["font-family"]||t.fontFamily,s=e({text:t.text,fontFamily:i,fontSize:r});if(n&&(s.width>t.maxWidth||H_(t.text))){for(var o=n(t,(function(t){return e({text:t,fontFamily:i,fontSize:r})})),a=ch({},t),l=0,c="",u=0,h=o.lines.length;u<h;u++){var d=o.lines[u],f=e({text:d+=u===h-1&&o.reduced?K_:"",fontSize:r,fontFamily:i}).width;f>=l&&(l=f,c=d)}a.text=c;var p=vw(a,e);return p.height=G_(t)*o.lines.length,p}return vw(t,e)}var bw=.9;function _w(t,e){return{node:t,data:t.data,scale:e.scale,formatter:e.formatter,dataset:e.dataset}}function ww(t,e,n){var r={type:"text",text:e,maxWidth:t.width,x:0,y:t.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(t.width<n.fontSize)return!1;var s=Math.max(0,t.width-i.width);return r.x=t.x+n.align*s,r.y=t.y+i.height/1.2,r}function kw(t){return{type:"circle",bounds:{cx:t.cx,cy:t.cy,r:t.r}}}function Sw(t){return t.desc&&t.desc.slice?function(t){var e=t.innerRadius,n=t.outerRadius,r=t.offset;return Math.abs(t.start+2*Math.PI-t.end)>1e-12?{type:null,bounds:null}:kw({cx:r.x,cy:r.y,r:0!==e?e:n})}(t.desc.slice):"circle"===t.type?kw(t.attrs):"rect"===t.type?{type:"rect",bounds:t.bounds}:{type:null,bounds:null}}var Mw={bar:function(t){var e=t.settings,n=t.chart,r=t.nodes,i=t.rect,s=t.renderer,o=t.style,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k_,l=ch({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},o.label);l.fontSize=parseInt(l.fontSize,10);var c=e.labels.map((function(t){return ch({},l,e,t)})),u=e.labels.map((function(t){return t.placements.map((function(n){return ch({},l,e,t,n)}))})),h=S_({nodes:r,chart:n,renderer:s,settings:e,rect:i,labelSettings:c,placementSettings:u}),d=h.fitsHorizontally,f=h.hasHorizontalDirection,p=h.targetNodes,y=M_({orientation:e.orientation,defaultOrientation:f?"h":"v"}),g="h"===y?"y":"x",m="h"===y?"height":"width";return p.sort((function(t,e){return t.node.localBounds[g]+t.node.localBounds[m]-(e.node.localBounds[g]+e.node.localBounds[m])})),a({chart:n,targetNodes:p,stngs:e,rect:i,fitsHorizontally:d,collectiveOrientation:y})},slice:function(t){var e=t.settings,n=t.chart,r=t.nodes,i=t.rect,s=t.renderer,o=t.style,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j_,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:P_,c=ch({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},o.label);c.fontSize=parseInt(c.fontSize,10);for(var u=e.labels.map((function(t){return ch({},c,e,t)})),h=e.labels.map((function(t){return t.placements.map((function(n){return ch({},c,e,t,n)}))})),d=[],f={insideLabelBounds:[]},p={},y=0,g=(r=F_(r)).length;y<g;y++)for(var m=r[y],v=I_(m,n),x=0;x<u.length;x++){var b=u[x],_="function"==typeof b.label?b.label(v,y):"";if(_){var w="function"==typeof b.direction?b.direction(v,y):b.direction||"horizontal",k="function"==typeof b.linkData?b.linkData(v,y):void 0,S=z_(_,b,s),M=a({context:p,direction:w,lblStngs:b,measured:S,node:m,placementSettings:h[x],rect:i,store:f}),E=M.bounds,C=M.placement;if(E&&C){if("outside"===C.position&&"rotate"!==w){O_({context:p,node:m,bounds:E});var T=T_(E);if(!Mv(T,i))continue}var A="function"==typeof C.fill?C.fill(v,y):C.fill,N=l(E,_,{fill:A,fontSize:b.fontSize,fontFamily:b.fontFamily,textMetrics:S});N&&(void 0!==k&&(N.data=k),d.push(N),E.line&&(E.line.stroke=A,d.push(E.line)))}}}return d},rows:function(t){var e=t.settings,n=t.chart,r=t.nodes,i=t.renderer,s=t.style,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ww,a=ch({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},s.label);a.fontSize=parseInt(a.fontSize,10);for(var l=ch({},a,e),c=e.labels.map((function(t){return ch({},l,t)})),u={},h=[],d=0,f=r.length;d<f;d++){var p=r[d],y=_w(p,n),g=Sw(p),m=g.type,v=g.bounds;if(v){var x=0,b=[],_=[],w="circle"===m?2*v.r*bw:v.height;x+=l.padding;var k=void 0;for(k=0;k<c.length;k++){var S=c[k],M="function"==typeof S.label?S.label(y,d):"";u.fontFamily=S.fontFamily,u.fontSize="".concat(S.fontSize,"px"),u.text=M;var E=i.measureText(u);if((x+=E.height+S.padding)>w)break;_.push(M),b.push(E)}var C=k,T=Math.max(0,w-x),A=void 0;for(A="circle"===m?v.cy-v.r*bw:v.y,A+=l.justify*T+l.padding,k=0;k<C;k++){var N=c[k],R=void 0;if("circle"===m){var O=Math.max(Math.abs(A-v.cy),Math.abs(A+b[k].height-v.cy)),I=Math.sqrt(v.r*v.r-O*O);R={x:v.cx-I+l.padding,y:A,width:2*I-2*l.padding,height:b[k].height}}else R={x:v.x+l.padding,y:A,width:v.width-2*l.padding,height:b[k].height};A+=b[k].height+l.padding;var P="function"==typeof N.fill?N.fill(y,d):N.fill,D="function"==typeof N.linkData?N.linkData(y,d):void 0,j=o(R,_[k],{fill:P,align:N.align,fontSize:N.fontSize,fontFamily:N.fontFamily,textMetrics:b[k]});if(j){if(j.text&&j.text!==K_){var F=cw(j,i.measureText);if(K_===F)continue;j.ellipsed=F}void 0!==D&&(j.data=D),h.push(j)}}}}return h}},Ew={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render:function(){var t=this,e=[];return(this.settings.settings.sources||[]).forEach((function(n){n.strategy&&Mw[n.strategy.type]&&n.component&&e.push.apply(e,Th(function(t,e){var n=t.chart,r=t.source,i=t.rect,s=t.renderer,o=t.style;if(!n.component(r.component))return[];var a=n.findShapes(r.selector).filter((function(t){return t.key===r.component}));return e({chart:n,settings:r.strategy.settings,nodes:a,rect:{x:0,y:0,width:i.width,height:i.height},renderer:s,style:o})}({chart:t.chart,rect:t.rect,renderer:t.renderer,source:n,style:t.style},Mw[n.strategy.type])))})),e}},Cw={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,justify:.5,align:.5,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25},navigation:{button:{class:void 0,content:void 0,tabIndex:void 0},disabled:!1}};function Tw(t){var e,n,r,i,s,o=t.x,a=void 0===o?0:o,l=t.y,c=t.item,u=t.globalMetrics,h=t.createSymbol,d=t.direction,f=c.label.displayObject,p=c.label.bounds,y=c.symbol.meta,g="rtl"===(void 0===d?"ltr":d),m={x:g?a+u.maxLabelBounds.width:a+u.maxSymbolSize+u.spacing,y:l,width:u.maxLabelBounds.width,height:Math.max(u.maxSymbolSize,u.maxLabelBounds.height)},v=(e={x:g?a+u.maxLabelBounds.width+u.spacing:a,y:l,width:u.maxSymbolSize,height:m.height},n=y.size,r={align:void 0===y.align?.5:y.align,justify:void 0===y.justify?.5:y.justify},i=Math.max(0,e.width-n),s=Math.max(0,e.height-n),{x:e.x+n/2+r.align*i,y:e.y+n/2+r.justify*s}),x=h(ch({},y,v));return delete x.collider,f.anchor=g?"end":"start",function(t,e,n){var r=n.textMetrics;if(t.height<r.height)return!1;var i=Math.max(0,t.width-r.width);e.baseline="text-before-edge";var s=Math.max(0,t.height-r.height);e.x=t.x+n.align*i,e.y=t.y+n.justify*s+.175*parseInt(e.fontSize,10)}(m,f,{textMetrics:p,fontSize:parseInt(f.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:c.label.displayObject.data,children:[x,f],collider:{type:"rect",x:a,y:l,width:u.maxItemBounds.width,height:u.maxItemBounds.height}},metrics:m}}function Aw(t,e){var n=Math.ceil(t.items.length/e),r="horizontal"===t.layout.orientation?"width":"height";return t.globalMetrics.maxItemBounds[r]*n+(n-1)*t.layout.margin["width"===r?"horizontal":"vertical"]}function Nw(t){return Object.keys(t).filter((function(e){return t[e]})).join(" ")}var Rw={up:"\u25b2",right:"\u25b6",down:"\u25bc",left:"\u25c0"};function Ow(t,e){var n=e.size,r=e.isActive,i=e.direction,s=e.nav,o={},a="",l=e.attrs;s&&s.button&&("function"==typeof s.button.class?o=s.button.class({direction:i}):s.button.class&&(o=s.button.class),"function"==typeof s.button.content&&(a=s.button.content(t,{direction:i})),void 0!==s.button.tabIndex&&(l.tabindex=s.button.tabIndex));var c={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(o).length||(c.border="0",c.background="none"),(!r||s&&s.disabled)&&(l.disabled="disabled"),t("button",ch({class:Nw(o),style:c},l),[a||t("span",{style:{pointerEvents:"none"}},[Rw[i]])])}function Iw(t,e,n,r){var i,s,o,a=r.itemRenderer,l=r.navigationRenderer,c=r.titleRenderer,u=r.isPreliminary,h=void 0!==u&&u,d=0,f={x:e.spacing,y:e.spacing,width:t.width-2*e.spacing,height:t.height-2*e.spacing};if(i={x:f.x,y:f.y,width:f.width,height:c.spread()},"horizontal"===n){i={x:f.x,y:f.y,width:c.extent(),height:c.spread()};var p=f.width-i.width-(i.width?e.spacing:0),y=f.height;a.parallelize(p,h?void 0:y);var g=a.extent()>p?l.extent():0,m=a.spread(),v=g?l.spread():0;o={x:(s={x:i.x+i.width+(i.width?e.spacing:0),y:f.y+Math.max(0,(v-m)/2),width:f.width-g-i.width-(g?e.spacing:0)-(i.width?e.spacing:0),height:y}).x+s.width+(g?e.spacing:0),y:f.y,width:g,height:f.height},i.y=s.y,"rtl"===a.direction()&&(o.x=f.x,s.x=o.x+o.width+(o.width?e.spacing:0),i.x=s.x+s.width+(i.width?e.spacing:0)),d=Math.max(i.height,v,a.spread())}else{var x=f.height-i.height-(i.height?e.spacing:0);a.parallelize(x,h?void 0:f.width);var b=a.extent()>x?l.extent():0;s={x:f.x,y:i.y+i.height+(i.height?e.spacing:0),width:f.width,height:f.height-i.height-(i.height?e.spacing:0)-(o={x:f.x,y:f.y+f.height-b,width:f.width,height:b}).height-(o.height?e.spacing:0)},d=Math.max(c.extent(),b?l.spread():0,a.spread())}return s=ch({},t,{x:t.x+s.x,y:t.y+s.y,width:s.width,height:s.height}),o.x+=t.x,o.y+=t.y,i.x+=t.x,i.y+=t.y,{title:ch({},t,i),content:ch({},t,s),navigation:ch({},t,o),orientation:n,preferredSize:d}}function Pw(t){t.state.resolved=function(t){var e=t.scale.domain(),n={items:[]},r=t.settings.layout.dock;if("threshold-color"===t.scale.type){var i=t.scale.data().fields[0],s=function(t){return String(t)};t.settings.formatter?s=t.chart.formatter(t.settings.formatter):i&&(s=i.formatter());for(var o=0;o<e.length-1;o++){var a={value:e[o],label:"".concat(s(e[o])," - < ").concat(s(e[o+1]))};i&&(a.source={field:i.id()}),n.items.push(a)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{var l=t.scale.labels?t.scale.labels():null;n.items=e.map((function(e,n){var r=t.scale.datum?ch({},t.scale.datum(e)):{value:e};return r.value=e,t.scale.label?r.label=t.scale.label(e):l&&(r.label=l[n]),r}))}var c=t.resolver.resolve({data:{fields:t.scale.data().fields},defaults:ch(!0,{},Cw.title,t.style.title),settings:t.settings.settings.title}),u=t.resolver.resolve({data:{fields:t.scale.data().fields},defaults:Cw.layout,settings:t.settings.settings.layout}),h=t.resolver.resolve({data:n,defaults:ch(!0,{},Cw.item.label,t.style.item.label),settings:(t.settings.settings.item||{}).label}),d=ch(!0,{},(t.settings.settings.item||{}).shape);void 0===d.fill&&t.settings.scale&&(d.fill={scale:t.settings.scale});var f=t.resolver.resolve({data:n,defaults:ch(!0,{},Cw.item.shape,t.style.item.shape),settings:d}),p=t.resolver.resolve({data:n,defaults:ch(!0,{},{show:Cw.item.show}),settings:{show:(t.settings.settings.item||{}).show}});function y(t,n){t.data.value=[t.data.value,e[n+1]]}return"threshold-color"===t.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(p.items.reverse().forEach(y),p.items.reverse()):p.items.forEach(y)),{title:c,labels:h,symbols:f,items:p,layout:u}}(t),t.titleRenderer.itemize({resolved:t.state.resolved,dock:t.settings.layout.dock||"center"}),t.itemRenderer.itemize({resolved:t.state.resolved,dock:t.settings.layout.dock||"center"}),t.navigationRenderer.itemize({resolved:t.state.resolved,dock:t.settings.layout.dock||"center",navigation:t.settings.settings.navigation}),t.state.display={spacing:8}}function Dw(t){var e=t.itemRenderer,n=t.navigationRenderer,r=t.titleRenderer,i=t.settings.layout.dock,s=Iw(t.rect,t.state.display,"top"===i||"bottom"===i?"horizontal":"vertical",{itemRenderer:e,navigationRenderer:n,titleRenderer:r});t.renderer.size(s.content);var o=e.getItemsToRender({viewRect:ch({},s.content,{x:0,y:0})});return n.render({rect:s.navigation,itemRenderer:e}),r.render({rect:s.title}),t.state.views={layout:s},o}var jw={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted:function(t){t&&t.parentNode&&(this.navigationRenderer.renderer.appendTo(t.parentNode),this.titleRenderer.renderer.appendTo(t.parentNode),t.parentNode.insertBefore(this.navigationRenderer.renderer.element(),t),t.parentNode.insertBefore(this.titleRenderer.renderer.element(),t)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount:function(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart:function(){this.state.interaction.started||this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove:function(t){if(this.state.interaction.started){var e="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*t.deltaX:t.deltaY;this.itemRenderer.scroll(e-this.state.interaction.delta),this.state.interaction.delta=e}},panend:function(){this.state.interaction.started=!1},scroll:function(t){this.itemRenderer.scroll(-t)},next:function(){this.itemRenderer.next()},prev:function(){this.itemRenderer.prev()}},created:function(){var t,e,n,r,i,s,o,a,l,c,u=this;this.state={interaction:{}},this.onScroll=function(){var t=Dw(u);u.update(t)},this.itemRenderer=(t=this,o=void 0===(s=this.onScroll)?function(){}:s,a=null,l=0,c={itemize:function(n){e=function(t,e){for(var n,r,i=t.resolved,s=t.dock,o=[],a=i.items.items,l=i.symbols.items,c=i.labels.items,u=0,h=0,d=0,f=0;f<a.length;f++)if(!1!==a[f].show){var p=void 0!==c[f].text?c[f].text:c[f].data.label||"";n=ch({},c[f],{type:"text",fontSize:"".concat(parseInt(c[f].fontSize,10),"px"),text:p,title:p}),r={symbol:{meta:l[f]},label:{displayObject:n,bounds:e.textBounds(n)}},o.push(r),u=Math.max(l[f].size,u),h=Math.max(r.label.bounds.width,h),d=Math.max(r.label.bounds.height,d)}return{items:o,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,d),width:u+8+h},maxLabelBounds:{width:h,height:d}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===s||"bottom"===s?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(n,t.renderer),a=isNaN(e.layout.scrollOffset)?a:e.layout.scrollOffset},getItemsToRender:function(s){l=c.getContentOverflow(r=s.viewRect);var o=c.extent();a=Math.max(0,Math.min(a,l)),i=ch({},r);var u="horizontal"===c.orientation()?"x":"y";return i[u]-=a,i["x"===u?"width":"height"]=o,function(t,e,n){for(var r=t.viewRect,i=n.itemized,s=n.create,o=void 0===s?Tw:s,a=n.parallels,l=n.createSymbol,c=i.layout.direction,u=i.globalMetrics,h=i.items,d="horizontal"===i.layout.orientation,f=0,p=[],y=u.maxItemBounds.height,g=u.maxItemBounds.width,m=i.layout.margin.vertical+y,v=i.layout.margin.horizontal+g,x=e.x,b=e.y,_=r.x-e.x,w=0;w<h.length;w++){var k=o({y:b,x:"rtl"===c?r.x+_+r.width-g-(x-e.x):x,item:h[w],globalMetrics:u,direction:c,createSymbol:l});if((d&&x>=r.x-g||!d&&b>=r.y-y)&&p.push(k.item),++f>=a?(f=0,d?(x+=v,b=e.y):(b+=m,x=e.x)):d?b+=m:x+=v,!d&&b>r.y+r.height)break;if(d&&x>r.x+r.width)break}return p}(s,i,{itemized:e,parallels:n,createSymbol:t.symbol})},parallelize:function(t,r){return n=function(t,e,n){var r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",s=Math.ceil((n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin["width"===i?"horizontal":"vertical"])/t);if(null!=e){var o="horizontal"===n.layout.orientation?"height":"width",a=n.layout.margin["width"===o?"horizontal":"vertical"]||4,l=Math.floor((e+a)/(a+n.globalMetrics.maxItemBounds[o]));s=Math.min(s,l)}var c=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,c))}(t,r,e)},hasContentOverflow:function(){var t="horizontal"===e.layout.orientation?"width":"height";return Aw(e,n)>r[t]},getContentOverflow:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,i="horizontal"===e.layout.orientation?"width":"height";return Math.max(0,Aw(e,n)-t[i])},getNextSize:function(){var t="horizontal"===e.layout.orientation?"width":"height";return e.globalMetrics.maxItemBounds[t]+e.layout.margin["width"===t?"horizontal":"vertical"]},getPrevSize:function(){var t="horizontal"===e.layout.orientation?"width":"height";return e.globalMetrics.maxItemBounds[t]+e.layout.margin["width"===t?"horizontal":"vertical"]},hasNext:function(){return"horizontal"===c.orientation()?r.x+r.width<i.x+i.width:r.y+r.height<i.y+i.height},hasPrev:function(){return"horizontal"===c.orientation()?i.x<r.x:i.y<r.y},next:function(){c.scroll(-c.getNextSize())},prev:function(){c.scroll(c.getPrevSize())},scroll:function(t){var e=Math.max(0,Math.min(l,a-t));e!==a&&(a=e,o())},offset:function(){return a},orientation:function(){return e.layout.orientation},direction:function(){return e.layout.direction},extent:function(){return Aw(e,n)},spread:function(){return function(t,e){var n="horizontal"===t.layout.orientation?"height":"width";return t.globalMetrics.maxItemBounds[n]*e+(e-1)*t.layout.margin["width"===n?"horizontal":"vertical"]}(e,n)}}),this.navigationRenderer=function(t){var e,n={itemize:function(t){var n,r;e={layout:{orientation:"top"===(r=(n=t).dock)||"bottom"===r?"vertical":"horizontal"},navigation:n.navigation}},render:function(r){return function(t,e,n,r){var i=e.itemRenderer;if(t&&t.renderArgs){t.size(e.rect);var s=t.renderArgs[0],o="vertical"===n.layout.orientation,a="rtl"===i.direction(),l=i.hasNext(),c=i.hasPrev();if(c||l){var u=o?["right","left"]:["down","up"];a&&o&&u.reverse();var h=[s("div",{style:{position:"relative",display:"flex","flex-direction":o?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:a&&!o?"rtl":"ltr"},[Ow(s,{size:32,isActive:l,direction:u[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),Ow(s,{size:32,isActive:c,direction:u[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];t.render(h)}else t.render([])}}(n.renderer,r,e,t)},extent:function(){return 32},spread:function(){return 64}};return n}(this),this.titleRenderer=function(t){var e,n={itemize:function(n){e=function(t,e){var n=t.resolved;if(!1===n.title.item.show)return null;var r=ch({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){var i=e.scale.data().fields;r.text=i&&i[0]?i[0].title():""}return{displayObject:r,bounds:e.renderer.textBounds(r)}}(n,t)},render:function(t){!function(t,e,n){var r=t.rect;if(e){var i=[];e.size(r),n&&i.push(ch({},n.displayObject,{x:{start:0,end:r.width,middle:r.width/2}[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text})),e.render(i)}}(t,n.renderer,e)},spread:function(){return e?e.bounds.height:0},extent:function(){return e?e.bounds.width:0}};return n}(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),Pw(this)},preferredSize:function(t){return function(t,e){var n=0,r=t.settings.layout.dock||"center",i=t.state.display,s=Iw(e.inner,i,"top"===r||"bottom"===r?"horizontal":"vertical",{itemRenderer:t.itemRenderer,navigationRenderer:t.navigationRenderer,titleRenderer:t.titleRenderer,isPreliminary:!0});return n+=i.spacing,(n+=s.preferredSize)+i.spacing}(this,t)},beforeUpdate:function(){Pw(this)},render:function(){return Dw(this)},beforeDestroy:function(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements:function(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo:function(){return{offset:this.itemRenderer.offset()}}};function Fw(t,e){var n=0,r=t.state.isVertical?"justify":"align",i=t.state.isVertical?"y":"x",s=t.state.isVertical?"requiredHeight":"requiredWidth";n=t.state.rect[t.state.isVertical?"height":"width"]-t.state.legend.length()-t.state.title[s](),n*=Math.min(1,Math.max(t.stgns[r],0)),e[i]+=n}function zw(t,e,n){var r=n[t];return"object"===hh(r)?-1!==r.valid.indexOf(e)?e:r.default:n.default}function qw(t){return zw(t.layout.dock,t.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function Lw(t,e){var n={x:0,y:0,width:0,height:0},r=t.stgns.padding;return n.x=r.left,n.y=r.top,n.width=e.width-r.left-r.right,n.height=e.height-r.top-r.bottom,n}function Bw(t){var e,n="top"!==t.settings.layout.dock&&"bottom"!==t.settings.layout.dock,r=t.stgns.title,i=t.chart.scale(t.stgns.fill),s=t.chart.scale(t.stgns.major),o=function(t,e){var n=e.domain(),r=n,i=t.stgns.tick.label;return!i&&t.formatter?i=t.formatter:!i&&e.data().fields&&(i=e.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String)),n.map((function(n,i){var s=r[i];return{value:n,label:s,pos:e.norm(parseFloat(n,10)),textMetrics:t.renderer.measureText({text:s,fontSize:t.stgns.tick.fontSize,fontFamily:t.stgns.tick.fontFamily})}}))}(t,s),a=zw((e=t.settings).layout.dock,e.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});if(void 0===r.text){var l=s.data().fields;r.text=l&&l[0]?l[0].title():""}var c=t.renderer.measureText({text:r.text,fontSize:r.fontSize,fontFamily:r.fontFamily}),u=t.renderer.textBounds({text:r.text,fontSize:r.fontSize,fontFamily:r.fontFamily,maxLines:r.maxLines,maxWidth:r.maxLengthPx,wordBreak:r.wordBreak,hyphens:r.hyphens,lineHeight:r.lineHeight}),h={isVertical:n,nodes:[],title:{anchor:qw(t.settings),textMetrics:c,textBounds:u,requiredWidth:function(){if(!r.show)return 0;var t=u.width,e=r.maxLengthPx;return n||(t+=r.padding,e+=r.padding),Math.min(t,e,h.rect.width)},requiredHeight:function(){if(!r.show)return 0;var t=u.height;return n&&(t+=r.padding),Math.min(t,h.rect.height)}},ticks:{values:o,anchor:a,length:Math.min(Math.max.apply(Math,Th(o.map((function(t){return t.textMetrics.width})))),t.stgns.tick.maxLengthPx),requiredHeight:function(){return"top"===a?Math.max.apply(Math,Th(h.ticks.values.map((function(t){return t.textMetrics.height}))))+t.stgns.tick.padding:0},height:Math.max.apply(Math,Th(o.map((function(t){return t.textMetrics.height}))))},legend:{fillScale:i,majorScale:s,length:function(){var e=n?"height":"width",r=n?"requiredHeight":"requiredWidth",i=Math.min(h.rect[e],h.rect[e]*t.stgns.length)-h.title[r]();return Math.max(0,Math.min(i,t.stgns.maxLengthPx))}}};return h}var Hw={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize:function(t){var e=this.state;e.rect=Lw(this,t.inner);var n=this.stgns.size,r=e.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;var i=Math.max(t.inner.width,t.inner.height);if("left"===e.ticks.anchor||"right"===e.ticks.anchor){if(e.ticks.values.reduce((function(t,e){return t+e.textMetrics.height}),0)>this.state.legend.length())return i;n+=e.ticks.length}else{if(e.ticks.length>this.state.legend.length())return i;n+=Math.max.apply(Math,Th(e.ticks.values.map((function(t){return t.textMetrics.height}))))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===e.title.anchor||"right"===e.title.anchor?Math.max(e.title.textBounds.height+r,n):Math.max(n,e.title.requiredWidth()+r)),this.state.preferredSize=n,n},created:function(){this.stgns=this.settings.settings,this.state=Bw(this)},beforeUpdate:function(t){this.stgns=t.settings.settings,this.state=Bw(this)},beforeRender:function(t){if(this.state.nodes=[],this.state.rect=Lw(this,t.size),this.stgns.title.show){var e=function(t){var e=t.state,n=t.stgns,r="left"===e.ticks.anchor,i="top"===e.ticks.anchor,s=e.rect.x,o=e.rect.y,a="start";"left"===e.title.anchor?(s+=e.title.requiredWidth()-n.title.padding,o+=e.title.textMetrics.height,o+=i?e.rect.height-e.title.textBounds.height:0,a="end"):"right"===e.title.anchor?(s+=e.legend.length(),s+=n.title.padding,o+=e.title.textMetrics.height,o+=i?e.rect.height-e.title.textBounds.height:0):"top"===e.title.anchor&&(s+=r?e.rect.width:0,o+=e.title.textMetrics.height,a=r?"end":"start");var l={tag:"legend-title",type:"text",x:s,y:Math.min(o,e.rect.y+e.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:a,title:n.title.text};return Fw(t,l),l}(this);this.state.nodes.push(e)}var n,r,i,s,o,a,l,c,u,h=function(t,e){var n=t.state,r=t.stgns,i=n.rect,s=i.x,o=i.y,a=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?s+=n.rect.width-r.size:"top"===n.ticks.anchor&&(o+=n.rect.height-r.size),"top"===n.title.anchor?o+=n.title.requiredHeight():"left"===n.title.anchor&&(s+=n.title.requiredWidth());var c={type:"rect",x:s,y:o,width:a,height:l,fill:{type:"gradient",stops:e,degree:n.isVertical?90:180}};return Fw(t,c),c}(this,(r=this.state.legend.majorScale,(n=this.state.legend.fillScale).domain().map((function(t){return{type:"stop",color:n(t),offset:Math.min(1,Math.max(0,r.norm(t)))}})).sort((function(t,e){return t.offset-e.offset})))),d=(a=(i=this).stgns,l="start",c={type:"rect",x:(s=h).x,y:s.y,width:(o=i.state).isVertical?0:s.width,height:o.isVertical?s.height:0,fill:"transparent"},u=o.ticks.values.map((function(t){var e=0,n=0,r=0,u="alphabetical";return o.isVertical?(n=s.y+s.height*t.pos,u=0===t.pos?"text-before-edge":"text-after-edge"):e=s.x+s.width*t.pos,"right"===o.ticks.anchor?(e=s.x+a.size+a.tick.padding,c.x=s.x+s.width):"left"===o.ticks.anchor?(e=s.x-a.tick.padding,l="end"):"top"===o.ticks.anchor?(n=s.y-a.tick.padding,r-=.25*t.textMetrics.height,l=0===t.pos?"start":"end"):"bottom"===o.ticks.anchor&&(n=s.y+s.height+a.tick.padding,r=.8*t.textMetrics.height,l=0===t.pos?"start":"end",c.y=s.y+s.height),{type:"text",x:e,y:n,dx:0,dy:r,text:t.label,fontSize:a.tick.fontSize,fontFamily:a.tick.fontFamily,fill:a.tick.fill,maxWidth:o.isVertical?a.tick.maxLengthPx:Math.min(a.tick.maxLengthPx,o.legend.length()/2),anchor:l,textBoundsFn:i.renderer.textBounds,title:t.label,baseline:u}})),{type:"container",id:"legend-seq-ticks",children:[].concat(Th(u),[c])});this.state.nodes.push({id:"legend-seq-target",type:"container",children:[h,d]})},render:function(){return this.state.nodes}},Vw={step:function(t){return new zd(t,.5)},stepAfter:function(t){return new zd(t,1)},stepBefore:function(t){return new zd(t,0)},linear:gd,basis:function(t){return new kd(t)},cardinal:Ed.tension(0),catmullRom:Td,monotonex:function(t){return new Id(t)},monotoney:function(t){return new Pd(t)},natural:function(t){return new jd(t)}},Ww={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},connect:!1,orientation:"horizontal",layers:{curve:"linear",show:!0,sort:void 0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function $w(t,e){var n=e.generator,r=e.item,i=e.data,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=n(t),a={type:"path",d:o,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:s||r.fill,data:i};return r.strokeDasharray&&(a.strokeDasharray=r.strokeDasharray),a}var Uw={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created:function(){},render:function(t){var e=t.data,n=this.rect,r=n.width,i=n.height;this.stngs=this.settings.settings||{};var s=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,o=function(t){var e=function(t){for(var e=t.stngs,n=t.rect,r=t.resolver,i=t.style,s=t.domain,o=n.width,a=n.height,l=r.resolve({data:t.data,defaults:Ww.coordinates,settings:e.coordinates||{},scaled:{major:"vertical"===e.orientation?a:o,minor:"vertical"===e.orientation?o:a}}),c=!e.connect&&s.length>2&&("function"==typeof e.coordinates.layerId||"object"===hh(e.coordinates.layerId)),u={},h=0,d=0;d<l.items.length;d++){var f=l.items[d],p=f.layerId;if(c){var y=u[p]?u[p].items[u[p].items.length-1]:null,g=y?s.indexOf(y.data.major?y.data.major.value:y.data.value):null;y&&s.indexOf(f.data.major?f.data.major.value:f.data.value)-1!==g&&u[p].items.push({dummy:!0})}u[p]=u[p]||{order:h++,id:p,items:[],dataItems:[],consumableData:{}},u[p].dataItems.push(f.data),u[p].items.push(f)}var m=Object.keys(u).map((function(t){return u[t].consumableData=mh({points:u[t].dataItems},u[t].dataItems[0]),u[t]})),v={items:m.map((function(t){return t.consumableData}))},x=e.layers||{};return{coordinates:l,metaLayers:m,layers:r.resolve({data:v,defaults:{curve:Ww.layers.curve,show:Ww.layers.show},settings:{curve:x.curve,show:x.show}}),lines:r.resolve({data:v,defaults:ch({},Ww.layers.line,i.line),settings:x.line}),areas:r.resolve({data:v,defaults:ch({},Ww.layers.area,i.area),settings:x.area})}}(t),n=e.coordinates,r=e.layers,i=e.lines,s=e.areas,o=[];return e.metaLayers.forEach((function(e,a){var l=r.items[a];if(!1!==l.show){l.datum=l.data,l.data=[],l.id=e.id;for(var c,u,h=[],d=[],f=0;f<e.items.length;f++){if(u=(c=e.items[f]).data,!c.dummy){if(isNaN(c.major))continue;t.missingMinor0&&(c.minor0=n.settings.minor.scale?n.settings.minor.scale(u.minor0?u.minor0.value:0):0),isNaN(c.minor)||h.push(c.minor),l.data.push(c.data)}d.push(c)}var p=h.sort((function(t,e){return t-e}))[Math.floor((h.length-1)/2)];o.push({layerObj:l,lineObj:i.items[a],areaObj:s.items[a],median:p,points:d,consumableData:e.consumableData})}})),o}({data:e,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:s,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){var a=o.map((function(t){return{id:t.layerObj.id,data:t.layerObj.data}})).sort(this.stngs.layers.sort).map((function(t){return t.id}));o.sort((function(t,e){return a.indexOf(t.layerObj.id)-a.indexOf(e.layerObj.id)}))}else o.sort((function(t,e){return t.median-e.median}));return function(t,e){var n=e.width,r=e.height,i=e.missingMinor0,s=e.stngs,o=[],a=s.layers||{};return t.forEach((function(t){var e,l,c=t.lineObj,u=t.layerObj,h=t.areaObj,d=t.points,f=function(){var t=md,e=null,n=Qh(0),r=vd,i=Qh(!0),s=null,o=gd,a=null;function l(l){var c,u,h,d,f,p=l.length,y=!1,g=new Array(p),m=new Array(p);for(null==s&&(a=o(f=Yh())),c=0;c<=p;++c){if(!(c<p&&i(d=l[c],c,l))===y)if(y=!y)u=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),h=c-1;h>=u;--h)a.point(g[h],m[h]);a.lineEnd(),a.areaEnd()}y&&(g[c]=+t(d,c,l),m[c]=+n(d,c,l),a.point(e?+e(d,c,l):g[c],r?+r(d,c,l):m[c]))}if(f)return a=null,f+""||null}function c(){return function(){var t=md,e=vd,n=Qh(!0),r=null,i=gd,s=null;function o(o){var a,l,c,u=o.length,h=!1;for(null==r&&(s=i(c=Yh())),a=0;a<=u;++a)!(a<u&&n(l=o[a],a,o))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+t(l,a,o),+e(l,a,o));if(c)return s=null,c+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:Qh(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Qh(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Qh(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(s=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=s=null:s=i(r=t),o):r},o}().defined(i).curve(o).context(s)}return l.x=function(n){return arguments.length?(t="function"==typeof n?n:Qh(+n),e=null,l):t},l.x0=function(e){return arguments.length?(t="function"==typeof e?e:Qh(+e),l):t},l.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Qh(+t),l):e},l.y=function(t){return arguments.length?(n="function"==typeof t?t:Qh(+t),r=null,l):n},l.y0=function(t){return arguments.length?(n="function"==typeof t?t:Qh(+t),l):n},l.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Qh(+t),l):r},l.lineX0=l.lineY0=function(){return c().x(t).y(n)},l.lineY1=function(){return c().x(t).y(r)},l.lineX1=function(){return c().x(e).y(n)},l.defined=function(t){return arguments.length?(i="function"==typeof t?t:Qh(!!t),l):i},l.curve=function(t){return arguments.length?(o=t,null!=s&&(a=o(s)),l):o},l.context=function(t){return arguments.length?(null==t?s=a=null:a=o(s=t),l):s},l}(),p=s.coordinates?s.coordinates.defined:null,y={size:r,p:"y"},g={size:n,p:"x"};if("vertical"===s.orientation){var m=ch(!0,{},g);g=ch(!0,{},y),y=ch(!0,{},m)}f[g.p]((function(t){return t.major*g.size}))["".concat(y.p,"1")]((function(t){return t.minor*y.size}))["".concat(y.p,"0")]((function(t){return t.minor0*y.size})).curve(Vw["monotone"===u.curve?"monotone".concat(g.p):u.curve]),f.defined(p?function(t){return!t.dummy&&"number"==typeof t.minor&&!isNaN(t.minor)&&t.defined}:function(t){return!t.dummy&&"number"==typeof t.minor&&!isNaN(t.minor)});var v=s.connect?d.filter(f.defined()):d;e=f["line".concat(y.p.toUpperCase(),"1")](),l=f["line".concat(y.p.toUpperCase(),"0")](),a.area&&!1!==h.show&&o.push($w(v,{data:t.consumableData,item:h,generator:f})),c&&!1!==c.show&&(o.push($w(v,{data:t.consumableData,item:c,generator:e},"none")),!i&&a.area&&!1!==h.show&&!1!==c.showMinor0&&o.push($w(v,{data:t.consumableData,item:c,generator:l},"none")))})),o}(o,{width:r,height:i,missingMinor0:s,stngs:this.stngs})}};function Yw(t,e){var n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"===hh(e.center)?(n=e.center.x,r=e.center.y):(n=e.clientX,r=e.clientY);var s=n-t.state.boundingRect.left,o=r-t.state.boundingRect.top;return{x:i?Math.max(0,Math.min(s,t.rect.width)):s,y:i?Math.max(0,Math.min(o,t.rect.height)):o}}function Qw(t,e){return{x:e.x+t.rect.x,y:e.y+t.rect.y}}function Kw(t,e){var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y);return{x:n,y:r,width:Math.max(t.x,e.x)-n,height:Math.max(t.y,e.y)-r}}var Zw={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart:function(t){this.start(t)},areaMove:function(t){this.move(t)},areaEnd:function(t){this.end(t)},areaCancel:function(){this.cancel()}},created:function(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:function(){return 0},render:function(){},start:function(t){this.state.boundingRect=this.renderer.element().getBoundingClientRect();var e=Yw(this,t,!1);Bv({x:0,y:0,width:this.rect.width,height:this.rect.height},e)&&(this.state.brushConfig=this.settings.settings.brush.components.map((function(t){return{key:t.key,contexts:t.contexts,data:t.data,action:t.action||"set"}})),this.state.start=Yw(this,t),this.state.active=!0)},move:function(t){var e;this.state.active&&(this.state.end=Yw(this,t),function(t){if(t.state.active){var e=Qw(t,t.state.start),n=Qw(t,t.state.end),r=t.chart.shapesAt(Kw(e,n),{components:t.state.brushConfig});t.chart.brushFromShapes(r,{components:t.state.brushConfig})}}(this),(e=this).renderer.render([ch({type:"rect"},Kw(e.state.start,e.state.end),e.style.area)]))},end:function(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel:function(){var t;this.state.active&&(t=this.chart,this.state.brushConfig.forEach((function(e){Array.isArray(e.contexts)&&e.contexts.forEach((function(e){t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function Xw(t,e,n){var r=n.renderer,i=n.style,s=n.props,o=n.h,a=function(t,e){return{tooltip:"function"==typeof t.tooltipClass?t.tooltipClass({dock:e.dock}):t.tooltipClass,content:"function"==typeof t.contentClass?t.contentClass({dock:e.dock}):t.contentClass,arrow:"function"==typeof t.arrowClass?t.arrowClass({dock:e.dock}):t.arrowClass}}(s,e),l=function(t,e,n,r){return r.content({h:t,style:n,data:e})}(o,t,i,s),c=o("div",{dir:s.direction,class:Nw(ch({"pic-tooltip":!0},a.tooltip)),style:ch({position:"relative",display:"inline-block"},e.computedTooltipStyle)},o("div",{style:i.content,class:Nw(ch({"pic-tooltip-content":!0},a.content))},l),o("div",{class:Nw(ch({"pic-tooltip-arrow":!0},a.arrow)),style:ch({},i.arrow,i["arrow-".concat(e.dock)],e.computedArrowStyle)}));return r.render(c),r.element().children[0]}function Gw(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-t,"px)"),right:"translate(".concat(t,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-t,"px)"),bottom:"translate(-50%, ".concat(t,"px)")}}function Jw(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-t-n,y:-e/2},right:{x:n,y:-e/2},top:{x:-t/2,y:-e-n},bottom:{x:-t/2,y:n}}}function tk(t){return{left:{left:"100%",top:"calc(50% - ".concat(t,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-t,"px"),top:"calc(50% - ".concat(t,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% - ".concat(t,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% - ".concat(t,"px)"),top:"".concat(2*-t,"px"),borderWidth:"".concat(t,"px")}}}function ek(t,e,n,r,i,s){var o=e+s.x,a=n+s.y;return!(o<0||a<0||o+r>t.width||a+i>t.height)}function nk(t){var e=t.area,n=t.width,r=t.height,i=t.offset,s=t.vx+i.x,o=t.vy+i.y,a=s<0?-s:0,l=o<0?-o:0;return{x:a+=s+n>e.width?-(s+n-e.width):0,y:l+=o+r>e.height?-(o+r-e.height):0}}function rk(t){var e=t.options,n=t.width,r=t.height,i=t.dockOrder,s=t.x,o=t.y,a=t.pointer.targetBounds,l=Gw(e.offset),c=l[e.dock];if(c)return{computedTooltipStyle:{left:"".concat(s,"px"),top:"".concat(o,"px"),transform:c},computedArrowStyle:tk(e.offset)[e.dock],dock:e.dock};for(var u={width:"target"===e.area?a.width:window.innerWidth,height:"target"===e.area?a.height:window.innerHeight},h=Jw(n,r,e.offset),d=[],f="target"===e.area?s:a.left+s,p="target"===e.area?o:a.top+o,y=0;y<i.length;y+=1){var g=i[y],m=nk({area:u,vx:f,vy:p,width:n,height:r,offset:h[g]}),v={left:"".concat(s,"px"),top:"".concat(o,"px"),transform:l[g]},x=tk(e.offset)[g];0!==m.x&&(v.width="".concat(n-20-Math.abs(m.x),"px"),"top"!==g&&"bottom"!==g||(v.left="".concat(s+m.x,"px"),x.left="calc(50% ".concat(m.x>0?"-":"+"," ").concat(Math.abs(m.x),"px)")));var b={computedTooltipStyle:v,computedArrowStyle:x,dock:g,rect:{width:n,height:r}};if(0===m.x&&0===m.y)return b;b.offset=m,d.push(b)}return d.sort((function(t,e){return Math.abs(t.offset.x)-Math.abs(e.offset.x)})),d[0]}function ik(t,e,n){var r=t.key?n.component(t.key):n.componentsFromPoint({x:e.clientX,y:e.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};var i=r.rect;return ch({scaleRatio:i.scaleRatio},i.computedInner)}var sk,ok={bounds:function(t){var e=t.width,n=t.height,r=t.options,i=t.pointer.targetBounds,s=t.resources.getNodeBoundsRelativeToTarget(t.nodes[0]),o=s.x,a=s.y,l=s.width,c=s.height,u={left:{x:o,y:a+c/2},right:{x:o+l,y:a+c/2},top:{x:o+l/2,y:a},bottom:{x:o+l/2,y:a+c}},h=Gw(r.offset),d=h[r.dock];if(d)return{computedTooltipStyle:{left:"".concat(u[r.dock].x,"px"),top:"".concat(u[r.dock].y,"px"),transform:d},computedArrowStyle:tk(r.offset)[r.dock],dock:r.dock};for(var f={width:"target"===r.area?i.width:window.innerWidth,height:"target"===r.area?i.height:window.innerHeight},p=Jw(e,n,r.offset),y=["top","left","right","bottom"],g=0;g<y.length;g+=1){var m=y[g];if(ek(f,"target"===r.area?u[m].x:i.left+u[m].x,"target"===r.area?u[m].y:i.top+u[m].y,e,n,p[m]))return{computedTooltipStyle:{left:"".concat(u[m].x,"px"),top:"".concat(u[m].y,"px"),transform:h[m]},computedArrowStyle:tk(r.offset)[m],dock:m}}return{computedTooltipStyle:{left:"".concat(u.top.x,"px"),top:"".concat(u.top.y,"px"),transform:h.top},computedArrowStyle:tk(r.offset).top,dock:"top"}},pointer:function(t){var e=t.pointer;return rk({x:e.x,y:e.y,pointer:e,width:t.width,height:t.height,options:t.options,dockOrder:["top","left","right","bottom"]})},slice:function(t){var e=t.options,n=t.pointer,r=t.width,i=t.height,s=t.nodes[0],o=n.dx,a=n.dy,l=t.resources.getComponentBoundsFromNode(s),c=a+l.y+l.height/2,u=s.desc.slice,h=u.outerRadius,d=(u.start+u.end)/2-Math.PI/2,f=2*Math.PI,p=(d%f+f)%f,y=["top","left","right","bottom"];return"auto"===e.dock&&(y=p<=Math.PI/4||p>=7*Math.PI/4?["right","top","bottom","left"]:p<=3*Math.PI/4?["bottom","left","right","top"]:p<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),rk({x:o+l.x+l.width/2+h*l.scaleRatio.x*Math.cos(p),y:c+h*l.scaleRatio.y*Math.sin(p),pointer:n,width:r,height:i,options:e,dockOrder:y})}};function ak(){sk=null}function lk(t,e){var n=e.state,r=0,i=0;t.center?(r+=t.center.x,i+=t.center.y):(r+=t.clientX,i+=t.clientY);var s=e.chart.element.getBoundingClientRect(),o=n.targetElement.getBoundingClientRect(),a=r,l=i,c=r-s.left,u=i-s.top;return{x:r-=o.left,y:i-=o.top,dx:s.left-o.left,dy:s.top-o.top,cx:c,cy:u,clientX:a,clientY:l,targetBounds:o,chartBounds:s}}var ck={require:["chart","renderer"],defaultSettings:{settings:{duration:8e3,delay:500,filter:function(t){return t.filter((function(t){return t.data&&void 0!==t.data.value}))},extract:function(t){return t.node.data.value},content:function(t){var e=t.h;return t.data.map((function(t){return e("div",{},t)}))},isEqual:function(t,e){return t.length&&t.length===e.length&&t.every((function(t,n){return e[n]&&JSON.stringify(t.data)===JSON.stringify(e[n].data)}))},placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0},style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide:function(){this.hide()},show:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(t,e)},prevent:function(t){this.prevent(t)}},hide:function(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show:function(t){var e,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.nodes,s=r.duration,o=r.delay;!this.state.prevent&&this.state.targetElement&&(this.state.pointer=lk(t,this),e=Array.isArray(i)?this.props.filter(i):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,e)||(this.dispatcher.clear(),this.state.activeNodes=e,this.state.activeNodes.length&&this.dispatcher.invoke((function(){return n.invokeRenderer(n.state.activeNodes)}),s,o)))},prevent:function(t){this.state.prevent=!!t},init:function(t){var e,n,r,i,s,o,a,l,c,u=this;this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=t.settings,this.dispatcher=(n=(e={defaultDuration:this.props.duration,defaultDelay:this.props.delay}).defaultDuration,r=e.defaultDelay,i=null,s=null,o=!1,a=function(){var t=function(){},e={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};return t.set=function(t){e[t].forEach((function(e){return e(t)}))},t.on=function(t,n){Array.isArray(t)?t.forEach((function(t){return e[t].push(n)})):e[t].push(n)},t.destroy=function(){Object.keys(e).forEach((function(t){e[t].length=0}))},t}(),c=function(){i=null,s=null,o=!1,a.set("fulfilled")},(l=function(){}).invoke=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r;i&&(clearTimeout(i),a.set("debounced")),a.set("pending"),i=setTimeout((function(){t(),o=!0,i=null,a.set("active")}),l),e>0&&(s&&clearTimeout(s),s=setTimeout(c,e+Math.max(l,0)))},l.clear=function(){o?a.set("cancelled"):i&&(clearTimeout(i),a.set("rejected")),s&&clearTimeout(s),i=null,s=null,o=!1},l.on=function(t,e){a.on(t,e)},l.destroy=function(){l.clear(),a.destroy()},l);var h=this.dispatcher.clear;this.dispatcher.on("pending",(function(){sk&&sk!==h&&sk(),sk=h,"function"==typeof u.props.beforeShow&&u.props.beforeShow.call(void 0,{resources:{formatter:u.chart.formatter,scale:u.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(function(){var t={resources:{formatter:u.chart.formatter,scale:u.chart.scale}};"function"==typeof u.props.beforeHide&&u.props.beforeHide.call(void 0,ch({element:u.state.tooltipElm},t)),"function"==typeof u.props.onHide?u.props.onHide.call(void 0,ch({element:u.state.tooltipElm},t)):u.renderer.clear([]),"function"==typeof u.props.afterHide&&u.props.afterHide.call(void 0,t),sk===h&&(sk=null),u.state.tooltipElm=void 0})),this.dispatcher.on("active",(function(){"function"==typeof u.props.afterShow&&u.props.afterShow.call(void 0,{element:u.state.tooltipElm,resources:{formatter:u.chart.formatter,scale:u.chart.scale}})}))},created:function(){this.init(this.settings)},beforeUpdate:function(t){var e=t.settings;this.dispatcher&&(this.dispatcher.destroy(),ak()),this.init(e)},render:function(t){return this.h=t,[]},beforeDestroy:function(){this.dispatcher.destroy(),ak()},appendTo:function(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;var t=this.state.targetElement.getBoundingClientRect(),e=t.width,n=t.height;this.renderer.destroy(),this.renderer.size({width:e,height:n}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted:function(){this.appendTo()},updated:function(){this.appendTo()},invokeRenderer:function(t){var e=function(t,e){var n=e.chart,r=e.props,i={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:e.scale,h:e.h},s=[];return t.forEach((function(t){if("function"==typeof r.extract){var e=ch({node:t},i);s.push(r.extract(e))}})),s}(t,this),n=function(t,e){var n=e.chart,r=e.state,i=e.props,s={resources:{formatter:n.formatter,scale:n.scale,component:n.component,getComponentBoundsFromNode:function(t){return ik(t,r.pointer,n)},getNodeBoundsRelativeToTarget:function(t){return function(t,e,n){var r=ik(t,e,n),i=t.bounds;return{x:r.x+e.dx+i.x,y:r.y+e.dy+i.y,width:i.width,height:i.height}}(t,r.pointer,n)}},nodes:r.activeNodes,pointer:r.pointer,width:t.width,height:t.height},o=hh(i.placement);if("object"===o&&"function"==typeof i.placement.fn)return i.placement.fn(s);var a={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===o&&(a=ch(a,i.placement(s))),"object"===o&&ok[i.placement.type]?a=ch(a,i.placement):"string"===o&&ok[i.placement]&&(a=ch(a,{type:i.placement})),s.options=a;var l=ok[a.type](s),c=s.resources.getComponentBoundsFromNode(s.nodes[0]),u=c.x,h=c.y,d=c.width,f=c.height;return d+=u+=s.pointer.dx,f+=h+=s.pointer.dy,l.computedTooltipStyle.left="".concat(Math.min(Math.max(0,u,parseFloat(l.computedTooltipStyle.left)),d),"px"),l.computedTooltipStyle.top="".concat(Math.min(Math.max(0,h,parseFloat(l.computedTooltipStyle.top)),f),"px"),l}(Xw(e,{style:{left:"0px",top:"0px",visibility:"hidden"}},this).getBoundingClientRect(),this);this.state.tooltipElm=Xw(e,n,this)}},uk={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update:function(){this.draw()}},draw:function(){var t=this,e=this.chart.findShapes(this.props.selector).filter((function(e){return e.key===t.props.target})).filter((function(t){return t.collider})).map((function(t){return t.collider}));e.forEach((function(e){e.fill=t.props.fill,e.stroke=t.props.stroke,e.opacity=t.props.opacity,e.collider={type:null}})),this.renderer.render(e)},created:function(){this.props=this.settings.settings},resize:function(t){return this.props.useOuterRect?t.outer:t.inner},render:function(){},mounted:function(){this.draw()},updated:function(){this.props=this.settings.settings,this.draw()}},hk=2*Math.PI;function dk(t,e,n,r){return Math.abs(t.x+n.x-(e.x+e.x))+Math.abs(t.y+n.y-(e.y+e.y))+Math.abs(e.x+r.x-(n.x+n.x))+Math.abs(e.y+r.y-(n.y+n.y))}function fk(t,e){return{x:.5*(t.x+e.x),y:.5*(t.y+e.y)}}function pk(t,e,n,r,i){var s=1-t;return Math.pow(s,3)*e+3*Math.pow(s,2)*t*n+3*s*Math.pow(t,2)*r+Math.pow(t,3)*i}function yk(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(s<1||dk(t,e,n,r)<=10)return i[i.length-1]!==t&&i.push(t),i.push(r),i;var o=.5,a=fk(t,e),l=fk(e,n),c=fk(n,r),u={x:pk(o,t.x,e.x,n.x,r.x),y:pk(o,t.y,e.y,n.y,r.y)},h=fk(a,l),d=fk(l,c);return yk(t,a,h,u,i,s-1),yk(u,d,c,r,i,s-1),i}function gk(t,e,n){var r=function(t,e,n){return{cp1:{x:t.x+2/3*(e.x-t.x),y:t.y+2/3*(e.y-t.y)},cp2:{x:n.x+2/3*(e.x-n.x),y:n.y+2/3*(e.y-n.y)}}}(t,e,n);return yk(t,r.cp1,r.cp2,n)}function mk(t,e,n){var r,i,s,o,a=[],l=!!t[4],c=!!t[5],u=t[3],h=t[6],d=t[7],f=t[1],p=t[2];if("a"===t[0]&&(h+=e,d+=n),e===d&&n===d)return a;if(!f||!p)return a.push({x:h,y:d}),a;var y=function(t,e,n,r,i,s,o,a,l){var c,u,h,d,f,p,y=rv(n%360),g=Math.cos(y),m=Math.sin(y),v=(a-s)/2,x=(l-o)/2,b=g*v+m*x,_=g*x-m*v;t=Math.abs(t),e=Math.abs(e),(p=Math.pow(b,2)/Math.pow(t,2)+Math.pow(_,2)/Math.pow(e,2))>1&&(t*=p=Math.sqrt(p),e*=p);var w=t*e,k=t*_,S=e*b,M=Math.pow(k,2)+Math.pow(S,2),E=Math.pow(w,2)-M,C=Math.sqrt(Math.max(E/M,0));r===i&&(C=-C);var T=C*(k/e),A=C*(-S/t);d=g*T-m*A+(a+s)/2,f=m*T+g*A+(l+o)/2;var N=(-b-T)/t,R=(-_-A)/e;return c=Math.atan2((_-A)/e,(b-T)/t),c+=c<0?hk:0,u=Math.atan2(R,N),h=(u+=u<0?hk:0)-c,!i&&c<u?h-=hk:i&&u<c&&(h+=hk),{startAngle:c,sweepAngle:h%=hk,cx:d,cy:f,rx:t,ry:e}}(f,p,u,l,c,h,d,e,n);r=y.cx,i=y.cy,f=y.rx,p=y.ry,s=y.sweepAngle,o=y.startAngle;for(var g=Math.abs(s*Math.sqrt((Math.pow(f,2)+Math.pow(p,2))/2)),m=Math.ceil(g/10),v=s/m,x=1;x<=m;x++){var b=(o+v*x)%hk,_=Math.cos(b),w=Math.sin(b);a.push({x:r+_*f+-w*_,y:i+w*p+_*w})}return a}function vk(t){for(var e=th(t),n=[],r=[],i=0,s=0,o=null,a=null,l=null,c=null,u=0;u<e.length;++u){var h=e[u],d=h[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(o=null,a=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":r.push({x:i+=h[1],y:s+=h[2]});break;case"M":r.length&&n.push(r.splice(0));case"L":r.push({x:i=h[1],y:s=h[2]});break;case"H":r.push({x:i=h[1],y:s});break;case"h":r.push({x:i+=h[1],y:s});break;case"V":r.push({x:i,y:s=h[1]});break;case"v":r.push({x:i,y:s+=h[1]});break;case"a":r.push.apply(r,Th(mk(h,i,s))),i+=h[6],s+=h[7];break;case"A":r.push.apply(r,Th(mk(h,i,s))),i=h[6],s=h[7];break;case"c":r.push.apply(r,Th(yk({x:i,y:s},{x:h[1]+i,y:h[2]+s},{x:h[3]+i,y:h[4]+s},{x:h[5]+i,y:h[6]+s}))),o=h[3]+i,a=h[4]+s,i+=h[5],s+=h[6];break;case"C":r.push.apply(r,Th(yk({x:i,y:s},{x:h[1],y:h[2]},{x:h[3],y:h[4]},{x:h[5],y:h[6]}))),o=h[3],a=h[4],i=h[5],s=h[6];break;case"s":null!==o&&null!==o||(o=i,a=s),r.push.apply(r,Th(yk({x:i,y:s},{x:2*i-o,y:2*s-a},{x:h[1]+i,y:h[2]+s},{x:h[3]+i,y:h[4]+s}))),o=h[1]+i,a=h[2]+s,i+=h[3],s+=h[4];break;case"S":null!==o&&null!==o||(o=i,a=s),r.push.apply(r,Th(yk({x:i,y:s},{x:2*i-o,y:2*s-a},{x:h[1],y:h[2]},{x:h[3],y:h[4]}))),o=h[1],a=h[2],i=h[3],s=h[4];break;case"Q":r.push.apply(r,Th(gk({x:i,y:s},{x:h[1],y:h[2]},{x:h[3],y:h[4]}))),l=h[1],c=h[2],i=h[3],s=h[4];break;case"q":r.push.apply(r,Th(gk({x:i,y:s},{x:h[1]+i,y:h[2]+s},{x:h[3]+i,y:h[4]+s}))),l=h[1]+i,c=h[2]+s,i+=h[3],s+=h[4];break;case"T":null!==l&&null!==l||(l=i,c=s),r.push.apply(r,Th(gk({x:i,y:s},{x:l=2*i-l,y:c=2*s-c},{x:h[1],y:h[2]}))),i=h[1],s=h[2];break;case"t":null!==l&&null!==l||(l=i,c=s),r.push.apply(r,Th(gk({x:i,y:s},{x:l=2*i-l,y:c=2*s-c},{x:h[1]+i,y:h[2]+s}))),i+=h[1],s+=h[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(t){for(var e=0;e<t.length-1;e++){var n=t[e],r=t[e+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(t.splice(e,1),e--)}}(r),n.push(r.splice(0)),n}var xk={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update:function(){this.draw()}},draw:function(){var t=this,e=this.chart.findShapes("path").filter((function(e){return e.key===t.props.target})),n=[];e.forEach((function(e){vk(e.attrs.d).forEach((function(e){e.forEach((function(e){n.push({type:"circle",cx:e.x,cy:e.y,r:t.props.radius,fill:t.props.fill,stroke:t.props.stroke,opacity:t.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(n)},created:function(){this.props=this.settings.settings},resize:function(t){return this.props.useOuterRect?t.outer:t.inner},render:function(){},mounted:function(){this.draw()},updated:function(){this.props=this.settings.settings,this.draw()}},bk=[function(t){t.component("box",Qx),t.component("box-marker",Qx)},function(t){t.component("point",tb),t.component("point-marker",tb)},function(t){t.component("pie",rb)},function(t){t.component("grid-line",lb)},function(t){t.component("ref-line",yb)},function(t){t.component("axis",Ab)},function(t){t.component("container",Nb)},function(t){t.component("text",Ib)},function(t){t.component("scrollbar",jb)},function(t){t.component("brush-range",Xb),t.component("brush-area-dir",t_)},function(t){t.component("range",r_)},function(t){t.component("brush-lasso",c_)},function(t){t.component("labels",Ew)},function(t){t.component("legend-cat",jw)},function(t){t.component("legend-seq",Hw)},function(t){t.component("line",Uw)},function(t){t.component("brush-area",Zw)},function(t){t.component("tooltip",ck)},function(t){t.component("debug-collider",uk)},function(t){t.component("debug-path-to-points",xk)}],_k=function(){function t(e){dh(this,t),this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}return ph(t,[{key:"detach",value:function(){return this._parent&&this._parent.removeChild(this),this}},{key:"parent",get:function(){return this._parent}},{key:"isBranch",get:function(){return this._children&&this._children.length}},{key:"children",get:function(){return this._children}},{key:"ancestors",get:function(){var t;return this._ancestors||(this._ancestors=[],this.parent&&(t=this._ancestors).push.apply(t,[this.parent].concat(Th(this.parent.ancestors)))),this._ancestors}},{key:"descendants",get:function(){var t,e,n=[],r=this.children.length;for(t=0;t<r;t++)n.push(e=this.children[t]),e.children.length&&n.push.apply(n,Th(e.descendants));return n}},{key:"equals",value:function(t){var e=this.children,n=t.children;if(e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(!e[r].equals(n[r]))return!1;return!0}},{key:"toJSON",value:function(){return{type:this.type,children:this.children.map((function(t){return t.toJSON()}))}}}]),t}(),wk=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.x,r=void 0===n?0:n,i=e.y,s=void 0===i?0:i,o=e.width,a=void 0===o?0:o,l=e.height,c=void 0===l?0:l,u=e.minWidth,h=void 0===u?0:u,d=e.minHeight,f=void 0===d?0:d;dh(this,t),this.set({x:r,y:s,width:a,height:c,minWidth:h,minHeight:f})}return ph(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x,n=void 0===e?0:e,r=t.y,i=void 0===r?0:r,s=t.width,o=void 0===s?0:s,a=t.height,l=void 0===a?0:a,c=t.minWidth,u=void 0===c?0:c,h=t.minHeight,d=void 0===h?0:h;this.type="rect",o>=0?(this.x=n,this.width=Math.max(o,u)):(this.x=n+Math.min(o,-u),this.width=-Math.min(o,-u)),l>=0?(this.y=i,this.height=Math.max(l,d)):(this.y=i+Math.min(l,-d),this.height=-Math.min(l,-d))}},{key:"containsPoint",value:function(t){return Bv(this,t)}},{key:"intersectsLine",value:function(t){return Hv(this,zh(t))}},{key:"intersectsRect",value:function(t){return qv(this,Fh(t))}},{key:"intersectsCircle",value:function(t){return Iv(t,this)}},{key:"intersectsPolygon",value:function(t){return zv(t,this)}},{key:"intersectsGeoPolygon",value:function(t){return Zv(t,this)}},{key:"points",value:function(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}]),t}(),kk=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.cx,r=void 0===n?0:n,i=e.cy,s=void 0===i?0:i,o=e.r,a=void 0===o?0:o,l=e.minRadius,c=void 0===l?0:l;dh(this,t),this.set({cx:r,cy:s,r:a,minRadius:c})}return ph(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.cx,n=void 0===e?0:e,r=t.cy,i=void 0===r?0:r,s=t.r,o=void 0===s?0:s,a=t.minRadius,l=void 0===a?0:a;this.type="circle",this.cx=n,this.cy=i,this.r=Math.max(o,l),this.vector={x:this.cx,y:this.cy}}},{key:"containsPoint",value:function(t){return Ov(this,t)}},{key:"intersectsLine",value:function(t){return Pv(this,zh(t))}},{key:"intersectsRect",value:function(t){return Iv(this,Fh(t))}},{key:"intersectsCircle",value:function(t){return function(t,e){if(Tv(t)||Tv(e))return!1;var n=t.cy-e.cy;return Math.pow(t.cx-e.cx,2)+Math.pow(n,2)<=Math.pow(t.r+e.r,2)}(this,t)}},{key:"intersectsPolygon",value:function(t){return Dv(this,t)}},{key:"intersectsGeoPolygon",value:function(t){return Yv(this,t)}},{key:"points",value:function(){return[{x:this.cx,y:this.cy}]}}]),t}(),Sk=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.x1,r=void 0===n?0:n,i=e.y1,s=void 0===i?0:i,o=e.x2,a=void 0===o?0:o,l=e.y2,c=void 0===l?0:l,u=e.tolerance,h=void 0===u?0:u;dh(this,t),this.set({x1:r,y1:s,x2:a,y2:c,tolerance:h})}return ph(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x1,n=void 0===e?0:e,r=t.y1,i=void 0===r?0:r,s=t.x2,o=void 0===s?0:s,a=t.y2,l=void 0===a?0:a,c=t.tolerance,u=void 0===c?0:c;this.type="line",this.x1=n,this.y1=i,this.x2=o,this.y2=l,this.tolerance=Math.max(0,Math.round(u)),this.vectors=this.points(),this.zeroSize=n===o&&i===l}},{key:"containsPoint",value:function(t){return this.tolerance>0?Pv({cx:t.x,cy:t.y,r:this.tolerance},this):Wv(this,t)}},{key:"intersectsLine",value:function(t){return Vv(this,zh(t))}},{key:"intersectsRect",value:function(t){return Hv(Fh(t),this)}},{key:"intersectsCircle",value:function(t){return Pv(t,this)}},{key:"intersectsPolygon",value:function(t){return Fv(t,this)}},{key:"intersectsGeoPolygon",value:function(t){return Kv(t,this)}},{key:"points",value:function(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}]),t}();function Mk(t){var e=t[0],n=t[t.length-1];e.x===n.x&&e.y===n.y||t.push(e)}function Ek(t){for(var e=0;e<t.length-1;e++){var n=t[e],r=t[e+1];n.x===r.x&&n.y===r.y&&(t.splice(e,1),e--)}}var Ck=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.vertices,r=void 0===n?[]:n;dh(this,t),this.set({vertices:r})}return ph(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.vertices,n=void 0===e?[]:e;if(this.type="polygon",this.vertices=n.slice(),this.edges=[],Ek(this.vertices),!(this.vertices.length<=2)){Mk(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(var r=0;r<this.vertices.length;r++)r<this.vertices.length-1&&this.edges.push([this.vertices[r],this.vertices[r+1]]),this.xMin=isNaN(this.xMin)?this.vertices[r].x:Math.min(this.xMin,this.vertices[r].x),this.xMax=isNaN(this.xMax)?this.vertices[r].x:Math.max(this.xMax,this.vertices[r].x),this.yMin=isNaN(this.yMin)?this.vertices[r].y:Math.min(this.yMin,this.vertices[r].y),this.yMax=isNaN(this.yMax)?this.vertices[r].y:Math.max(this.yMax,this.vertices[r].y);this._bounds=null,this._boundingRect=null}}},{key:"containsPoint",value:function(t){return jv(this,t)}},{key:"intersectsCircle",value:function(t){return Dv(t,this)}},{key:"intersectsLine",value:function(t){return Fv(this,zh(t))}},{key:"intersectsRect",value:function(t){return zv(this,Fh(t))}},{key:"intersectsPolygon",value:function(t){return $v(this,t)}},{key:"intersectsGeoPolygon",value:function(t){return Uv(t,this)}},{key:"points",value:function(){return this.vertices}},{key:"bounds",value:function(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}},{key:"boundingRect",value:function(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}]),t}();function Tk(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(Ck,e)}function Ak(t){var e=t[0],n=t[t.length-1];e.x===n.x&&e.y===n.y||t.push(e)}function Nk(t){for(var e=0;e<t.length-1;e++){var n=t[e],r=t[e+1];n.x===r.x&&n.y===r.y&&(t.splice(e,1),e--)}}var Rk=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.vertices,r=void 0===n?[[]]:n;dh(this,t),this.set({vertices:r})}return ph(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.vertices,n=void 0===e?[]:e;this.type="geopolygon",this.vertices=n.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(var r=0;r<this.numPolygons;r++)Nk(this.vertices[r]),this.vertices[r].length>2&&Ak(this.vertices[r]),this.polygons[r]=Tk({vertices:this.vertices[r]}),this.xMin=isNaN(this.xMin)?this.polygons[r].xMin:Math.min(this.xMin,this.polygons[r].xMin),this.xMax=isNaN(this.xMax)?this.polygons[r].xMax:Math.max(this.xMax,this.polygons[r].xMax),this.yMin=isNaN(this.yMin)?this.polygons[r].yMin:Math.min(this.yMin,this.polygons[r].yMin),this.yMax=isNaN(this.yMax)?this.polygons[r].yMax:Math.max(this.yMax,this.polygons[r].yMax);this._bounds=null,this._boundingRect=null}},{key:"containsPoint",value:function(t){return Qv(this,t)}},{key:"intersectsCircle",value:function(t){return Yv(t,this)}},{key:"intersectsLine",value:function(t){return Kv(this,zh(t))}},{key:"intersectsRect",value:function(t){return Zv(this,Fh(t))}},{key:"intersectsPolygon",value:function(t){return Uv(this,t)}},{key:"intersectsGeoPolygon",value:function(t){return n=t,!!qv(r=(e=this).boundingRect(),i=n.boundingRect())&&(Lv(i,r)?Rv(n,e):Rv(e,n));var e,n,r,i}},{key:"points",value:function(){return this.vertices}},{key:"bounds",value:function(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}},{key:"boundingRect",value:function(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}]),t}();function Ok(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(Rk,e)}function Ik(t,e){return t.x!==e.x||t.y!==e.y}var Pk=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.points,r=void 0===n?[]:n;dh(this,t),this.set({points:r})}return ph(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.points,n=void 0===e?[]:e;if(this.type="polyline",this.segments=[],this._points=n.slice(),this._points.length>1)for(var r=0,i=this._points.length-1;r<i;r++)Ik(this._points[r],this._points[r+1])&&this.segments.push({x1:this._points[r].x,y1:this._points[r].y,x2:this._points[r+1].x,y2:this._points[r+1].y})}},{key:"containsPoint",value:function(t){return this.segments.some((function(e){return Wv(e,t)}))}},{key:"intersectsCircle",value:function(t){return this.segments.some((function(e){return Pv(t,e)}))}},{key:"intersectsLine",value:function(t){var e=zh(t);return this.segments.some((function(t){return Vv(t,e)}))}},{key:"intersectsRect",value:function(t){var e=Fh(t);return this.segments.some((function(t){return Hv(e,t)}))}},{key:"intersectsPolygon",value:function(t){return this.segments.some((function(e){return Fv(t,e)}))}},{key:"intersectsGeoPolygon",value:function(t){return this.segments.some((function(e){return Kv(t,e)}))}},{key:"points",value:function(){return this._points}}]),t}(),Dk=Wd();function jk(t,e){return Dk.get(t)(e)}Dk.add("rect",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(wk,e)})),Dk.add("circle",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(kk,e)})),Dk.add("line",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(Sk,e)})),Dk.add("polygon",Tk),Dk.add("geopolygon",Ok),Dk.add("polyline",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(Pk,e)}));var Fk=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];dh(this,t),this.set(e)}return ph(t,[{key:"set",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((function(e){var n=jk(e.type,e);n&&t.geometries.push(n)}))}},{key:"containsPoint",value:function(t){return this.geometries.some((function(e){return e.containsPoint(t)}))}},{key:"intersectsLine",value:function(t){return this.geometries.some((function(e){return e.intersectsLine(t)}))}},{key:"intersectsRect",value:function(t){return this.geometries.some((function(e){return e.intersectsRect(t)}))}},{key:"intersectsCircle",value:function(t){return this.geometries.some((function(e){return e.intersectsCircle(t)}))}},{key:"intersectsPolygon",value:function(t){return this.geometries.some((function(e){return e.intersectsPolygon(t)}))}},{key:"intersectsGeoPolygon",value:function(t){return this.geometries.some((function(e){return e.intersectsGeoPolygon(t)}))}}]),t}(),zk=function(){function t(){dh(this,t),this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}return ph(t,[{key:"clone",value:function(){return(new t).multiply(this)}},{key:"set",value:function(t){return this._elements=t,this}},{key:"save",value:function(){return this._stack.push(this.elements),this}},{key:"restore",value:function(){return this._stack.length&&(this._elements=this._stack.pop()),this}},{key:"add",value:function(t){var e,n;for(e=0;e<this._elements.length;e++)for(n=0;n<this._elements[e].length;n++)this._elements[e][n]+=t;return this}},{key:"translate",value:function(t,e){return this.multiply([[1,0,t],[0,1,e],[0,0,1]]),this}},{key:"rotate",value:function(t){var e=Math.cos(-t),n=Math.sin(-t);return this.multiply([[e,n,0],[-n,e,0],[0,0,1]]),this}},{key:"multiply",value:function(e){var n,r,i,s;if(e instanceof t&&(e=e._elements),Array.isArray(e)){for(i=[[0,0,0],[0,0,0],[0,0,0]],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)for(s=0;s<3;s++)i[n][r]+=this._elements[n][s]*e[s][r];this._elements=i}else for(n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)this._elements[n][r]*=e;return this}},{key:"scale",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.multiply([[t,0,0],[0,e,0],[0,0,1]]),this}},{key:"transform",value:function(t,e,n,r,i,s){return this.multiply([[t,n,i],[e,r,s],[0,0,1]]),this}},{key:"determinant",value:function(){var t=this._elements[0][0],e=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],s=this._elements[1][2],o=this._elements[2][0],a=this._elements[2][1],l=this._elements[2][2];return t*i*l+e*s*o+n*r*a-n*i*o-e*r*l-t*s*a}},{key:"invert",value:function(){var t=this.determinant(),e=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],s=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[s*c-o*l,r*l-n*c,n*o-r*s],[o*a-i*c,e*c-r*a,r*i-e*o],[i*l-s*a,a*n-e*l,e*s-n*i]],this.multiply(1/t),this}},{key:"transpose",value:function(){var t=Object.create(this._elements);return this._elements=[[t[0][0],t[1][0],t[2][0]],[t[0][1],t[1][1],t[2][1]],[t[0][2],t[1][2],t[2][2]]],this}},{key:"identity",value:function(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}},{key:"toString",value:function(){return"".concat(this._elements.map((function(t){return t.join("\t")})).join("\n"))}},{key:"isIdentity",value:function(){var t=this._elements;return 1===t[0][0]&&0===t[0][1]&&0===t[0][2]&&0===t[1][0]&&1===t[1][1]&&0===t[1][2]&&0===t[2][0]&&0===t[2][1]&&1===t[2][2]}},{key:"transformPoint",value:function(t){var e,n,r=[t.x,t.y,1],i=this._elements,s=[0,0,0];for(e=0;e<this._elements.length;e++)for(n=0;n<this._elements[e].length;n++)s[e]+=r[n]*i[e][n];return{x:s[0],y:s[1]}}},{key:"transformPoints",value:function(t){var e,n,r,i,s,o=this._elements,a=[];for(i=0;i<t.length;i++){for(e=[t[i].x,t[i].y,1],s=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)s[n]+=e[r]*o[n][r];a.push({x:s[0],y:s[1]})}return a}},{key:"elements",get:function(){var t=this._elements;return[[t[0][0],t[0][1],t[0][2]],[t[1][0],t[1][1],t[1][2]],[t[2][0],t[2][1],t[2][2]]]}}]),t}(),qk=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function Lk(t,e){var n=e.args[0]*(Math.PI/180);if(e.args.length>2){var r=e.args[1],i=e.args[2];t.translate(r,i),t.rotate(n),t.translate(-r,-i)}else 1===e.args.length&&t.rotate(n)}function Bk(t,e){var n=e.args[0],r=isNaN(e.args[1])?e.args[0]:e.args[1];t.scale(n,r)}function Hk(t,e){var n=e.args[0],r=isNaN(e.args[1])?0:e.args[1];t.translate(n,r)}function Vk(t,e){e.args.length>=6&&t.transform.apply(t,Th(e.args))}function Wk(t,e){for(var n,r=function(t){for(var e,n=[];null!==(e=qk.exec(t));){var r=e[2].trim(),i=-1===r.indexOf(",")?r.split(" "):r.split(",");n.push({cmd:e[1],args:i.filter((function(t){return t.trim().length>0})).map((function(t){return Number(t)}))})}return n}(t),i=0,s=r.length;i<s;i++)"rotate"===(n=r[i]).cmd?Lk(e,n):"scale"===n.cmd?Bk(e,n):"matrix"===n.cmd?Vk(e,n):"translate"===n.cmd&&Hk(e,n)}var $k={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},Uk={type:function(t,e){return e.filter((function(e){var n=e.type;return!!n&&n.toLowerCase()===t.toLowerCase()}))},attr:function(t,e,n,r){return r.filter((function(r){var i=r.attrs[t];if(!e)return void 0!==i;if(void 0===i)return!1;switch(e){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}}))},universal:function(t){return t},tag:function(t,e){return e.filter((function(e){var n=e.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(t.replace(".",""))}))}};function Yk(t,e,n){var r=t.type,i=t.points();n&&(i=i.every((function(t){return Array.isArray(t)}))?i.map((function(t){return n.transformPoints(t)})):n.transformPoints(i)),function(t,e){for(var n=0,r=t.length;n<r;n++)t[n].x/=e,t[n].y/=e}(i,e);var s=null;if("rect"===r||"bounds"===r)(s=Fh(i)).type=r;else if("circle"===r)(s=function(t,e){return{cx:t[0].x,cy:t[0].y,r:e}}(i,t.r)).type=r;else if("line"===r)(s=zh(i)).type=r;else if("polygon"===r||"polyline"===r)s={type:"path",d:ev(i,"polygon"===r)};else if("geopolygon"===r){for(var o="",a=0;a<i.length;a++)o+=ev(i[a],!0);s={type:"path",d:o}}return s}var Qk=function(){function t(e){var n=this;dh(this,t),this._bounds=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0},r=n.x,i=n.y,s=n.width,o=n.height;return{x:r,y:i,width:s,height:o}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=function(){return function(t,e){if(t.collider){var n=t.modelViewMatrix;return"collection"===t.colliderType?{type:"container",children:t.collider.geometries.map((function(t){return Yk(t,e,n)}))}:Yk(t.collider,e,n)}return null}(e,n._dpi)},this._desc=e.desc,this._tag=e.tag,this._children=function(){return e.children.map((function(e){return new t(e)}))},this._parent=function(){return e.parent?new t(e.parent):null},this._cache={elementBoundingRect:null},this._getElementBoundingRect=function(){return!n._cache.elementBoundingRect&&n.element&&(n._cache.elementBoundingRect=n.element.getBoundingClientRect()),n._cache.elementBoundingRect||{left:0,top:0}}}return ph(t,[{key:"children",get:function(){return this._children()}},{key:"parent",get:function(){return this._parent()}},{key:"type",get:function(){return this._type}},{key:"data",get:function(){return this._data}},{key:"attrs",get:function(){return this._attrs}},{key:"element",get:function(){return this._element},set:function(t){this._cache.elementBoundingRect=null,this._element=t}},{key:"key",get:function(){return this._key},set:function(t){this._key=t}},{key:"bounds",get:function(){var t=this._bounds();return t.x/=this._dpi,t.y/=this._dpi,t.width/=this._dpi,t.height/=this._dpi,t}},{key:"localBounds",get:function(){return this._bounds(!1)}},{key:"boundsRelativeTo",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=hh(t),r=e?this.bounds:this.localBounds,i=this._getElementBoundingRect(),s=i.left,o=i.top;if("object"===n&&null!==t&&"function"==typeof t.getBoundingClientRect){var a=t.getBoundingClientRect(),l=a.left,c=void 0===l?0:l,u=a.top,h=void 0===u?0:u;s-=c,o-=h}return r.x+=s,r.y+=o,r}},{key:"collider",get:function(){return this._collider()}},{key:"desc",get:function(){return this._desc}},{key:"tag",get:function(){return this._tag}}]),t}();function Kk(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(Qk,e)}var Zk=function(){function t(e){dh(this,t),this._node=Kk(e),this._parent=null,this._input=null}return ph(t,[{key:"node",get:function(){return this._node}},{key:"parent",get:function(){return this._parent},set:function(t){this._parent=t}},{key:"input",get:function(){return this._input},set:function(t){this._input=t}}]),t}();function Xk(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(Zk,e)}function Gk(t,e){var n=t.parent;if(n&&"stage"!==n.type){e.parent=Xk(n);var r=n.parent;r&&"stage"!==r.type&&Gk(r,e.parent)}}function Jk(t,e,n){if(null===t.colliderType)return null;var r=function(t,e){var n={};if(t.modelViewMatrix)if(Array.isArray(e))n=t.inverseModelViewMatrix.transformPoints(e);else if(isNaN(e.r))Array.isArray(e.vertices)?n.vertices=t.inverseModelViewMatrix.transformPoints(e.vertices):n=t.inverseModelViewMatrix.transformPoint(e);else{var r=t.inverseModelViewMatrix.transformPoint({x:e.cx,y:e.cy});n.cx=r.x,n.cy=r.y,n.r=e.r}else n=e;return Array.isArray(n.vertices)&&(n=n.vertices.every((function(t){return Array.isArray(t)}))?Ok(n):Tk(n)),n}(t,n);return"frontChild"===t.colliderType?function(t,e,n){for(var r=t.descendants.length-1;r>=0;r--){var i=t.descendants[r];if(null!==i.collider&&i.collider[e](n)){var s=Xk(i);return Gk(i,s),s}}return null}(t,e,r):function(t,e,n){if(t.collider[e](n)){var r=Xk(t);return Gk(t,r),r}return null}(t,e,r)}function tS(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=qh(t),r={};switch(n){case"circle":return r.cx=t.cx*e,r.cy=t.cy*e,r.r=t.r,["intersectsCircle",r];case"rect":return["intersectsRect",r=jh(t).map((function(t){return av(t,e)}))];case"line":return["intersectsLine",r=Dh(t).map((function(t){return av(t,e)}))];case"point":return["containsPoint",r=av(t,e)];case"polygon":return r.vertices=t.vertices.map((function(t){return av(t,e)})),["intersectsPolygon",r];case"geopolygon":return r.vertices=t.vertices.map((function(t){return t.map((function(t){return av(t,e)}))})),["intersectsGeoPolygon",r];default:return[]}}function eS(t,e){var n=Ch(tS(e,t.dpi),2);return function t(e,n,r){for(var i=e.length,s=0;s<i;s++){var o=e[s];if(null!==Jk(o,n,r))return!0;if(o.children&&!o.collider)return t(o.children,n,r)}return!1}([t],n[0],n[1])}var nS=function(t){vh(n,t);var e=Mh(n);function n(t){var r;return dh(this,n),(r=e.call(this,t))._stage=null,r._collider={type:null,definition:null,fn:null},r._attrs={},r._node=null,r}return ph(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=t;var e=t.data,n=t.desc,r=t.tag,i=t.strokeReference,s=t.fillReference;tv(this.attrs,t),void 0!==e&&(this.data=e),"object"===hh(n)&&(this.desc=ch(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof s&&(this.fillReference=s)}},{key:"findShapes",value:function(t){return function(t,e){var n,r,i=[],s=[];if(e.isBranch){var o;n=function(t){var e,n,r,i,s=[];return t.split(/\s*,\s*/).forEach((function(t){t=t.trim(),e=[];for(var o=function(s){(r=t.match($k[s]))&&(i=!0,t=t.slice(r[0].length),n={type:s,value:r[0]},"attr"===s&&(r=r[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),n.attribute=r[1],n.operator=r[2],n.attributeValue=r[3]),e.push(n))};t&&(i=!1,(r=t.match(/^\s*([>+~]|\s)\s*/))&&(i=!0,e.push({type:" ",value:r[0]}),t=t.slice(r[0].length)),Object.keys($k).forEach(o),e&&e.length&&s.indexOf(e)<0&&s.push(e),i););})),s}(t),r=e.descendants;for(var a=function(t,e){o=n[t];var i=[],a=r.slice(),l=!1;o.reverse().forEach((function(t){if(" "===t.type)return i.push(a),a=r.slice(),void(l=!1);a=function(t,e){if(!e||!e.length||!t||"function"!=typeof Uk[t.type])return[];switch(t.type){case"type":return Uk[t.type](t.value,e);case"attr":return Uk[t.type](t.attribute,t.operator,t.attributeValue,e);case"universal":return Uk[t.type](e);case"tag":return Uk[t.type](t.value,e);default:return[]}}(t,a),l=!0})),l&&i.push(a);var c=i[0].filter((function(t){for(var e,n=t.parent,r=1;r<i.length;r++){for(e=i[r].indexOf(n);n&&e<0;)e=i[r].indexOf(n=n.parent);if(e<0)return!1}return!0}));s.push(c)},l=0,c=n.length;l<c;l++)a(l);for(var u=0,h=s.length;u<h;u++)for(var d=0,f=s[u].length;d<f;d++)i.indexOf(s[u][d])<0&&i.push(s[u][d])}return i||[]}(t,this).map((function(t){return Kk(t)}))}},{key:"getItemsFrom",value:function(t){return function(t,e){var n=Ch(tS(e,t.dpi),2),r=n[0],i=[];return r&&(function t(e,n,r,i){for(var s=e.length,o=0;o<s;o++){var a=e[o],l=Jk(a,n,i);l&&r.push(l),!a.children||l||a.collider||t(a.children,n,r,i)}}([t],r,i,n[1]),function(t,e){for(var n=0,r=e.length;n<r;n++)e[n].input=t}(e,i)),i}(this,t)}},{key:"containsPoint",value:function(t){return eS(this,t)}},{key:"intersectsLine",value:function(t){return eS(this,t)}},{key:"intersectsRect",value:function(t){return eS(this,t)}},{key:"intersectsCircle",value:function(t){return eS(this,t)}},{key:"intersectsPolygon",value:function(t){return eS(this,t)}},{key:"intersectsGeoPolygon",value:function(t){return eS(this,t)}},{key:"resolveLocalTransform",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new zk;void 0!==this.attrs.transform&&Wk(this.attrs.transform,t),this.modelViewMatrix=t.clone()}},{key:"resolveGlobalTransform",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new zk,e=this.ancestors;if(e.length>0)for(var n=e.length-1;n>=0;n--)e[n].resolveLocalTransform(t),t=e[n].modelViewMatrix;this.resolveLocalTransform(t)}},{key:"attr",value:function(t){return this.attrs[t]}},{key:"equals",value:function(t){var e=this.attrs,r=Object.keys(e),i=t.attrs,s=Object.keys(i);if(r.length!==s.length)return!1;for(var o=0;o<r.length;o++){var a=r[o];if(!Object.hasOwnProperty.call(i,a))return!1;if(e[a]!==i[a])return!1}return Eh(xh(n.prototype),"equals",this).call(this,t)}},{key:"toJSON",value:function(){var t=Eh(xh(n.prototype),"toJSON",this).call(this);return t.attrs=this.attrs,t}},{key:"attrs",get:function(){return this._attrs}},{key:"stage",get:function(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}},{key:"modelViewMatrix",get:function(){return this._mvm},set:function(t){this._mvm=t,this._imvm=null}},{key:"inverseModelViewMatrix",get:function(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}},{key:"node",get:function(){return this._node},set:function(t){this._node=t}},{key:"collider",get:function(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(Fk,e)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=jk("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=jk(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn},set:function(t){var e=Array.isArray(t)?"collection":t&&t.type;return"string"!=typeof e?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===e&&null!==this._collider.fn?(this._collider.fn.set(t),void(this._collider.definition=t)):(this._collider.type=e,void(this._collider.definition=t))}},{key:"colliderType",get:function(){return this._collider.type}}]),n}(_k),rS=function(t){vh(n,t);var e=Mh(n);function n(){return dh(this,n),e.apply(this,arguments)}return ph(n,[{key:"addChild",value:function(t){if(!(t&&t instanceof _k))throw new TypeError("Expecting a Node as argument, but got ".concat(t));if(t===this)throw new Error("Can not add itself as child!");if(t._children&&t._children.length&&this.ancestors.indexOf(t)>=0)throw new Error("Can not add an ancestor as child!");return t._parent&&t._parent!==this&&t._parent.removeChild(t),this._children.push(t),t._parent=this,t._ancestors=null,this}},{key:"addChildren",value:function(t){var e,n=t?t.length:0;for(e=0;e<n;e++)this.addChild(t[e]);return this}},{key:"removeChild",value:function(t){var e=this._children.indexOf(t);return e>=0&&(this._children.splice(e,1),t._parent=null,t._ancestors=null),this}},{key:"removeChildren",value:function(t){var e,n;if(!this._children)return this;if(t)for(n=t.length,e=0;e<n;e++)this.removeChild(t[e]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}]),n}(_k),iS=rS.prototype,sS=function(t){vh(n,t);var e=Mh(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};dh(this,n);var i=r.type,s=void 0===i?"container":i;return(t=e.call(this,s)).set(r),t}return ph(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Eh(xh(n.prototype),"set",this).call(this,t);var e=t.collider,r=ch({type:null},e);this.collider=r,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"appendChildRect",value:function(t,e){if(void 0!==t.bounds){var n=this.__boundingRect[e]||{},r=Ch(t.bounds(e),3),i=r[0],s=r[2],o=i.x,a=i.y,l=s.x,c=s.y,u=isNaN(n.width)?l:Math.max(l,n.width+n.x),h=isNaN(n.height)?c:Math.max(c,n.height+n.y);n.x=isNaN(n.x)?o:Math.min(o,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=u-n.x,n.height=h-n.y,this.__boundingRect[e]=n}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];for(var e=this.children.length,n=0;n<e;n++)this.appendChildRect(this.children[n],t);return this.__boundingRect[t]=ch({x:0,y:0,width:0,height:0},this.__boundingRect[t]),this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.boundingRect(t);return this.__bounds[t]=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],this.__bounds[t]}},{key:"addChild",value:function(t){var e=iS.addChild.call(this,t);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(t,!0);var n=ch({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=n}return e}},{key:"addChildren",value:function(t){var e=iS.addChildren.call(this,t),n=t.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(var r=0;r<n;r++)this.appendChildRect(t[r],!0);var i=ch({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=i}return e}},{key:"removeChild",value:function(t){t._stage=null;var e,n=t.descendants,r=n?n.length:0;for(e=0;e<r;e++)n[e]._stage=null;if(iS.removeChild.call(this,t),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};var i=ch(this.boundingRect(!0),{type:"bounds"});this.collider=i}return this}},{key:"removeChildren",value:function(t){if(iS.removeChildren.call(this,t),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};var e=ch(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}]),n}(nS);function oS(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(sS,e)}var aS=function(t){vh(n,t);var e=Mh(n);function n(t){var r;return dh(this,n),(r=e.call(this,"stage"))._stage=kh(r),r._dpiRatio=t||1,r}return ph(n,[{key:"dpi",get:function(){return this._dpiRatio}}]),n}(sS),lS=rS.prototype,cS=["x1","x2","y1","y2","id","offset","style"],uS=function(t){vh(n,t);var e=Mh(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};dh(this,n);var i=r.type,s=void 0===i?"container":i;return(t=e.call(this,s)).set(r),t._boundingRect={},t}return ph(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Eh(xh(n.prototype),"set",this).call(this,t);for(var e=this.attrs,r="",i=0,s=cS.length;i!==s;i++)void 0!==t[r=cS[i]]&&(e[r]=t[r])}},{key:"addChild",value:function(t){return lS.addChild.call(this,t)}},{key:"addChildren",value:function(t){return lS.addChildren.call(this,t)}},{key:"removeChild",value:function(t){t._stage=null;var e,n=t.descendants,r=n?n.length:0;for(e=0;e<r;e++)n[e]._stage=null;return lS.removeChild.call(this,t),this}},{key:"removeChildren",value:function(t){return lS.removeChildren.call(this,t),this}}]),n}(nS);function hS(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(uS,e)}var dS=rS.prototype,fS=["patternUnits","x","y","width","height","id"],pS=function(t){vh(n,t);var e=Mh(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};dh(this,n);var i=r.type,s=void 0===i?"container":i;return(t=e.call(this,s)).set(r),t._boundingRect={},t}return ph(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Eh(xh(n.prototype),"set",this).call(this,t);for(var e=this.attrs,r="",i=0,s=fS.length;i!==s;i++)void 0!==t[r=fS[i]]&&(e[r]=t[r])}},{key:"addChild",value:function(t){return dS.addChild.call(this,t)}},{key:"addChildren",value:function(t){return dS.addChildren.call(this,t)}},{key:"removeChild",value:function(t){t._stage=null;var e,n=t.descendants,r=n?n.length:0;for(e=0;e<r;e++)n[e]._stage=null;return dS.removeChild.call(this,t),this}},{key:"removeChildren",value:function(t){return dS.removeChildren.call(this,t),this}}]),n}(nS),yS=function(t){vh(n,t);var e=Mh(n);function n(){var t,r;return dh(this,n),(t=r=e.call(this,"rect")).set.apply(t,arguments),r}return ph(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x,r=void 0===e?0:e,i=t.y,s=void 0===i?0:i,o=t.width,a=void 0===o?0:o,l=t.height,c=void 0===l?0:l,u=t.rx,h=void 0===u?0:u,d=t.ry,f=void 0===d?0:d,p=t.collider,y=ch({type:"rect",x:r,y:s,width:a,height:c},p);Eh(xh(n.prototype),"set",this).call(this,t),a>=0?(this.attrs.x=r,this.attrs.width=a):(this.attrs.x=r+a,this.attrs.width=-a),c>=0?(this.attrs.y=s,this.attrs.height=c):(this.attrs.y=s+c,this.attrs.height=-c),h>0&&(this.attrs.rx=h),f>0&&(this.attrs.ry=f),this.collider=y,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];var e=jh(this.attrs),n=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(e):e,r=Ph(n),i=Ch(r,4),s=i[0],o=i[1],a=i[2],l=i[3];return this.__boundingRect[t]={x:s,y:o,width:a-s,height:l-o},this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.boundingRect(t);return this.__bounds[t]=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],this.__bounds[t]}}]),n}(nS),gS=function(t){vh(n,t);var e=Mh(n);function n(){var t,r;return dh(this,n),(t=r=e.call(this,"circle")).set.apply(t,arguments),r}return ph(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.cx,r=void 0===e?0:e,i=t.cy,s=void 0===i?0:i,o=t.r,a=void 0===o?0:o,l=t.collider,c=ch({type:"circle",cx:r,cy:s,r:a},l);Eh(xh(n.prototype),"set",this).call(this,t),this.attrs.cx=r,this.attrs.cy=s,this.attrs.r=a,this.collider=c,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];var e=this.bounds(t);return this.__boundingRect[t]={x:e[0].x,y:e[0].y,width:e[2].x-e[0].x,height:e[2].y-e[0].y},this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.attrs,n=e.cx,r=e.cy,i=e.r,s=e.r,o=n-i,a=r-s,l=2*i,c=2*s,u=[{x:o,y:a},{x:o+l,y:a},{x:o+l,y:a+c},{x:o,y:a+c}];if(t&&this.modelViewMatrix){var h=Ph(u=this.modelViewMatrix.transformPoints(u)),d=Ch(h,4),f=d[0],p=d[1],y=d[2],g=d[3];this.__bounds[t]=[{x:f,y:p},{x:f+(l=y-f),y:p},{x:f+l,y:p+(c=g-p)},{x:f,y:p+c}]}else this.__bounds[t]=u;return this.__bounds[t]}}]),n}(nS),mS=function(t){vh(n,t);var e=Mh(n);function n(){var t,r;return dh(this,n),(t=r=e.call(this,"line")).set.apply(t,arguments),r}return ph(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x1,r=void 0===e?0:e,i=t.y1,s=void 0===i?0:i,o=t.x2,a=void 0===o?0:o,l=t.y2,c=void 0===l?0:l,u=t.collider;Eh(xh(n.prototype),"set",this).call(this,t),this.attrs.x1=r,this.attrs.y1=s,this.attrs.x2=a,this.attrs.y2=c;var h={type:"line",x1:r,y1:s,x2:a,y2:c};this.collider=ch(h,u),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];var e=Dh(this.attrs);t&&this.modelViewMatrix&&(e=this.modelViewMatrix.transformPoints(e));var n=Ph(e),r=Ch(n,4),i=r[0],s=r[1],o=r[2],a=r[3],l=i!==o||s!==a;return this.__boundingRect[t]={x:i,y:s,width:l?Math.max(1,o-i):0,height:l?Math.max(1,a-s):0},this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.boundingRect(t);return this.__bounds[t]=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],this.__bounds[t]}}]),n}(nS),vS=Math.PI/2;function xS(t,e){var n=Math.atan2(e.y-t.y,e.x-t.x);return n<0?n+2*Math.PI:n}function bS(t,e,n){return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}}function _S(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=[],i=[];if("h"===n.forceOrientation){var s=t[0].x<t[1].x?-1:1,o=t[t.length-1].x>t[t.length-2].x?1:-1;t.unshift({x:t[0].x+s,y:t[0].y}),t.push({x:t[t.length-1].x+o,y:t[t.length-1].y})}else if("v"===n.forceOrientation){var a=t[0].y<t[1].y?-1:1,l=t[t.length-1].y>t[t.length-2].y?1:-1;t.unshift({x:t[0].x,y:t[0].y+a}),t.push({x:t[t.length-1].x,y:t[t.length-1].y+l})}for(var c=t.length-1,u=1;u<c;u++){var h=t[u-1],d=t[u],f=t[u+1],p=xS(d,h),y=xS(d,f),g=(p+y)/2,m=g+Math.PI,v=Math.max(g,m),x=Math.min(g,m),b=p>y;if(1===u){var _=xS(h,d);r.push(bS(h,_-vS,e)),i.unshift(bS(h,_+vS,e))}var w=b?v:x,k=b?x:v;if(r.push(bS(d,w,e)),i.unshift(bS(d,k,e)),u===c-1){var S=xS(f,d);r.push(bS(f,S+vS,e)),i.unshift(bS(f,S-vS,e))}}return{type:"polygon",vertices:[].concat(r,i)}}function wS(t){for(var e,n=[],r=t.length,i=0;i<r;i++){e=t[i];for(var s=0;s<e.length;s++)n.push(e[s])}return n}function kS(t){if(t.length<2)return!1;var e=t[0],n=t[t.length-1];return Math.abs(e.x-n.x)<1e-12&&Math.abs(e.y-n.y)<1e-12}var SS=function(t){vh(n,t);var e=Mh(n);function n(){var t,r;return dh(this,n),(t=r=e.call(this,"path")).set.apply(t,arguments),r}return ph(n,[{key:"set",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Eh(xh(n.prototype),"set",this).call(this,e),this.segments=[],this.points=[],this.attrs.d=e.d,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"===hh(e.collider)&&void 0!==e.collider.type)this.collider=e.collider;else if(e.d){if(this.segments=vk(e.d),this.segments.length>1&&this.segments.every((function(t){return kS(t)})))return void(this.collider=ch({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((function(n){n.length<=1||(t.collider=kS(n)?ch({type:"polygon",vertices:n},e.collider):"object"===hh(e.collider)&&e.collider.visual?_S(n,t.attrs["stroke-width"]/2,e.collider):ch({type:"polyline",points:n},e.collider))}))}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];this.points.length||(this.segments=this.segments.length?this.segments:vk(this.attrs.d),this.points=wS(this.segments));var e=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,n=Ph(e),r=Ch(n,4),i=r[0],s=r[1],o=r[2],a=r[3];return this.__boundingRect[t]={x:i||0,y:s||0,width:o-i||0,height:a-s||0},this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.boundingRect(t);return this.__bounds[t]=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],this.__bounds[t]}}]),n}(nS);function MS(t){return null!=t.data&&(t._boundingRect||t._textBoundsFn)}var ES=function(t){vh(n,t);var e=Mh(n);function n(){var t,r;return dh(this,n),(t=r=e.call(this,"text")).set.apply(t,arguments),r}return ph(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x,r=void 0===e?0:e,i=t.y,s=void 0===i?0:i,o=t.dx,a=void 0===o?0:o,l=t.dy,c=void 0===l?0:l,u=t.textBoundsFn,h=t.text,d=t.title,f=t.collider,p=t.boundingRect,y=t.ellipsed;Eh(xh(n.prototype),"set",this).call(this,t),this.attrs.x=r,this.attrs.y=s,this.attrs.dx=a,this.attrs.dy=c,this.attrs.text=h,void 0!==d&&(this.attrs.title=String(d)),"object"===hh(p)?this._textBoundsFn=function(){return p}:"function"==typeof u&&(this._textBoundsFn=u),"string"==typeof y&&(this.ellipsed=y),this.collider=ch({type:MS(this)?"bounds":null},f),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};var e=jh(this._textBoundsFn(this.attrs)),n=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(e):e,r=Ph(n),i=Ch(r,4),s=i[0],o=i[1],a=i[2],l=i[3];return this.__boundingRect[t]={x:s,y:o,width:a-s,height:l-o},this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.boundingRect(t);return this.__bounds[t]=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],this.__bounds[t]}}]),n}(nS),CS=Wd();function TS(t,e){return CS.get(t)(e)}CS.add("rect",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(yS,e)})),CS.add("circle",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(gS,e)})),CS.add("text",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(ES,e)})),CS.add("line",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(mS,e)})),CS.add("path",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(SS,e)})),CS.add("stage",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(aS,e)})),CS.add("container",oS),CS.add("defs",oS),CS.add("linearGradient",hS),CS.add("radialGradient",hS),CS.add("stop",hS),CS.add("pattern",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wh(pS,e)}));var AS=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=[{}];function n(){return e[e.length-1]}return n.save=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n(),s={},o="",a=0;a<t.length;a++)void 0!==i[o=t[a]]&&(s[o]=i[o]);return ch(s,r),e.push(s),n()},n.restore=function(){e.splice(e.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function NS(t,e){if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)e[n](t)}function RS(t,e,n){t.node=n[e],t.index=e}function OS(t){var e=t.items,n=t.stage,r=t.on,i=void 0===r?{}:r;return n||(n=TS("stage",t.dpi)),function t(e,n,r,i){for(var s={siblings:e,node:null,index:0},o=0,a=e.length;o<a;o++)if(RS(s,o,e),NS(s,i.create),!("function"==typeof s.node.disabled?s.node.disabled():s.node.disabled)){s.node=AS.save(s.node);var l=TS(s.node.type,s.node);l&&(s.node.transform&&(r.save(),Wk(s.node.transform,r)),r.isIdentity()||(l.modelViewMatrix=r.clone()),n.addChild(l),s.node.children&&t(s.node.children,l,r,i),s.node.transform&&r.restore()),AS.restore()}}(e,n,new zk,i),n}function IS(t,e,n){var r=n.degree,i=n.stops,s=void 0===i?[]:i,o=null;if("radial"===n.orientation){var a=e.boundingRect();o=t.createRadialGradient(a.x+a.width/2,a.y+a.height/2,1e-5,a.x+a.width/2,a.y+a.height/2,Math.max(a.width,a.height)/2)}else{var l=iv(r);["x1","x2","y1","y2"].forEach((function(t){t in n&&(l[t]=n[t])}));var c=e.boundingRect();o=t.createLinearGradient(c.x+l.x1*c.width,c.y+l.y1*c.height,c.x+l.x2*c.width,c.y+l.y2*c.height)}for(var u=0,h=s.length;u<h;u++){var d=s[u];o.addColorStop(d.offset,d.color)}return o}function PS(t,e,n){return e.width=t.width,e.height=t.height,n.save(),n.fillStyle=t.fill,t.shapes.forEach((function(t){switch(t.type){case"rect":n.rect(t.x,t.y,t.width,t.height)}})),n.fill(),n.restore(),n.createPattern(e,"repeat")}function DS(t){var e=t.createElement("canvas"),n=e.getContext("2d"),r={};return{create:function(t){var i=t.key;return i?(r[i]=r[i]||PS(t,e,n),r[i]):PS(t,e,n)},clear:function(){r={}}}}function jS(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x,n=t.y,r=t.width,i=t.height,s=t.scaleRatio,o=t.margin,a=t.edgeBleed,l={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return l.x=isNaN(e)?l.x:e,l.y=isNaN(n)?l.y:n,l.width=isNaN(r)?l.width:r,l.height=isNaN(i)?l.height:i,void 0!==s&&(l.scaleRatio.x=isNaN(s.x)?l.scaleRatio.x:s.x,l.scaleRatio.y=isNaN(s.y)?l.scaleRatio.y:s.y),void 0!==o&&(l.margin.left=isNaN(o.left)?0:o.left,l.margin.top=isNaN(o.top)?0:o.top),"object"===hh(a)&&["left","right","top","bottom"].forEach((function(t){!isNaN(a[t])&&a[t]>0&&(l.edgeBleed[t]=a[t],l.edgeBleed.bool=!0)})),l.computedPhysical={x:Math.round(l.margin.left+(l.x-l.edgeBleed.left)*l.scaleRatio.x),y:Math.round(l.margin.top+(l.y-l.edgeBleed.top)*l.scaleRatio.y),width:Math.round((l.width+l.edgeBleed.left+l.edgeBleed.right)*l.scaleRatio.x),height:Math.round((l.height+l.edgeBleed.top+l.edgeBleed.bottom)*l.scaleRatio.y)},l}function FS(){var t={element:function(){},root:function(){},settings:function(){},appendTo:function(){},render:function(){return!1},itemsAt:function(){return[]},findShapes:function(){return[]},clear:function(){},destory:function(){},size:function(){},measureText:mw,textBounds:xw,setKey:function(e){t.element().setAttribute("data-key",e)}};return t}function zS(t){return function(e){var n=e.node;"text"!==n.type||null==n.data||n.textBoundsFn||(n.textBoundsFn=t.textBounds)}}var qS=function(){function t(e){dh(this,t),this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}return ph(t,[{key:"updateSize",value:function(t){var e,n=t.rect,r=t.dpiRatio,i=t.canvasBufferSize;e=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+400,height:n.computedPhysical.height+400},this.bufferCanvas.style.width="".concat(e.width,"px"),this.bufferCanvas.style.height="".concat(e.height,"px"),this.bufferCanvas.width=Math.round(e.width*r),this.bufferCanvas.height=Math.round(e.height*r)}},{key:"apply",value:function(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}},{key:"clear",value:function(){this.bufferCanvas.width=this.bufferCanvas.width}},{key:"getContext",value:function(){return this.bufferCanvas.getContext("2d")}}]),t}(),LS=Wd();function BS(t){return Array.isArray(t)?t:"string"==typeof t?-1!==t.indexOf(",")?t.split(","):t.split(" "):[]}function HS(t){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}function VS(t,e){e.setTransform(t[0][0],t[1][0],t[0][1],t[1][1],t[0][2],t[1][2])}function WS(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=Object.keys(r),s=0,o=n.length;s<o;s++){var a=n[s],l=a[0],c=a[1],u=a[2];if(l in e.attrs&&!(c in r)&&t[c]!==e.attrs[l]){var h=u?u(e.attrs[l]):e.attrs[l];"function"==typeof t[c]?t[c](h):t[c]=h}}for(var d=0,f=i.length;d<f;d++){var p=i[d];t[p]=r[p]}}function $S(t,e,n,r){for(var i=0,s=t.length;i<s;i++){var o=t[i],a={};e.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"===hh(o.attrs.fill)&&"gradient"===o.attrs.fill.type?a.fillStyle=IS(e,o,o.attrs.fill):o.attrs.fill&&"object"===hh(o.attrs.fill)&&"pattern"===o.attrs.fill.type&&(a.fillStyle=r.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"===hh(o.attrs.stroke)&&"gradient"===o.attrs.stroke.type?a.strokeStyle=IS(e,o,o.attrs.stroke):o.attrs.stroke&&"object"===hh(o.attrs.stroke)&&"pattern"===o.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(o.attrs.stroke))),WS(e,o,n,a),o.modelViewMatrix&&VS(o.modelViewMatrix.elements,e),LS.has(o.type)&&LS.get(o.type)(o.attrs,{g:e,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&$S(o.children,e,n,r),e.restore()}}function US(t){var e=t.el,n=t.dpiRatio,r=t.transform;if("object"===hh(r)){var i=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n],s=e.getContext("2d");s.setTransform.apply(s,i)}}function YS(){var t,e,n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:OS,s={transform:void 0,canvasBufferSize:void 0},o=!1,a=jS(),l=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",BS]],c=FS();return c.element=function(){return t},c.root=function(){return t},c.settings=function(t){return t&&Object.keys(s).forEach((function(e){void 0!==t[e]&&(s[e]=t[e])})),s},c.appendTo=function(n){return t||((t=n.ownerDocument.createElement("canvas")).style.position="absolute",t.style["-webkit-font-smoothing"]="antialiased",t.style["-moz-osx-font-smoothing"]="antialiased",t.style.pointerEvents="none"),"function"!=typeof s.transform||e||(e=new qS(t)),n.appendChild(t),t},c.render=function(u){if(!t)return!1;r||(r=DS(t.ownerDocument));var h=e&&e.getContext()||t.getContext("2d"),d=HS(h),f=e&&s.transform();if(f)return t.width=t.width,US({el:t,dpiRatio:d,transform:f}),e.apply(),!0;var p=a.scaleRatio.x,y=a.scaleRatio.y;o&&(t.style.left="".concat(a.computedPhysical.x,"px"),t.style.top="".concat(a.computedPhysical.y,"px"),t.style.width="".concat(a.computedPhysical.width,"px"),t.style.height="".concat(a.computedPhysical.height,"px"),t.width=Math.round(a.computedPhysical.width*d),t.height=Math.round(a.computedPhysical.height*d),e&&e.updateSize({rect:a,dpiRatio:d,canvasBufferSize:s.canvasBufferSize}));var g={type:"container",children:u,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*d*p,", ").concat(a.edgeBleed.top*d*y,")"):""};1===d&&1===p&&1===y||(g.transform+="scale(".concat(d*p,", ").concat(d*y,")"));var m=i({items:[g],dpi:d,on:{create:[lw(c.measureText),zS(c)]}}),v=!n||!m.equals(n);r.clear();var x=o||v;return x&&(c.clear(),$S(m.children,h,l,{patterns:r})),e&&(t.width=t.width,e.apply()),o=!1,n=m,x},c.itemsAt=function(t){return n?n.getItemsFrom(t):[]},c.findShapes=function(t){return n?n.findShapes(t):[]},c.clear=function(){return t&&(t.width=t.width),e&&e.clear(),n=null,c},c.size=function(t){if(t){var e=jS(t);JSON.stringify(a)!==JSON.stringify(e)&&(o=!0,a=e)}return a},c.destroy=function(){t&&(t.parentElement&&t.parentElement.removeChild(t),t=null),e&&(e=null),n=null},c}function QS(t,e){LS.add(t,e)}function KS(t,e){return Math.max(0,Math.min(t,e))}var ZS=new RegExp("[A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u02bb-\u02c1\u02d0-\u02d1\u02e0-\u02e4\u02ee\u0370-\u0373\u0376-\u037d\u0386\u0388-\u03f5\u03f7-\u0482\u048a-\u0589\u0903-\u0939\u093b\u093d-\u0940\u0949-\u094c\u094e-\u0950\u0958-\u0961\u0964-\u097f\u0982-\u09b9\u09bd-\u09c0\u09c7-\u09cc\u09ce-\u09e1\u09e6-\u09f1\u09f4-\u09fa\u0a03-\u0a39\u0a3e-\u0a40\u0a59-\u0a6f\u0a72-\u0a74\u0a83-\u0ab9\u0abd-\u0ac0\u0ac9-\u0acc\u0ad0-\u0ae1\u0ae6-\u0aef\u0b02-\u0b39\u0b3d-\u0b3e\u0b40\u0b47-\u0b4c\u0b57-\u0b61\u0b66-\u0b77\u0b83-\u0bbf\u0bc1-\u0bcc\u0bd0-\u0bf2\u0c01-\u0c3d\u0c41-\u0c44\u0c58-\u0c61\u0c66-\u0c6f\u0c7f-\u0cb9\u0cbd-\u0ccb\u0cd5-\u0ce1\u0ce6-\u0d40\u0d46-\u0d4c\u0d4e-\u0d61\u0d66-\u0dc6\u0dcf-\u0dd1\u0dd8-\u0e30\u0e32-\u0e33\u0e40-\u0e46\u0e4f-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec6\u0ed0-\u0f17\u0f1a-\u0f34\u0f36\u0f38\u0f3e-\u0f6c\u0f7f\u0f85\u0f88-\u0f8c\u0fbe-\u0fc5\u0fc7-\u102c\u1031\u1038\u103b-\u103c\u103f-\u1057\u105a-\u105d\u1061-\u1070\u1075-\u1081\u1083-\u1084\u1087-\u108c\u108e-\u109c\u109e-\u135a\u1360-\u138f\u13a0-\u13f4\u1401-\u167f\u1681-\u169a\u16a0-\u1711\u1720-\u1731\u1735-\u1751\u1760-\u1770\u1780-\u17b6\u17be-\u17c5\u17c7-\u17c8\u17d4-\u17da\u17dc\u17e0-\u17e9\u1810-\u18a8\u18aa-\u191c\u1923-\u1926\u1929-\u1931\u1933-\u1938\u1946-\u19da\u1a00-\u1a16\u1a19-\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1a80-\u1aad\u1b04-\u1b33\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b6a\u1b74-\u1b7c\u1b82-\u1ba1\u1ba6-\u1ba7\u1baa-\u1be5\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1c2b\u1c34-\u1c35\u1c3b-\u1c7f\u1cd3\u1ce1\u1ce9-\u1cec\u1cee-\u1dbf\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u200e\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e-\u214f\u2160-\u2188\u2336-\u237a\u2395\u249c-\u24e9\u26ac\u2800-\u28ff\u2c00-\u2ce4\u2ceb-\u2cee\u2d00-\u2d70\u2d80-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u31ba\u31f0-\u321c\u3220-\u324f\u3260-\u327b\u327f-\u32b0\u32c0-\u32cb\u32d0-\u3376\u337b-\u33dd\u33e0-\u33fe\u3400-\u4db5\u4e00-\ua48c\ua4d0-\ua60c\ua610-\ua66e\ua680-\ua6ef\ua6f2-\ua6f7\ua722-\ua787\ua789-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua824\ua827\ua830-\ua837\ua840-\ua873\ua880-\ua8c3\ua8ce-\ua8d9\ua8f2-\ua925\ua92e-\ua946\ua952-\ua97c\ua983-\ua9b2\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\uaa28\uaa2f-\uaa30\uaa33-\uaa34\uaa40-\uaa42\uaa44-\uaa4b\uaa4d-\uaaaf\uaab1\uaab5-\uaab6\uaab9-\uaabd\uaac0\uaac2-\uabe4\uabe6-\uabe7\uabe9-\uabec\uabf0-\ufb17\uff21-\uff3a\uff41-\uff5a\uff66-\uffdc]"),XS=new RegExp("[\u05be\u05c0\u05c3\u05c6\u05d0-\u05f4\u07c0-\u07ea\u07f4-\u07f5\u07fa-\u0815\u081a\u0824\u0828\u0830-\u0858\u085e\u200f\ufb1d\ufb1f-\ufb28\ufb2a-\ufb4f]"),GS=new RegExp("[\u0608\u060b\u060d\u061b-\u064a\u066d-\u066f\u0671-\u06d5\u06e5-\u06e6\u06ee-\u06ef\u06fa-\u070d\u0710\u0712-\u072f\u074d-\u07a5\u07b1\ufb50-\ufd3d\ufd50-\ufdfc\ufe70-\ufefc]");function JS(t){return ZS.test(t)}function tM(t){return XS.test(t)||GS.test(t)}function eM(t){var e,n,r=t?t.length:0;for(e=0;e<r;e++){if(JS(n=t[e]))return"ltr";if(tM(n))return"rtl"}return"ltr"}var nM={start:"end",end:"start",center:"center",middle:"middle"};function rM(t,e){return"rtl"===e?nM[t]:t}function iM(t,e,n){for(var r=0,i=t.length;r<i;r++)t[r].object=n(t[r].content.type,e)}function sM(t,e){for(var n=0,r=t.length;n<r;n++)null!=t[n].object&&(e(t[n].object),t[n].object=null)}function oM(t,e,n,r,i,s){var o=function t(e,n){var r,i,s,o=[],a=[],l=[],c=[],u=function(t){return t.id},h=function(t,e){var n;return n="object"===hh(t)?"id"in t?t.id:e:t,{content:t,id:"".concat(n,"__").concat(t.type||"")}};e.isTree||(e=e.map(h)),n=n.map(h),i=e.map(u),s=n.map(u);for(var d=0,f=n.length;d<f;d++)-1===i.indexOf(n[d].id)?o.push(n[d]):l.push(n[d]);for(var p=0,y=e.length;p<y;p++)-1===s.indexOf(e[p].id)?a.push(e[p]):c.push(e[p]);for(var g=0,m=o.length;g<m;g++)o[g].content.children&&(o[g].diff=t([],o[g].content.children),o[g].children=o[g].diff.updatedNew.concat(o[g].diff.added),o[g].children.isTree=!0);for(var v=0,x=l.length;v<x;v++)l[v].diff=t(c[v].children||[],l[v].content.children||[]),l[v].object=c[v].object,l[v].children=l[v].diff.items;return r=l.concat(o),o.isTree=!0,a.isTree=!0,l.isTree=!0,c.isTree=!0,r.isTree=!0,{added:o,updatedNew:l,updatedOld:c,removed:a,items:r}}(t,e);return iM(o.added,n,r),sM(o.removed,s),function t(e,n,r,i){for(var s,o=0,a=e.length;o<a;o++)null!=(s=e[o]).object&&(r(s.object,s.content),s.diff&&(iM(s.diff.added,s.object,n),sM(s.diff.removed,i),t(s.diff.items,n,r,i)))}(o.items,r,i,s),o.items}QS("rect",(function(t,e){var n=e.g,r=e.doFill,i=e.doStroke;n.beginPath(),t.rx>0||t.ry>0?function(t,e,n,r,i,s,o){s=KS(r/2,s>0?s:o),o=KS(i/2,o>0?o:s),t.moveTo(e,n+o),t.lineTo(e,n+i-o),t.quadraticCurveTo(e,n+i,e+s,n+i),t.lineTo(e+r-s,n+i),t.quadraticCurveTo(e+r,n+i,e+r,n+i-o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e+r,n,e+r-s,n),t.lineTo(e+s,n),t.quadraticCurveTo(e,n,e,n+o)}(n,t.x,t.y,t.width,t.height,t.rx,t.ry):n.rect(t.x,t.y,t.width,t.height),r&&n.fill(),i&&n.stroke()})),QS("circle",(function(t,e){var n=e.g,r=e.doFill,i=e.doStroke;n.beginPath(),n.moveTo(t.cx+t.r,t.cy),n.arc(t.cx,t.cy,t.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()})),QS("line",(function(t,e){var n=e.g,r=e.doStroke;n.beginPath(),n.moveTo(t.x1,t.y1),n.lineTo(t.x2,t.y2),r&&n.stroke()})),QS("path",(function(t,e){var n=e.g,r=e.doStroke,i=e.doFill,s=new Path2D(t.d);i&&n.fill(s),r&&n.stroke(s)})),QS("text",(function(t,e){var n=e.g,r=e.ellipsed||cw(t,mw);n.font="".concat(t["font-size"]," ").concat(t["font-family"]);var i=eM(t.text);n.canvas.dir!==i&&(n.canvas.dir=i);var s=rM("middle"===t["text-anchor"]?"center":t["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);var o=uw(t);n.fillText(r,t.x+t.dx,t.y+t.dy+o)}));var aM="http://www.w3.org/2000/svg",lM=function(t,e){if(!t||"string"!=typeof t)throw new Error("Invalid type: ".concat(t));var n=e.ownerDocument.createElementNS(aM,"container"===t?"g":t);return e.appendChild(n),n},cM=function(t){t.parentNode&&t.parentNode.removeChild(t)},uM=function(t,e){if(function(t){switch(t.type){case"circle":return!isNaN(t.attrs.cx)&&!isNaN(t.attrs.cy)&&!isNaN(t.attrs.r);case"line":return!(isNaN(t.attrs.x1)||isNaN(t.attrs.y1)||isNaN(t.attrs.x2)||isNaN(t.attrs.y2));case"rect":return!(isNaN(t.attrs.x)||isNaN(t.attrs.y)||isNaN(t.attrs.width)||isNaN(t.attrs.height));case"text":return!isNaN(t.attrs.x)&&!isNaN(t.attrs.y);default:return!0}}(e)){for(var n in e.attrs)if("stroke"===n&&e.strokeReference)t.setAttribute("stroke",e.strokeReference);else if("fill"===n&&e.fillReference)t.setAttribute("fill",e.fillReference);else if("text"===n){t.setAttribute("style","white-space: pre"),t.textContent=e.ellipsed||cw(e.attrs,mw);var r=eM(e.attrs.text);"rtl"===r&&(t.setAttribute("direction","rtl"),t.setAttribute("dir","rtl"),t.setAttribute("text-anchor",rM(t.getAttribute("text-anchor"),r)))}else if("text"!==e.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===e.type&&"title"===n&&e.attrs.title){var i=t.ownerDocument.createElementNS(aM,"title");i.textContent=e.attrs.title,t.appendChild(i)}else t.setAttribute(n,e.attrs[n]);else{var s,o=+t.getAttribute(n)||0;s="dominant-baseline"===n?uw(e.attrs):e.attrs[n],t.setAttribute("dy",s+o)}if("string"==typeof e.data||"number"==typeof e.data||"boolean"==typeof e.data)t.setAttribute("data",e.data);else if("object"===hh(e.data)&&null!==e.data)for(var a in e.data)"string"!=typeof e.data[a]&&"number"!=typeof e.data[a]&&"boolean"!=typeof e.data[a]||t.setAttribute("data-".concat(a),e.data[a])}},hM=function(){function t(e,n,r,i){dh(this,t),this.create=e,this.nodeCreator=n,this.nodeMaintainer=r,this.nodeDestroyer=i}return ph(t,[{key:"render",value:function(t,e){return this.create([],t,e,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}]),t}();function dM(){return new hM(oM,lM,uM,cM)}function fM(t){var e,n,r=0;if(0===(t=JSON.stringify(t)).length)return r;for(e=0,n=t.length;e<n;e++)r=(r<<5)-r+t.charCodeAt(e),r&=r;return r}function pM(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fM,n={},r=Date.now(),i={getOrCreateGradient:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=e(i[s]),l="picasso-gradient-".concat(r,"-").concat(a);if(!n[a]){var c=i[s],u=c.orientation,h=c.degree,d=c.stops,f=void 0===d?[]:d,p={};void 0===h&&(h=90),"radial"===u?p.type="radialGradient":(p=iv(h),["x1","x2","y1","y2"].forEach((function(t){t in i[s]&&(p[t]=i[s][t])})),p.type="linearGradient"),p.id=l,p.children=f.map((function(t){var e=t.color,n=t.opacity;return{type:"stop",offset:"".concat(100*t.offset,"%"),style:"stop-color:".concat(e,";stop-opacity:").concat(void 0!==n?n:1)}})),t.push(p),n[a]=l}return"url('".concat(o,"#").concat(l,"')")},onCreate:function(t){var e="";"undefined"!=typeof window&&(e=window.location.href.split("#")[0]);var n=t.node;n.fill&&"object"===hh(n.fill)&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",e)),n.stroke&&"object"===hh(n.stroke)&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",e))},clear:function(){n={}}};return i}function yM(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fM,n={},r=Date.now(),i={onCreate:function(i){var s={};i.node&&"object"===hh(i.node.fill)&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(s.fill=i.node.fill),i.node&&"object"===hh(i.node.stroke)&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(s.stroke=i.node.stroke),Object.keys(s).forEach((function(o){var a="",l=s[o],c=e(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(a=window.location.href.split("#")[0]),!n[c]){var h={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach((function(t){h.children.push(t)})),t.push(h),n[c]=!0}i.node["".concat(o,"Reference")]="url('".concat(a,"#").concat(u,"')")}))},clear:function(){n={}}};return i}function gM(){var t,e,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dM,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aM,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:OS,o=r(),a=!1,l=jS(),c={transform:void 0},u=FS(),h={type:"defs",children:[]},d=yM(h.children),f=pM(h.children);return u.element=function(){return t},u.root=function(){return e},u.settings=function(t){return t&&Object.keys(c).forEach((function(e){void 0!==t[e]&&(c[e]=t[e])})),c},u.appendTo=function(n){return t||((t=n.ownerDocument.createElementNS(i,"svg")).style.position="absolute",t.style["-webkit-font-smoothing"]="antialiased",t.style["-moz-osx-font-smoothing"]="antialiased",t.style.pointerEvents="none",t.setAttribute("xmlns",i),(e=n.ownerDocument.createElementNS(i,"g")).style.pointerEvents="auto",t.appendChild(e)),n.appendChild(t),t},u.render=function(r){if(!t)return!1;var i="function"==typeof c.transform&&c.transform();if(i){var p=i.b,y=i.c,g=i.d,m=i.e,v=i.f;return e.style.transform="matrix(".concat(i.a,", ").concat(p,", ").concat(y,", ").concat(g,", ").concat(m,", ").concat(v,")"),!0}e.style.transform="";var x=l.scaleRatio.x,b=l.scaleRatio.y;a&&(t.style.left="".concat(l.computedPhysical.x,"px"),t.style.top="".concat(l.computedPhysical.y,"px"),t.setAttribute("width",l.computedPhysical.width),t.setAttribute("height",l.computedPhysical.height)),f.clear(),d.clear(),h.children.length=0;var _={type:"container",children:Array.isArray(r)?[].concat(Th(r),[h]):r,transform:l.edgeBleed.bool?"translate(".concat(l.edgeBleed.left*x,", ").concat(l.edgeBleed.top*b,")"):""};1===x&&1===b||(_.transform+="scale(".concat(x,", ").concat(b,")"));var w=s({items:[_],on:{create:[function(t){t.node.fillReference=void 0,t.node.strokeReference=void 0},f.onCreate,d.onCreate,lw(u.measureText),zS(u)]}}),k=!n||!w.equals(n),S=a||k;return S&&(u.clear(),o.render(w.children,e)),a=!1,n=w,S},u.itemsAt=function(t){return n?n.getItemsFrom(t):[]},u.findShapes=function(t){return n?n.findShapes(t):[]},u.clear=function(){if(!e)return u;n=null;var r=e.cloneNode(!1);return t.replaceChild(r,e),e=r,u},u.destroy=function(){t&&t.parentNode&&t.parentNode.removeChild(t),t=null,e=null},u.size=function(t){if(t){var e=jS(t);JSON.stringify(l)!==JSON.stringify(e)&&(a=!0,l=e)}return l},u}var mM,vM,xM,bM,_M={},wM=[],kM=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function SM(t,e){for(var n in e)t[n]=e[n];return t}function MM(t){var e=t.parentNode;e&&e.removeChild(t)}function EM(t,e,n){var r,i,s,o=arguments,a={};for(s in e)"key"==s?r=e[s]:"ref"==s?i=e[s]:a[s]=e[s];if(arguments.length>3)for(n=[n],s=3;s<arguments.length;s++)n.push(o[s]);if(null!=n&&(a.children=n),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return CM(t,a,r,i,null)}function CM(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++mM.__v:i};return null!=mM.vnode&&mM.vnode(s),s}function TM(t){return t.children}function AM(t,e){this.props=t,this.context=e}function NM(t,e){if(null==e)return t.__?NM(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?NM(t):null}function RM(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return RM(t)}}function OM(t){(!t.__d&&(t.__d=!0)&&vM.push(t)&&!IM.__r++||bM!==mM.debounceRendering)&&((bM=mM.debounceRendering)||xM)(IM)}function IM(){for(var t;IM.__r=vM.length;)t=vM.sort((function(t,e){return t.__v.__b-e.__v.__b})),vM=[],t.some((function(t){var e,n,r,i,s,o;t.__d&&(s=(i=(e=t).__v).__e,(o=e.__P)&&(n=[],(r=SM({},i)).__v=i.__v+1,BM(o,i,r,e.__n,void 0!==o.ownerSVGElement,null!=i.__h?[s]:null,n,null==s?NM(i):s,i.__h),HM(n,i),i.__e!=s&&RM(i)))}))}function PM(t,e,n,r,i,s,o,a,l,c){var u,h,d,f,p,y,g,m=r&&r.__k||wM,v=m.length;for(n.__k=[],u=0;u<e.length;u++)if(null!=(f=n.__k[u]=null==(f=e[u])||"boolean"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?CM(null,f,null,null,f):Array.isArray(f)?CM(TM,{children:f},null,null,null):f.__b>0?CM(f.type,f.props,f.key,null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(d=m[u])||d&&f.key==d.key&&f.type===d.type)m[u]=void 0;else for(h=0;h<v;h++){if((d=m[h])&&f.key==d.key&&f.type===d.type){m[h]=void 0;break}d=null}BM(t,f,d=d||_M,i,s,o,a,l,c),p=f.__e,(h=f.ref)&&d.ref!=h&&(g||(g=[]),d.ref&&g.push(d.ref,null,f),g.push(h,f.__c||p,f)),null!=p?(null==y&&(y=p),"function"==typeof f.type&&null!=f.__k&&f.__k===d.__k?f.__d=l=DM(f,l,t):l=jM(t,f,d,m,p,l),c||"option"!==n.type?"function"==typeof n.type&&(n.__d=l):t.value=""):l&&d.__e==l&&l.parentNode!=t&&(l=NM(d))}for(n.__e=y,u=v;u--;)null!=m[u]&&("function"==typeof n.type&&null!=m[u].__e&&m[u].__e==n.__d&&(n.__d=NM(r,u+1)),$M(m[u],m[u]));if(g)for(u=0;u<g.length;u++)WM(g[u],g[++u],g[++u])}function DM(t,e,n){var r,i;for(r=0;r<t.__k.length;r++)(i=t.__k[r])&&(i.__=t,e="function"==typeof i.type?DM(i,e,n):jM(n,i,i,t.__k,i.__e,e));return e}function jM(t,e,n,r,i,s){var o,a,l;if(void 0!==e.__d)o=e.__d,e.__d=void 0;else if(null==n||i!=s||null==i.parentNode)t:if(null==s||s.parentNode!==t)t.appendChild(i),o=null;else{for(a=s,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break t;t.insertBefore(i,s),o=s}return void 0!==o?o:i.nextSibling}function FM(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||kM.test(e)?n:n+"px"}function zM(t,e,n,r,i){var s;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||FM(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||FM(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])s=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r||t.addEventListener(e,s?LM:qM,s):t.removeEventListener(e,s?LM:qM,s);else if("dangerouslySetInnerHTML"!==e){if(i)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null!=n&&(!1!==n||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,n):t.removeAttribute(e))}}function qM(t){this.l[t.type+!1](mM.event?mM.event(t):t)}function LM(t){this.l[t.type+!0](mM.event?mM.event(t):t)}function BM(t,e,n,r,i,s,o,a,l){var c,u,h,d,f,p,y,g,m,v,x,b=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(l=n.__h,a=e.__e=n.__e,e.__h=null,s=[a]),(c=mM.__b)&&c(e);try{t:if("function"==typeof b){if(g=e.props,m=(c=b.contextType)&&r[c.__c],v=c?m?m.props.value:c.__:r,n.__c?y=(u=e.__c=n.__c).__=u.__E:("prototype"in b&&b.prototype.render?e.__c=u=new b(g,v):(e.__c=u=new AM(g,v),u.constructor=b,u.render=UM),m&&m.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=r,h=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=b.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=SM({},u.__s)),SM(u.__s,b.getDerivedStateFromProps(g,u.__s))),d=u.props,f=u.state,h)null==b.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==b.getDerivedStateFromProps&&g!==d&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,v),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,v)||e.__v===n.__v){u.props=g,u.state=u.__s,e.__v!==n.__v&&(u.__d=!1),u.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),u.__h.length&&o.push(u);break t}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,v),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(d,f,p)}))}u.context=v,u.props=g,u.state=u.__s,(c=mM.__r)&&c(e),u.__d=!1,u.__v=e,u.__P=t,c=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(r=SM(SM({},r),u.getChildContext())),h||null==u.getSnapshotBeforeUpdate||(p=u.getSnapshotBeforeUpdate(d,f)),x=null!=c&&c.type===TM&&null==c.key?c.props.children:c,PM(t,Array.isArray(x)?x:[x],e,n,r,i,s,o,a,l),u.base=e.__e,e.__h=null,u.__h.length&&o.push(u),y&&(u.__E=u.__=null),u.__e=!1}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=VM(n.__e,e,n,r,i,s,o,l);(c=mM.diffed)&&c(e)}catch(t){e.__v=null,(l||null!=s)&&(e.__e=a,e.__h=!!l,s[s.indexOf(a)]=null),mM.__e(t,e,n)}}function HM(t,e){mM.__c&&mM.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){mM.__e(t,e.__v)}}))}function VM(t,e,n,r,i,s,o,a){var l,c,u,h,d=n.props,f=e.props,p=e.type,y=0;if("svg"===p&&(i=!0),null!=s)for(;y<s.length;y++)if((l=s[y])&&(l===t||(p?l.localName==p:3==l.nodeType))){t=l,s[y]=null;break}if(null==t){if(null===p)return document.createTextNode(f);t=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,f.is&&f),s=null,a=!1}if(null===p)d===f||a&&t.data===f||(t.data=f);else{if(s=s&&wM.slice.call(t.childNodes),c=(d=n.props||_M).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!a){if(null!=s)for(d={},h=0;h<t.attributes.length;h++)d[t.attributes[h].name]=t.attributes[h].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===t.innerHTML)||(t.innerHTML=u&&u.__html||""))}if(function(t,e,n,r,i){var s;for(s in n)"children"===s||"key"===s||s in e||zM(t,s,null,n[s],r);for(s in e)i&&"function"!=typeof e[s]||"children"===s||"key"===s||"value"===s||"checked"===s||n[s]===e[s]||zM(t,s,e[s],n[s],r)}(t,f,d,i,a),u)e.__k=[];else if(y=e.props.children,PM(t,Array.isArray(y)?y:[y],e,n,r,i&&"foreignObject"!==p,s,o,t.firstChild,a),null!=s)for(y=s.length;y--;)null!=s[y]&&MM(s[y]);a||("value"in f&&void 0!==(y=f.value)&&(y!==t.value||"progress"===p&&!y)&&zM(t,"value",y,d.value,!1),"checked"in f&&void 0!==(y=f.checked)&&y!==t.checked&&zM(t,"checked",y,d.checked,!1))}return t}function WM(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){mM.__e(t,n)}}function $M(t,e,n){var r,i,s;if(mM.unmount&&mM.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||WM(r,null,e)),n||"function"==typeof t.type||(n=null!=(i=t.__e)),t.__e=t.__d=void 0,null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){mM.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(s=0;s<r.length;s++)r[s]&&$M(r[s],e,n);null!=i&&MM(i)}function UM(t,e,n){return this.constructor(t,n)}function YM(t,e,n){var r,i,s;mM.__&&mM.__(t,e),i=(r="function"==typeof n)?null:n&&n.__k||e.__k,s=[],BM(e,t=(!r&&n||e).__k=EM(TM,null,[t]),i||_M,_M,void 0!==e.ownerSVGElement,!r&&n?[n]:i?null:e.firstChild?wM.slice.call(e.childNodes):null,s,!r&&n?n:i?i.__e:e.firstChild,r),HM(s,t)}function QM(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.createElement,i=void 0===r?document.createElement.bind(document):r,s=jS(),o={transform:void 0},a=FS();return a.element=function(){return t},a.root=function(){return t},a.settings=function(t){return t&&Object.keys(o).forEach((function(e){void 0!==t[e]&&(o[e]=t[e])})),o},a.appendTo=function(e){return t||((t=i("div")).style.position="absolute",t.style["-webkit-font-smoothing"]="antialiased",t.style["-moz-osx-font-smoothing"]="antialiased",t.style.pointerEvents="none"),e.appendChild(t),t},a.render=function(n){if(!t)return!1;var r,i="function"==typeof o.transform&&o.transform();if(i){var a=i.b,l=i.c,c=i.d,u=i.e,h=i.f;return t.style.transform="matrix(".concat(i.a,", ").concat(a,", ").concat(l,", ").concat(c,", ").concat(u,", ").concat(h,")"),!0}return t.style.transform="",t.style.left="".concat(s.computedPhysical.x,"px"),t.style.top="".concat(s.computedPhysical.y,"px"),t.style.width="".concat(s.computedPhysical.width,"px"),t.style.height="".concat(s.computedPhysical.height,"px"),r=Array.isArray(n)?EM("div",null,n):n,e=YM(r,t,e),!0},a.renderArgs=[EM],a.clear=function(){if(t){for(var n=t.firstChild;n;)t.removeChild(n),n=t.firstChild;e=null}return a},a.destroy=function(){t&&t.parentElement&&t.parentElement.removeChild(t),t=null,e=null},a.size=function(t){return t&&(s=jS(t)),s},a}mM={__e:function(t,e){for(var n,r,i;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(t)),i=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(t),i=n.__d),i)return n.__E=n}catch(e){t=e}throw t},__v:0},AM.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=SM({},this.state),"function"==typeof t&&(t=t(SM({},n),this.props)),t&&SM(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),OM(this))},AM.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),OM(this))},AM.prototype.render=TM,vM=[],xM="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,IM.__r=0;var KM=[function(t){t.renderer("svg",gM)},function(t){t.renderer("canvas",YS)},function(t){t.renderer("dom",QM)}],ZM={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},XM=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.level,r=void 0===n?ZM.OFF:n,i=e.pipe,s=void 0===i?console:i,o=r,a=(yh(t={},ZM.OFF,(function(){})),yh(t,ZM.ERROR,(function(){return s.error.apply(s,arguments)})),yh(t,ZM.WARN,(function(){return s.warn.apply(s,arguments)})),yh(t,ZM.INFO,(function(){return s.info.apply(s,arguments)})),yh(t,ZM.DEBUG,(function(){return s.log.apply(s,arguments)})),t),l=function(t){if(t&&!(o<t)){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];(a[t]||a[ZM.DEBUG]).apply(void 0,n)}};return{log:l,error:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l.apply(void 0,[ZM.ERROR].concat(e))},warn:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l.apply(void 0,[ZM.WARN].concat(e))},info:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l.apply(void 0,[ZM.INFO].concat(e))},debug:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l.apply(void 0,[ZM.DEBUG].concat(e))},level:function(t){return"number"==typeof t&&(o=t),o},LOG_LEVEL:ZM}};function GM(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;t(n,e)}var JM=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=XM(e.logger),i={component:Wd(n.component,"component",r),data:Wd(n.data,"data",r),formatter:Wd(n.formatter,"formatter",r),interaction:Wd(n.interaction,"interaction",r),renderer:Sx(n.renderer),scale:Wd(n.scale,"scale",r),symbol:Wd(n.symbol,"symbol",r),logger:r};function s(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={palettes:e.palettes.concat(n.palettes||[]),style:ch({},e.style,n.style),logger:n.logger||e.logger,renderer:n.renderer||e.renderer};return t(r,i)}return e.renderer&&e.renderer.prio&&i.renderer.default(e.renderer.prio[0]),s.use=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return GM(t,e,i)},s.chart=function(t){return kx(t,{registries:i,logger:r,style:e.style,palettes:e.palettes})},s.config=function(){return e},Object.keys(i).forEach((function(t){s[t]=i[t]})),s.version=uh,s}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l"},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:Mx,data:qx,formatter:$p,interaction:Lx,renderer:Sx(),scale:im,symbol:gv});bk.forEach(JM.use),KM.forEach(JM.use),[].forEach(JM.use);var tE=JM;function eE(t){return(eE="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 nE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rE(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 iE(t,e,n){return e&&rE(t.prototype,e),n&&rE(t,n),t}function sE(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oE(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 aE(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?oE(Object(n),!0).forEach((function(e){sE(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oE(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function lE(t,e){return(lE=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cE(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function uE(t,e,n){return(uE=cE()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&lE(i,n.prototype),i}).apply(null,arguments)}function hE(t){return function(t){if(Array.isArray(t))return fE(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||dE(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 dE(t,e){if(t){if("string"==typeof t)return fE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fE(t,e):void 0}}function fE(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}var pE=Object.prototype.hasOwnProperty,yE=Object.prototype.toString,gE=Object.defineProperty,mE=Object.getOwnPropertyDescriptor,vE=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===yE.call(t)},xE=function(t){if(!t||"[object Object]"!==yE.call(t))return!1;var e,n=pE.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&pE.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;for(e in t);return void 0===e||pE.call(t,e)},bE=function(t,e){gE&&"__proto__"===e.name?gE(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},_E=function(t,e){if("__proto__"===e){if(!pE.call(t,e))return;if(mE)return mE(t,e).value}return t[e]},wE=function t(){var e,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},l=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});l<c;++l)if(null!=(e=arguments[l]))for(n in e)r=_E(a,n),a!==(i=_E(e,n))&&(u&&i&&(xE(i)||(s=vE(i)))?(s?(s=!1,o=r&&vE(r)?r:[]):o=r&&xE(r)?r:{},bE(a,{name:n,newValue:t(u,o,i)})):void 0!==i&&bE(a,{name:n,newValue:i}));return a};function kE(t,e,n){if(!t)return-1;var r=n.cache,i=t.origin?t.origin():null;i&&(t=i);var s=r.fields.indexOf(t),o=-1,a=-1;if(-1===s)for(var l=0;l<r.wrappedFields.length;l++)if(a=r.wrappedFields[l].attrDims.map((function(t){return t.instance})).indexOf(t),o=r.wrappedFields[l].attrExps.map((function(t){return t.instance})).indexOf(t),-1!==a||-1!==o){s=l;break}return(s-=e.qArea.qLeft)<0||s>=e.qArea.qWidth?-1:a>=0?function(t){return t[s].qAttrDims.qValues[a]}:o>=0?function(t){return t[s].qAttrExps.qValues[o]}:function(t){return t[s]}}function SE(t,e,n){var r=n.key,i={value:"function"==typeof t.value?t.value(e):void 0!==t.value?t.value:e};return i.label="function"==typeof t.label?t.label(e):String(void 0!==t.label?t.label:i.value),t.field&&(i.source={key:r,field:t.field.key()}),i}function ME(t){var e=t.p,n=t.rowIdx,r=t.row,i=t.sourceKey,s=t.target,o=t.targetProp,a=t.mainCell;if(e.field&&e.field!==t.f){var l=kE(e.field,t.page,{cache:t.cache});if(-1===l)return;a=wE({qRow:n},l(r))}s[o]=SE(e,a,{key:i})}function EE(t,e,n,r){for(var i=Array.isArray(t)?t:[t],s=[],o=0;o<i.length;o++)if(void 0!==i[o].field){for(var a=e.raw(),l=e.key(),c="object"===eE(i[o].field)?i[o].field:e.field(i[o].field),u=r.normalizeConfig(i[o],e),h=u.props,d=u.main,f=Object.keys(h),p=!!i[o].trackBy,y=eE(i[o].trackBy),g={},m=[],v=[],x=0;x<a.qDataPages.length;x++){var b=kE(c,a.qDataPages[x],{cache:n});if(-1!==b)for(var _=0;_<a.qDataPages[x].qMatrix.length;_++){var w=a.qDataPages[x].qArea.qTop+_,k=wE({qRow:w},b(a.qDataPages[x].qMatrix[_])),S=SE(d,k,{key:l});if(!d.filter||d.filter(k)){for(var M=0;M<f.length;M++){var E=h[f[M]],C=E.fields||[E];E.fields&&(S[f[M]]=[]);for(var T=0;T<C.length;T++)ME({cache:n,f:c,mainCell:k,p:C[T],prop:f[M],props:h,page:a.qDataPages[x],rowIdx:w,row:a.qDataPages[x].qMatrix[_],sourceKey:l,target:E.fields?S[f[M]]:S,targetProp:E.fields?T:f[M]});if(E.fields){var A=S[f[M]].map((function(t){return t.value})),N=S[f[M]].map((function(t){return t.label}));S[f[M]]={value:"function"==typeof E.value?E.value(A):void 0!==E.value?E.value:A,label:"function"==typeof E.label?E.label(N):String(void 0!==E.label?E.label:S[f[M]].value)}}}p&&r.track({cfg:i[o],itemData:k,obj:S,target:m,tracker:g,trackType:y}),v.push(S)}}}s.push.apply(s,p?hE(r.collect(m,{main:d,propsArr:f,props:h})):v)}return s}function CE(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function TE(t,e){var n,r,i,s,o,a=new OE(t),l=+t.value&&(a.value=t.value),c=[a];for(null==e&&(e=AE);n=c.pop();)if(l&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),s=o-1;s>=0;--s)c.push(r=n.children[s]=new OE(i[s])),r.parent=n,r.depth=n.depth+1;return a.eachBefore(RE)}function AE(t){return t.children}function NE(t){t.data=t.data.data}function RE(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function OE(t){this.data=t,this.depth=this.height=0,this.parent=null}function IE(t){if("function"!=typeof t)throw new Error;return t}OE.prototype=TE.prototype={constructor:OE,count:function(){return this.eachAfter(CE)},each:function(t){var e,n,r,i,s=this,o=[s];do{for(e=o.reverse(),o=[];s=e.pop();)if(t(s),n=s.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,s=[i],o=[];i=s.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)s.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)r.push(e=e.parent);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return TE(this).eachBefore(NE)}};var PE={depth:-1},DE={};function jE(t){return t.id}function FE(t){return t.parentId}function zE(t,e){"/"===t.charAt(0)&&(t=t.substring(1));for(var n,r=t.split("/"),i=e,s=0;s<r.length;s++){if("*"===r[s]&&Array.isArray(i)){var o=[];n=r.slice(s+1).join("/");for(var a=0;a<i.length;a++){var l=zE(n,i[a]);Array.isArray(l)?o.push.apply(o,hE(l)):o.push(l)}return o}if(!r[s]&&Array.isArray(i)){var c=new Array(i.length);n=r.slice(s+1).join("/");for(var u=0;u<i.length;u++)c[u]=zE(n,i[u]);return c}r[s]in i&&(i=i[r[s]])}return i}function qE(t,e){var n=e.cache;if("number"==typeof t)return n.fields[t];var r=n.allFields;if("function"==typeof t){for(var i=0;i<r.length;i++)if(t(r[i]))return r[i];return!1}if("string"==typeof t){for(var s=0;s<r.length;s++)if(r[s].key()===t||r[s].title()===t)return r[s]}else if(t&&-1!==r.indexOf(t))return t;throw Error("Field not found: ".concat(t))}var LE=/^qDimensionInfo(?:\/(\d+))?/,BE=/^\/?qMeasureInfo\/(\d+)/,HE=/\/qAttrExprInfo\/(\d+)/,VE=/\/qAttrDimInfo\/(\d+)/;function WE(t){return(t.qColumnOrder&&t.qColumnOrder.length?t.qColumnOrder:t.qDimensionInfo.map((function(t,e){return e}))).filter((function(e){return e<t.qDimensionInfo.length}))}function $E(t,e){var n=e.cube;if(!t)return-1;var r=t.origin&&t.origin()?t.origin().key():t.key(),i=!1,s=-1,o=-1,a=-1,l=-1,c=-1,u=r,h=n.qEffectiveInterColumnSortOrder,d=WE(n);return LE.test(u)&&(i=!0,s=+LE.exec(u)[1],u=r.replace(LE,"")),BE.test(u)&&("K"===n.qMode?l=+BE.exec(u)[1]:h&&-1!==h.indexOf(-1)?(l=+BE.exec(u)[1],c=0):c=+BE.exec(u)[1],u=u.replace(BE,"")),u&&(VE.exec(u)?a=+VE.exec(u)[1]:HE.exec(u)&&(o=+HE.exec(u)[1])),{fieldDepth:(i?"S"===n.qMode?d[s]:h?h.indexOf(s):s:h&&-1!==h.indexOf(-1)?h.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:c,attrDimIdx:a,attrIdx:o}}function UE(t,e){var n,r=function(t,e,n){if(t===e)return function(t){return t};if(t>e){var r=Math.max(0,Math.min(100,t-e));return function(t){for(var e=t,n=0;n<r;++n)e=e.parent;return e}}if(e>t){var i=Math.max(0,Math.min(100,e-t));return function(t){return function t(e,n,r){var i=[];if(!e||!e.length)return i;if(n<=0)i.push.apply(i,hE(r>=0?[e[r]]:e));else for(var s=0;s<e.length;s++)e[s].children&&e[s].children.length&&i.push.apply(i,hE(t(e[s].children,n-1,r)));return i}(t.children,i-1,n)}}return!1}(t.fieldDepth,e.fieldDepth,e.pseudoMeasureIndex);return e.attrDimIdx>=0?n=function(t){var n;return null==t||null===(n=t.qAttrDims)||void 0===n?void 0:n.qValues[e.attrDimIdx]}:e.attrIdx>=0&&(n=function(t){var n;return null==t||null===(n=t.qAttrExps)||void 0===n?void 0:n.qValues[e.attrIdx]}),{nodeFn:r,attrFn:n,valueFn:e.measureIdx>=0?function(t){return t.data.qValues[e.measureIdx]}:function(t){return t.data}}}function YE(t,e,n){var r=n.key,i={value:"function"==typeof t.value?t.value(e):void 0!==t.value?t.value:e};return i.label="function"==typeof t.label?t.label(e):String(void 0!==t.label?t.label:i.value),t.field&&(i.source={key:r,field:t.field.key()}),i}function QE(t){for(var e=t.propsArr,n=t.props,r=t.item,i=t.itemData,s=t.ret,o=t.sourceKey,a=0;a<e.length;a++){var l=n[e[a]],c=l.fields||[l],u=void 0,h=void 0;l.fields&&(u=[],h=[]);for(var d=function(t){var n=c[t],d=void 0,f=void 0,p=void 0,y=void 0,g=void 0,m=void 0;if("primitive"===n.type?(p=n.value,m=String(n.value)):("function"==typeof n.value&&(d=function(t){return n.value(t,r)}),"function"==typeof n.label&&(f=function(t){return n.label(t,r)}),n.accessor?(y=n.accessor(r),Array.isArray(y)?(g=y.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),d&&(p=g.map(d),d=null),f&&(m=g.map(f),f=null),p=n.reduce?n.reduce(p):p,m=n.reduceLabel?n.reduceLabel(m,p):String(p)):m=p=n.attrAccessor?n.attrAccessor(n.valueAccessor(y)):n.valueAccessor(y)):(p=i,m=i)),l.fields){var v=d?d(p):p;u.push(v),h.push(f&&null!=m?f(m):null!=m?m:String(v))}else{var x=d?d(p):p;s[e[a]]={value:x,label:f?f(m):null!=m?m:String(x)},n.field&&(s[e[a]].source={field:n.field.key(),key:o})}},f=0;f<c.length;f++)d(f);u&&(s[e[a]]={value:"function"==typeof l.value?l.value(u,r):u,label:"function"==typeof l.label?l.label(h,r):h})}}var KE=function(t,e,n){var r="K"===t.qMode?"qSubNodes":"qNodes",i=zE("K"===t.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",t);return i&&i[0]?(e.tree=TE(i[0],n.children||function(t){return t[r]}),e.tree):null};function ZE(t){for(var e=t.raw().qDataPages.length?t.raw().qDataPages[0].qMatrix:[],n=function(t){var e=t.raw().qColumnOrder,n=t.fields();return e&&e.length===n.length?e:n.map((function(t,e){return e}))}(t),r=t.fields(),i=t.fields().filter((function(t){return"dimension"===t.type()})).map((function(t){return n.indexOf(r.indexOf(t))})),s=t.fields().filter((function(t){return"measure"===t.type()})).map((function(t){return n.indexOf(r.indexOf(t))})),o={__root:{__id:"__root",qValues:[]}},a=0;a<e.length;a++){for(var l=e[a],c="__root",u=!1,h=0;h<i.length;h++){var d=l[i[h]],f="".concat(c,"__").concat(d.qText);o[f]||(o[f]=aE({__id:f,__parent:c,qValues:[]},d),u=!0),c=f}if(u)for(var p=0;p<s.length;p++)o[c].qValues.push(l[s[p]])}var y=Object.keys(o).map((function(t){return o[t]}));return function(){var t=jE,e=FE;function n(n){var r,i,s,o,a,l,c,u=n.length,h=new Array(u),d={};for(i=0;i<u;++i)a=h[i]=new OE(r=n[i]),null!=(l=t(r,i,n))&&(l+="")&&(d[c="$"+(a.id=l)]=c in d?DE:a);for(i=0;i<u;++i)if(a=h[i],null!=(l=e(n[i],i,n))&&(l+="")){if(!(o=d["$"+l]))throw new Error("missing: "+l);if(o===DE)throw new Error("ambiguous: "+l);o.children?o.children.push(a):o.children=[a],a.parent=o}else{if(s)throw new Error("multiple roots");s=a}if(!s)throw new Error("no root");if(s.parent=PE,s.eachBefore((function(t){t.depth=t.parent.depth+1,--u})).eachBefore(RE),s.parent=null,u>0)throw new Error("cycle");return s}return n.id=function(e){return arguments.length?(t=IE(e),n):t},n.parentId=function(t){return arguments.length?(e=IE(t),n):e},n}().id((function(t){return t.__id})).parentId((function(t){return t.__parent}))(y)}var XE=function(t){for(var e=t.propsArr,n=t.props,r=t.cube,i=t.cache,s=t.itemDepthObject,o=t.f,a=0;a<e.length;a++)for(var l=n[e[a]],c=l.fields?l.fields:[l],u=0;u<c.length;u++){var h=c[u];if(h.field!==o){var d=UE(s,$E(h.field,{cube:r,cache:i}));h.accessor=d.nodeFn,h.valueAccessor=d.valueFn,h.attrAccessor=d.attrFn}}};function GE(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e.raw(),s=e.key(),o="S"===i.qMode?ZE(e):KE(i,n,t);if(!o)return null;for(var a=o.height,l=[],c=0;c<=a;c++){var u=null;if(c>0)if("S"===i.qMode){var h=WE(i),d=h[c-1];u=n.fields[d]}else{var f=i.qEffectiveInterColumnSortOrder[c-1];c>i.qEffectiveInterColumnSortOrder.length&&(f=i.qDimensionInfo.length),u=n.fields[f]}var p=r.normalizeConfig(aE(aE({},t),{},{field:u?u.key():void 0}),e),y=p.props,g=p.main,m=Object.keys(y);l[c]={propsArr:m,props:y,main:g};var v=u?$E(u,{cube:i,cache:n}):{fieldDepth:0};XE({propsArr:m,props:y,cube:i,cache:n,itemDepthObject:v,f:u})}for(var x=o.copy(),b=x.descendants(),_=o.descendants(),w=0;w<_.length;w++){var k=l[_[w].depth].propsArr,S=l[_[w].depth].props,M=l[_[w].depth].main,E=b[w],C=E.data,T=YE(M,C,{key:s});QE({propsArr:k,props:S,item:E,itemData:C,ret:T,sourceKey:s,isTree:!0}),_[w].data=T}return o}function JE(t,e,n,r){for(var i=Array.isArray(t)?t:[t],s=[],o=0;o<i.length;o++)if(void 0!==i[o].field){var a=e.raw(),l=e.key();if(!KE(a,n,t))continue;var c="object"===eE(i[o].field)?i[o].field:e.field(i[o].field),u=r.normalizeConfig(i[o],e),h=u.props,d=u.main,f=Object.keys(h),p=$E(c,{cube:a,cache:n}),y=UE({fieldDepth:0},p),g=y.nodeFn,m=y.attrFn,v=y.valueFn;XE({propsArr:f,props:h,cube:a,cache:n,itemDepthObject:p,f:c});for(var x=!!i[o].trackBy,b=eE(i[o].trackBy),_={},w=[],k=g(n.tree),S=[],M=0;M<k.length;M++){var E=k[M],C=m?m(v(E)):v(E);if(!d.filter||d.filter(C)){var T=YE(d,C,{key:l});QE({propsArr:f,props:h,item:E,itemData:C,ret:T,sourceKey:l}),x&&r.track({cfg:i[o],itemData:C,obj:T,target:w,tracker:_,trackType:b}),S.push(T)}}s.push.apply(s,x?hE(r.collect(w,{main:d,propsArr:f,props:h})):S)}return s}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var tC=function(t,e){return function(t){t.exports=function(t,e){if(!t||isNaN(+e))return e;var n,r,i,s,o,a,l,c,u,h,d=t.length,f=t.search(/[0-9\-\+#]/),p=f>0?t.substring(0,f):"",y=t.split("").reverse().join(""),g=y.search(/[0-9\-\+#]/),m=d-g,v=t.substring(m,m+1),x=m+("."===v||","===v?1:0),b=g>0?t.substring(x,d):"";if(n=(e="-"===(t=t.substring(f,x)).charAt(0)?-e:+e)<0?e=-e:0,s=(r=t.match(/[^\d\-\+#]/g))&&r[1]&&r[0]||",",t=t.split(i=r&&r[r.length-1]||"."),e=+(e=e.toFixed(t[1]&&t[1].length))+"",a=t[1]&&t[1].lastIndexOf("0"),(!(c=e.split("."))[1]||c[1]&&c[1].length<=a)&&(e=(+e).toFixed(a+1)),u=t[0].split(s),t[0]=u.join(""),(o=t[0]&&t[0].indexOf("0"))>-1)for(;c[0].length<t[0].length-o;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((e=e.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(y="",m=(h=e[0]).length%l,d=h.length,x=0;x<d;x++)y+=h.charAt(x),!((x-m+1)%l)&&x<d-l&&(y+=s);e[0]=y}return e[1]=t[1]&&e[1]?i+e[1]:"","0"!==(r=e.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+b}}(e={exports:{}}),e.exports}();function eC(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var nC={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"\u03bc","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},rC=/%$/,iC=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,sC=/^\(oct\)/i,oC=/^\(dec\)/i,aC=/^\(hex\)/i,lC=/^\(bin\)/i,cC=/^\(rom\)/i,uC=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,hC=/#|0/g;function dC(t,e,n,r){return t=t.toString(e),n[1]===n[1].toUpperCase()&&(t=t.toUpperCase()),t.length-t.indexOf(".")>10&&(t=t.slice(0,t.indexOf(".")+11)),t.replace(".",r||".")}function fC(t,e,n){var r=eC(t);return n?r:new RegExp(r||"",e)}function pC(t,e,n){var r,i,s,o,a,l,c,u,h,d,f,p=t.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),t.abbreviate=!0),d=e,(f=n)&&(f=eC(f)),d&&(d=eC(d)),h=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(f,"[#0]+)?")),o=(s=(s=p.match(h))?s[0]:"")?p.substr(0,p.indexOf(s)):p,a=s?p.substring(p.indexOf(s)+s.length):"",s||(s=p?"#":"##########"),e&&e===n&&(i=(r=s.split(n)).pop(),s=r.join("")+n+i,e=""),l=e,e=/,/.test(n)?"\xa4":",",l&&(s=s.replace(fC(l,"g"),e)),c=n,n=".",c&&(s=s.replace(fC(c,"g"),n)),u=(u=s.match(/#/g))?u.length:0;var y,g=p.split(c);g[1]&&(y=g[1].match(hC)),t.prefix=o||"",t.postfix=a||"",t.pattern=p,t.maxPrecision=y?y.length:2,t.percentage=rC.test(p),t.numericPattern=s||"",t.numericRegex=new RegExp("".concat(fC(e,null,!0),"|").concat(fC(n,null,!0)),"g"),t.groupTemp=l,t.decTemp=c,t.t=e,t.d=n,t.temp=u}var yC=function(){function t(e,n,r,i,s){nE(this,t),this.localeInfo=e,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=s||"numeric",this.patternSeparator=";",this.abbreviations=function(t,e){if(!t||!t.qNumericalAbbreviation)return nC;var n={};return t.qNumericalAbbreviation.split(e).forEach((function(t){var e=t.split(":");2===e.length&&(n[e[0]]=e[1])})),n}(e,this.patternSeparator),this.prepare()}return iE(t,[{key:"clone",value:function(){var e=new t(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}},{key:"format",value:function(t,e,n,r){return this.prepare(e,n,r),this.formatValue(t)}},{key:"prepare",value:function(t,e,n){var r;void 0===t&&(t=this.pattern),void 0===e&&(e=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),t?(this._prepared={positive:{d:n,t:e,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:e,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:e,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,t=t.split(this.patternSeparator),r.positive.pattern=t[0],r.negative.pattern=t[1],r.zero.pattern=t[2],uC.test(t[0])&&(r.positive.isFunctional=!0),t[1]?uC.test(t[1])&&(r.negative.isFunctional=!0):r.negative=!1,t[2]?uC.test(t[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||pC(r.positive,e,n),r.negative&&!r.negative.isFunctional&&pC(r.negative,e,n),r.zero&&!r.zero.isFunctional&&pC(r.zero,e,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(t){var e,n,r,i,s,o,a,l,c,u=this._prepared,h="",d="",f=t;if(isNaN(t))return"".concat(f);if(t=+t,!1===u.pattern)return t.toString();if(0===t&&u.zero)return(u=u.zero).pattern;if(t<0&&u.negative?(u=u.negative,t=-t):u=u.positive,s=u.d,o=u.t,u.isFunctional)t=function(t,e,n){var r;return iC.test(e)?t=dC(t,Number(/\d{2}/.exec(e)[0]),e,n):sC.test(e)?t=dC(t,8,e,n):oC.test(e)?t=dC(t,10,e,n):aC.test(e)?t=dC(t,16,e,n):lC.test(e)?t=dC(t,2,e,n):cC.test(e)&&(r="",t<0&&(r="-",t=-t),t=0===(t=Math.floor(t))?"0":t<=5e5?r+(t=function(t,e){for(var n,r="",i=Number(String(t).slice(-3)),s=(t-i)/1e3,o=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),a=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<o.length;n++)if(o[n]<=i){r+=a[n],i-=o[n];break}for(n=0;n<s;n++)r="M".concat(r);return e[1]!==e[1].toUpperCase()&&(r=r.toLowerCase()),r}(t,e)):e+r+t.toExponential(0)),t}(t,u.pattern,s);else{if(u.percentage&&(t*=100),u.abbreviate){var p,y,g=Object.keys(this.abbreviations).map((function(t){return parseInt(t,10)})).sort((function(t,e){return t-e})),m=g[0];for(a=0,n=Number(Number(t).toExponential().split("e")[1]);m<=n&&a<g.length;)m=g[++a];a>0&&(p=g[a-1]),p&&n>0&&p>0?y=p:(n<0&&p<0||!p)&&(m<0&&m-n<=u.maxPrecision?y=m:p<=n&&!(m>0&&-n<=u.maxPrecision)&&(y=p)),y&&(h=this.abbreviations[y],t/=Math.pow(10,y))}if(r=Math.abs(t),e=u.temp,c=(l=u.numericPattern).split(s)[1],"I"===this.type&&(t=Math.round(t)),i=t,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)t=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(t.toFixed(Math.min(20,c?c.length:0)).split(".")[0]),x=l.split(s)[0];if(t=tC(x+=s,v)||"0",c){var b=Math.max(0,Math.min(14,c.length)),_=c.replace(/#+$/,"").length,w=("I"===this.type?0:r%1).toFixed(b).slice(2).replace(/0+$/,"");for(a=w.length;a<_;a++)w+="0";w&&(t+=s+w)}else 0===v&&(i=0)}else if(r>=Math.pow(10,e)||r<1||r<1e-4)0===t?t="0":r<1e-4||r>=1e20?(t=(t=i.toExponential(Math.max(1,Math.min(14,e))-1)).replace(/\.?0+(?=e)/,""),d=""):(t=t.toPrecision(Math.max(1,Math.min(14,e)))).indexOf(".")>=0&&(t=(t=t.replace(t.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",s));else{for(l+=s,e=Math.max(0,Math.min(20,e-Math.ceil(Math.log(r)/Math.log(10)))),a=0;a<e;a++)l+="#";t=tC(l,t)}t=t.replace(u.numericRegex,(function(t){return t===o?u.groupTemp:t===s?u.decTemp:""})),i<0&&!/^-/.test(t)&&(t="-".concat(t))}return u.prefix+t+d+h+u.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(t){return"".concat(t)}}}}]),t}();function gC(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,s=void 0===i?5e3:i,o=r.multipleArguments,a=void 0!==o&&o,l=r.toKey,c=void 0===l?function(t){return t}:l,u=Object.create(null),h=Object.create(null),d=0,f=0;return(e=a?function(){return n=c.apply(void 0,arguments),e.has(n)?e.get(n):e.set(n,t.apply(void 0,arguments))}:function(r){return n=c(r),e.has(n)?e.get(n):e.set(n,t(r))}).set=function(t,e){return d>=s&&(delete u[h[f]],delete h[f],d--,f++),u[t]=e,h[d]=t,d++,e},e.get=function(t){return u[t]},e.has=function(t){return t in u},e.clear=function(){u=Object.create(null),h=Object.create(null),d=0,f=0},e.size=function(){return d},e}function mC(t,e,n,r,i){var s=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return uE(yC,e)}(i,t,e,n,r),o=gC(s.formatValue.bind(s),{toKey:function(t){return isNaN(t)?t:+t}});function a(t){return o(t)}return a.format=function(t,e,n,r){return o.clear(),s.format(e,t,n,r)},a.pattern=function(t){return t&&(o.clear(),s.pattern=t,s.prepare()),s.pattern},a}var vC=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],xC=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],bC=["January","February","March","April","May","June","July","August","September","October","November","December"],_C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function wC(t,e){for(var n=t.length;n<e;n++)t="0".concat(t);return t}function kC(t){var e=t.toString().split(".");return e[1]?e=Number("0.".concat(e[1])):0}var SC=function(){function t(e,n,r){nE(this,t);var i,s=e||{};s.qCalendarStrings||(s.qCalendarStrings={qLongDayNames:vC,qDayNames:xC,qLongMonthNames:bC,qMonthNames:_C}),this.localeInfo=s,this.locale_days=s.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=s.qCalendarStrings.qDayNames.slice(),this.locale_months=s.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=s.qCalendarStrings.qMonthNames.slice(),n||(n=(sE(i={},"T",s.qTimeFmt||"hh:mm:ss"),sE(i,"D",s.qDateFmt||"YYYY-MM-DD"),sE(i,"TS",s.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]),this.pattern=n}return iE(t,[{key:"clone",value:function(){var e=new t(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}},{key:"format",value:function(t,e){e||(e=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),e=e.replace(/\[.+]|\[|]/g,"");var n,r=/t+/gi.test(e);t instanceof Date?n=function(t,e){var n=t.getUTCHours(),r=t.getUTCDay()-1;return e&&((n%=12)||(n=12)),r<0&&(r=6),{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:r,date:t.getUTCDate(),h:n,m:t.getUTCMinutes(),s:t.getUTCSeconds(),f:t.getUTCMilliseconds(),t:t.getUTCHours()>=12?"pm":"am"}}(t,r):(t<0&&(t=-t,e="-".concat(e)),n=function(t,e){var n,r=function(t){var e=t,n=24*kC(e),r=60*kC(n),i=60*kC(r),s=1e3*kC(i);return{d:Math.floor(e),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(s)}}(t),i=r.d,s=r.h,o=r.m,a=r.s,l=r.f,c=0;/w+|t+/gi.test(e)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(t),0,0,Math.round(86400*(t-Math.floor(t))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(e)||(s+=24*i),/h+/gi.test(e)||(o+=60*s),/m+/gi.test(e)||(a+=60*o),/w+/gi.test(e)&&(c=n?n.getDay()-1:0)<0&&(c=6);var u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:s,m:o,s:a,f:l,t:u}}(t,e));var i=function(t,e){return{"Y+|y+":{Y:"".concat(Number("".concat(e.year).slice(-2))),YY:wC("".concat(e.year).slice(-2),2),YYY:wC("".concat(e.year).slice(-3),3),def:function(t){return wC("".concat(e.year),t.length)}},"M+":{M:e.month+1,MM:wC("".concat(e.month+1),2),MMM:t.locale_months_abbr[e.month],def:t.locale_months[e.month]},"W+|w+":{W:e.day,WW:wC("".concat(e.day),2),WWW:t.locale_days_abbr[e.day],def:t.locale_days[e.day]},"D+|d+":{D:e.date,def:function(t){return wC("".concat(e.date),t.length)}},"h+|H+":{h:e.h,def:function(t){return wC("".concat(e.h),t.length)}},"m+":{m:e.m,def:function(t){return wC("".concat(e.m),t.length)}},"s+|S+":{s:e.s,def:function(t){return wC("".concat(e.s),t.length)}},"f+|F+":{def:function(t){var n="".concat(e.f),r=t.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,t.length));return n}},"t{1,2}|T{1,2}":{def:function(t){var n=e.t;return t[0].toUpperCase()===t[0]&&(n=n.toUpperCase()),n.slice(0,t.length)}}}}(this,n),s=[];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);var a=new RegExp(s.join("|"),"g");return e.replace(a,(function(t){var e,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(e=new RegExp(n)).test(t))break;if(!e)return"";for(var s in i[n])if(s===t||s.toLowerCase()===t){void 0===(r=i[n][s])&&(r=i[n][s.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(t)),r}))}}]),t}();function MC(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return uE(SC,e)}function EC(t){return new Date(Date.UTC(1899,11,30+Math.floor(t),0,0,0,Math.round(864e5*(t-Math.floor(t)))))}function CC(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=MC(n,t,e),i=gC(r.format.bind(r),{toKey:function(t){return"object"===eE(t)&&"function"==typeof t.getTime?t.getTime():t}});function s(t){return"IV"!==e?EC(t):t}function o(t){return t=s(t),i(t)}return o.format=function(t,e){return i.clear(),e=s(e),r.format(e,t)},o.locale=function(n){return r=MC(n,t,e),i=gC(r.format.bind(r),{toKey:function(t){return"object"===eE(t)?t.getTime():t}}),this},o.qtype=function(t){return void 0!==t&&(e=t,i.clear()),e},o}function TC(t,e){if(t&&t.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(t.qNumFormat.qType))return CC(t.qNumFormat.qFmt,t.qNumFormat.qType,e);var n="#",r=e&&void 0!==e.qThousandSep?e.qThousandSep:",",i=e&&void 0!==e.qDecimalSep?e.qDecimalSep:".",s="U",o=t&&!!t.qIsAutoFormat;return t&&t.qNumFormat?(n=t.qNumFormat.qFmt||n,r=t.qNumFormat.qThou||r,i=t.qNumFormat.qDec||i,s=t.qNumFormat.qType||s,o=o&&-1===["M"].indexOf(t.qNumFormat.qType)):o=!0,(o||"U"===s)&&(n="#".concat(i,"##A"),s="U"),mC(n,r,i,s,e)}function AC(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.meta,r=e.id,i=e.key,s=e.localeInfo,o=e.fieldExtractor,a=e.value,l=e.type,c=e.sourceField,u=a||("dimension"===l?function(t){return t.qElemNo}:function(t){return t.qValue}),h=function(t){return t.qText||""},d="dimension"===l?"first":"avg",f=TC(n,s),p="dimension"===l?"first":function(t,e){return f(e)},y={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return c},items:function(){return t||(t=o(y)),t},min:function(){return n.qMin},max:function(){return n.qMax},value:u,label:h,reduce:d,reduceLabel:p,formatter:function(){return f},tags:function(){return n.qTags}};return y}function NC(t,e,n,r,i){return(e[t]||[]).map((function(e,s){var o="".concat(r?"".concat(r,"/"):"").concat(t,"/").concat(s),a={instance:AC(wE({id:"".concat(n?"".concat(n,"/"):"").concat(o),key:o,meta:e},i))};return a.attrDims=NC("qAttrDimInfo",e,n,o,wE({},i,{value:function(t){return t.qElemNo},type:"dimension"})),a.attrExps=NC("qAttrExprInfo",e,n,o,wE({},i,{value:function(t){return t.qNum},type:"measure"})),a.measures=NC("qMeasureInfo",e,n,o,wE({},i,{value:function(t){return t.qValue},type:"measure"})),a}))}function RC(){var t,e,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,s=r.data,o=r.config,a=void 0===o?{}:o,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},c=s;if(!c)throw new Error('Missing "data" input');if(!c.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var u=RC.util,h={cache:l,cube:c,localeInfo:a.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:a.virtualFields},d={key:function(){return i},raw:function(){return c},field:function(t){return qE(t,h)},fields:function(){return l.fields.slice()},extract:function(t){return h.extractor(t,d,l,u)},hierarchy:function(t){return h.hierarchy(t,d,l,u)},_cache:function(){return l}};"K"===c.qMode||"T"===c.qMode||!c.qMode&&c.qNodesOnDim?(h.extractor=JE,h.hierarchy=GE,h.pages="K"===c.qMode?c.qStackedDataPages:c.qTreeDataPages):"S"===c.qMode?(h.extractor=EE,h.pages=c.qDataPages,h.hierarchy=GE):h.extractor=function(){return[]},h.fieldExtractor=function(t){return h.extractor({field:t},d,l,u)};var f="S"===c.qMode?function(t){return t.qElemNumber}:void 0,p="S"===c.qMode?function(t){return t.qNum}:void 0;(t=l.wrappedFields).push.apply(t,hE(NC("qDimensionInfo",c,i,"",wE({},h,{value:f,type:"dimension"})))),(e=l.wrappedFields).push.apply(e,hE(NC("qMeasureInfo",c,i,"",wE({},h,{value:p,type:"measure"})))),l.fields=l.wrappedFields.map((function(t){return t.instance}));var y=function t(e){e.forEach((function(e){l.allFields.push(e.instance),t(e.measures),t(e.attrDims),t(e.attrExps)}))};return y(l.wrappedFields),(a.virtualFields||[]).forEach((function(t){var e=d.field(t.from),n=AC(aE({meta:e.raw(),id:"".concat(i,"/").concat(t.key),sourceField:e,fieldExtractor:function(t){return h.extractor({field:t},d,l,u)},key:t.key,type:e.type(),localeInfo:h.localeInfo,value:e.value},t.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,hE(l.virtualFields)),d}var OC=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],IC=/\/qDimensionInfo(?:\/(\d+))?/,PC=/\/qMeasureInfo\/(\d+)/,DC=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,jC=/\/qAttrExprInfo\/(\d+)/,FC=/\/?qHyperCube/,zC=/\/?qTreeData/,qC=function(t){return"".concat(t.substr(0,t.indexOf("/qHyperCubeDef")+14))},LC=function(t){return"".concat(t.substr(0,t.indexOf("/qTreeDataDef")+13))};function BC(t,e){var n=t,r=-1,i=-1,s="",o=function(t){return t};FC.test(t)?(s="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),o=qC):zC.test(t)&&(s="".concat(n.substr(0,n.indexOf("qTreeData")+9)),o=LC);var a=!0;if(IC.test(t)&&(r=+IC.exec(t)[1]),PC.test(t)&&(i=+PC.exec(t)[1]),DC.test(t)){i=-1,r=0;var l=+DC.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),a=!1}if(jC.test(t)){var c=i;if(e){i=0;var u=zE(s,e);i+=(u.qMeasureInfo||[]).length,r>-1?(i=u.qDimensionInfo.slice(0,r).reduce((function(t,e){return t+e.qAttrExprInfo.length}),i),r=-1):(i=u.qDimensionInfo.reduce((function(t,e){return t+e.qAttrExprInfo.length}),i),i=u.qMeasureInfo.slice(0,c).reduce((function(t,e){return t+e.qAttrExprInfo.length}),i)),i+=+jC.exec(n)[1]}else r>-1?(r=-1,i=+jC.exec(n)[1]):i+=+jC.exec(n)[1]+1}return OC.forEach((function(t){var e,r=(2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done)&&(n.push(o.value),2!==n.length);r=!0);}catch(l){i=!0,s=l}finally{try{r||null==a.return||a.return()}finally{if(i)throw s}}return n}}(e)||dE(e,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());n=n.replace(r[0],r[1])})),a&&(n=o(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function HC(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,s=n.primarySource,o=[],a={},l=t.isActive(),c=!1;return t.brushes().forEach((function(t){var e=BC(t.id,r);if("range"===t.type&&e.measureIdx>-1&&e.dimensionIdx>-1){var n=t.brush.ranges();n.length&&(c=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:e.path,ranges:[]}),n.forEach((function(t){return a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:e.measureIdx,qDimensionIx:e.dimensionIdx,qRange:{qMin:t.min,qMax:t.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===t.type&&e.measureIdx>-1){var l=t.brush.ranges();l.length&&(c=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:e.path,ranges:[]}),l.forEach((function(t){return a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:e.measureIdx,qRange:{qMin:t.min,qMax:t.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===t.type&&e.dimensionIdx>-1){var u=t.brush.ranges();u.length&&(c=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:e.path,ranges:[]}),u.forEach((function(t){return a.selectHyperCubeContinuousRange.ranges.push({qDimIx:e.dimensionIdx,qRange:{qMin:t.min,qMax:t.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===t.type&&e.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var h=r.qHyperCube,d=h.qNoOfLeftDims,f=h.qEffectiveInterColumnSortOrder.indexOf(e.dimensionIdx);a.selectPivotCells||(a.selectPivotCells={path:e.path,cells:[]}),t.id!==s&&s||(t.brush.values().map((function(t){return+t})).filter((function(t){return!isNaN(t)})).forEach((0===d||f>=d)&&d>-1?function(t){a.selectPivotCells.cells.push({qType:"T",qCol:t,qRow:f-d})}:function(t){a.selectPivotCells.cells.push({qType:"L",qCol:e.dimensionIdx,qRow:t})}),c=!!a.selectPivotCells.cells.length)}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:e.path,cols:[]}),a.selectHyperCubeCells.cols.push(e.dimensionIdx),t.id!==s&&(s||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=t.brush.values().map((function(t){return+t})).filter((function(t){return!isNaN(t)})),c=!!a.selectHyperCubeCells.values.length);else{var p=t.brush.values().map((function(t){return+t})).filter((function(t){return!isNaN(t)}));c=!!p.length,o.push({params:[e.path,e.dimensionIdx,p,!1],method:"selectHyperCubeValues"})}}})),!c&&l?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(e=n.orMode)||void 0===e||e]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o)}function VC(t){RC.util=t.data("matrix").util,t.data("q",RC),t.formatter("q-number",mC),t.formatter("q-time",CC)}VC.qBrushHelper=HC,VC.selections=HC;const WC=["container"];tE.use(VC);let $C=(()=>{class t{ngAfterViewInit(){this.instance=tE.chart(Object.assign({element:this.containerEl.nativeElement},this.config))}ngOnChanges(t){console.log(t),this.instance&&this.instance.update(this.config)}onResized(t){var e,n;this.instance&&(null===(n=null===(e=this.instance)||void 0===e?void 0:e.update)||void 0===n||n.call(e))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=re({type:t,selectors:[["drayman-picasso-internal"]],viewQuery:function(t,e){var n,r,i,s,o,a;1&t&&(s=WC,o=!0,function(t,e,n,r,i,s){t.firstCreatePass&&function(t,e,n){null===t.queries&&(t.queries=new $s),t.queries.track(new Us(e,-1))}(t,new Ws(n,r,!1,i)),function(t,e){const n=new Bs;wr(t,e,n,n.destroy),null===e[19]&&(e[19]=new Vs),e[19].queries.push(new Hs(n))}(t,e)}(He(),Be(),s,o,a)),2&t&&function(t){const e=Be(),n=He(),r=Ze();Xe(r+1);const i=Zs(n,r);if(t.dirty&&Pe(e)===i.metadata.isStatic){if(null===i.matches)t.reset([]);else{const s=i.crossesNgTemplate?function t(e,n,r,i){const s=e.queries.getByIndex(r),o=s.matches;if(null!==o){const a=Ks(e,n,s,r);for(let e=0;e<o.length;e+=2){const r=o[e];if(r>0)i.push(a[e/2]);else{const s=o[e+1],a=n[-r];for(let e=pe;e<a.length;e++){const n=a[e];n[17]===n[3]&&t(n[1],n,s,i)}if(null!==a[9]){const e=a[9];for(let n=0;n<e.length;n++){const r=e[n];t(r[1],r,s,i)}}}}}return i}(n,e,r,[]):Ks(n,e,i,r);t.reset(s),t.notifyOnChanges()}return!0}return!1}((r=Be(),i=Ze(),n=r[19].queries[i].queryList))&&(e.containerEl=n.first)},inputs:{config:"config"},features:[we],decls:3,vars:0,consts:[[1,"picasso-wrapper",3,"resized"],[1,"picasso-container"],["container",""]],template:function(t,e){1&t&&(Li(0,"div",0),Vi("resized",(function(t){return e.onResized(t)})),Li(1,"div",1,2),Bi(),Bi())},directives:[Vu],styles:[".picasso-container[_ngcontent-%COMP%], .picasso-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.picasso-container[_ngcontent-%COMP%]{position:relative}"]}),t})(),UC=(()=>{class t{constructor(t){this.injector=t}ngDoBootstrap(){const t=function(t,e){const n=function(t,e){return e.get(Ki).resolveComponentFactory(t).inputs}(t,e.injector),r=e.strategyFactory||new xa(t,e.injector),i=function(t){const e={};return t.forEach(({propName:t,templateName:n})=>{var r;e[(r=n,r.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()))]=t}),e}(n);class s extends _a{constructor(t){super(),this.injector=t}get ngElementStrategy(){if(!this._ngElementStrategy){const t=this._ngElementStrategy=r.create(this.injector||e.injector),i=n.filter(({propName:t})=>this.hasOwnProperty(t)).map(({propName:t})=>[t,this[t]]);this instanceof s?i.forEach(([t])=>delete this[t]):wa(n,this),i.forEach(([e,n])=>t.setInputValue(e,n))}return this._ngElementStrategy}attributeChangedCallback(t,e,n,r){this.ngElementStrategy.setInputValue(i[t],n)}connectedCallback(){let t=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),t=!0),this.ngElementStrategy.connect(this),t||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(t=>{const e=function(t,e,n){if("function"!=typeof CustomEvent){const r=t.createEvent("CustomEvent");return r.initCustomEvent(e,!1,!1,n),r}return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:n})}(this.ownerDocument,t.name,t.value);this.dispatchEvent(e)})}}return s.observedAttributes=Object.keys(i),Object.defineProperty(s.prototype,"ngElementStrategy",{enumerable:!0}),wa(n,s.prototype),s}($C,{injector:this.injector});customElements.define("drayman-picasso",t)}}return t.\u0275mod=ae({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)(Wt(Ii))},providers:[{provide:ya,useClass:Au}],imports:[[Za,Tu,Lu,Wu]]}),t})();(function(){if($n)throw new Error("Cannot enable prod mode after platform setup.");Wn=!1})(),Qa().bootstrapModule(UC).catch(t=>console.error(t))},zn8P:function(t,e){function n(t){return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}))}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"}});
|